Skip to content

Commit 1f43e7b

Browse files
Daniel Wagenknechtgalak
authored andcommitted
boards: arm: STM32 boards use DT to configure SPI
Configure SPI using DT for the following STM32 boards: 96b_neonkey nucleo_f091rc nucleo_f334r8 nucleo_f401re nucleo_l432kc nucleo_l476rg SPI nodes in <board>.dts file are populated matching boards existing pinmux default configuration and enabled in Kconfig.defconfig if SPI is enabled. For nucleo_l476rg board SPI2 and SPI3 nodes are not yet added, because of missing pinmux defines. Fixes #5836 Signed-off-by: Daniel Wagenknecht <[email protected]>
1 parent 44bfd32 commit 1f43e7b

File tree

12 files changed

+98
-0
lines changed

12 files changed

+98
-0
lines changed

boards/arm/96b_neonkey/96b_neonkey.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@
3737
&i2c3 {
3838
clock-frequency = <I2C_BITRATE_FAST>;
3939
};
40+
41+
&spi1 {
42+
status = "ok";
43+
};

boards/arm/96b_neonkey/Kconfig.defconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,14 @@ config UART_STM32_PORT_1
1717

1818
endif # UART_CONSOLE
1919

20+
if SPI
21+
22+
config SPI_1
23+
default y
24+
25+
config SPI_STM32_INTERRUPT
26+
default y
27+
28+
endif # SPI
29+
2030
endif # BOARD_96B_NEONKEY

boards/arm/nucleo_f091rc/Kconfig.defconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,17 @@ config I2C_2
2727

2828
endif # I2C
2929

30+
if SPI
31+
32+
config SPI_1
33+
default y
34+
35+
config SPI_2
36+
default y
37+
38+
config SPI_STM32_INTERRUPT
39+
default y
40+
41+
endif # SPI
42+
3043
endif # BOARD_NUCLEO_F091RC

boards/arm/nucleo_f091rc/nucleo_f091rc.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@
4040
status = "ok";
4141
clock-frequency = <I2C_BITRATE_FAST>;
4242
};
43+
44+
&spi1 {
45+
status = "ok";
46+
};
47+
48+
&spi2 {
49+
status = "ok";
50+
};

boards/arm/nucleo_f334r8/Kconfig.defconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,14 @@ config UART_STM32_PORT_2
1717

1818
endif # UART_CONSOLE
1919

20+
if SPI
21+
22+
config SPI_1
23+
default y
24+
25+
config SPI_STM32_INTERRUPT
26+
default y
27+
28+
endif # SPI
29+
2030
endif # BOARD_NUCLEO_F334R8

boards/arm/nucleo_f334r8/nucleo_f334r8.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@
3737
pinctrl-0 = <&usart3_pins_a>;
3838
pinctrl-names = "default";
3939
};
40+
41+
&spi1 {
42+
status = "ok";
43+
};

boards/arm/nucleo_f401re/Kconfig.defconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ config I2C_1
2424

2525
endif # I2C
2626

27+
if SPI
28+
29+
config SPI_1
30+
default y
31+
32+
config SPI_2
33+
default y
34+
35+
config SPI_STM32_INTERRUPT
36+
default y
37+
38+
endif # SPI
39+
2740
if PWM
2841

2942
config PWM_STM32_2

boards/arm/nucleo_f401re/nucleo_f401re.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737
clock-frequency = <I2C_BITRATE_FAST>;
3838
};
3939

40+
&spi1 {
41+
status = "ok";
42+
};
43+
44+
&spi2 {
45+
status = "ok";
46+
};
47+
4048
&flash0 {
4149
partitions {
4250
/*

boards/arm/nucleo_l432kc/Kconfig.defconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,14 @@ config PWM_STM32_2
2525

2626
endif # PWM
2727

28+
if SPI
29+
30+
config SPI_1
31+
default y
32+
33+
config SPI_STM32_INTERRUPT
34+
default y
35+
36+
endif # SPI
37+
2838
endif # BOARD_NUCLEO_L432KC

boards/arm/nucleo_l432kc/nucleo_l432kc.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@
3030
pinctrl-names = "default";
3131
status = "ok";
3232
};
33+
34+
&spi1 {
35+
status = "ok";
36+
};

0 commit comments

Comments
 (0)