From f6753e35a5453f51dae8adda36165fa33d701848 Mon Sep 17 00:00:00 2001 From: Francois Ramu Date: Fri, 17 Mar 2023 16:39:28 +0100 Subject: [PATCH] boards: arm: stm32h573 disco kit has spi instance Enable the spi2 instance on the stm32h573i_dk board pin are available on the arduino connector Signed-off-by: Francois Ramu --- boards/arm/stm32h573i_dk/arduino_r3_connector.dtsi | 2 ++ boards/arm/stm32h573i_dk/doc/index.rst | 2 ++ boards/arm/stm32h573i_dk/stm32h573i_dk.dts | 7 +++++++ boards/arm/stm32h573i_dk/stm32h573i_dk.yaml | 1 + 4 files changed, 12 insertions(+) diff --git a/boards/arm/stm32h573i_dk/arduino_r3_connector.dtsi b/boards/arm/stm32h573i_dk/arduino_r3_connector.dtsi index 386d6ad603c085..87f3e6332dff33 100644 --- a/boards/arm/stm32h573i_dk/arduino_r3_connector.dtsi +++ b/boards/arm/stm32h573i_dk/arduino_r3_connector.dtsi @@ -34,3 +34,5 @@ <21 0 &gpiob 6 0>; /* D15 */ }; }; + +arduino_spi: &spi2 {}; diff --git a/boards/arm/stm32h573i_dk/doc/index.rst b/boards/arm/stm32h573i_dk/doc/index.rst index 17607489176d46..65b868eb12136b 100644 --- a/boards/arm/stm32h573i_dk/doc/index.rst +++ b/boards/arm/stm32h573i_dk/doc/index.rst @@ -183,6 +183,8 @@ hardware features: +-----------+------------+-------------------------------------+ | RTC | on-chip | Real Time Clock | +-----------+------------+-------------------------------------+ +| SPI | on-chip | spi bus | ++-----------+------------+-------------------------------------+ Other hardware features are not yet supported on this Zephyr port. diff --git a/boards/arm/stm32h573i_dk/stm32h573i_dk.dts b/boards/arm/stm32h573i_dk/stm32h573i_dk.dts index 7859f321254891..53a46809cc8b8a 100644 --- a/boards/arm/stm32h573i_dk/stm32h573i_dk.dts +++ b/boards/arm/stm32h573i_dk/stm32h573i_dk.dts @@ -183,3 +183,10 @@ pinctrl-names = "default"; status = "okay"; }; + +&spi2 { + pinctrl-0 = <&spi2_nss_pa3 &spi2_sck_pi1 + &spi2_miso_pi2 &spi2_mosi_pb15>; + pinctrl-names = "default"; + status = "okay"; +}; diff --git a/boards/arm/stm32h573i_dk/stm32h573i_dk.yaml b/boards/arm/stm32h573i_dk/stm32h573i_dk.yaml index 3eb2cb9719a0fc..97d1b7d50b402b 100644 --- a/boards/arm/stm32h573i_dk/stm32h573i_dk.yaml +++ b/boards/arm/stm32h573i_dk/stm32h573i_dk.yaml @@ -17,3 +17,4 @@ supported: - dac - pwm - counter + - spi