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>
This commit is contained in:
Findlay Feng 2019-07-31 10:14:57 +08:00 committed by Maureen Helm
commit 3bc7d9e50e
3 changed files with 15 additions and 0 deletions

View file

@ -68,6 +68,18 @@
#define STM32F1_PINMUX_FUNC_PB15_SPI2_MASTER_MOSI STM32_PIN_SPI_MASTER_MOSI #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_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_PA8_PWM1_CH1 STM32_PIN_PWM
#define STM32F1_PINMUX_FUNC_PF6_ADC3_IN4 STM32_CNF_IN_ANALOG #define STM32F1_PINMUX_FUNC_PF6_ADC3_IN4 STM32_CNF_IN_ANALOG

View file

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

View file

@ -150,6 +150,8 @@
#define DT_SPI_3_IRQ_PRI DT_ST_STM32_SPI_40003C00_IRQ_0_PRIORITY #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_NAME DT_ST_STM32_SPI_40003C00_LABEL
#define DT_SPI_3_IRQ DT_ST_STM32_SPI_40003C00_IRQ_0 #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_BASE_ADDRESS DT_ST_STM32_USB_40005C00_BASE_ADDRESS
#define DT_USB_IRQ DT_ST_STM32_USB_40005C00_IRQ_USB #define DT_USB_IRQ DT_ST_STM32_USB_40005C00_IRQ_USB