Skip to content

Commit

Permalink
boards: st: stm32n6: enable spi for stm32n6 boards
Browse files Browse the repository at this point in the history
Enable SPI for Nucleo N657x0-Q and STM32N6570 DK boards.

Signed-off-by: Guillaume Gautier <[email protected]>
  • Loading branch information
gautierg-st authored and fabiobaltieri committed Feb 14, 2025
1 parent 7634406 commit 7950db5
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions boards/st/nucleo_n657x0_q/arduino_r3_connector.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@

arduino_serial: &usart3 {};
arduino_i2c: &i2c1 {};
arduino_spi: &spi5 {};
6 changes: 6 additions & 0 deletions boards/st/nucleo_n657x0_q/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ The Zephyr ``nucleo_n657x0_q`` board supports the following hardware features:
+-----------+------------+-------------------------------------+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
Expand Down Expand Up @@ -111,6 +113,10 @@ Default Zephyr Peripheral Mapping:
- I2C4_SDA : PE14
- LD1 : PO1
- LD2 : PG10
- SPI5_SCK : PE15
- SPI5_MOSI : PG2
- SPI5_MISO : PG1
- SPI5_NSS : PA3
- USART_1_TX : PE5
- USART_1_RX : PE6
- USART_3_TX : PD8
Expand Down
8 changes: 8 additions & 0 deletions boards/st/nucleo_n657x0_q/nucleo_n657x0_q_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@
status = "okay";
};

&spi5 {
clocks = <&rcc STM32_CLOCK(APB2, 20)>,
<&rcc STM32_SRC_CKPER SPI5_SEL(1)>;
pinctrl-0 = <&spi5_nss_pa3 &spi5_sck_pe15 &spi5_miso_pg1 &spi5_mosi_pg2>;
pinctrl-names = "default";
status = "okay";
};

&usart1 {
clocks = <&rcc STM32_CLOCK(APB2, 4)>,
<&rcc STM32_SRC_CKPER USART1_SEL(1)>;
Expand Down
2 changes: 2 additions & 0 deletions boards/st/nucleo_n657x0_q/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ flash: 1024
supported:
- arduino_i2c
- arduino_serial
- arduino_spi
- adc
- can
- dma
- i2c
- gpio
- spi
- uart
vendor: st
variants:
Expand Down
1 change: 1 addition & 0 deletions boards/st/stm32n6570_dk/arduino_r3_connector.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@

arduino_serial: &usart2 {};
arduino_i2c: &i2c1 {};
arduino_spi: &spi5 {};
6 changes: 6 additions & 0 deletions boards/st/stm32n6570_dk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ The Zephyr ``stm32n6570_dk`` board supports the following hardware features:
+-----------+------------+-------------------------------------+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| SPI | on-chip | spi |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+
Expand Down Expand Up @@ -115,6 +117,10 @@ Default Zephyr Peripheral Mapping:
- I2C4_SDA : PE14
- LD1 : PO1
- LD2 : PG10
- SPI5_SCK : PE15
- SPI5_MOSI : PG2
- SPI5_MISO : PH8
- SPI5_NSS : PA3
- USART_1_TX : PE5
- USART_1_RX : PE6
- USART_2_TX : PD5
Expand Down
8 changes: 8 additions & 0 deletions boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@
status = "okay";
};

&spi5 {
clocks = <&rcc STM32_CLOCK(APB2, 20)>,
<&rcc STM32_SRC_CKPER SPI5_SEL(1)>;
pinctrl-0 = <&spi5_nss_pa3 &spi5_sck_pe15 &spi5_miso_ph8 &spi5_mosi_pg2>;
pinctrl-names = "default";
status = "okay";
};

&usart1 {
clocks = <&rcc STM32_CLOCK(APB2, 4)>,
<&rcc STM32_SRC_CKPER USART1_SEL(1)>;
Expand Down
2 changes: 2 additions & 0 deletions boards/st/stm32n6570_dk/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ vendor: st
supported:
- arduino_i2c
- arduino_serial
- arduino_spi
- adc
- can
- dma
- i2c
- gpio
- spi
- uart
variants:
stm32n6570_dk/stm32n657xx:
Expand Down

0 comments on commit 7950db5

Please sign in to comment.