diff --git a/dts/arm/st/l1/stm32l1.dtsi b/dts/arm/st/l1/stm32l1.dtsi index 70e3ef18a08..f6ee21da68e 100644 --- a/dts/arm/st/l1/stm32l1.dtsi +++ b/dts/arm/st/l1/stm32l1.dtsi @@ -72,6 +72,28 @@ label= "I2C_2"; }; + spi1: spi@40013000 { + compatible = "st,stm32-spi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x40013000 0x400>; + clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00001000>; + interrupts = <35 0>; + status = "disabled"; + label = "SPI_1"; + }; + + spi2: spi@40003800 { + compatible = "st,stm32-spi"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x40003800 0x400>; + clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00004000>; + interrupts = <36 0>; + status = "disabled"; + label = "SPI_2"; + }; + usart1: serial@40013800 { compatible = "st,stm32-usart", "st,stm32-uart"; reg = <0x40013800 0x400>; diff --git a/soc/arm/st_stm32/stm32l1/dts_fixup.h b/soc/arm/st_stm32/stm32l1/dts_fixup.h index ade3e63fd62..6eb639a0d23 100644 --- a/soc/arm/st_stm32/stm32l1/dts_fixup.h +++ b/soc/arm/st_stm32/stm32l1/dts_fixup.h @@ -109,6 +109,20 @@ #define DT_I2C_2_CLOCK_BITS DT_ST_STM32_I2C_V1_40005800_CLOCK_BITS #define DT_I2C_2_CLOCK_BUS DT_ST_STM32_I2C_V1_40005800_CLOCK_BUS +#define DT_SPI_1_BASE_ADDRESS DT_ST_STM32_SPI_40013000_BASE_ADDRESS +#define DT_SPI_1_IRQ_PRI DT_ST_STM32_SPI_40013000_IRQ_0_PRIORITY +#define DT_SPI_1_NAME DT_ST_STM32_SPI_40013000_LABEL +#define DT_SPI_1_IRQ DT_ST_STM32_SPI_40013000_IRQ_0 +#define DT_SPI_1_CLOCK_BITS DT_ST_STM32_SPI_40013000_CLOCK_BITS +#define DT_SPI_1_CLOCK_BUS DT_ST_STM32_SPI_40013000_CLOCK_BUS + +#define DT_SPI_2_BASE_ADDRESS DT_ST_STM32_SPI_40003800_BASE_ADDRESS +#define DT_SPI_2_IRQ_PRI DT_ST_STM32_SPI_40003800_IRQ_0_PRIORITY +#define DT_SPI_2_NAME DT_ST_STM32_SPI_40003800_LABEL +#define DT_SPI_2_IRQ DT_ST_STM32_SPI_40003800_IRQ_0 +#define DT_SPI_2_CLOCK_BITS DT_ST_STM32_SPI_40003800_CLOCK_BITS +#define DT_SPI_2_CLOCK_BUS DT_ST_STM32_SPI_40003800_CLOCK_BUS + #define DT_WWDT_0_BASE_ADDRESS DT_INST_0_ST_STM32_WINDOW_WATCHDOG_BASE_ADDRESS #define DT_WWDT_0_NAME DT_INST_0_ST_STM32_WINDOW_WATCHDOG_LABEL #define DT_WWDT_0_IRQ DT_INST_0_ST_STM32_WINDOW_WATCHDOG_IRQ_0 diff --git a/soc/arm/st_stm32/stm32l1/soc.h b/soc/arm/st_stm32/stm32l1/soc.h index 1879c3599d5..94d10c9a08b 100644 --- a/soc/arm/st_stm32/stm32l1/soc.h +++ b/soc/arm/st_stm32/stm32l1/soc.h @@ -51,6 +51,10 @@ #include #endif +#ifdef CONFIG_SPI_STM32 +#include +#endif + #ifdef CONFIG_WWDG_STM32 #include #endif