Skip to content

Commit 276dc8c

Browse files
CharlesDiasfabiobaltieri
authored andcommitted
boards: arm: fk7b0m1_vbt6: add support to external NOR Flash
Updates the DTS file by adding support for QSPI and SPI NOR Flash. Signed-off-by: Charles Dias <[email protected]>
1 parent c5b2a16 commit 276dc8c

File tree

2 files changed

+82
-30
lines changed

2 files changed

+82
-30
lines changed

boards/fanke/fk7b0m1_vbt6/doc/index.rst

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@ More information about STM32H7B0VB can be found here:
5757
Supported Features
5858
==================
5959

60-
The Zephyr nucleo_h723zg board configuration supports the following hardware
60+
The Zephyr fk7b0m1_vbt6 board configuration supports the following hardware
6161
features:
6262

6363
+-------------+------------+-------------------------------------+
6464
| Interface | Controller | Driver/Component |
6565
+=============+============+=====================================+
6666
| NVIC | on-chip | nested vector interrupt controller |
6767
+-------------+------------+-------------------------------------+
68+
| FLASH | on-chip | flash memory |
69+
+-------------+------------+-------------------------------------+
6870
| UART | on-chip | serial port |
6971
+-------------+------------+-------------------------------------+
7072
| PINMUX | on-chip | pinmux |
@@ -75,19 +77,20 @@ features:
7577
+-------------+------------+-------------------------------------+
7678
| Backup SRAM | on-chip | Backup SRAM |
7779
+-------------+------------+-------------------------------------+
80+
| SPI | on-chip | spi bus |
81+
+-------------+------------+-------------------------------------+
82+
| OCTOSPI | on-chip | octospi |
83+
+-------------+------------+-------------------------------------+
7884

7985
Other hardware features are not yet supported on this Zephyr port.
8086

8187
The default configuration per core can be found in
8288
:zephyr_file:`boards/fanke/fk7b0m1_vbt6/fk7b0m1_vbt6_defconfig`
8389

84-
Connections and IOs
85-
===================
86-
87-
Available pins:
88-
---------------
90+
Pin Mapping
91+
===========
8992

90-
Nucleo FK7B0M1-VBT6 board has 6 GPIO controllers. These controllers are responsible for pin muxing,
93+
FK7B0M1-VBT6 board has 5 GPIO controllers. These controllers are responsible for pin muxing,
9194
input/output, pull-up, etc.
9295

9396
.. figure:: img/fk7b0m1_vbt6_pins.webp
@@ -97,29 +100,17 @@ input/output, pull-up, etc.
97100

98101
FK7B0M1-VBT6 (Credit: FANKE Technology Co., Ltd)
99102

100-
LED
101-
---
102-
103-
- User LED (blue) = PC1
104-
105-
Push buttons
106-
-------------------------
107-
108-
- BOOT = SW1 = BOOT0
109-
- RESET = SW2 = NRST
110-
- User button = SW3 = PC13
103+
Default Zephyr Peripheral Mapping:
104+
----------------------------------
111105

112-
UART
113-
-----
106+
The FK7B0M1-VBT6 board is configured as follows
114107

115-
- TX device = USART1 PA9
116-
- RX device = USART1 PA10
117-
118-
USB
119-
---
120-
121-
- USB D- = PA11
122-
- USB D+ = PA12
108+
- UART_1 TX/RX : PA9/PA10 (available on the header pins)
109+
- User LED (blue) : PC1
110+
- User PB : PC13
111+
- SPI1 NCS/CLK/MISO/MOSI : PA15/PB3/PB4/PB5 (NOR Flash)
112+
- QuadSPI NCS/CLK/IO0/IO1/IO2/IO3 : PB6/PB2/PD11/PD12/PE2/PD13 (NOR Flash)
113+
- USB DM/DP : PA11/PA12
123114

124115
System Clock
125116
============
@@ -136,13 +127,19 @@ The Zephyr console output is assigned to UART1. The default communication settin
136127
Programming and Debugging
137128
*************************
138129

130+
Applications for the ``fk7b0m1_vbt6`` board configuration can be built and flashed in the usual
131+
way (see :ref:`build_an_application` and :ref:`application_run` for more details).
132+
133+
Flashing
134+
========
135+
139136
The FK7B0M1-VBT6 board does not include an on-board debugger. As a result, it requires
140137
an external debugger, such as ST-Link, for programming and debugging purposes.
141138

142139
The board provides header pins for the Serial Wire Debug (SWD) interface.
143140

144-
Flashing
145-
========
141+
Flashing an application to FK7B0M1-VBT6
142+
---------------------------------------
146143

147144
To begin, connect the ST-Link Debug Programmer to the FK7B0M1-VBT6 board using the SWD
148145
interface. Next, connect the ST-Link to your host computer via a USB port.

boards/fanke/fk7b0m1_vbt6/fk7b0m1_vbt6.dts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
aliases {
4242
led0 = &user_led;
4343
sw0 = &user_button;
44+
spi-flash0 = &w25q64jvssiq_spi;
4445
};
4546
};
4647

@@ -75,6 +76,60 @@
7576
d3ppre = <2>;
7677
};
7778

79+
&octospi1 {
80+
pinctrl-0 = <&octospim_p1_clk_pb2 &octospim_p1_ncs_pb6
81+
&octospim_p1_io0_pd11 &octospim_p1_io1_pd12
82+
&octospim_p1_io2_pe2 &octospim_p1_io3_pd13>;
83+
pinctrl-names = "default";
84+
status = "okay";
85+
86+
/* Winbond external flash */
87+
w25q64jvssiq_qspi: qspi-nor-flash@0 {
88+
compatible = "st,stm32-ospi-nor";
89+
reg = <0 DT_SIZE_M(8)>; /* 64 Mbits */
90+
ospi-max-frequency = <DT_FREQ_M(133)>;
91+
spi-bus-width = <OSPI_QUAD_MODE>;
92+
data-rate = <OSPI_STR_TRANSFER>;
93+
writeoc = "PP_1_1_4";
94+
status = "okay";
95+
partitions {
96+
compatible = "fixed-partitions";
97+
#address-cells = <1>;
98+
#size-cells = <1>;
99+
slot0_partition: partition@0 {
100+
reg = <0x00000000 DT_SIZE_M(8)>; /* 64 Mbits */
101+
};
102+
};
103+
};
104+
};
105+
106+
&spi6 {
107+
pinctrl-0 = <&spi6_sck_pb3 &spi6_miso_pb4 &spi6_mosi_pb5>;
108+
cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
109+
pinctrl-names = "default";
110+
status = "okay";
111+
w25q64jvssiq_spi: spi-nor-flash@0 {
112+
compatible = "jedec,spi-nor";
113+
reg = <0>;
114+
spi-max-frequency = <DT_FREQ_M(40)>;
115+
size = <DT_SIZE_M(64)>; /* 64 Mbits */
116+
status = "okay";
117+
jedec-id = [ef 40 17];
118+
has-dpd;
119+
t-enter-dpd = <3500>;
120+
t-exit-dpd = <3500>;
121+
partitions {
122+
compatible = "fixed-partitions";
123+
#address-cells = <1>;
124+
#size-cells = <1>;
125+
storage_partition: partition@0 {
126+
label = "storage";
127+
reg = <0x00000000 DT_SIZE_M(8)>; /* 64 Mbits */
128+
};
129+
};
130+
};
131+
};
132+
78133
&usart1 {
79134
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
80135
pinctrl-names = "default";

0 commit comments

Comments
 (0)