Skip to content
Permalink
Browse files

drivers: spi: Fix spi related files of stm32f1x

pinmux: Add the relevant definition of the spi3 pin
dts: Fix a bug, spi3 does not have a label
soc: Supplement spi3 related definition

Signed-off-by: Findlay Feng <i@fengch.me>
  • Loading branch information...
findlayfeng authored and MaureenHelm committed Jul 31, 2019
1 parent 479c1aa commit 3bc7d9e50e240cc20a553fda56d5ceb0cbbebb3f
Showing with 15 additions and 0 deletions.
  1. +12 −0 drivers/pinmux/stm32/pinmux_stm32f1.h
  2. +1 −0 dts/arm/st/f1/stm32f103Xe.dtsi
  3. +2 −0 soc/arm/st_stm32/stm32f1/dts_fixup.h
@@ -68,6 +68,18 @@
#define STM32F1_PINMUX_FUNC_PB15_SPI2_MASTER_MOSI STM32_PIN_SPI_MASTER_MOSI
#define STM32F1_PINMUX_FUNC_PB15_SPI2_SLAVE_MOSI STM32_PIN_SPI_SLAVE_MOSI

#define STM32F1_PINMUX_FUNC_PA15_SPI3_MASTER_NSS STM32_PIN_SPI_MASTER_NSS
#define STM32F1_PINMUX_FUNC_PA15_SPI3_MASTER_NSS_OE STM32_PIN_SPI_MASTER_NSS_OE
#define STM32F1_PINMUX_FUNC_PA15_SPI3_SLAVE_NSS STM32_PIN_SPI_SLAVE_NSS
#define STM32F1_PINMUX_FUNC_PB3_SPI3_MASTER_SCK STM32_PIN_SPI_MASTER_SCK | \
STM32_MODE_OUTPUT_MAX_50
#define STM32F1_PINMUX_FUNC_PB3_SPI3_SLAVE_SCK STM32_PIN_SPI_SLAVE_SCK | \
STM32_MODE_OUTPUT_MAX_50
#define STM32F1_PINMUX_FUNC_PB4_SPI3_MASTER_MISO STM32_PIN_SPI_MASTER_MISO
#define STM32F1_PINMUX_FUNC_PB4_SPI3_SLAVE_MISO STM32_PIN_SPI_SLAVE_MISO
#define STM32F1_PINMUX_FUNC_PB5_SPI3_MASTER_MOSI STM32_PIN_SPI_MASTER_MOSI
#define STM32F1_PINMUX_FUNC_PB5_SPI3_SLAVE_MOSI STM32_PIN_SPI_SLAVE_MOSI

#define STM32F1_PINMUX_FUNC_PA8_PWM1_CH1 STM32_PIN_PWM

#define STM32F1_PINMUX_FUNC_PF6_ADC3_IN4 STM32_CNF_IN_ANALOG
@@ -93,6 +93,7 @@
reg = <0X40003c00 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00008000>;
interrupts = <51 5>;
label = "SPI_3";
status = "disabled";
};

@@ -150,6 +150,8 @@
#define DT_SPI_3_IRQ_PRI DT_ST_STM32_SPI_40003C00_IRQ_0_PRIORITY
#define DT_SPI_3_NAME DT_ST_STM32_SPI_40003C00_LABEL
#define DT_SPI_3_IRQ DT_ST_STM32_SPI_40003C00_IRQ_0
#define DT_SPI_3_CLOCK_BITS DT_ST_STM32_SPI_40003C00_CLOCK_BITS
#define DT_SPI_3_CLOCK_BUS DT_ST_STM32_SPI_40003C00_CLOCK_BUS

#define DT_USB_BASE_ADDRESS DT_ST_STM32_USB_40005C00_BASE_ADDRESS
#define DT_USB_IRQ DT_ST_STM32_USB_40005C00_IRQ_USB

0 comments on commit 3bc7d9e

Please sign in to comment.
You can’t perform that action at this time.