drivers: pwm: stm32: remove remaining Kconfig instances
Following other drivers, Kconfig based instances are now entirely removed. In order to do this change, PWM nodes in board DT files have been given a pwm{N} label so that both: - DT API checks such as #if DT_HAS_NODE(DT_NODELABEL(pwmN)) can be used (N being PWM instance number). - DT references can be written as pwms = <&pwmN x y>; instead of pwms = <&{/soc/timers@XXXXXXXX/pwm} x y>; This approach is also used on the Linux Kernel. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
f90f5d8da8
commit
c6b1375400
94 changed files with 115 additions and 467 deletions
|
@ -107,7 +107,7 @@
|
|||
&timers3 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm3: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
@ -115,7 +115,7 @@
|
|||
&timers4 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm4: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
@ -123,7 +123,7 @@
|
|||
&timers9 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm9: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -32,17 +32,4 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
if PWM
|
||||
|
||||
config PWM_STM32_3
|
||||
default y
|
||||
|
||||
config PWM_STM32_4
|
||||
default y
|
||||
|
||||
config PWM_STM32_9
|
||||
default y
|
||||
|
||||
endif # PWM
|
||||
|
||||
endif # BOARD_96B_STM32_SENSOR_MEZ
|
||||
|
|
|
@ -72,18 +72,18 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PC7, STM32F4_PINMUX_FUNC_PC7_I2S2_CK},
|
||||
{STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_I2S2_SD},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_3
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm3))
|
||||
{ STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_PWM3_CH1 },
|
||||
{ STM32_PIN_PC8, STM32F4_PINMUX_FUNC_PC8_PWM3_CH3 },
|
||||
#endif /* CONFIG_PWM_STM32_3 */
|
||||
#ifdef CONFIG_PWM_STM32_4
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm4))
|
||||
{ STM32_PIN_PD14, STM32F4_PINMUX_FUNC_PD14_PWM4_CH3 },
|
||||
{ STM32_PIN_PD15, STM32F4_PINMUX_FUNC_PD15_PWM4_CH4 },
|
||||
#endif /* CONFIG_PWM_STM32_4 */
|
||||
#ifdef CONFIG_PWM_STM32_9
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm9))
|
||||
{ STM32_PIN_PE5, STM32F4_PINMUX_FUNC_PE5_PWM9_CH1 },
|
||||
{ STM32_PIN_PE6, STM32F4_PINMUX_FUNC_PE6_PWM9_CH2 },
|
||||
#endif /* CONFIG_PWM_STM32_9 */
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -8,10 +8,6 @@ if BOARD_BLACK_F407VE
|
|||
config BOARD
|
||||
default "black_f407ve"
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
|
||||
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
|
||||
|
|
|
@ -8,10 +8,6 @@ if BOARD_BLACK_F407ZG_PRO
|
|||
config BOARD
|
||||
default "black_f407zg_pro"
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
|
||||
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
|
||||
|
|
|
@ -17,10 +17,6 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
choice LIS3MDL_TRIGGER_MODE
|
||||
default LIS3MDL_TRIGGER_NONE
|
||||
endchoice
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -47,9 +47,9 @@ static const struct pin_config pinconf[] = {
|
|||
STM32_OSPEEDR_VERY_HIGH_SPEED},
|
||||
{STM32_PIN_PC12, STM32L4X_PINMUX_FUNC_PC12_SPI3_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA15, STM32L4X_PINMUX_FUNC_PA15_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA10, STM32L4X_PINMUX_FUNC_PA10_OTG_FS_ID},
|
||||
{STM32_PIN_PA11, STM32L4X_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
|
|
|
@ -12,10 +12,6 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_STM32_3
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config USB_DC_STM32
|
||||
default y
|
||||
depends on USB
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
&timers3 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm3: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -30,9 +30,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO},
|
||||
{STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_3
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm3))
|
||||
{STM32_PIN_PB4, STM32F4_PINMUX_FUNC_PB4_PWM3_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_3 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
|
||||
|
|
|
@ -8,8 +8,4 @@ if BOARD_NUCLEO_F103RB
|
|||
config BOARD
|
||||
default "nucleo_f103rb"
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F103RB
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,9 +26,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX},
|
||||
{STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS},
|
||||
|
|
|
@ -8,9 +8,4 @@ if BOARD_NUCLEO_F302R8
|
|||
config BOARD
|
||||
default "nucleo_f302r8"
|
||||
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F302R8
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -38,9 +38,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB14, STM32F3_PINMUX_FUNC_PB14_SPI2_MISO},
|
||||
{STM32_PIN_PB15, STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F3_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(adc1))
|
||||
{STM32_PIN_PA0, STM32F3_PINMUX_FUNC_PA0_ADC1_IN1},
|
||||
#endif
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -38,9 +38,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA6, STM32F3_PINMUX_FUNC_PA6_SPI1_MISO},
|
||||
{STM32_PIN_PA7, STM32F3_PINMUX_FUNC_PA7_SPI1_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{STM32_PIN_PA8, STM32F3_PINMUX_FUNC_PA8_PWM1_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -13,10 +13,6 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
if WATCHDOG
|
||||
|
||||
config WWDG_STM32
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
|
||||
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(i2c1))
|
||||
{STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||
{STM32_PIN_PB9, STM32F4_PINMUX_FUNC_PB9_I2C1_SDA},
|
||||
|
|
|
@ -21,8 +21,4 @@ config USB_DEVICE_NETWORK_ECM
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F412ZG
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX},
|
||||
{STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
|
||||
|
|
|
@ -21,8 +21,4 @@ config USB_DEVICE_NETWORK_ECM
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F413ZH
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX},
|
||||
{STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
|
||||
|
|
|
@ -18,9 +18,4 @@ config ETH_STM32_HAL
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F429ZI
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PG14, STM32F4_PINMUX_FUNC_PG14_USART6_TX},
|
||||
{STM32_PIN_PG9, STM32F4_PINMUX_FUNC_PG9_USART6_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{STM32_PIN_PE13, STM32F4_PINMUX_FUNC_PE13_PWM1_CH3},
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#ifdef CONFIG_ETH_STM32_HAL
|
||||
{STM32_PIN_PC1, STM32F4_PINMUX_FUNC_PC1_ETH},
|
||||
{STM32_PIN_PC4, STM32F4_PINMUX_FUNC_PC4_ETH},
|
||||
|
|
|
@ -18,9 +18,4 @@ config ETH_STM32_HAL
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F746ZG
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -53,9 +53,9 @@ static const struct pin_config pinconf[] = {
|
|||
{ STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL },
|
||||
{ STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA },
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{ STM32_PIN_PE13, STM32F7_PINMUX_FUNC_PE13_PWM1_CH3 },
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{ STM32_PIN_PA4, STM32F7_PINMUX_FUNC_PA4_SPI1_NSS },
|
||||
|
|
|
@ -18,9 +18,4 @@ config ETH_STM32_HAL
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F756ZG
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -53,9 +53,9 @@ static const struct pin_config pinconf[] = {
|
|||
{ STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL },
|
||||
{ STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA },
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{ STM32_PIN_PE13, STM32F7_PINMUX_FUNC_PE13_PWM1_CH3 },
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{ STM32_PIN_PA4, STM32F7_PINMUX_FUNC_PA4_SPI1_NSS },
|
||||
|
|
|
@ -18,9 +18,4 @@ config ETH_STM32_HAL
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_F767ZI
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -53,9 +53,9 @@ static const struct pin_config pinconf[] = {
|
|||
{ STM32_PIN_PB8, STM32F7_PINMUX_FUNC_PB8_I2C1_SCL },
|
||||
{ STM32_PIN_PB9, STM32F7_PINMUX_FUNC_PB9_I2C1_SDA },
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{ STM32_PIN_PE13, STM32F7_PINMUX_FUNC_PE13_PWM1_CH3 },
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{ STM32_PIN_PA4, STM32F7_PINMUX_FUNC_PA4_SPI1_NSS },
|
||||
|
|
|
@ -8,10 +8,6 @@ if BOARD_NUCLEO_G431RB
|
|||
config BOARD
|
||||
default "nucleo_g431rb"
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
compatible = "pwm-leds";
|
||||
|
||||
green_pwm_led: green_pwm_led {
|
||||
pwms = <&{/soc/timers@40000000/pwm} 1 4>;
|
||||
pwms = <&pwm2 1 4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,9 +26,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB8, STM32G4X_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||
{STM32_PIN_PB9, STM32G4X_PINMUX_FUNC_PB9_I2C1_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA5, STM32G4X_PINMUX_FUNC_PA5_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
/* SPI1 on the Arduino connectors pins A2, D3, D11, D12 */
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
|
|
|
@ -8,11 +8,6 @@ if BOARD_NUCLEO_G474RE
|
|||
config BOARD
|
||||
default "nucleo_g474re"
|
||||
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
compatible = "pwm-leds";
|
||||
|
||||
green_pwm_led: green_pwm_led {
|
||||
pwms = <&{/soc/timers@40000000/pwm} 1 4>;
|
||||
pwms = <&pwm2 1 4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,9 +26,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB8, STM32G4X_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||
{STM32_PIN_PB9, STM32G4X_PINMUX_FUNC_PB9_I2C1_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA5, STM32G4X_PINMUX_FUNC_PA5_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
/* SPI1 on the Arduino connectors pins A2, D3, D11, D12 */
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
|
|
|
@ -8,9 +8,4 @@ if BOARD_NUCLEO_H743ZI
|
|||
config BOARD
|
||||
default "nucleo_h743zi"
|
||||
|
||||
|
||||
config PWM_STM32_12
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_H743ZI
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
compatible = "pwm-leds";
|
||||
|
||||
red_pwm_led: red_pwm_led {
|
||||
pwms = <&{/soc/timers@40001800/pwm} 1 4>;
|
||||
pwms = <&pwm12 1 4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
|||
&timers12 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm12: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{ STM32_PIN_PB8, STM32H7_PINMUX_FUNC_PB8_I2C1_SCL },
|
||||
{ STM32_PIN_PB9, STM32H7_PINMUX_FUNC_PB9_I2C1_SDA },
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_12
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm12))
|
||||
{ STM32_PIN_PB14, STM32H7_PINMUX_FUNC_PB14_PWM12_CH1 }
|
||||
#endif /* CONFIG_PWM_STM32_12 */
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -9,10 +9,6 @@ if BOARD_NUCLEO_L432KC
|
|||
config BOARD
|
||||
default "nucleo_l432kc"
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -27,9 +27,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL},
|
||||
{STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{STM32_PIN_PA4, STM32L4X_PINMUX_FUNC_PA4_SPI1_NSS},
|
||||
|
|
|
@ -9,10 +9,6 @@ if BOARD_NUCLEO_L452RE
|
|||
config BOARD
|
||||
default "nucleo_l452re"
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config SPI_STM32_INTERRUPT
|
||||
default y
|
||||
depends on SPI
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,9 +26,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL},
|
||||
{STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{STM32_PIN_PA4, STM32L4X_PINMUX_FUNC_PA4_SPI1_NSS},
|
||||
|
|
|
@ -13,9 +13,4 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_NUCLEO_L476RG
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -35,9 +35,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PC0, STM32L4X_PINMUX_FUNC_PC0_I2C3_SCL},
|
||||
{STM32_PIN_PC1, STM32L4X_PINMUX_FUNC_PC1_I2C3_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
/* SPI1 on the Arduino connectors pins A2, D3, D12, D11 */
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
|
|
|
@ -12,22 +12,6 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
if PWM
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
|
||||
config PWM_STM32_4
|
||||
default y
|
||||
|
||||
config PWM_STM32_15
|
||||
default y
|
||||
|
||||
endif # PWM
|
||||
|
||||
if WATCHDOG
|
||||
|
||||
config WWDG_STM32
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
compatible = "pwm-leds";
|
||||
|
||||
red_pwm_led: red_pwm_led {
|
||||
pwms = <&{/soc/timers@40014000/pwm} 1 4>;
|
||||
pwms = <&pwm15 1 4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
@ -86,7 +86,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
@ -94,7 +94,7 @@
|
|||
&timers4 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm4: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
@ -102,7 +102,7 @@
|
|||
&timers15 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm15: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -31,17 +31,17 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA6, STM32L4X_PINMUX_FUNC_PA6_SPI1_MISO},
|
||||
{STM32_PIN_PA7, STM32L4X_PINMUX_FUNC_PA7_SPI1_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{STM32_PIN_PE9, STM32L4X_PINMUX_FUNC_PE9_PWM1_CH1},
|
||||
{STM32_PIN_PE11, STM32L4X_PINMUX_FUNC_PE11_PWM1_CH2},
|
||||
{STM32_PIN_PE13, STM32L4X_PINMUX_FUNC_PE13_PWM1_CH3},
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#ifdef CONFIG_PWM_STM32_15
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm15))
|
||||
{STM32_PIN_PB14, STM32L4X_PINMUX_FUNC_PB14_PWM15_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_15 */
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -17,10 +17,6 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
if NETWORKING
|
||||
|
||||
config USB
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -34,9 +34,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB6, STM32L4X_PINMUX_FUNC_PB6_I2C1_SCL},
|
||||
{STM32_PIN_PB7, STM32L4X_PINMUX_FUNC_PB7_I2C1_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
/* SPI1 on the Arduino connectors pins A2, D3, D12, D11 */
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
&timers2 {
|
||||
status = "okay";
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -38,9 +38,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA6, STM32WBX_PINMUX_FUNC_PA6_SPI1_MISO},
|
||||
{STM32_PIN_PA7, STM32WBX_PINMUX_FUNC_PA7_SPI1_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32WBX_PINMUX_FUNC_PA0_TMR2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(adc1))
|
||||
{STM32_PIN_PC2, STM32WBX_PINMUX_FUNC_PC2_ADC1_IN3},
|
||||
#endif
|
||||
|
|
|
@ -12,8 +12,4 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_OLIMEXINO_STM32
|
||||
|
|
|
@ -98,7 +98,7 @@ uext_serial: &usart1 {};
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -51,9 +51,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB14, STM32F1_PINMUX_FUNC_PB14_SPI2_MASTER_MISO},
|
||||
{STM32_PIN_PB15, STM32F1_PINMUX_FUNC_PB15_SPI2_MASTER_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F1_PINMUX_FUNC_PA11_USB_DM},
|
||||
{STM32_PIN_PA12, STM32F1_PINMUX_FUNC_PA12_USB_DP},
|
||||
|
|
|
@ -8,9 +8,4 @@ if BOARD_STEVAL_FCU001V1
|
|||
config BOARD
|
||||
default "steval_fcu001v1"
|
||||
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_STEVAL_FCU001V1
|
||||
|
|
|
@ -18,9 +18,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA9, STM32F4_PINMUX_FUNC_PA9_USART1_TX},
|
||||
{STM32_PIN_PA10, STM32F4_PINMUX_FUNC_PA10_USART1_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(i2c2))
|
||||
{STM32_PIN_PB3, STM32F4_PINMUX_FUNC_PB3_I2C2_SDA},
|
||||
{STM32_PIN_PB10, STM32F4_PINMUX_FUNC_PB10_I2C2_SCL},
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,11 +9,4 @@ config BOARD
|
|||
default "stm32_min_dev_blue" if BOARD_STM32_MIN_DEV_BLUE
|
||||
default "stm32_min_dev_black" if BOARD_STM32_MIN_DEV_BLACK
|
||||
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
|
||||
|
||||
endif # BOARD_STM32_MIN_DEV_BLUE || BOARD_STM32_MIN_DEV_BLACK
|
||||
|
|
|
@ -34,9 +34,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_I2C2_SCL},
|
||||
{STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_I2C2_SDA},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS_OE},
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -8,8 +8,4 @@ if BOARD_STM32F411E_DISCO
|
|||
config BOARD
|
||||
default "stm32f411e_disco"
|
||||
|
||||
config PWM_STM32_4
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_STM32F411E_DISCO
|
||||
|
|
|
@ -18,9 +18,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
|
||||
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_4
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm4))
|
||||
{STM32_PIN_PD12, STM32F4_PINMUX_FUNC_PD12_PWM4_CH1 },
|
||||
#endif /* CONFIG_PWM_STM32_4 */
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
green_pwm_led: green_pwm_led {
|
||||
pwms = <&{/soc/timers@40000800/pwm} 1 0>;
|
||||
pwms = <&pwm4 1 0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
&timers4 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm4: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -8,8 +8,4 @@ if BOARD_STM32F4_DISCO
|
|||
config BOARD
|
||||
default "stm32f4_disco"
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_STM32F4_DISCO
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA2, STM32F4_PINMUX_FUNC_PA2_USART2_TX},
|
||||
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
#ifdef CONFIG_USB_DC_STM32
|
||||
{STM32_PIN_PA11, STM32F4_PINMUX_FUNC_PA11_OTG_FS_DM},
|
||||
{STM32_PIN_PA12, STM32F4_PINMUX_FUNC_PA12_OTG_FS_DP},
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -18,11 +18,6 @@ config ETH_STM32_HAL
|
|||
|
||||
endif # NETWORKING
|
||||
|
||||
|
||||
config PWM_STM32_1
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
config I2C
|
||||
default y if KSCAN
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX},
|
||||
{STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_3
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm3))
|
||||
{STM32_PIN_PB4, STM32F7_PINMUX_FUNC_PB4_PWM3_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_3 */
|
||||
#endif
|
||||
#ifdef CONFIG_ETH_STM32_HAL
|
||||
{STM32_PIN_PC1, STM32F7_PINMUX_FUNC_PC1_ETH},
|
||||
{STM32_PIN_PC4, STM32F7_PINMUX_FUNC_PC4_ETH},
|
||||
|
|
|
@ -84,7 +84,7 @@ arduino_serial: &usart6 {};
|
|||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -13,8 +13,4 @@ config SPI_STM32_INTERRUPT
|
|||
default y
|
||||
depends on SPI
|
||||
|
||||
config PWM_STM32_2
|
||||
default y
|
||||
depends on PWM
|
||||
|
||||
endif # BOARD_STM32L496G_DISCO
|
||||
|
|
|
@ -36,9 +36,9 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PB4, STM32L4X_PINMUX_FUNC_PB4_SPI1_MISO},
|
||||
{STM32_PIN_PB5, STM32L4X_PINMUX_FUNC_PB5_SPI1_MOSI},
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_2
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm2))
|
||||
{STM32_PIN_PA0, STM32L4X_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
#endif /* CONFIG_PWM_STM32_2 */
|
||||
#endif
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
|
|
|
@ -78,7 +78,7 @@ arduino_serial: &lpuart1 {};
|
|||
&timers2 {
|
||||
status = "okay";
|
||||
|
||||
pwm {
|
||||
pwm2: pwm {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -26,9 +26,9 @@ static const struct pin_config pinconf[] = {
|
|||
{ STM32_PIN_PB10, STM32F1_PINMUX_FUNC_PB10_USART3_TX },
|
||||
{ STM32_PIN_PB11, STM32F1_PINMUX_FUNC_PB11_USART3_RX },
|
||||
#endif
|
||||
#ifdef CONFIG_PWM_STM32_1
|
||||
#if DT_HAS_NODE(DT_NODELABEL(pwm1))
|
||||
{ STM32_PIN_PA8, STM32F1_PINMUX_FUNC_PA8_PWM1_CH1 },
|
||||
#endif /* CONFIG_PWM_STM32_1 */
|
||||
#endif
|
||||
#if DT_HAS_NODE(DT_NODELABEL(spi1))
|
||||
#ifdef CONFIG_SPI_STM32_USE_HW_SS
|
||||
{ STM32_PIN_PA4, STM32F1_PINMUX_FUNC_PA4_SPI1_MASTER_NSS },
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2016 Linaro Limited.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
menuconfig PWM_STM32
|
||||
config PWM_STM32
|
||||
bool "STM32 MCU PWM driver"
|
||||
depends on SOC_FAMILY_STM32
|
||||
select USE_STM32_HAL_TIM
|
||||
|
@ -11,127 +11,3 @@ menuconfig PWM_STM32
|
|||
This option enables the PWM driver for STM32 family of
|
||||
processors. Say y if you wish to use PWM port on STM32
|
||||
MCU.
|
||||
|
||||
if PWM_STM32
|
||||
|
||||
config PWM_STM32_1
|
||||
bool "STM32 PWM 1 Output"
|
||||
help
|
||||
Enable output for PWM1 in the driver. Say y here
|
||||
if you want to use PWM1 output.
|
||||
|
||||
config PWM_STM32_2
|
||||
bool "STM32 PWM 2 Output"
|
||||
help
|
||||
Enable output for PWM2 in the driver. Say y here
|
||||
if you want to use PWM2 output.
|
||||
|
||||
config PWM_STM32_3
|
||||
bool "STM32 PWM 3 Output"
|
||||
help
|
||||
Enable output for PWM3 in the driver. Say y here
|
||||
if you want to use PWM3 output.
|
||||
|
||||
config PWM_STM32_4
|
||||
bool "STM32 PWM 4 Output"
|
||||
help
|
||||
Enable output for PWM4 in the driver. Say y here
|
||||
if you want to use PWM4 output.
|
||||
|
||||
config PWM_STM32_5
|
||||
bool "STM32 PWM 5 Output"
|
||||
help
|
||||
Enable output for PWM5 in the driver. Say y here
|
||||
if you want to use PWM5 output.
|
||||
|
||||
config PWM_STM32_6
|
||||
bool "STM32 PWM 6 Output"
|
||||
help
|
||||
Enable output for PWM6 in the driver. Say y here
|
||||
if you want to use PWM6 output.
|
||||
|
||||
config PWM_STM32_7
|
||||
bool "STM32 PWM 7 Output"
|
||||
help
|
||||
Enable output for PWM7 in the driver. Say y here
|
||||
if you want to use PWM7 output.
|
||||
|
||||
config PWM_STM32_8
|
||||
bool "STM32 PWM 8 Output"
|
||||
help
|
||||
Enable output for PWM8 in the driver. Say y here
|
||||
if you want to use PWM8 output.
|
||||
|
||||
config PWM_STM32_9
|
||||
bool "STM32 PWM 9 Output"
|
||||
help
|
||||
Enable output for PWM9 in the driver. Say y here
|
||||
if you want to use PWM9 output.
|
||||
|
||||
config PWM_STM32_10
|
||||
bool "STM32 PWM 10 Output"
|
||||
help
|
||||
Enable output for PWM10 in the driver. Say y here
|
||||
if you want to use PWM10 output.
|
||||
|
||||
config PWM_STM32_11
|
||||
bool "STM32 PWM 11 Output"
|
||||
help
|
||||
Enable output for PWM11 in the driver. Say y here
|
||||
if you want to use PWM11 output.
|
||||
|
||||
config PWM_STM32_12
|
||||
bool "STM32 PWM 12 Output"
|
||||
help
|
||||
Enable output for PWM12 in the driver. Say y here
|
||||
if you want to use PWM12 output.
|
||||
|
||||
config PWM_STM32_13
|
||||
bool "STM32 PWM 13 Output"
|
||||
help
|
||||
Enable output for PWM13 in the driver. Say y here
|
||||
if you want to use PWM13 output.
|
||||
|
||||
config PWM_STM32_14
|
||||
bool "STM32 PWM 14 Output"
|
||||
help
|
||||
Enable output for PWM14 in the driver. Say y here
|
||||
if you want to use PWM14 output.
|
||||
|
||||
config PWM_STM32_15
|
||||
bool "STM32 PWM 15 Output"
|
||||
help
|
||||
Enable output for PWM15 in the driver. Say y here
|
||||
if you want to use PWM15 output.
|
||||
|
||||
config PWM_STM32_16
|
||||
bool "STM32 PWM 16 Output"
|
||||
help
|
||||
Enable output for PWM16 in the driver. Say y here
|
||||
if you want to use PWM16 output.
|
||||
|
||||
config PWM_STM32_17
|
||||
bool "STM32 PWM 17 Output"
|
||||
help
|
||||
Enable output for PWM17 in the driver. Say y here
|
||||
if you want to use PWM17 output.
|
||||
|
||||
config PWM_STM32_18
|
||||
bool "STM32 PWM 18 Output"
|
||||
help
|
||||
Enable output for PWM18 in the driver. Say y here
|
||||
if you want to use PWM18 output.
|
||||
|
||||
config PWM_STM32_19
|
||||
bool "STM32 PWM 19 Output"
|
||||
help
|
||||
Enable output for PWM19 in the driver. Say y here
|
||||
if you want to use PWM19 output.
|
||||
|
||||
config PWM_STM32_20
|
||||
bool "STM32 PWM 20 Output"
|
||||
help
|
||||
Enable output for PWM20 in the driver. Say y here
|
||||
if you want to use PWM20 output.
|
||||
|
||||
endif # PWM_STM32
|
||||
|
|
|
@ -275,82 +275,4 @@ static int pwm_stm32_init(struct device *dev)
|
|||
POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,\
|
||||
&pwm_stm32_drv_api_funcs)
|
||||
|
||||
#if DT_HAS_DRV_INST(0)
|
||||
PWM_DEVICE_INIT_STM32(0);
|
||||
#endif /* DT_HAS_DRV_INST(0) */
|
||||
|
||||
#if DT_HAS_DRV_INST(1)
|
||||
PWM_DEVICE_INIT_STM32(1);
|
||||
#endif /* DT_HAS_DRV_INST(1) */
|
||||
|
||||
#if DT_HAS_DRV_INST(2)
|
||||
PWM_DEVICE_INIT_STM32(2);
|
||||
#endif /* DT_HAS_DRV_INST(2) */
|
||||
|
||||
#if DT_HAS_DRV_INST(3)
|
||||
PWM_DEVICE_INIT_STM32(3);
|
||||
#endif /* DT_HAS_DRV_INST(3) */
|
||||
|
||||
#if DT_HAS_DRV_INST(4)
|
||||
PWM_DEVICE_INIT_STM32(4);
|
||||
#endif /* DT_HAS_DRV_INST(4) */
|
||||
|
||||
#if DT_HAS_DRV_INST(5)
|
||||
PWM_DEVICE_INIT_STM32(5);
|
||||
#endif /* DT_HAS_DRV_INST(5) */
|
||||
|
||||
#if DT_HAS_DRV_INST(6)
|
||||
PWM_DEVICE_INIT_STM32(6);
|
||||
#endif /* DT_HAS_DRV_INST(6) */
|
||||
|
||||
#if DT_HAS_DRV_INST(7)
|
||||
PWM_DEVICE_INIT_STM32(7);
|
||||
#endif /* DT_HAS_DRV_INST(7) */
|
||||
|
||||
#if DT_HAS_DRV_INST(8)
|
||||
PWM_DEVICE_INIT_STM32(8);
|
||||
#endif /* DT_HAS_DRV_INST(8) */
|
||||
|
||||
#if DT_HAS_DRV_INST(9)
|
||||
PWM_DEVICE_INIT_STM32(9);
|
||||
#endif /* DT_HAS_DRV_INST(9) */
|
||||
|
||||
#if DT_HAS_DRV_INST(10)
|
||||
PWM_DEVICE_INIT_STM32(10);
|
||||
#endif /* DT_HAS_DRV_INST(10) */
|
||||
|
||||
#if DT_HAS_DRV_INST(11)
|
||||
PWM_DEVICE_INIT_STM32(11);
|
||||
#endif /* DT_HAS_DRV_INST(11) */
|
||||
|
||||
#if DT_HAS_DRV_INST(12)
|
||||
PWM_DEVICE_INIT_STM32(12);
|
||||
#endif /* DT_HAS_DRV_INST(12) */
|
||||
|
||||
#if DT_HAS_DRV_INST(13)
|
||||
PWM_DEVICE_INIT_STM32(13);
|
||||
#endif /* DT_HAS_DRV_INST(13) */
|
||||
|
||||
#if DT_HAS_DRV_INST(14)
|
||||
PWM_DEVICE_INIT_STM32(14);
|
||||
#endif /* DT_HAS_DRV_INST(14) */
|
||||
|
||||
#if DT_HAS_DRV_INST(15)
|
||||
PWM_DEVICE_INIT_STM32(15);
|
||||
#endif /* DT_HAS_DRV_INST(15) */
|
||||
|
||||
#if DT_HAS_DRV_INST(16)
|
||||
PWM_DEVICE_INIT_STM32(16);
|
||||
#endif /* DT_HAS_DRV_INST(16) */
|
||||
|
||||
#if DT_HAS_DRV_INST(17)
|
||||
PWM_DEVICE_INIT_STM32(17);
|
||||
#endif /* DT_HAS_DRV_INST(17) */
|
||||
|
||||
#if DT_HAS_DRV_INST(18)
|
||||
PWM_DEVICE_INIT_STM32(18);
|
||||
#endif /* DT_HAS_DRV_INST(18) */
|
||||
|
||||
#if DT_HAS_DRV_INST(19)
|
||||
PWM_DEVICE_INIT_STM32(19);
|
||||
#endif /* DT_HAS_DRV_INST(19) */
|
||||
DT_INST_FOREACH(PWM_DEVICE_INIT_STM32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue