diff --git a/boards/arm/96b_aerocore2/96b_aerocore2.dts b/boards/arm/96b_aerocore2/96b_aerocore2.dts index b5d53dff968f7..5d96d25270488 100644 --- a/boards/arm/96b_aerocore2/96b_aerocore2.dts +++ b/boards/arm/96b_aerocore2/96b_aerocore2.dts @@ -64,30 +64,35 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart7 { pinctrl-0 = <&uart7_tx_pe8 &uart7_rx_pe7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart8 { pinctrl-0 = <&uart8_tx_pe1 &uart8_rx_pe0>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -97,6 +102,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -105,11 +111,13 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; &spi3 { pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; status = "okay"; }; @@ -118,17 +126,20 @@ &spi4 { pinctrl-0 = <&spi4_nss_pe11 &spi4_sck_pe12 &spi4_miso_pe13 &spi4_mosi_pe14>; + pinctrl-names = "default"; status = "okay"; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -141,6 +152,7 @@ zephyr_udc0: &usbotg_fs { &tim4_ch2_pd13 &tim4_ch3_pd14 &tim4_ch4_pd15>; + pinctrl-names = "default"; }; }; @@ -153,12 +165,14 @@ zephyr_udc0: &usbotg_fs { &tim5_ch2_pa1 &tim5_ch3_pa2 &tim5_ch4_pa3>; + pinctrl-names = "default"; }; }; &adc1 { pinctrl-0 = <&adc1_in10_pc0 &adc1_in11_pc1 &adc1_in12_pc2 &adc1_in13_pc3>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/96b_aerocore2/96b_aerocore2_defconfig b/boards/arm/96b_aerocore2/96b_aerocore2_defconfig index 1d95860335660..8cd955fe1cbe8 100644 --- a/boards/arm/96b_aerocore2/96b_aerocore2_defconfig +++ b/boards/arm/96b_aerocore2/96b_aerocore2_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/96b_argonkey/96b_argonkey.dts b/boards/arm/96b_argonkey/96b_argonkey.dts index addd38c9cd2fc..ee33f0db7d27c 100644 --- a/boards/arm/96b_argonkey/96b_argonkey.dts +++ b/boards/arm/96b_argonkey/96b_argonkey.dts @@ -71,6 +71,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -80,6 +81,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -88,6 +90,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; /* ST Microelectronics LSM6DSL accel/gyro sensor */ @@ -107,6 +110,7 @@ &i2s5 { status = "okay"; pinctrl-0 = <&i2s5_ck_pb0 &i2s5_sd_pb8>; + pinctrl-names = "default"; mp34dt05@0 { compatible = "st,mpxxdtyy"; @@ -117,12 +121,14 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -148,6 +154,7 @@ &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; diff --git a/boards/arm/96b_argonkey/96b_argonkey_defconfig b/boards/arm/96b_argonkey/96b_argonkey_defconfig index fba707e37485d..76869d633452f 100644 --- a/boards/arm/96b_argonkey/96b_argonkey_defconfig +++ b/boards/arm/96b_argonkey/96b_argonkey_defconfig @@ -12,9 +12,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/96b_avenger96/96b_avenger96.dts b/boards/arm/96b_avenger96/96b_avenger96.dts index 83ce2b1fd0634..3accaae12a95a 100644 --- a/boards/arm/96b_avenger96/96b_avenger96.dts +++ b/boards/arm/96b_avenger96/96b_avenger96.dts @@ -59,12 +59,14 @@ &uart4 { pinctrl-0 = <&uart4_tx_pd1 &uart4_rx_pb2>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart7 { pinctrl-0 = <&uart7_tx_pe8 &uart7_rx_pe7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/96b_avenger96/96b_avenger96_defconfig b/boards/arm/96b_avenger96/96b_avenger96_defconfig index 2164509818623..05be01fbb36ec 100644 --- a/boards/arm/96b_avenger96/96b_avenger96_defconfig +++ b/boards/arm/96b_avenger96/96b_avenger96_defconfig @@ -14,9 +14,6 @@ CONFIG_GPIO=y CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y -# pin mux configuration -CONFIG_PINMUX=y - # clock configuration CONFIG_CLOCK_CONTROL=y @@ -27,3 +24,6 @@ CONFIG_RAM_CONSOLE_BUFFER_SIZE=1024 # uart console (overrides remote proc console) CONFIG_UART_CONSOLE=n + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/96b_carbon/96b_carbon.dts b/boards/arm/96b_carbon/96b_carbon.dts index cd792a49ff28e..49204bce28f42 100644 --- a/boards/arm/96b_carbon/96b_carbon.dts +++ b/boards/arm/96b_carbon/96b_carbon.dts @@ -77,30 +77,35 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -110,6 +115,7 @@ pinctrl-0 = <&spi1_miso_pa6 &spi1_mosi_pa7 &spi1_sck_pa5 &spi1_nss_pa4>; + pinctrl-names = "default"; /* Nordic nRF51822-QFAC */ bt-hci@0 { @@ -125,11 +131,13 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/96b_carbon/96b_carbon_defconfig b/boards/arm/96b_carbon/96b_carbon_defconfig index ad3e793db8201..92cb9c88b9dde 100644 --- a/boards/arm/96b_carbon/96b_carbon_defconfig +++ b/boards/arm/96b_carbon/96b_carbon_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/96b_neonkey/96b_neonkey.dts b/boards/arm/96b_neonkey/96b_neonkey.dts index 5c4688f1cad80..78979f9610b13 100644 --- a/boards/arm/96b_neonkey/96b_neonkey.dts +++ b/boards/arm/96b_neonkey/96b_neonkey.dts @@ -78,24 +78,28 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -109,6 +113,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/96b_neonkey/96b_neonkey_defconfig b/boards/arm/96b_neonkey/96b_neonkey_defconfig index 314da54468bf2..1b51c0cc14ad3 100644 --- a/boards/arm/96b_neonkey/96b_neonkey_defconfig +++ b/boards/arm/96b_neonkey/96b_neonkey_defconfig @@ -12,9 +12,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez.dts b/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez.dts index fb2db7e795302..25b10ce958bd8 100644 --- a/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez.dts +++ b/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez.dts @@ -85,6 +85,7 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -105,6 +106,7 @@ &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pc12>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -115,6 +117,7 @@ &i2s2 { pinctrl-0 = <&i2s2_ck_pc7 &i2s2_sd_pc1>; + pinctrl-names = "default"; status = "okay"; }; @@ -123,6 +126,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -131,6 +135,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb9 &spi2_sck_pd3 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; /* Cannot be used together with i2s2. */ /* status = "okay"; */ }; @@ -140,6 +145,7 @@ &spi4 { pinctrl-0 = <&spi4_nss_pe11 &spi4_sck_pe12 &spi4_miso_pe13 &spi4_mosi_pe14>; + pinctrl-names = "default"; status = "okay"; }; @@ -149,6 +155,7 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pb4 &tim3_ch3_pc8>; + pinctrl-names = "default"; }; }; @@ -158,6 +165,7 @@ pwm4: pwm { status = "okay"; pinctrl-0 = <&tim4_ch3_pd14 &tim4_ch4_pd15>; + pinctrl-names = "default"; }; }; @@ -167,29 +175,34 @@ pwm9: pwm { status = "okay"; pinctrl-0 = <&tim9_ch1_pe5 &tim9_ch2_pe6>; + pinctrl-names = "default"; }; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart4 { pinctrl-0 = <&uart4_tx_pc10 &uart4_rx_pc11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez_defconfig b/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez_defconfig index c24066443abd6..a9e0141c1258c 100644 --- a/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez_defconfig +++ b/boards/arm/96b_stm32_sensor_mez/96b_stm32_sensor_mez_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/96b_wistrio/96b_wistrio.dts b/boards/arm/96b_wistrio/96b_wistrio.dts index b902ef7d17530..bc555ce1ee0de 100644 --- a/boards/arm/96b_wistrio/96b_wistrio.dts +++ b/boards/arm/96b_wistrio/96b_wistrio.dts @@ -60,18 +60,21 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; lis3dh@32 { @@ -83,6 +86,7 @@ &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>; diff --git a/boards/arm/96b_wistrio/96b_wistrio_defconfig b/boards/arm/96b_wistrio/96b_wistrio_defconfig index e2f2155fd4291..9520805e917d8 100644 --- a/boards/arm/96b_wistrio/96b_wistrio_defconfig +++ b/boards/arm/96b_wistrio/96b_wistrio_defconfig @@ -10,9 +10,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -22,3 +19,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405.dts b/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405.dts index dceeb84cc90a6..2cdce573ec232 100644 --- a/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405.dts +++ b/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405.dts @@ -58,12 +58,14 @@ &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -73,6 +75,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa15 &spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; gd25q16: gd25q16c@0 { @@ -90,6 +93,7 @@ &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -99,5 +103,6 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405_defconfig b/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405_defconfig index ef6a1913d0823..ca015a21976c5 100644 --- a/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405_defconfig +++ b/boards/arm/adafruit_feather_stm32f405/adafruit_feather_stm32f405_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1.dts b/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1.dts index bf17f5fd485e3..dd87e75cee1cf 100644 --- a/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1.dts +++ b/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1.dts @@ -100,12 +100,14 @@ arduino_i2c: &i2c1 {}; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -113,6 +115,7 @@ arduino_i2c: &i2c1 {}; &spi1 { pinctrl-0 = <&spi1_nss_pa15 &spi1_sck_pb3 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; @@ -139,11 +142,13 @@ arduino_i2c: &i2c1 {}; &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -162,6 +167,7 @@ arduino_i2c: &i2c1 {}; &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1_defconfig b/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1_defconfig index 0f2375fd2f53b..cd14c09d3a645 100644 --- a/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1_defconfig +++ b/boards/arm/b_l072z_lrwan1/b_l072z_lrwan1_defconfig @@ -20,8 +20,8 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a.dts b/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a.dts index b295057229c26..cfd031c263c15 100644 --- a/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a.dts +++ b/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a.dts @@ -69,23 +69,27 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart4 { pinctrl-0 = <&uart4_tx_pa0 &uart4_rx_pa1>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -124,12 +128,14 @@ &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpioa 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &spi3 { pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpiod 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>, @@ -200,6 +206,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa15>; + pinctrl-names = "default"; }; }; @@ -214,6 +221,7 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12 &usb_otg_fs_id_pa10>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a_defconfig b/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a_defconfig index 0dffee21efe61..981dd5f1670d9 100644 --- a/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a_defconfig +++ b/boards/arm/b_l4s5i_iot01a/b_l4s5i_iot01a_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L4S5XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -18,3 +15,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/b_u585i_iot02a/b_u585i_iot02a.dts b/boards/arm/b_u585i_iot02a/b_u585i_iot02a.dts index ff9a799396843..c5fdba4817792 100644 --- a/boards/arm/b_u585i_iot02a/b_u585i_iot02a.dts +++ b/boards/arm/b_u585i_iot02a/b_u585i_iot02a.dts @@ -35,6 +35,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -42,17 +43,20 @@ &spi1 { pinctrl-0 = <&spi1_nss_pe12 &spi1_sck_pe13 &spi1_miso_pe14 &spi1_mosi_pe15>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_ph4 &i2c2_sda_ph5>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -69,16 +73,19 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in15_pb0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { pinctrl-0 = <&dac1_out1_pa4>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/b_u585i_iot02a/b_u585i_iot02a_defconfig b/boards/arm/b_u585i_iot02a/b_u585i_iot02a_defconfig index 5ad1d1d662d34..c034f717771cd 100644 --- a/boards/arm/b_u585i_iot02a/b_u585i_iot02a_defconfig +++ b/boards/arm/b_u585i_iot02a/b_u585i_iot02a_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32U585XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -18,3 +15,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/black_f407ve/black_f407ve.dts b/boards/arm/black_f407ve/black_f407ve.dts index 123fd5539a810..17daca34f1773 100644 --- a/boards/arm/black_f407ve/black_f407ve.dts +++ b/boards/arm/black_f407ve/black_f407ve.dts @@ -80,12 +80,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -96,6 +98,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -105,23 +108,27 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &can1 { pinctrl-0 = <&can1_rx_pd0 &can1_tx_pd1>; + pinctrl-names = "default"; bus-speed = <125000>; status = "disabled"; }; &can2 { pinctrl-0 = <&can2_rx_pb12 &can2_tx_pb13>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpiob 0 GPIO_ACTIVE_LOW>; w25q16cv: w25q16cv@0 { @@ -139,5 +146,6 @@ zephyr_udc0: &usbotg_fs { &spi2 { pinctrl-0 = <&spi2_sck_pb10 &spi2_miso_pc2 &spi2_mosi_pc3>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/black_f407ve/black_f407ve_defconfig b/boards/arm/black_f407ve/black_f407ve_defconfig index 211bb64020394..03fd48b107248 100644 --- a/boards/arm/black_f407ve/black_f407ve_defconfig +++ b/boards/arm/black_f407ve/black_f407ve_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable pinmux -CONFIG_PINMUX=y - # Enable Clocks CONFIG_CLOCK_CONTROL=y # Enable GPIO CONFIG_GPIO=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/black_f407zg_pro/black_f407zg_pro.dts b/boards/arm/black_f407zg_pro/black_f407zg_pro.dts index 4cb6df3ac5b51..791c5570ace59 100644 --- a/boards/arm/black_f407zg_pro/black_f407zg_pro.dts +++ b/boards/arm/black_f407zg_pro/black_f407zg_pro.dts @@ -80,12 +80,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -96,6 +98,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -105,22 +108,26 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &can1 { pinctrl-0 = <&can1_rx_pd0 &can1_tx_pd1>; + pinctrl-names = "default"; bus-speed = <125000>; status = "disabled"; }; &can2 { pinctrl-0 = <&can2_rx_pb12 &can2_tx_pb13>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_sck_pb10 &spi2_miso_pc2 &spi2_mosi_pc3>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/black_f407zg_pro/black_f407zg_pro_defconfig b/boards/arm/black_f407zg_pro/black_f407zg_pro_defconfig index 24ba17ec41c67..3e74a5e5885fa 100644 --- a/boards/arm/black_f407zg_pro/black_f407zg_pro_defconfig +++ b/boards/arm/black_f407zg_pro/black_f407zg_pro_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable pinmux -CONFIG_PINMUX=y - # Enable Clocks CONFIG_CLOCK_CONTROL=y # Enable GPIO CONFIG_GPIO=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/blackpill_f401ce/blackpill_f401ce.dts b/boards/arm/blackpill_f401ce/blackpill_f401ce.dts index ee7747fc6d303..c0eafe31c5efc 100644 --- a/boards/arm/blackpill_f401ce/blackpill_f401ce.dts +++ b/boards/arm/blackpill_f401ce/blackpill_f401ce.dts @@ -81,17 +81,20 @@ pwm4: pwm { status = "okay"; pinctrl-0 = <&tim4_ch1_pb6 &tim4_ch2_pb7>; + pinctrl-names = "default"; }; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; status = "okay"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -99,6 +102,7 @@ &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_nss_pa4 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -108,11 +112,13 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in1_pa1>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig b/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig index 14f574f20ade4..e2fdc023a5ba7 100644 --- a/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig +++ b/boards/arm/blackpill_f401ce/blackpill_f401ce_defconfig @@ -15,11 +15,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Clock configuration CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/blackpill_f411ce/blackpill_f411ce.dts b/boards/arm/blackpill_f411ce/blackpill_f411ce.dts index e9d6aa4b44a80..53425c1f62924 100644 --- a/boards/arm/blackpill_f411ce/blackpill_f411ce.dts +++ b/boards/arm/blackpill_f411ce/blackpill_f411ce.dts @@ -82,17 +82,20 @@ pwm4: pwm { status = "okay"; pinctrl-0 = <&tim4_ch1_pb6 &tim4_ch2_pb7>; + pinctrl-names = "default"; }; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; status = "okay"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -100,6 +103,7 @@ &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_nss_pa4 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -109,11 +113,13 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in1_pa1>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/blackpill_f411ce/blackpill_f411ce_defconfig b/boards/arm/blackpill_f411ce/blackpill_f411ce_defconfig index 4e004f6cefd4e..1c1d2d9692591 100644 --- a/boards/arm/blackpill_f411ce/blackpill_f411ce_defconfig +++ b/boards/arm/blackpill_f411ce/blackpill_f411ce_defconfig @@ -15,11 +15,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Clock configuration CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/disco_l475_iot1/disco_l475_iot1.dts b/boards/arm/disco_l475_iot1/disco_l475_iot1.dts index 04fd16915af5f..a5381881f24a7 100644 --- a/boards/arm/disco_l475_iot1/disco_l475_iot1.dts +++ b/boards/arm/disco_l475_iot1/disco_l475_iot1.dts @@ -81,18 +81,21 @@ &uart4 { pinctrl-0 = <&uart4_tx_pa0 &uart4_rx_pa1>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -131,12 +134,14 @@ &i2c3 { pinctrl-0 = <&i2c3_scl_pc0 &i2c3_sda_pc1>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpioa 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -147,6 +152,7 @@ status = "okay"; pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; cs-gpios = <&gpiod 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>, <&gpioe 0 GPIO_ACTIVE_LOW>; @@ -207,6 +213,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa15>; + pinctrl-names = "default"; }; }; @@ -221,6 +228,7 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12 &usb_otg_fs_id_pa10>; + pinctrl-names = "default"; status = "okay"; }; @@ -236,6 +244,7 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&adc1_in5_pa0 &adc1_in3_pc2 &adc1_in4_pc3 &adc1_in13_pc4 &adc1_in14_pc5>; + pinctrl-names = "default"; status = "okay"; }; @@ -247,6 +256,7 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&quadspi_clk_pe10 &quadspi_ncs_pe11 &quadspi_bk1_io0_pe12 &quadspi_bk1_io1_pe13 &quadspi_bk1_io2_pe14 &quadspi_bk1_io3_pe15>; + pinctrl-names = "default"; dmas = <&dma1 5 5 0x0000>; dma-names = "tx_rx"; diff --git a/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig b/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig index ba967050a1da8..a25b1eff6458e 100644 --- a/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig +++ b/boards/arm/disco_l475_iot1/disco_l475_iot1_defconfig @@ -8,9 +8,6 @@ CONFIG_SOC_STM32L475XX=y CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -26,3 +23,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/dragino_lsn50/dragino_lsn50.dts b/boards/arm/dragino_lsn50/dragino_lsn50.dts index 0806df7165684..6e7ab61f4844c 100644 --- a/boards/arm/dragino_lsn50/dragino_lsn50.dts +++ b/boards/arm/dragino_lsn50/dragino_lsn50.dts @@ -41,12 +41,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/dragino_lsn50/dragino_lsn50_defconfig b/boards/arm/dragino_lsn50/dragino_lsn50_defconfig index 6bc0f9c1edc28..7b6c7e6409d15 100644 --- a/boards/arm/dragino_lsn50/dragino_lsn50_defconfig +++ b/boards/arm/dragino_lsn50/dragino_lsn50_defconfig @@ -14,11 +14,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/dragino_nbsn95/dragino_nbsn95.dts b/boards/arm/dragino_nbsn95/dragino_nbsn95.dts index 171a4158c3921..4838e3b0c28a7 100644 --- a/boards/arm/dragino_nbsn95/dragino_nbsn95.dts +++ b/boards/arm/dragino_nbsn95/dragino_nbsn95.dts @@ -53,12 +53,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/dragino_nbsn95/dragino_nbsn95_defconfig b/boards/arm/dragino_nbsn95/dragino_nbsn95_defconfig index 8b8cbb939c3e5..20b5025cc578d 100644 --- a/boards/arm/dragino_nbsn95/dragino_nbsn95_defconfig +++ b/boards/arm/dragino_nbsn95/dragino_nbsn95_defconfig @@ -10,15 +10,16 @@ CONFIG_BOARD_DRAGINO_NBSN95=y # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y + # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/google_kukui/google_kukui.dts b/boards/arm/google_kukui/google_kukui.dts index 4fcb0d24061f2..a84a3334c2e50 100644 --- a/boards/arm/google_kukui/google_kukui.dts +++ b/boards/arm/google_kukui/google_kukui.dts @@ -33,6 +33,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -53,12 +54,14 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; diff --git a/boards/arm/google_kukui/google_kukui_defconfig b/boards/arm/google_kukui/google_kukui_defconfig index 798bb6bc32f49..a56b11a79e26a 100644 --- a/boards/arm/google_kukui/google_kukui_defconfig +++ b/boards/arm/google_kukui/google_kukui_defconfig @@ -18,11 +18,11 @@ CONFIG_I2C=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/legend/legend.dts b/boards/arm/legend/legend.dts index 198a2bf608e6b..205a830ef6574 100644 --- a/boards/arm/legend/legend.dts +++ b/boards/arm/legend/legend.dts @@ -42,18 +42,21 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; dmas = <&dma1 3 0x20440>, <&dma1 2 0x20480>; dma-names = "tx", "rx"; status = "okay"; @@ -78,6 +81,7 @@ &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>; status = "okay"; @@ -175,6 +179,7 @@ pwm3: pwm { pinctrl-0 = <&tim3_ch3_pb0>; + pinctrl-names = "default"; status = "disabled"; }; }; diff --git a/boards/arm/legend/legend_defconfig b/boards/arm/legend/legend_defconfig index 63720f0538f1b..1ab444cc39b05 100644 --- a/boards/arm/legend/legend_defconfig +++ b/boards/arm/legend/legend_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Clock Control CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/lora_e5_dev_board/lora_e5_dev_board.dts b/boards/arm/lora_e5_dev_board/lora_e5_dev_board.dts index ab7196dee9236..7e8a72cc2be0c 100644 --- a/boards/arm/lora_e5_dev_board/lora_e5_dev_board.dts +++ b/boards/arm/lora_e5_dev_board/lora_e5_dev_board.dts @@ -132,18 +132,21 @@ &lpuart1 { pinctrl-0 = <&lpuart1_tx_pc1 &lpuart1_rx_pc0>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; /* PB4 can select RS-485 TX, when J17 (A4) is closed */ @@ -151,6 +154,7 @@ &i2c2 { pinctrl-0 = <&i2c2_scl_pb15 &i2c2_sda_pa15>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -161,6 +165,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb9 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pa10>; + pinctrl-names = "default"; status = "okay"; /* unpopulated footprint for spi flash */ @@ -176,6 +181,7 @@ &adc1 { pinctrl-0 = <&adc_in2_pb3>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/lora_e5_dev_board/lora_e5_dev_board_defconfig b/boards/arm/lora_e5_dev_board/lora_e5_dev_board_defconfig index 0e9eb43b5addd..912493764e21d 100644 --- a/boards/arm/lora_e5_dev_board/lora_e5_dev_board_defconfig +++ b/boards/arm/lora_e5_dev_board/lora_e5_dev_board_defconfig @@ -4,9 +4,6 @@ CONFIG_SOC_STM32WLE5XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -25,3 +22,6 @@ CONFIG_HW_STACK_PROTECTION=y # Enable regulator for the power-rails CONFIG_REGULATOR=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/mikroe_clicker_2/mikroe_clicker_2.dts b/boards/arm/mikroe_clicker_2/mikroe_clicker_2.dts index 2dade5de17bf1..6328327a1b597 100644 --- a/boards/arm/mikroe_clicker_2/mikroe_clicker_2.dts +++ b/boards/arm/mikroe_clicker_2/mikroe_clicker_2.dts @@ -76,18 +76,21 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <9600>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <9600>; status = "okay"; }; &uart4 { pinctrl-0 = <&uart4_tx_pa0 &uart4_rx_pa1>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -98,34 +101,40 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>; status = "okay"; }; &spi3 { pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; cs-gpios = <&gpioe 8 GPIO_ACTIVE_LOW>; status = "okay"; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pc9>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { status ="okay"; pinctrl-0 = <&adc1_in2_pa2 &adc1_in3_pa3>; + pinctrl-names = "default"; }; mikrobus_1_i2c: &i2c3 {}; diff --git a/boards/arm/mikroe_clicker_2/mikroe_clicker_2_defconfig b/boards/arm/mikroe_clicker_2/mikroe_clicker_2_defconfig index 83a35a4ba2b97..0d46fd7c84e65 100644 --- a/boards/arm/mikroe_clicker_2/mikroe_clicker_2_defconfig +++ b/boards/arm/mikroe_clicker_2/mikroe_clicker_2_defconfig @@ -10,11 +10,11 @@ CONFIG_SERIAL=y # console CONFIG_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32.dts b/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32.dts index 3057cc6e958d2..60f270855a715 100644 --- a/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32.dts +++ b/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32.dts @@ -62,18 +62,21 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -83,11 +86,13 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pb4>; + pinctrl-names = "default"; }; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig b/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig index 0bd64acca2a59..3f0ccc9cca746 100644 --- a/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig +++ b/boards/arm/mikroe_mini_m4_for_stm32/mikroe_mini_m4_for_stm32_defconfig @@ -14,11 +14,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8.dts b/boards/arm/nucleo_f030r8/nucleo_f030r8.dts index d6520ecd70145..b27ce5f748bdc 100644 --- a/boards/arm/nucleo_f030r8/nucleo_f030r8.dts +++ b/boards/arm/nucleo_f030r8/nucleo_f030r8.dts @@ -69,30 +69,35 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -100,6 +105,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig b/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig index 8be75cf6abe43..1ba94fff95d8e 100644 --- a/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig +++ b/boards/arm/nucleo_f030r8/nucleo_f030r8_defconfig @@ -20,11 +20,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f031k6/nucleo_f031k6.dts b/boards/arm/nucleo_f031k6/nucleo_f031k6.dts index b1b85c4a27834..df21cf3599e3e 100644 --- a/boards/arm/nucleo_f031k6/nucleo_f031k6.dts +++ b/boards/arm/nucleo_f031k6/nucleo_f031k6.dts @@ -69,17 +69,20 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch2_pb3>; + pinctrl-names = "default"; }; }; &usart1 { pinctrl-0 = <&usart1_tx_pa2 &usart1_rx_pa15>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -87,11 +90,13 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f031k6/nucleo_f031k6_defconfig b/boards/arm/nucleo_f031k6/nucleo_f031k6_defconfig index 2e83111a72813..c2c8d055a9044 100644 --- a/boards/arm/nucleo_f031k6/nucleo_f031k6_defconfig +++ b/boards/arm/nucleo_f031k6/nucleo_f031k6_defconfig @@ -19,11 +19,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f070rb/nucleo_f070rb.dts b/boards/arm/nucleo_f070rb/nucleo_f070rb.dts index 922657f03f099..13568b68ac94c 100644 --- a/boards/arm/nucleo_f070rb/nucleo_f070rb.dts +++ b/boards/arm/nucleo_f070rb/nucleo_f070rb.dts @@ -64,36 +64,42 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f070rb/nucleo_f070rb_defconfig b/boards/arm/nucleo_f070rb/nucleo_f070rb_defconfig index bca68ac1f0e21..088920775b4f6 100644 --- a/boards/arm/nucleo_f070rb/nucleo_f070rb_defconfig +++ b/boards/arm/nucleo_f070rb/nucleo_f070rb_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f091rc/nucleo_f091rc.dts b/boards/arm/nucleo_f091rc/nucleo_f091rc.dts index 5eeca19c85baf..0a28bd54aab24 100644 --- a/boards/arm/nucleo_f091rc/nucleo_f091rc.dts +++ b/boards/arm/nucleo_f091rc/nucleo_f091rc.dts @@ -64,34 +64,40 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -120,12 +126,14 @@ &adc1 { pinctrl-0 = <&adc_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &dma1 { diff --git a/boards/arm/nucleo_f091rc/nucleo_f091rc_defconfig b/boards/arm/nucleo_f091rc/nucleo_f091rc_defconfig index 21ef50d9250df..c166772f8e33f 100644 --- a/boards/arm/nucleo_f091rc/nucleo_f091rc_defconfig +++ b/boards/arm/nucleo_f091rc/nucleo_f091rc_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f103rb/nucleo_f103rb.dts b/boards/arm/nucleo_f103rb/nucleo_f103rb.dts index 75e72fabfc502..9317d11bbfe87 100644 --- a/boards/arm/nucleo_f103rb/nucleo_f103rb.dts +++ b/boards/arm/nucleo_f103rb/nucleo_f103rb.dts @@ -64,29 +64,34 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -94,6 +99,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -104,6 +110,7 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; @@ -113,6 +120,7 @@ &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig b/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig index 7ac7b8d213477..b3d7a802a8842 100644 --- a/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig +++ b/boards/arm/nucleo_f103rb/nucleo_f103rb_defconfig @@ -9,11 +9,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clock CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f207zg/nucleo_f207zg.dts b/boards/arm/nucleo_f207zg/nucleo_f207zg.dts index 98b9821dc52f7..ee657733217b6 100644 --- a/boards/arm/nucleo_f207zg/nucleo_f207zg.dts +++ b/boards/arm/nucleo_f207zg/nucleo_f207zg.dts @@ -77,30 +77,35 @@ &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -118,6 +123,7 @@ zephyr_udc0: &usbotg_fs { &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; @@ -136,6 +142,7 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &flash0 { @@ -157,6 +164,7 @@ zephyr_udc0: &usbotg_fs { &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &backup_sram { @@ -169,5 +177,6 @@ zephyr_udc0: &usbotg_fs { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pe9>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/nucleo_f207zg/nucleo_f207zg_defconfig b/boards/arm/nucleo_f207zg/nucleo_f207zg_defconfig index 67c31bc45a2b9..b501adaa7ca60 100644 --- a/boards/arm/nucleo_f207zg/nucleo_f207zg_defconfig +++ b/boards/arm/nucleo_f207zg/nucleo_f207zg_defconfig @@ -15,11 +15,11 @@ CONFIG_HW_STACK_PROTECTION=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f302r8/nucleo_f302r8.dts b/boards/arm/nucleo_f302r8/nucleo_f302r8.dts index 34e64b2c5e108..2479e7f613ec6 100644 --- a/boards/arm/nucleo_f302r8/nucleo_f302r8.dts +++ b/boards/arm/nucleo_f302r8/nucleo_f302r8.dts @@ -65,28 +65,33 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -97,6 +102,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -106,5 +112,6 @@ &adc1 { pinctrl-0 = <&adc1_in1_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f302r8/nucleo_f302r8_defconfig b/boards/arm/nucleo_f302r8/nucleo_f302r8_defconfig index beea91851dba3..8cb3b3a13adfa 100644 --- a/boards/arm/nucleo_f302r8/nucleo_f302r8_defconfig +++ b/boards/arm/nucleo_f302r8/nucleo_f302r8_defconfig @@ -9,11 +9,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f303k8/nucleo_f303k8.dts b/boards/arm/nucleo_f303k8/nucleo_f303k8.dts index 27ce90f713af0..9fcc390d9af73 100644 --- a/boards/arm/nucleo_f303k8/nucleo_f303k8.dts +++ b/boards/arm/nucleo_f303k8/nucleo_f303k8.dts @@ -65,17 +65,20 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch2_pb3>; + pinctrl-names = "default"; }; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -83,11 +86,13 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in1_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f303k8/nucleo_f303k8_defconfig b/boards/arm/nucleo_f303k8/nucleo_f303k8_defconfig index c4f486c1f2c1b..67f7f844b42ca 100644 --- a/boards/arm/nucleo_f303k8/nucleo_f303k8_defconfig +++ b/boards/arm/nucleo_f303k8/nucleo_f303k8_defconfig @@ -9,11 +9,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f303re/nucleo_f303re.dts b/boards/arm/nucleo_f303re/nucleo_f303re.dts index 932df317d3de2..c66b98cc0049a 100644 --- a/boards/arm/nucleo_f303re/nucleo_f303re.dts +++ b/boards/arm/nucleo_f303re/nucleo_f303re.dts @@ -66,12 +66,14 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -82,6 +84,7 @@ &can1 { pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; prop-seg = <0>; diff --git a/boards/arm/nucleo_f303re/nucleo_f303re_defconfig b/boards/arm/nucleo_f303re/nucleo_f303re_defconfig index 22686be206c92..c73a485b23936 100644 --- a/boards/arm/nucleo_f303re/nucleo_f303re_defconfig +++ b/boards/arm/nucleo_f303re/nucleo_f303re_defconfig @@ -15,11 +15,11 @@ CONFIG_HW_STACK_PROTECTION=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f334r8/nucleo_f334r8.dts b/boards/arm/nucleo_f334r8/nucleo_f334r8.dts index 4eeca8edad500..3f6a150cbd1de 100644 --- a/boards/arm/nucleo_f334r8/nucleo_f334r8.dts +++ b/boards/arm/nucleo_f334r8/nucleo_f334r8.dts @@ -65,29 +65,34 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -99,6 +104,7 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pa8>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig b/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig index 3d8560733465f..a7a22c2096d11 100644 --- a/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig +++ b/boards/arm/nucleo_f334r8/nucleo_f334r8_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable clock CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f401re/nucleo_f401re.dts b/boards/arm/nucleo_f401re/nucleo_f401re.dts index 62183e5e45e76..b21ceb758fad1 100644 --- a/boards/arm/nucleo_f401re/nucleo_f401re.dts +++ b/boards/arm/nucleo_f401re/nucleo_f401re.dts @@ -77,24 +77,28 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -102,6 +106,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -144,6 +149,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa5>; + pinctrl-names = "default"; }; }; @@ -153,6 +159,7 @@ &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f401re/nucleo_f401re_defconfig b/boards/arm/nucleo_f401re/nucleo_f401re_defconfig index cd1a0cc71bae8..637108b6d833e 100644 --- a/boards/arm/nucleo_f401re/nucleo_f401re_defconfig +++ b/boards/arm/nucleo_f401re/nucleo_f401re_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f410rb/nucleo_f410rb.dts b/boards/arm/nucleo_f410rb/nucleo_f410rb.dts index f17b6e01f8240..82d3e43dea0c7 100644 --- a/boards/arm/nucleo_f410rb/nucleo_f410rb.dts +++ b/boards/arm/nucleo_f410rb/nucleo_f410rb.dts @@ -67,24 +67,28 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -92,6 +96,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -102,6 +107,7 @@ &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa5>; + pinctrl-names = "default"; }; &flash0 { diff --git a/boards/arm/nucleo_f410rb/nucleo_f410rb_defconfig b/boards/arm/nucleo_f410rb/nucleo_f410rb_defconfig index e60e783fd9b13..4c7485eb6b36c 100644 --- a/boards/arm/nucleo_f410rb/nucleo_f410rb_defconfig +++ b/boards/arm/nucleo_f410rb/nucleo_f410rb_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f411re/nucleo_f411re.dts b/boards/arm/nucleo_f411re/nucleo_f411re.dts index fdc2f33e3a5d8..3b4605c0fd290 100644 --- a/boards/arm/nucleo_f411re/nucleo_f411re.dts +++ b/boards/arm/nucleo_f411re/nucleo_f411re.dts @@ -67,39 +67,46 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>; + pinctrl-names = "default"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; + pinctrl-names = "default"; clock-frequency = ; }; &i2s1 { pinctrl-0 = <&i2s1_ck_pa5 &i2s1_sd_pa7>; + pinctrl-names = "default"; }; &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_f411re/nucleo_f411re_defconfig b/boards/arm/nucleo_f411re/nucleo_f411re_defconfig index e5fa34d9a49d6..cc07fdb2d8fc3 100644 --- a/boards/arm/nucleo_f411re/nucleo_f411re_defconfig +++ b/boards/arm/nucleo_f411re/nucleo_f411re_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f412zg/nucleo_f412zg.dts b/boards/arm/nucleo_f412zg/nucleo_f412zg.dts index 51a77b255a365..2d24758dfaf10 100644 --- a/boards/arm/nucleo_f412zg/nucleo_f412zg.dts +++ b/boards/arm/nucleo_f412zg/nucleo_f412zg.dts @@ -77,30 +77,35 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -110,6 +115,7 @@ zephyr_udc0: &usbotg_fs { pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig b/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig index 4db88dc1908bb..d9ce153a46b81 100644 --- a/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig +++ b/boards/arm/nucleo_f412zg/nucleo_f412zg_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f413zh/nucleo_f413zh.dts b/boards/arm/nucleo_f413zh/nucleo_f413zh.dts index 396400896189e..d944b6ba3a191 100644 --- a/boards/arm/nucleo_f413zh/nucleo_f413zh.dts +++ b/boards/arm/nucleo_f413zh/nucleo_f413zh.dts @@ -77,30 +77,35 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -110,6 +115,7 @@ zephyr_udc0: &usbotg_fs { pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig b/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig index 742b36b03911a..1b7b52cb5b75f 100644 --- a/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig +++ b/boards/arm/nucleo_f413zh/nucleo_f413zh_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f429zi/nucleo_f429zi.dts b/boards/arm/nucleo_f429zi/nucleo_f429zi.dts index c72fc1cbb64df..7c8dbba0788b8 100644 --- a/boards/arm/nucleo_f429zi/nucleo_f429zi.dts +++ b/boards/arm/nucleo_f429zi/nucleo_f429zi.dts @@ -79,39 +79,46 @@ &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -122,6 +129,7 @@ zephyr_udc0: &usbotg_fs { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch3_pe13>; + pinctrl-names = "default"; }; }; @@ -152,6 +160,7 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &flash0 { diff --git a/boards/arm/nucleo_f429zi/nucleo_f429zi_defconfig b/boards/arm/nucleo_f429zi/nucleo_f429zi_defconfig index 2d1cbac02a4e8..478a485246cbf 100644 --- a/boards/arm/nucleo_f429zi/nucleo_f429zi_defconfig +++ b/boards/arm/nucleo_f429zi/nucleo_f429zi_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # clock configuration CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f446re/nucleo_f446re.dts b/boards/arm/nucleo_f446re/nucleo_f446re.dts index 5270a7d4fc729..cf5ef594d1ffa 100644 --- a/boards/arm/nucleo_f446re/nucleo_f446re.dts +++ b/boards/arm/nucleo_f446re/nucleo_f446re.dts @@ -68,30 +68,35 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb3>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pb4>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -99,6 +104,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -113,6 +119,7 @@ &can1 { /* CAUTION: PB8 and PB9 may conflict with same pins of I2C1 */ pinctrl-0 = <&can1_rx_pb8 &can1_tx_pb9>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; prop-seg = <0>; diff --git a/boards/arm/nucleo_f446re/nucleo_f446re_defconfig b/boards/arm/nucleo_f446re/nucleo_f446re_defconfig index c24066443abd6..a9e0141c1258c 100644 --- a/boards/arm/nucleo_f446re/nucleo_f446re_defconfig +++ b/boards/arm/nucleo_f446re/nucleo_f446re_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f446ze/nucleo_f446ze.dts b/boards/arm/nucleo_f446ze/nucleo_f446ze.dts index 7f92ea1197d55..9119fca59b82d 100644 --- a/boards/arm/nucleo_f446ze/nucleo_f446ze.dts +++ b/boards/arm/nucleo_f446ze/nucleo_f446ze.dts @@ -78,28 +78,33 @@ &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -107,20 +112,22 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pf1 &i2c2_sda_pf0>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { - pinctrl-0 = <&spi1_sck_pa5 - &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -128,21 +135,14 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; -/* QSPI not supported until PR #37297 is merged - * &quadspi { - * pinctrl-0 = <&quadspi_clk_pb2 &quadspi_bk1_ncs_pb6 - * &quadspi_bk1_io0_pd11 &quadspi_bk1_io1_pd12 - * &quadspi_bk1_io2_pe2 &quadspi_bk1_io3_pd13>; - * status = "disabled"; - *}; - */ - zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12 &usb_otg_fs_id_pa10>; + pinctrl-names = "default"; status = "okay"; }; @@ -153,6 +153,7 @@ zephyr_udc0: &usbotg_fs { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pe9>; + pinctrl-names = "default"; }; }; @@ -166,6 +167,7 @@ zephyr_udc0: &usbotg_fs { &can1 { pinctrl-0 = <&can1_rx_pd0 &can1_tx_pd1>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; prop-seg = <0>; diff --git a/boards/arm/nucleo_f446ze/nucleo_f446ze_defconfig b/boards/arm/nucleo_f446ze/nucleo_f446ze_defconfig index c24066443abd6..a9e0141c1258c 100644 --- a/boards/arm/nucleo_f446ze/nucleo_f446ze_defconfig +++ b/boards/arm/nucleo_f446ze/nucleo_f446ze_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f746zg/nucleo_f746zg.dts b/boards/arm/nucleo_f746zg/nucleo_f746zg.dts index bb52813ace529..950335e294f8a 100644 --- a/boards/arm/nucleo_f746zg/nucleo_f746zg.dts +++ b/boards/arm/nucleo_f746zg/nucleo_f746zg.dts @@ -87,28 +87,33 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6 &usart2_rts_pd4 &usart2_cts_pd3>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -120,11 +125,13 @@ zephyr_udc0: &usbotg_fs { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch3_pe13>; + pinctrl-names = "default"; }; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -139,6 +146,7 @@ zephyr_udc0: &usbotg_fs { &can1 { pinctrl-0 = <&can1_rx_pd0 &can1_tx_pd1>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; prop-seg = <0>; @@ -153,6 +161,7 @@ zephyr_udc0: &usbotg_fs { &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; @@ -171,6 +180,7 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &backup_sram { diff --git a/boards/arm/nucleo_f746zg/nucleo_f746zg_defconfig b/boards/arm/nucleo_f746zg/nucleo_f746zg_defconfig index 0b93447e7fb79..e1eb901f61c9c 100644 --- a/boards/arm/nucleo_f746zg/nucleo_f746zg_defconfig +++ b/boards/arm/nucleo_f746zg/nucleo_f746zg_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f756zg/nucleo_f756zg.dts b/boards/arm/nucleo_f756zg/nucleo_f756zg.dts index 76f7ed90cb0ab..2099bb0f59f9f 100644 --- a/boards/arm/nucleo_f756zg/nucleo_f756zg.dts +++ b/boards/arm/nucleo_f756zg/nucleo_f756zg.dts @@ -86,29 +86,34 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6 &usart2_rts_pd4 &usart2_cts_pd3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -120,11 +125,13 @@ zephyr_udc0: &usbotg_fs { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch3_pe13>; + pinctrl-names = "default"; }; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -140,4 +147,5 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; diff --git a/boards/arm/nucleo_f756zg/nucleo_f756zg_defconfig b/boards/arm/nucleo_f756zg/nucleo_f756zg_defconfig index 033b35c412e3a..6f89a9784b9ed 100644 --- a/boards/arm/nucleo_f756zg/nucleo_f756zg_defconfig +++ b/boards/arm/nucleo_f756zg/nucleo_f756zg_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_f767zi/nucleo_f767zi.dts b/boards/arm/nucleo_f767zi/nucleo_f767zi.dts index d12adc6234bc1..144ae2631cb0b 100644 --- a/boards/arm/nucleo_f767zi/nucleo_f767zi.dts +++ b/boards/arm/nucleo_f767zi/nucleo_f767zi.dts @@ -90,28 +90,33 @@ &usart2_rx_pd6 &usart2_rts_pd4 &usart2_cts_pd3>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -123,11 +128,13 @@ zephyr_udc0: &usbotg_fs { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch3_pe13>; + pinctrl-names = "default"; }; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* * WARNING: The pin PA7 will conflict on selection of SPI_1 and @@ -146,6 +153,7 @@ zephyr_udc0: &usbotg_fs { &can1 { pinctrl-0 = <&can1_rx_pd0 &can1_tx_pd1>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; prop-seg = <0>; @@ -156,12 +164,14 @@ zephyr_udc0: &usbotg_fs { &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &rng { @@ -179,6 +189,7 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &flash0 { diff --git a/boards/arm/nucleo_f767zi/nucleo_f767zi_defconfig b/boards/arm/nucleo_f767zi/nucleo_f767zi_defconfig index 19a1c042c0e57..df549434139ac 100644 --- a/boards/arm/nucleo_f767zi/nucleo_f767zi_defconfig +++ b/boards/arm/nucleo_f767zi/nucleo_f767zi_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_g071rb/nucleo_g071rb.dts b/boards/arm/nucleo_g071rb/nucleo_g071rb.dts index 9e3bf39c547cd..c595612a59af6 100644 --- a/boards/arm/nucleo_g071rb/nucleo_g071rb.dts +++ b/boards/arm/nucleo_g071rb/nucleo_g071rb.dts @@ -81,12 +81,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -105,17 +107,20 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pa6>; + pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -123,23 +128,27 @@ &spi1 { pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in0_pa0 &adc1_in1_pa1>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac1_out1_pa4>; + pinctrl-names = "default"; }; &flash0 { diff --git a/boards/arm/nucleo_g071rb/nucleo_g071rb_defconfig b/boards/arm/nucleo_g071rb/nucleo_g071rb_defconfig index 2fa8573ed2e65..71cc51e4ffcf8 100644 --- a/boards/arm/nucleo_g071rb/nucleo_g071rb_defconfig +++ b/boards/arm/nucleo_g071rb/nucleo_g071rb_defconfig @@ -12,11 +12,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enables clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts b/boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts index 019b51962752f..0190cb056a890 100644 --- a/boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts +++ b/boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts @@ -82,17 +82,20 @@ zephyr_udc0: &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -111,6 +114,7 @@ zephyr_udc0: &usb { pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pb4>; + pinctrl-names = "default"; }; }; @@ -120,17 +124,20 @@ zephyr_udc0: &usb { pwm15: pwm { status = "okay"; pinctrl-0 = <&tim15_ch1_pb14>; + pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa11 &i2c2_sda_pa12>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -138,23 +145,27 @@ zephyr_udc0: &usb { &spi1 { pinctrl-0 = <&spi1_nss_pb0 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_pd0 &spi2_sck_pd1 &spi2_miso_pd3 &spi2_mosi_pd4>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in0_pa0 &adc1_in1_pa1>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac1_out1_pa4>; + pinctrl-names = "default"; }; &flash0 { diff --git a/boards/arm/nucleo_g0b1re/nucleo_g0b1re_defconfig b/boards/arm/nucleo_g0b1re/nucleo_g0b1re_defconfig index eae60eda42f97..c57537f7c3107 100644 --- a/boards/arm/nucleo_g0b1re/nucleo_g0b1re_defconfig +++ b/boards/arm/nucleo_g0b1re/nucleo_g0b1re_defconfig @@ -12,11 +12,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_g431rb/nucleo_g431rb.dts b/boards/arm/nucleo_g431rb/nucleo_g431rb.dts index 6f7319058ba7e..4dd2b80be80da 100644 --- a/boards/arm/nucleo_g431rb/nucleo_g431rb.dts +++ b/boards/arm/nucleo_g431rb/nucleo_g431rb.dts @@ -76,23 +76,27 @@ &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -100,6 +104,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -107,6 +112,7 @@ /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; status = "okay"; }; @@ -116,6 +122,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa5>; + pinctrl-names = "default"; }; }; @@ -145,4 +152,5 @@ &dac1 { status = "okay"; pinctrl-0 = <&dac1_out1_pa4>; + pinctrl-names = "default"; }; diff --git a/boards/arm/nucleo_g431rb/nucleo_g431rb_defconfig b/boards/arm/nucleo_g431rb/nucleo_g431rb_defconfig index 0892c157d6494..92c2363d2d8ff 100644 --- a/boards/arm/nucleo_g431rb/nucleo_g431rb_defconfig +++ b/boards/arm/nucleo_g431rb/nucleo_g431rb_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32G431XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_g474re/nucleo_g474re.dts b/boards/arm/nucleo_g474re/nucleo_g474re.dts index c0943a6d03c4c..cbbf1d41f5087 100644 --- a/boards/arm/nucleo_g474re/nucleo_g474re.dts +++ b/boards/arm/nucleo_g474re/nucleo_g474re.dts @@ -77,23 +77,27 @@ &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -101,6 +105,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -108,6 +113,7 @@ /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; status = "okay"; }; @@ -117,6 +123,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch3_pb10>; + pinctrl-names = "default"; }; }; @@ -126,6 +133,7 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pb4>; + pinctrl-names = "default"; }; }; @@ -161,11 +169,13 @@ &adc1 { pinctrl-0 = <&adc1_in1_pa0>; + pinctrl-names = "default"; status = "okay"; }; &can1 { pinctrl-0 = <&fdcan1_rx_pa11 &fdcan1_tx_pa12>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; sample-point = <875>; diff --git a/boards/arm/nucleo_g474re/nucleo_g474re_defconfig b/boards/arm/nucleo_g474re/nucleo_g474re_defconfig index 12a32c0c2433a..15b382fefaec0 100644 --- a/boards/arm/nucleo_g474re/nucleo_g474re_defconfig +++ b/boards/arm/nucleo_g474re/nucleo_g474re_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32G474XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_h723zg/nucleo_h723zg.dts b/boards/arm/nucleo_h723zg/nucleo_h723zg.dts index 9aea706672753..c9d8f0fb34c6f 100644 --- a/boards/arm/nucleo_h723zg/nucleo_h723zg.dts +++ b/boards/arm/nucleo_h723zg/nucleo_h723zg.dts @@ -91,12 +91,14 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -107,6 +109,7 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -122,6 +125,7 @@ pwm12: pwm { status = "okay"; pinctrl-0 = <&tim12_ch1_pb14>; + pinctrl-names = "default"; }; }; @@ -136,6 +140,7 @@ ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &rng { diff --git a/boards/arm/nucleo_h723zg/nucleo_h723zg_defconfig b/boards/arm/nucleo_h723zg/nucleo_h723zg_defconfig index ada15918faefb..676bfa4533f2a 100644 --- a/boards/arm/nucleo_h723zg/nucleo_h723zg_defconfig +++ b/boards/arm/nucleo_h723zg/nucleo_h723zg_defconfig @@ -18,11 +18,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable Clock CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_h743zi/nucleo_h743zi.dts b/boards/arm/nucleo_h743zi/nucleo_h743zi.dts index 183ba1a85e278..787098b6a5618 100644 --- a/boards/arm/nucleo_h743zi/nucleo_h743zi.dts +++ b/boards/arm/nucleo_h743zi/nucleo_h743zi.dts @@ -87,12 +87,14 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -102,6 +104,7 @@ zephyr_udc0: &usbotg_fs { &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -113,11 +116,13 @@ zephyr_udc0: &usbotg_fs { pwm12: pwm { status = "okay"; pinctrl-0 = <&tim12_ch1_pb14>; + pinctrl-names = "default"; }; }; &adc1 { pinctrl-0 = <&adc1_inp15_pa3>; + pinctrl-names = "default"; status = "okay"; }; @@ -144,11 +149,13 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &spi1 { status = "okay"; pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; diff --git a/boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig b/boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig index fb77550d72855..c06c8d3440682 100644 --- a/boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig +++ b/boards/arm/nucleo_h743zi/nucleo_h743zi_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4.dts b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4.dts index 9eec31c4d7870..d4de60053acfd 100644 --- a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4.dts +++ b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4.dts @@ -27,6 +27,7 @@ &uart8 { pinctrl-0 = <&uart8_tx_pe1 &uart8_rx_pe0>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4_defconfig b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4_defconfig index 86ede150076fb..b6233762bbd97 100644 --- a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4_defconfig +++ b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m4_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32H745XX=y # Board config should be specified since there are 2 possible targets CONFIG_BOARD_NUCLEO_H745ZI_Q_M4=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y @@ -23,3 +20,6 @@ CONFIG_CLOCK_CONTROL=y # Console #CONFIG_CONSOLE=y #CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7.dts b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7.dts index 265b34aca42e7..763afdc395690 100644 --- a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7.dts +++ b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7.dts @@ -68,6 +68,7 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -78,6 +79,7 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -89,6 +91,7 @@ pwm12: pwm { status = "okay"; pinctrl-0 = <&tim12_ch1_pb14>; + pinctrl-names = "default"; }; }; @@ -103,6 +106,7 @@ ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &rng { diff --git a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7_defconfig b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7_defconfig index d88458070e3d4..1647a840c01e2 100644 --- a/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7_defconfig +++ b/boards/arm/nucleo_h745zi_q/nucleo_h745zi_q_m7_defconfig @@ -19,11 +19,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable Clock CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_h753zi/nucleo_h753zi.dts b/boards/arm/nucleo_h753zi/nucleo_h753zi.dts index 943d21cef5537..5386773ba7757 100644 --- a/boards/arm/nucleo_h753zi/nucleo_h753zi.dts +++ b/boards/arm/nucleo_h753zi/nucleo_h753zi.dts @@ -87,12 +87,14 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -102,6 +104,7 @@ zephyr_udc0: &usbotg_fs { &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -113,11 +116,13 @@ zephyr_udc0: &usbotg_fs { pwm12: pwm { status = "okay"; pinctrl-0 = <&tim12_ch1_pb14>; + pinctrl-names = "default"; }; }; &adc1 { pinctrl-0 = <&adc1_inp15_pa3>; + pinctrl-names = "default"; status = "okay"; }; @@ -144,11 +149,13 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pb13>; + pinctrl-names = "default"; }; &spi1 { status = "okay"; pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pb5>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; }; diff --git a/boards/arm/nucleo_h753zi/nucleo_h753zi_defconfig b/boards/arm/nucleo_h753zi/nucleo_h753zi_defconfig index 11649d95eb740..42eb8fd0f1215 100644 --- a/boards/arm/nucleo_h753zi/nucleo_h753zi_defconfig +++ b/boards/arm/nucleo_h753zi/nucleo_h753zi_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Enable Pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y # Enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l011k4/nucleo_l011k4.dts b/boards/arm/nucleo_l011k4/nucleo_l011k4.dts index 949b99e2abd9e..c75ced787eabb 100644 --- a/boards/arm/nucleo_l011k4/nucleo_l011k4.dts +++ b/boards/arm/nucleo_l011k4/nucleo_l011k4.dts @@ -62,12 +62,14 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pa4 &i2c1_sda_pa10>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; diff --git a/boards/arm/nucleo_l011k4/nucleo_l011k4_defconfig b/boards/arm/nucleo_l011k4/nucleo_l011k4_defconfig index 2c0c8c38f324d..62de04f9b1a90 100644 --- a/boards/arm/nucleo_l011k4/nucleo_l011k4_defconfig +++ b/boards/arm/nucleo_l011k4/nucleo_l011k4_defconfig @@ -18,11 +18,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l031k6/nucleo_l031k6.dts b/boards/arm/nucleo_l031k6/nucleo_l031k6.dts index 8a8fd80a097f9..f4998077743c8 100644 --- a/boards/arm/nucleo_l031k6/nucleo_l031k6.dts +++ b/boards/arm/nucleo_l031k6/nucleo_l031k6.dts @@ -54,18 +54,21 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pa9 &i2c1_sda_pa10>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_l031k6/nucleo_l031k6_defconfig b/boards/arm/nucleo_l031k6/nucleo_l031k6_defconfig index 0a9f04d0540a4..83745ca36aff0 100644 --- a/boards/arm/nucleo_l031k6/nucleo_l031k6_defconfig +++ b/boards/arm/nucleo_l031k6/nucleo_l031k6_defconfig @@ -18,11 +18,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l053r8/nucleo_l053r8.dts b/boards/arm/nucleo_l053r8/nucleo_l053r8.dts index 9f6a3ec3b6820..ffd16f75f594f 100644 --- a/boards/arm/nucleo_l053r8/nucleo_l053r8.dts +++ b/boards/arm/nucleo_l053r8/nucleo_l053r8.dts @@ -71,23 +71,27 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_l053r8/nucleo_l053r8_defconfig b/boards/arm/nucleo_l053r8/nucleo_l053r8_defconfig index 76c1dfaa0b820..154565653dafa 100644 --- a/boards/arm/nucleo_l053r8/nucleo_l053r8_defconfig +++ b/boards/arm/nucleo_l053r8/nucleo_l053r8_defconfig @@ -21,11 +21,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Clock controller CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l073rz/nucleo_l073rz.dts b/boards/arm/nucleo_l073rz/nucleo_l073rz.dts index dcd82463df284..d06a179dfdcde 100644 --- a/boards/arm/nucleo_l073rz/nucleo_l073rz.dts +++ b/boards/arm/nucleo_l073rz/nucleo_l073rz.dts @@ -65,23 +65,27 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -91,10 +95,12 @@ &adc1 { pinctrl-0 = <&adc_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; diff --git a/boards/arm/nucleo_l073rz/nucleo_l073rz_defconfig b/boards/arm/nucleo_l073rz/nucleo_l073rz_defconfig index c4bfc0de575d9..06c6cdfe5daff 100644 --- a/boards/arm/nucleo_l073rz/nucleo_l073rz_defconfig +++ b/boards/arm/nucleo_l073rz/nucleo_l073rz_defconfig @@ -16,11 +16,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l152re/nucleo_l152re.dts b/boards/arm/nucleo_l152re/nucleo_l152re.dts index 16829e34a2491..fd80371193664 100644 --- a/boards/arm/nucleo_l152re/nucleo_l152re.dts +++ b/boards/arm/nucleo_l152re/nucleo_l152re.dts @@ -64,12 +64,14 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; }; @@ -87,12 +89,14 @@ &adc1 { pinctrl-0 = <&adc_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &flash0 { @@ -115,6 +119,7 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pa6>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/nucleo_l152re/nucleo_l152re_defconfig b/boards/arm/nucleo_l152re/nucleo_l152re_defconfig index c21674daae02f..b8045bd70a5ea 100644 --- a/boards/arm/nucleo_l152re/nucleo_l152re_defconfig +++ b/boards/arm/nucleo_l152re/nucleo_l152re_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p.dts b/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p.dts index 2da96cd176068..500b985c3f61d 100644 --- a/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p.dts +++ b/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p.dts @@ -65,23 +65,27 @@ &lpuart1 { pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; }; &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpioa 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb7>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; @@ -92,6 +96,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -101,6 +106,7 @@ &adc1 { pinctrl-0 = <&adc1_in5_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p_defconfig b/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p_defconfig index 3477183dbe2ef..a3541daa6f6ab 100644 --- a/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p_defconfig +++ b/boards/arm/nucleo_l412rb_p/nucleo_l412rb_p_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l432kc/nucleo_l432kc.dts b/boards/arm/nucleo_l432kc/nucleo_l432kc.dts index 71a67749034a9..a073c408ab5cd 100644 --- a/boards/arm/nucleo_l432kc/nucleo_l432kc.dts +++ b/boards/arm/nucleo_l432kc/nucleo_l432kc.dts @@ -57,11 +57,13 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa15>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -69,11 +71,13 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; @@ -84,11 +88,13 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; &can1 { pinctrl-0 = <&can1_rx_pa11 &can1_tx_pa12>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; diff --git a/boards/arm/nucleo_l432kc/nucleo_l432kc_defconfig b/boards/arm/nucleo_l432kc/nucleo_l432kc_defconfig index 8f54532c758b6..d4bf42213f4b2 100644 --- a/boards/arm/nucleo_l432kc/nucleo_l432kc_defconfig +++ b/boards/arm/nucleo_l432kc/nucleo_l432kc_defconfig @@ -12,9 +12,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p.dts b/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p.dts index 338d0384e3abe..17f68dc062e45 100644 --- a/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p.dts +++ b/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p.dts @@ -67,29 +67,34 @@ &lpuart1 { pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; }; &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpioa 11 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; @@ -100,11 +105,13 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; &can1 { pinctrl-0 = <&can1_rx_pa11 &can1_tx_pa12>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; diff --git a/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p_defconfig b/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p_defconfig index e936235d26162..72a116e3fec1e 100644 --- a/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p_defconfig +++ b/boards/arm/nucleo_l433rc_p/nucleo_l433rc_p_defconfig @@ -12,9 +12,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l452re/nucleo_l452re_common.dtsi b/boards/arm/nucleo_l452re/nucleo_l452re_common.dtsi index 17ba04b1e6f31..204bff3d1afd3 100644 --- a/boards/arm/nucleo_l452re/nucleo_l452re_common.dtsi +++ b/boards/arm/nucleo_l452re/nucleo_l452re_common.dtsi @@ -58,23 +58,27 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb7>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; @@ -85,11 +89,13 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; &can1 { pinctrl-0 = <&can1_rx_pa11 &can1_tx_pa12>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; diff --git a/boards/arm/nucleo_l452re/nucleo_l452re_defconfig b/boards/arm/nucleo_l452re/nucleo_l452re_defconfig index ceeb7347825c3..14b7ffdd20928 100644 --- a/boards/arm/nucleo_l452re/nucleo_l452re_defconfig +++ b/boards/arm/nucleo_l452re/nucleo_l452re_defconfig @@ -12,9 +12,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l452re/nucleo_l452re_p_defconfig b/boards/arm/nucleo_l452re/nucleo_l452re_p_defconfig index ceeb7347825c3..14b7ffdd20928 100644 --- a/boards/arm/nucleo_l452re/nucleo_l452re_p_defconfig +++ b/boards/arm/nucleo_l452re/nucleo_l452re_p_defconfig @@ -12,9 +12,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l476rg/nucleo_l476rg.dts b/boards/arm/nucleo_l476rg/nucleo_l476rg.dts index 48aac87d1187c..ce3f5b9ba455d 100644 --- a/boards/arm/nucleo_l476rg/nucleo_l476rg.dts +++ b/boards/arm/nucleo_l476rg/nucleo_l476rg.dts @@ -89,35 +89,41 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pc0 &i2c3_sda_pc1>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiob 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -125,6 +131,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -132,6 +139,7 @@ /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; status = "okay"; }; @@ -141,6 +149,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch3_pb10>; + pinctrl-names = "default"; }; }; @@ -151,6 +160,7 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pb4>; + pinctrl-names = "default"; }; }; @@ -160,5 +170,6 @@ &adc1 { pinctrl-0 = <&adc1_in1_pc0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_l476rg/nucleo_l476rg_defconfig b/boards/arm/nucleo_l476rg/nucleo_l476rg_defconfig index 5e4bba5f31485..0ba22d7b6c432 100644 --- a/boards/arm/nucleo_l476rg/nucleo_l476rg_defconfig +++ b/boards/arm/nucleo_l476rg/nucleo_l476rg_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L476XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l496zg/nucleo_l496zg.dts b/boards/arm/nucleo_l496zg/nucleo_l496zg.dts index dd3abdfa21306..0ddff41cb2872 100644 --- a/boards/arm/nucleo_l496zg/nucleo_l496zg.dts +++ b/boards/arm/nucleo_l496zg/nucleo_l496zg.dts @@ -85,17 +85,21 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { + pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -109,6 +113,7 @@ pinctrl-0 = <&tim1_ch1_pe9 &tim1_ch2_pe11 &tim1_ch3_pe13>; + pinctrl-names = "default"; }; }; @@ -118,6 +123,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -128,17 +134,20 @@ pwm15: pwm { status = "okay"; pinctrl-0 = <&tim15_ch1_pb14>; + pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; diff --git a/boards/arm/nucleo_l496zg/nucleo_l496zg_defconfig b/boards/arm/nucleo_l496zg/nucleo_l496zg_defconfig index f0e9a804c7546..e195230eb2082 100644 --- a/boards/arm/nucleo_l496zg/nucleo_l496zg_defconfig +++ b/boards/arm/nucleo_l496zg/nucleo_l496zg_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L496XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi.dts b/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi.dts index c1ca305bf8017..3d001e6fe0b6f 100644 --- a/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi.dts +++ b/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi.dts @@ -78,35 +78,41 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; cs-gpios = <&gpiod 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -114,6 +120,7 @@ &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -121,12 +128,14 @@ /* SPI3 on the ST Morpho Connector CN7 pins 17, 1, 2, 3*/ pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + pinctrl-names = "default"; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12 &usb_otg_fs_id_pa10>; + pinctrl-names = "default"; status = "okay"; }; @@ -136,6 +145,7 @@ zephyr_udc0: &usbotg_fs { pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -163,5 +173,6 @@ zephyr_udc0: &usbotg_fs { &adc1 { pinctrl-0 = <&adc1_in1_pc0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi_defconfig b/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi_defconfig index 8719d09a17888..0efb42f55a9f6 100644 --- a/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi_defconfig +++ b/boards/arm/nucleo_l4r5zi/nucleo_l4r5zi_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L4R5XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q-common.dtsi b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q-common.dtsi index 298062cc1535b..56cd612cbb0b8 100644 --- a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q-common.dtsi +++ b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q-common.dtsi @@ -64,15 +64,25 @@ &dac1 { status = "okay"; pinctrl-0 = <&dac1_out1_pa4>; + pinctrl-names = "default"; }; &adc1 { pinctrl-0 = <&adc1_in1_pc0>; + pinctrl-names = "default"; + status = "okay"; +}; + +&lpuart1 { + pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; + pinctrl-names = "default"; + current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -80,5 +90,6 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q.dts b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q.dts index d9f0ed693438a..d0dbd4c60bb48 100644 --- a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q.dts +++ b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q.dts @@ -26,9 +26,3 @@ sw0 = &user_button; }; }; - -&lpuart1 { - pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; - current-speed = <115200>; - status = "okay"; -}; diff --git a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_defconfig b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_defconfig index a8cfbb0fd0fce..aa132c44b32af 100644 --- a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_defconfig +++ b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L552XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns.dts b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns.dts index 6c83139ffccd2..3f4b0661e8ada 100644 --- a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns.dts +++ b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns.dts @@ -26,8 +26,3 @@ sw0 = &user_button; }; }; - -&lpuart1 { - current-speed = <115200>; - status = "okay"; -}; diff --git a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns_defconfig b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns_defconfig index 10441298bfe66..93f551efc34b6 100644 --- a/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns_defconfig +++ b/boards/arm/nucleo_l552ze_q/nucleo_l552ze_q_ns_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L552XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -25,3 +22,6 @@ CONFIG_ARM_MPU=y CONFIG_ARM_TRUSTZONE_M=y CONFIG_RUNTIME_NMI=y CONFIG_TRUSTED_EXECUTION_NONSECURE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q.dts b/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q.dts index 3557bd2c4e446..e7cddaf56ba41 100644 --- a/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q.dts +++ b/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q.dts @@ -29,6 +29,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q_defconfig b/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q_defconfig index b5656b326af5f..23eebae7ef079 100644 --- a/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q_defconfig +++ b/boards/arm/nucleo_u575zi_q/nucleo_u575zi_q_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32U575XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts b/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts index 205161cae24be..4341468fe87d2 100644 --- a/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts +++ b/boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts @@ -107,18 +107,21 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pc0 &i2c3_sda_pc1>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -130,6 +133,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -140,6 +144,7 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pa8>; + pinctrl-names = "default"; }; }; @@ -148,17 +153,20 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa15>; + pinctrl-names = "default"; }; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in3_pc2>; + pinctrl-names = "default"; status = "okay"; }; @@ -173,6 +181,7 @@ zephyr_udc0: &usb { status = "okay"; pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; }; &rng { diff --git a/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig b/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig index 0095b6c1c3a5c..9fdd732848efc 100644 --- a/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig +++ b/boards/arm/nucleo_wb55rg/nucleo_wb55rg_defconfig @@ -4,9 +4,6 @@ CONFIG_SOC_STM32WB55XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -22,3 +19,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/nucleo_wl55jc/nucleo_wl55jc.dts b/boards/arm/nucleo_wl55jc/nucleo_wl55jc.dts index 6863d7bed96ed..e87eece6dd8fe 100644 --- a/boards/arm/nucleo_wl55jc/nucleo_wl55jc.dts +++ b/boards/arm/nucleo_wl55jc/nucleo_wl55jc.dts @@ -116,12 +116,14 @@ &lpuart1 { pinctrl-0 = <&lpuart1_tx_pa2 &lpuart1_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pa12 &i2c2_sda_pa11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -129,6 +131,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/nucleo_wl55jc/nucleo_wl55jc_defconfig b/boards/arm/nucleo_wl55jc/nucleo_wl55jc_defconfig index 460684e7c11f1..813ba6643ccc8 100644 --- a/boards/arm/nucleo_wl55jc/nucleo_wl55jc_defconfig +++ b/boards/arm/nucleo_wl55jc/nucleo_wl55jc_defconfig @@ -4,9 +4,6 @@ CONFIG_SOC_STM32WL55XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -22,3 +19,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/olimex_stm32_e407/olimex_stm32_e407.dts b/boards/arm/olimex_stm32_e407/olimex_stm32_e407.dts index d69a679b0b6b2..5c611193fdf53 100644 --- a/boards/arm/olimex_stm32_e407/olimex_stm32_e407.dts +++ b/boards/arm/olimex_stm32_e407/olimex_stm32_e407.dts @@ -66,18 +66,21 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -93,11 +96,13 @@ /* Only one interface should be enabled at a time: usbotg_fs or usbotg_hs */ usb_otg1: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "disabled"; }; zephyr_udc0: &usbotg_hs { pinctrl-0 = <&usb_otg_hs_dm_pb14 &usb_otg_hs_dp_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -113,4 +118,5 @@ zephyr_udc0: &usbotg_hs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pg14>; + pinctrl-names = "default"; }; diff --git a/boards/arm/olimex_stm32_e407/olimex_stm32_e407_defconfig b/boards/arm/olimex_stm32_e407/olimex_stm32_e407_defconfig index 984563e2cd9ef..ad325266c72c9 100644 --- a/boards/arm/olimex_stm32_e407/olimex_stm32_e407_defconfig +++ b/boards/arm/olimex_stm32_e407/olimex_stm32_e407_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/olimex_stm32_h103/olimex_stm32_h103.dts b/boards/arm/olimex_stm32_h103/olimex_stm32_h103.dts index fbbf7ed24eeae..866b3b55c64ed 100644 --- a/boards/arm/olimex_stm32_h103/olimex_stm32_h103.dts +++ b/boards/arm/olimex_stm32_h103/olimex_stm32_h103.dts @@ -61,29 +61,34 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -91,12 +96,14 @@ &spi1 { pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -107,6 +114,7 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; @@ -117,10 +125,12 @@ &adc1 { /* adc1_in14_pc4 is used to sense the USB voltage */ pinctrl-0 = <&adc1_in1_pa1 &adc1_in14_pc4>; + pinctrl-names = "default"; status = "okay"; }; &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; disconnect-gpios = <&gpioc 11 GPIO_ACTIVE_LOW>; }; diff --git a/boards/arm/olimex_stm32_h103/olimex_stm32_h103_defconfig b/boards/arm/olimex_stm32_h103/olimex_stm32_h103_defconfig index 251368bce5fbb..7dc8d8f3b6fc0 100644 --- a/boards/arm/olimex_stm32_h103/olimex_stm32_h103_defconfig +++ b/boards/arm/olimex_stm32_h103/olimex_stm32_h103_defconfig @@ -9,11 +9,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/olimex_stm32_h407/olimex_stm32_h407.dts b/boards/arm/olimex_stm32_h407/olimex_stm32_h407.dts index b77f965a69500..925590f49f3d0 100644 --- a/boards/arm/olimex_stm32_h407/olimex_stm32_h407.dts +++ b/boards/arm/olimex_stm32_h407/olimex_stm32_h407.dts @@ -66,18 +66,21 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -92,4 +95,5 @@ &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; }; diff --git a/boards/arm/olimex_stm32_h407/olimex_stm32_h407_defconfig b/boards/arm/olimex_stm32_h407/olimex_stm32_h407_defconfig index 984563e2cd9ef..ad325266c72c9 100644 --- a/boards/arm/olimex_stm32_h407/olimex_stm32_h407_defconfig +++ b/boards/arm/olimex_stm32_h407/olimex_stm32_h407_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/olimex_stm32_p405/olimex_stm32_p405.dts b/boards/arm/olimex_stm32_p405/olimex_stm32_p405.dts index d788dad34c68c..60c22ac3be9b3 100644 --- a/boards/arm/olimex_stm32_p405/olimex_stm32_p405.dts +++ b/boards/arm/olimex_stm32_p405/olimex_stm32_p405.dts @@ -67,6 +67,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -77,6 +78,7 @@ &can1 { pinctrl-0 = <&can1_rx_pb8 &can1_tx_pb9>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; diff --git a/boards/arm/olimex_stm32_p405/olimex_stm32_p405_defconfig b/boards/arm/olimex_stm32_p405/olimex_stm32_p405_defconfig index e6773b619ed9c..18d48f08e1a5c 100644 --- a/boards/arm/olimex_stm32_p405/olimex_stm32_p405_defconfig +++ b/boards/arm/olimex_stm32_p405/olimex_stm32_p405_defconfig @@ -15,9 +15,6 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -25,3 +22,6 @@ CONFIG_GPIO=y CONFIG_CLOCK_CONTROL=y CONFIG_ENTROPY_GENERATOR=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/olimexino_stm32/olimexino_stm32.dts b/boards/arm/olimexino_stm32/olimexino_stm32.dts index 2621b16fce574..748a91b8df17d 100644 --- a/boards/arm/olimexino_stm32/olimexino_stm32.dts +++ b/boards/arm/olimexino_stm32/olimexino_stm32.dts @@ -72,28 +72,33 @@ uext_serial: &usart1 {}; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -101,12 +106,14 @@ uext_serial: &usart1 {}; &spi1 { pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpiod 2 GPIO_ACTIVE_HIGH>; @@ -123,6 +130,7 @@ zephyr_udc0: &usb { status = "okay"; disconnect-gpios = <&gpioc 12 GPIO_ACTIVE_LOW>; pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; }; &timers1 { @@ -132,6 +140,7 @@ zephyr_udc0: &usb { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; @@ -141,6 +150,7 @@ zephyr_udc0: &usb { &can1 { pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; + pinctrl-names = "default"; bus-speed = <125000>; sjw = <1>; prop-seg = <0>; diff --git a/boards/arm/olimexino_stm32/olimexino_stm32_defconfig b/boards/arm/olimexino_stm32/olimexino_stm32_defconfig index cb38d407d605c..f8edab4b9803f 100644 --- a/boards/arm/olimexino_stm32/olimexino_stm32_defconfig +++ b/boards/arm/olimexino_stm32/olimexino_stm32_defconfig @@ -16,11 +16,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/ronoth_lodev/ronoth_lodev.dts b/boards/arm/ronoth_lodev/ronoth_lodev.dts index 5bdcca7f1e99c..5d99ab47f4afc 100644 --- a/boards/arm/ronoth_lodev/ronoth_lodev.dts +++ b/boards/arm/ronoth_lodev/ronoth_lodev.dts @@ -120,24 +120,28 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -147,12 +151,14 @@ &adc1 { pinctrl-0 = <&adc_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; &dac1 { status = "okay"; pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &rtc { diff --git a/boards/arm/ronoth_lodev/ronoth_lodev_defconfig b/boards/arm/ronoth_lodev/ronoth_lodev_defconfig index eb42f9c29b0c0..1e4ef45671f86 100644 --- a/boards/arm/ronoth_lodev/ronoth_lodev_defconfig +++ b/boards/arm/ronoth_lodev/ronoth_lodev_defconfig @@ -18,11 +18,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/segger_trb_stm32f407/segger_trb_stm32f407_defconfig b/boards/arm/segger_trb_stm32f407/segger_trb_stm32f407_defconfig index c7ab6953785fb..0938e7b20493f 100644 --- a/boards/arm/segger_trb_stm32f407/segger_trb_stm32f407_defconfig +++ b/boards/arm/segger_trb_stm32f407/segger_trb_stm32f407_defconfig @@ -24,3 +24,6 @@ CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/sensortile_box/sensortile_box.dts b/boards/arm/sensortile_box/sensortile_box.dts index ae8c92c907d9a..76e26841c3d74 100644 --- a/boards/arm/sensortile_box/sensortile_box.dts +++ b/boards/arm/sensortile_box/sensortile_box.dts @@ -72,18 +72,21 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -104,6 +107,7 @@ &i2c3 { pinctrl-0 = <&i2c3_scl_pg7 &i2c3_sda_pg8>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -118,6 +122,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pe12 &spi1_sck_pe13 &spi1_miso_pe14 &spi1_mosi_pe15>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpioe 11 GPIO_ACTIVE_LOW>, <&gpioe 12 GPIO_ACTIVE_LOW>, <&gpioe 10 GPIO_ACTIVE_LOW>; @@ -151,6 +156,7 @@ &spi3 { pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pb3 &spi3_miso_pb4 &spi3_mosi_pb5>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>; @@ -166,17 +172,10 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; -&timers2 { - status = "okay"; - - pwm { - status = "okay"; - }; -}; - &rtc { status = "okay"; }; diff --git a/boards/arm/sensortile_box/sensortile_box_defconfig b/boards/arm/sensortile_box/sensortile_box_defconfig index 8536a048c9e68..2970c68d6c9e7 100644 --- a/boards/arm/sensortile_box/sensortile_box_defconfig +++ b/boards/arm/sensortile_box/sensortile_box_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L4R9XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # Enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/steval_fcu001v1/steval_fcu001v1.dts b/boards/arm/steval_fcu001v1/steval_fcu001v1.dts index c6a9c1e491f57..7ded694d55172 100644 --- a/boards/arm/steval_fcu001v1/steval_fcu001v1.dts +++ b/boards/arm/steval_fcu001v1/steval_fcu001v1.dts @@ -62,12 +62,14 @@ &i2c2 { pinctrl-0 = <&i2c2_sda_pb3 &i2c2_scl_pb10>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -78,6 +80,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/steval_fcu001v1/steval_fcu001v1_defconfig b/boards/arm/steval_fcu001v1/steval_fcu001v1_defconfig index be285322bbb60..53be30e3c52d0 100644 --- a/boards/arm/steval_fcu001v1/steval_fcu001v1_defconfig +++ b/boards/arm/steval_fcu001v1/steval_fcu001v1_defconfig @@ -12,11 +12,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm3210c_eval/stm3210c_eval.dts b/boards/arm/stm3210c_eval/stm3210c_eval.dts index baa0b2359b41a..15942f60a4912 100644 --- a/boards/arm/stm3210c_eval/stm3210c_eval.dts +++ b/boards/arm/stm3210c_eval/stm3210c_eval.dts @@ -64,6 +64,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm3210c_eval/stm3210c_eval_defconfig b/boards/arm/stm3210c_eval/stm3210c_eval_defconfig index d9d84620bf4bb..c282e80fd587c 100644 --- a/boards/arm/stm3210c_eval/stm3210c_eval_defconfig +++ b/boards/arm/stm3210c_eval/stm3210c_eval_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # RCC Controller CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32373c_eval/stm32373c_eval.dts b/boards/arm/stm32373c_eval/stm32373c_eval.dts index fa03fae4ce8c6..62426f31af0c8 100644 --- a/boards/arm/stm32373c_eval/stm32373c_eval.dts +++ b/boards/arm/stm32373c_eval/stm32373c_eval.dts @@ -63,6 +63,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32373c_eval/stm32373c_eval_defconfig b/boards/arm/stm32373c_eval/stm32373c_eval_defconfig index dad51767bb5ee..0ec3b1c5fcad9 100644 --- a/boards/arm/stm32373c_eval/stm32373c_eval_defconfig +++ b/boards/arm/stm32373c_eval/stm32373c_eval_defconfig @@ -22,11 +22,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32_min_dev/stm32_min_dev.dtsi b/boards/arm/stm32_min_dev/stm32_min_dev.dtsi index 17c9939a2032f..629e28ff38a34 100644 --- a/boards/arm/stm32_min_dev/stm32_min_dev.dtsi +++ b/boards/arm/stm32_min_dev/stm32_min_dev.dtsi @@ -55,29 +55,34 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; current-speed = <115200>; + pinctrl-names = "default"; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; current-speed = <115200>; + pinctrl-names = "default"; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; current-speed = <115200>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = < &i2c1_scl_pb6 &i2c1_sda_pb7 >; status = "okay"; + pinctrl-names = "default"; clock-frequency = ; }; &i2c2 { pinctrl-0 = < &i2c2_scl_pb10 &i2c2_sda_pb11 >; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -85,12 +90,14 @@ &spi1 { pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -100,15 +107,18 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32_min_dev/stm32_min_dev_black_defconfig b/boards/arm/stm32_min_dev/stm32_min_dev_black_defconfig index abd1788c783de..53876bb7d4b4b 100644 --- a/boards/arm/stm32_min_dev/stm32_min_dev_black_defconfig +++ b/boards/arm/stm32_min_dev/stm32_min_dev_black_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clock control CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32_min_dev/stm32_min_dev_blue_defconfig b/boards/arm/stm32_min_dev/stm32_min_dev_blue_defconfig index af3dbaea08e02..efc78388025d8 100644 --- a/boards/arm/stm32_min_dev/stm32_min_dev_blue_defconfig +++ b/boards/arm/stm32_min_dev/stm32_min_dev_blue_defconfig @@ -10,11 +10,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clock control CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f030_demo/stm32f030_demo.dts b/boards/arm/stm32f030_demo/stm32f030_demo.dts index b5e3a6962e1e6..465898cf30c2a 100644 --- a/boards/arm/stm32f030_demo/stm32f030_demo.dts +++ b/boards/arm/stm32f030_demo/stm32f030_demo.dts @@ -58,6 +58,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32f030_demo/stm32f030_demo_defconfig b/boards/arm/stm32f030_demo/stm32f030_demo_defconfig index 3648606e10b46..1e436d1e3ea38 100644 --- a/boards/arm/stm32f030_demo/stm32f030_demo_defconfig +++ b/boards/arm/stm32f030_demo/stm32f030_demo_defconfig @@ -20,11 +20,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f072_eval/stm32f072_eval.dts b/boards/arm/stm32f072_eval/stm32f072_eval.dts index cfe8f2f599ad1..853f61ce4759b 100644 --- a/boards/arm/stm32f072_eval/stm32f072_eval.dts +++ b/boards/arm/stm32f072_eval/stm32f072_eval.dts @@ -97,6 +97,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32f072_eval/stm32f072_eval_defconfig b/boards/arm/stm32f072_eval/stm32f072_eval_defconfig index f35b5705f4ebe..b5a9b9a376877 100644 --- a/boards/arm/stm32f072_eval/stm32f072_eval_defconfig +++ b/boards/arm/stm32f072_eval/stm32f072_eval_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f072b_disco/stm32f072b_disco.dts b/boards/arm/stm32f072b_disco/stm32f072b_disco.dts index a799665108b84..9b85df142fde9 100644 --- a/boards/arm/stm32f072b_disco/stm32f072b_disco.dts +++ b/boards/arm/stm32f072b_disco/stm32f072b_disco.dts @@ -77,29 +77,34 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pb3 &spi1_miso_pb4 &spi1_mosi_pb5>; + pinctrl-names = "default"; status = "okay"; }; &can1 { pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; diff --git a/boards/arm/stm32f072b_disco/stm32f072b_disco_defconfig b/boards/arm/stm32f072b_disco/stm32f072b_disco_defconfig index f35b5705f4ebe..b5a9b9a376877 100644 --- a/boards/arm/stm32f072b_disco/stm32f072b_disco_defconfig +++ b/boards/arm/stm32f072b_disco/stm32f072b_disco_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f0_disco/stm32f0_disco.dts b/boards/arm/stm32f0_disco/stm32f0_disco.dts index bd0273c9eba68..d8c9ea041cbfc 100644 --- a/boards/arm/stm32f0_disco/stm32f0_disco.dts +++ b/boards/arm/stm32f0_disco/stm32f0_disco.dts @@ -72,12 +72,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32f0_disco/stm32f0_disco_defconfig b/boards/arm/stm32f0_disco/stm32f0_disco_defconfig index b2c7db6abec0c..f1fd239fa3b29 100644 --- a/boards/arm/stm32f0_disco/stm32f0_disco_defconfig +++ b/boards/arm/stm32f0_disco/stm32f0_disco_defconfig @@ -20,11 +20,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f103_mini/stm32f103_mini.dts b/boards/arm/stm32f103_mini/stm32f103_mini.dts index 0ca74468a1fe1..779f62af8eb69 100644 --- a/boards/arm/stm32f103_mini/stm32f103_mini.dts +++ b/boards/arm/stm32f103_mini/stm32f103_mini.dts @@ -53,22 +53,26 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -76,12 +80,14 @@ &spi1 { pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -96,15 +102,18 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32f103_mini/stm32f103_mini_defconfig b/boards/arm/stm32f103_mini/stm32f103_mini_defconfig index e86eadbf22bbb..765fc062bd7db 100644 --- a/boards/arm/stm32f103_mini/stm32f103_mini_defconfig +++ b/boards/arm/stm32f103_mini/stm32f103_mini_defconfig @@ -9,11 +9,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f3_disco/stm32f3_disco.dts b/boards/arm/stm32f3_disco/stm32f3_disco.dts index 4658053db0553..5959c0c8f36d7 100644 --- a/boards/arm/stm32f3_disco/stm32f3_disco.dts +++ b/boards/arm/stm32f3_disco/stm32f3_disco.dts @@ -94,24 +94,28 @@ &usart1 { pinctrl-0 = <&usart1_tx_pc4 &usart1_rx_pc5>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart4 { pinctrl-0 = <&uart4_tx_pc10 &uart4_rx_pc11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -132,6 +136,7 @@ &i2c2 { pinctrl-0 = <&i2c2_scl_pa9 &i2c2_sda_pa10>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -139,17 +144,20 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; zephyr_udc0: &usb { pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -159,6 +167,7 @@ zephyr_udc0: &usb { &can1 { pinctrl-0 = <&can_rx_pd0 &can_tx_pd1>; + pinctrl-names = "default"; status = "okay"; }; @@ -187,11 +196,13 @@ zephyr_udc0: &usb { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pa8>; + pinctrl-names = "default"; }; }; &adc1 { pinctrl-0 = <&adc1_in1_pa0>; + pinctrl-names = "default"; status = "okay"; }; @@ -199,6 +210,7 @@ zephyr_udc0: &usb { status = "okay"; /* dac output pins(pa4,pa5,pa6) might conflict with spi1 pins */ pinctrl-0 = <&dac_out1_pa4>; + pinctrl-names = "default"; }; &dma1 { diff --git a/boards/arm/stm32f3_disco/stm32f3_disco_defconfig b/boards/arm/stm32f3_disco/stm32f3_disco_defconfig index 053239205af46..f5b6d9c5ec68d 100644 --- a/boards/arm/stm32f3_disco/stm32f3_disco_defconfig +++ b/boards/arm/stm32f3_disco/stm32f3_disco_defconfig @@ -19,11 +19,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f411e_disco/stm32f411e_disco.dts b/boards/arm/stm32f411e_disco/stm32f411e_disco.dts index 8479fce9eb940..92978a011ce00 100644 --- a/boards/arm/stm32f411e_disco/stm32f411e_disco.dts +++ b/boards/arm/stm32f411e_disco/stm32f411e_disco.dts @@ -108,11 +108,13 @@ &tim4_ch2_pd13 &tim4_ch3_pd14 &tim4_ch4_pd15>; + pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -136,6 +138,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -146,5 +149,6 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32f411e_disco/stm32f411e_disco_defconfig b/boards/arm/stm32f411e_disco/stm32f411e_disco_defconfig index c3678dd5e19b6..30784f3514d63 100644 --- a/boards/arm/stm32f411e_disco/stm32f411e_disco_defconfig +++ b/boards/arm/stm32f411e_disco/stm32f411e_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f412g_disco/stm32f412g_disco.dts b/boards/arm/stm32f412g_disco/stm32f412g_disco.dts index 94b9c552e7e84..0176cdcddf991 100644 --- a/boards/arm/stm32f412g_disco/stm32f412g_disco.dts +++ b/boards/arm/stm32f412g_disco/stm32f412g_disco.dts @@ -98,18 +98,21 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb9>; + pinctrl-names = "default"; clock-frequency = ; status = "okay"; }; @@ -117,6 +120,7 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa15 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; @@ -128,7 +132,7 @@ pinctrl-0 = <&quadspi_clk_pb2 &quadspi_bk1_ncs_pg6 &quadspi_bk1_io0_pf8 &quadspi_bk1_io1_pf9 &quadspi_bk1_io2_pf7 &quadspi_bk1_io3_pf6>; - + pinctrl-names = "default"; status = "okay"; n25q128a1: qspi-nor-flash@0 { diff --git a/boards/arm/stm32f412g_disco/stm32f412g_disco_defconfig b/boards/arm/stm32f412g_disco/stm32f412g_disco_defconfig index efc980c8789e2..1992a4de58c96 100644 --- a/boards/arm/stm32f412g_disco/stm32f412g_disco_defconfig +++ b/boards/arm/stm32f412g_disco/stm32f412g_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO ports A, B, C, D, E CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f429i_disc1/stm32f429i_disc1.dts b/boards/arm/stm32f429i_disc1/stm32f429i_disc1.dts index 412af74b0ce0e..91e4b2cd99d7e 100644 --- a/boards/arm/stm32f429i_disc1/stm32f429i_disc1.dts +++ b/boards/arm/stm32f429i_disc1/stm32f429i_disc1.dts @@ -75,6 +75,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -85,18 +86,21 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_pc9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -104,6 +108,7 @@ &spi5 { pinctrl-0 = <&spi5_nss_pf6 &spi5_sck_pf7 &spi5_miso_pf8 &spi5_mosi_pf9>; + pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpioc 2 GPIO_ACTIVE_LOW>; ili9340@0 { @@ -128,6 +133,7 @@ &fmc_d4_pe7 &fmc_d5_pe8 &fmc_d6_pe9 &fmc_d7_pe10 &fmc_d8_pe11 &fmc_d9_pe12 &fmc_d10_pe13 &fmc_d11_pe14 &fmc_d12_pe15 &fmc_d13_pd8 &fmc_d14_pd9 &fmc_d15_pd10>; + pinctrl-names = "default"; sdram { status = "okay"; diff --git a/boards/arm/stm32f429i_disc1/stm32f429i_disc1_defconfig b/boards/arm/stm32f429i_disc1/stm32f429i_disc1_defconfig index 2d0275f88bddb..0e2f562dc0377 100644 --- a/boards/arm/stm32f429i_disc1/stm32f429i_disc1_defconfig +++ b/boards/arm/stm32f429i_disc1/stm32f429i_disc1_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f469i_disco/stm32f469i_disco.dts b/boards/arm/stm32f469i_disco/stm32f469i_disco.dts index 5d78a8cd1a68a..e7e3174c1d293 100644 --- a/boards/arm/stm32f469i_disco/stm32f469i_disco.dts +++ b/boards/arm/stm32f469i_disco/stm32f469i_disco.dts @@ -82,29 +82,34 @@ &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pg14 &usart6_rx_pg9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_sck_pd3 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpioh 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32f469i_disco/stm32f469i_disco_defconfig b/boards/arm/stm32f469i_disco/stm32f469i_disco_defconfig index 9b20e78fa204d..94a8f52809e7e 100644 --- a/boards/arm/stm32f469i_disco/stm32f469i_disco_defconfig +++ b/boards/arm/stm32f469i_disco/stm32f469i_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f4_disco/stm32f4_disco.dts b/boards/arm/stm32f4_disco/stm32f4_disco.dts index 70284649f0d3c..15a79e0a90ac7 100644 --- a/boards/arm/stm32f4_disco/stm32f4_disco.dts +++ b/boards/arm/stm32f4_disco/stm32f4_disco.dts @@ -60,6 +60,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -88,6 +89,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -98,6 +100,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; @@ -107,17 +110,20 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; &can1 { pinctrl-0 = <&can1_rx_pb8 &can1_tx_pb9>; + pinctrl-names = "default"; bus-speed = <125000>; status = "disabled"; }; &can2 { pinctrl-0 = <&can2_rx_pb5 &can2_tx_pb13>; + pinctrl-names = "default"; bus-speed = <125000>; status = "okay"; }; diff --git a/boards/arm/stm32f4_disco/stm32f4_disco_defconfig b/boards/arm/stm32f4_disco/stm32f4_disco_defconfig index 984563e2cd9ef..ad325266c72c9 100644 --- a/boards/arm/stm32f4_disco/stm32f4_disco_defconfig +++ b/boards/arm/stm32f4_disco/stm32f4_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f723e_disco/stm32f723e_disco.dts b/boards/arm/stm32f723e_disco/stm32f723e_disco.dts index d93265a16fe1a..c9296aab96a61 100644 --- a/boards/arm/stm32f723e_disco/stm32f723e_disco.dts +++ b/boards/arm/stm32f723e_disco/stm32f723e_disco.dts @@ -76,37 +76,44 @@ &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; }; &i2c2 { pinctrl-0 = <&i2c2_scl_ph4 &i2c2_sda_ph5>; + pinctrl-names = "default"; status = "okay"; }; &i2c3 { pinctrl-0 = <&i2c3_scl_pa8 &i2c3_sda_ph8>; + pinctrl-names = "default"; status = "okay"; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pb4 &spi1_mosi_pb5>; + pinctrl-names = "default"; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32f723e_disco/stm32f723e_disco_defconfig b/boards/arm/stm32f723e_disco/stm32f723e_disco_defconfig index 14ef250b8d19b..404cd5c1bb15f 100644 --- a/boards/arm/stm32f723e_disco/stm32f723e_disco_defconfig +++ b/boards/arm/stm32f723e_disco/stm32f723e_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f746g_disco/stm32f746g_disco.dts b/boards/arm/stm32f746g_disco/stm32f746g_disco.dts index 230bec2aed121..55af87753d2ae 100644 --- a/boards/arm/stm32f746g_disco/stm32f746g_disco.dts +++ b/boards/arm/stm32f746g_disco/stm32f746g_disco.dts @@ -69,12 +69,14 @@ &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c3 { pinctrl-0 = <&i2c3_scl_ph7 &i2c3_sda_ph8>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -88,24 +90,28 @@ &spi2 { pinctrl-0 = <&spi2_sck_pi1 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpioa 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; zephyr_udc0: &usbotg_fs { pinctrl-0 = <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; + pinctrl-names = "default"; status = "okay"; }; @@ -116,6 +122,7 @@ zephyr_udc0: &usbotg_fs { pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pb4>; + pinctrl-names = "default"; }; }; @@ -128,6 +135,7 @@ zephyr_udc0: &usbotg_fs { pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9 &sdmmc1_d2_pc10 &sdmmc1_d3_pc11 &sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>; + pinctrl-names = "default"; cd-gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; }; @@ -142,12 +150,14 @@ zephyr_udc0: &usbotg_fs { ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pg14>; + pinctrl-names = "default"; }; &quadspi { pinctrl-0 = <&quadspi_clk_pb2 &quadspi_bk1_ncs_pb6 &quadspi_bk1_io0_pd11 &quadspi_bk1_io1_pd12 &quadspi_bk1_io2_pe2 &quadspi_bk1_io3_pd13>; + pinctrl-names = "default"; status = "okay"; n25q128a1: qspi-nor-flash@0 { diff --git a/boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig b/boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig index 1a5d7094fb118..fff57f6d5e40b 100644 --- a/boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig +++ b/boards/arm/stm32f746g_disco/stm32f746g_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32f769i_disco/stm32f769i_disco.dts b/boards/arm/stm32f769i_disco/stm32f769i_disco.dts index 22f8bbda51ce5..4c8fcdceb11fe 100644 --- a/boards/arm/stm32f769i_disco/stm32f769i_disco.dts +++ b/boards/arm/stm32f769i_disco/stm32f769i_disco.dts @@ -87,24 +87,28 @@ arduino_serial: &usart6 {}; &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart6 { pinctrl-0 = <&usart6_tx_pc6 &usart6_rx_pc7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi2 { pinctrl-0 = <&spi2_nss_pa11 &spi2_sck_pa12 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -119,6 +123,7 @@ arduino_serial: &usart6 {}; ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pg14>; + pinctrl-names = "default"; }; &sdmmc2 { @@ -126,6 +131,7 @@ arduino_serial: &usart6 {}; pinctrl-0 = <&sdmmc2_d0_pg9 &sdmmc2_d1_pg10 &sdmmc2_d2_pb3 &sdmmc2_d3_pb4 &sdmmc2_ck_pd6 &sdmmc2_cmd_pd7>; + pinctrl-names = "default"; cd-gpios = <&gpioi 15 GPIO_ACTIVE_LOW>; }; @@ -133,6 +139,7 @@ arduino_serial: &usart6 {}; pinctrl-0 = <&quadspi_clk_pb2 &quadspi_bk1_ncs_pb6 &quadspi_bk1_io0_pc9 &quadspi_bk1_io1_pc10 &quadspi_bk1_io2_pe2 &quadspi_bk1_io3_pd13>; + pinctrl-names = "default"; status = "okay"; mx25l51245g: qspi-nor-flash@0 { diff --git a/boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig b/boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig index ac676424d1f03..3a6c65f14b692 100644 --- a/boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig +++ b/boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32g0316_disco/stm32g0316_disco.dts b/boards/arm/stm32g0316_disco/stm32g0316_disco.dts index 1e9d8b48912fd..24e3754d3d4e5 100644 --- a/boards/arm/stm32g0316_disco/stm32g0316_disco.dts +++ b/boards/arm/stm32g0316_disco/stm32g0316_disco.dts @@ -68,6 +68,7 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pb7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32g0316_disco/stm32g0316_disco_defconfig b/boards/arm/stm32g0316_disco/stm32g0316_disco_defconfig index 1d03ce1a7128d..a790e064bf6c1 100644 --- a/boards/arm/stm32g0316_disco/stm32g0316_disco_defconfig +++ b/boards/arm/stm32g0316_disco/stm32g0316_disco_defconfig @@ -10,15 +10,16 @@ CONFIG_ISR_STACK_SIZE=512 # Serial Drivers CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y + # enable console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32g071b_disco/stm32g071b_disco.dts b/boards/arm/stm32g071b_disco/stm32g071b_disco.dts index 9c2b554be9412..a67d38d11f9eb 100644 --- a/boards/arm/stm32g071b_disco/stm32g071b_disco.dts +++ b/boards/arm/stm32g071b_disco/stm32g071b_disco.dts @@ -99,6 +99,7 @@ &usart3 { pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32g071b_disco/stm32g071b_disco_defconfig b/boards/arm/stm32g071b_disco/stm32g071b_disco_defconfig index 6e2fb1a966c9d..c4129b26a7fb3 100644 --- a/boards/arm/stm32g071b_disco/stm32g071b_disco_defconfig +++ b/boards/arm/stm32g071b_disco/stm32g071b_disco_defconfig @@ -13,11 +13,11 @@ CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# Pinmux Driver -CONFIG_PINMUX=y - # GPIO Controller CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32h735g_disco/stm32h735g_disco.dts b/boards/arm/stm32h735g_disco/stm32h735g_disco.dts index c09dccd85b31c..e062154e83ed3 100644 --- a/boards/arm/stm32h735g_disco/stm32h735g_disco.dts +++ b/boards/arm/stm32h735g_disco/stm32h735g_disco.dts @@ -74,17 +74,20 @@ &usart3 { pinctrl-0 = <&usart3_tx_pd8 &usart3_rx_pd9>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart7 { pinctrl-0 = <&uart7_tx_pf7 &uart7_rx_pf6>; + pinctrl-names = "default"; current-speed = <115200>; }; &i2c4 { pinctrl-0 = <&i2c4_scl_pf14 &i2c4_sda_pf15>; + pinctrl-names = "default"; }; &mac { @@ -97,6 +100,7 @@ ð_tx_en_pb11 ð_txd0_pb12 ð_txd1_pb13>; + pinctrl-names = "default"; }; &sdmmc1 { @@ -106,5 +110,6 @@ &sdmmc1_d3_pc11 &sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>; + pinctrl-names = "default"; cd-gpios = <&gpiof 5 GPIO_ACTIVE_LOW>; }; diff --git a/boards/arm/stm32h735g_disco/stm32h735g_disco_defconfig b/boards/arm/stm32h735g_disco/stm32h735g_disco_defconfig index 485f33baef7b0..389bdf15335bb 100644 --- a/boards/arm/stm32h735g_disco/stm32h735g_disco_defconfig +++ b/boards/arm/stm32h735g_disco/stm32h735g_disco_defconfig @@ -15,11 +15,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi b/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi index bad2ed721aeb5..67c2886403428 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco.dtsi @@ -77,15 +77,18 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; }; &uart8 { pinctrl-0 = <&uart8_tx_pj8 &uart8_rx_pj9>; + pinctrl-names = "default"; current-speed = <115200>; }; &spi5 { pinctrl-0 = <&spi5_nss_pk1 &spi5_sck_pk0 &spi5_miso_pj11 &spi5_mosi_pj10>; + pinctrl-names = "default"; }; diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig index 49e3780ca13d2..2f437301c8507 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m4_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32H747XX=y # Board config should be specified since there are 2 possible targets CONFIG_BOARD_STM32H747I_DISCO_M4=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -27,3 +24,6 @@ CONFIG_SERIAL=y # By default CONSOLE is assigned to m7 #CONFIG_CONSOLE=y #CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts index 4fc50f4ce1944..066c672128373 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7.dts @@ -113,6 +113,7 @@ ð_tx_en_pg11 ð_txd0_pg13 ð_txd1_pg12>; + pinctrl-names = "default"; }; &rng { @@ -136,6 +137,7 @@ &fmc_d23_ph15 &fmc_d24_pi0 &fmc_d25_pi1 &fmc_d26_pi2 &fmc_d27_pi3 &fmc_d28_pi6 &fmc_d29_pi7 &fmc_d30_pi9 &fmc_d31_pi10>; + pinctrl-names = "default"; sdram { status = "okay"; @@ -166,6 +168,7 @@ pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9 &sdmmc1_d2_pc10 &sdmmc1_d3_pc11 &sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>; + pinctrl-names = "default"; cd-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>; }; diff --git a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig index 9da952ab6ffd8..8d13679ff1368 100644 --- a/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig +++ b/boards/arm/stm32h747i_disco/stm32h747i_disco_m7_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32H747XX=y # Board config should be specified since there are 2 possible targets CONFIG_BOARD_STM32H747I_DISCO_M7=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -28,3 +25,6 @@ CONFIG_SERIAL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32l1_disco/stm32l1_disco.dts b/boards/arm/stm32l1_disco/stm32l1_disco.dts index f20723095c650..aacf7afae2350 100644 --- a/boards/arm/stm32l1_disco/stm32l1_disco.dts +++ b/boards/arm/stm32l1_disco/stm32l1_disco.dts @@ -68,30 +68,35 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -99,11 +104,13 @@ &spi1 { pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32l1_disco/stm32l1_disco_defconfig b/boards/arm/stm32l1_disco/stm32l1_disco_defconfig index 50b83601aafea..dfbf82011e57f 100644 --- a/boards/arm/stm32l1_disco/stm32l1_disco_defconfig +++ b/boards/arm/stm32l1_disco/stm32l1_disco_defconfig @@ -10,11 +10,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # Enable Clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32l476g_disco/stm32l476g_disco.dts b/boards/arm/stm32l476g_disco/stm32l476g_disco.dts index 6f6b311e6e7fb..ff06524845a4e 100644 --- a/boards/arm/stm32l476g_disco/stm32l476g_disco.dts +++ b/boards/arm/stm32l476g_disco/stm32l476g_disco.dts @@ -89,6 +89,7 @@ &usart2 { pinctrl-0 = <&usart2_tx_pd5 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; diff --git a/boards/arm/stm32l476g_disco/stm32l476g_disco_defconfig b/boards/arm/stm32l476g_disco/stm32l476g_disco_defconfig index f1d5b8011ba4a..0f0f47059fe07 100644 --- a/boards/arm/stm32l476g_disco/stm32l476g_disco_defconfig +++ b/boards/arm/stm32l476g_disco/stm32l476g_disco_defconfig @@ -12,9 +12,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32l496g_disco/stm32l496g_disco.dts b/boards/arm/stm32l496g_disco/stm32l496g_disco.dts index dbbee2d0a24dc..19697e2267686 100644 --- a/boards/arm/stm32l496g_disco/stm32l496g_disco.dts +++ b/boards/arm/stm32l496g_disco/stm32l496g_disco.dts @@ -87,18 +87,21 @@ &usart1 { pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pg10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pd6>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &lpuart1 { pinctrl-0 = <&lpuart1_tx_pg7 &lpuart1_rx_pg8>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -109,17 +112,20 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &spi1 { pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pb4 &spi1_mosi_pb5>; + pinctrl-names = "default"; cs-gpios = <&gpioa 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; @@ -132,10 +138,12 @@ pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9 &sdmmc1_d2_pc10 &sdmmc1_d3_pc11 &sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>; + pinctrl-names = "default"; status = "okay"; }; &adc1 { pinctrl-0 = < &adc1_in2_pc1>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32l496g_disco/stm32l496g_disco_defconfig b/boards/arm/stm32l496g_disco/stm32l496g_disco_defconfig index be068397cfb39..d2d940208b5ce 100644 --- a/boards/arm/stm32l496g_disco/stm32l496g_disco_defconfig +++ b/boards/arm/stm32l496g_disco/stm32l496g_disco_defconfig @@ -12,9 +12,6 @@ CONFIG_HW_STACK_PROTECTION=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIOs CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_CLOCK_CONTROL=y # console CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk.dts b/boards/arm/stm32l562e_dk/stm32l562e_dk.dts index 41ccb4e4daf47..c6149a535a991 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk.dts +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk.dts @@ -31,10 +31,6 @@ cpu-power-states = <&stop0 &stop1 &stop2>; }; -&usart1 { - pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; -}; - &lptim1 { status = "okay"; }; diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi b/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi index d724ba4f85135..52dd97224f627 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi @@ -81,17 +81,21 @@ &usart1 { current-speed = <115200>; + pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pc10 &usart3_rx_pc11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; @@ -109,6 +113,7 @@ &spi1 { pinctrl-0 = <&spi1_sck_pg2 &spi1_miso_pg3 &spi1_mosi_pg4>; + pinctrl-names = "default"; cs-gpios = <&gpiog 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; status = "okay"; @@ -128,26 +133,31 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa0>; + pinctrl-names = "default"; }; }; &dac1 { status = "okay"; pinctrl-0 = <&dac1_out1_pa4>; + pinctrl-names = "default"; }; &adc1 { pinctrl-0 = <&adc1_in13_pc4>; + pinctrl-names = "default"; status = "okay"; }; &spi3 { pinctrl-0 = <&spi3_sck_pg9 &spi3_mosi_pb5 &spi3_miso_pb4>; + pinctrl-names = "default"; cs-gpios = <&gpioe 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; status = "okay"; }; zephyr_udc0: &usb { pinctrl-0 = <&usb_dp_pa12 &usb_dm_pa11>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk_defconfig b/boards/arm/stm32l562e_dk/stm32l562e_dk_defconfig index 3b64093e6c88b..6646832e7ef7e 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk_defconfig +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L562XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -24,3 +21,6 @@ CONFIG_ARM_MPU=y # Enable HW stack protection CONFIG_HW_STACK_PROTECTION=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk_ns_defconfig b/boards/arm/stm32l562e_dk/stm32l562e_dk_ns_defconfig index 6b9bb5dd413e0..c28424d306a05 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk_ns_defconfig +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk_ns_defconfig @@ -6,9 +6,6 @@ CONFIG_SOC_STM32L562XX=y # enable uart driver CONFIG_SERIAL=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y @@ -25,3 +22,6 @@ CONFIG_ARM_MPU=y CONFIG_ARM_TRUSTZONE_M=y CONFIG_RUNTIME_NMI=y CONFIG_TRUSTED_EXECUTION_NONSECURE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2.dts b/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2.dts index 1c4b4474e9add..2704451697796 100644 --- a/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2.dts +++ b/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2.dts @@ -58,6 +58,7 @@ &spi4{ pinctrl-0 = <&spi4_nss_pe11 &spi4_sck_pe12 &spi4_miso_pe13 &spi4_mosi_pe14>; + pinctrl-names = "default"; status = "okay"; }; @@ -66,17 +67,20 @@ &spi5{ pinctrl-0 = <&spi5_nss_pf6 &spi5_sck_pf7 &spi5_miso_pf8 &spi5_mosi_pf9>; + pinctrl-names = "default"; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb12>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &uart7 { pinctrl-0 = <&uart7_tx_pe8 &uart7_rx_pe7>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -87,6 +91,7 @@ &i2c5 { pinctrl-0 = <&i2c5_scl_pa11 &i2c5_sda_pa12>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; diff --git a/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2_defconfig b/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2_defconfig index 9c8d92a3dccd4..66503dc240673 100644 --- a/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2_defconfig +++ b/boards/arm/stm32mp157c_dk2/stm32mp157c_dk2_defconfig @@ -14,9 +14,6 @@ CONFIG_HW_STACK_PROTECTION=y CONFIG_SERIAL=y CONFIG_UART_INTERRUPT_DRIVEN=y -# pin mux configuration -CONFIG_PINMUX=y - # clock configuration CONFIG_CLOCK_CONTROL=y @@ -27,3 +24,6 @@ CONFIG_RAM_CONSOLE_BUFFER_SIZE=1024 # uart console (overrides remote proc console) CONFIG_UART_CONSOLE=n + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/stm32vl_disco/stm32vl_disco.dts b/boards/arm/stm32vl_disco/stm32vl_disco.dts index ce16b5130761d..b869e362ebc98 100644 --- a/boards/arm/stm32vl_disco/stm32vl_disco.dts +++ b/boards/arm/stm32vl_disco/stm32vl_disco.dts @@ -66,30 +66,35 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_scl_pb6 &i2c1_sda_pb7>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; @@ -97,12 +102,14 @@ &spi1 { pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; }; @@ -113,5 +120,6 @@ pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; diff --git a/boards/arm/stm32vl_disco/stm32vl_disco_defconfig b/boards/arm/stm32vl_disco/stm32vl_disco_defconfig index a0604379f5527..ee2e8b8462ac5 100644 --- a/boards/arm/stm32vl_disco/stm32vl_disco_defconfig +++ b/boards/arm/stm32vl_disco/stm32vl_disco_defconfig @@ -17,11 +17,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/arm/waveshare_open103z/waveshare_open103z.dts b/boards/arm/waveshare_open103z/waveshare_open103z.dts index b8613a5b77615..42c32d027fdcb 100644 --- a/boards/arm/waveshare_open103z/waveshare_open103z.dts +++ b/boards/arm/waveshare_open103z/waveshare_open103z.dts @@ -98,12 +98,14 @@ &usart1 { pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; &usart2 { pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>; + pinctrl-names = "default"; current-speed = <115200>; status = "okay"; }; @@ -111,29 +113,34 @@ &spi1 { pinctrl-0 = <&spi1_nss_master_pa4 &spi1_sck_master_pa5 &spi1_miso_master_pa6 &spi1_mosi_master_pa7>; + pinctrl-names = "default"; status = "okay"; }; &spi2 { pinctrl-0 = <&spi2_nss_master_pb12 &spi2_sck_master_pb13 &spi2_miso_master_pb14 &spi2_mosi_master_pb15>; + pinctrl-names = "default"; status = "okay"; }; &i2c1 { pinctrl-0 = <&i2c1_sda_pb7 &i2c1_scl_pb6>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &i2c2 { pinctrl-0 = <&i2c2_sda_pb11 &i2c2_scl_pb10>; + pinctrl-names = "default"; status = "okay"; clock-frequency = ; }; &can1 { pinctrl-0 = <&can_rx_pb8 &can_tx_pb9>; + pinctrl-names = "default"; /* * make sure CAN and USB are not enabled at the same time * because they share interrupts 19, 20 (stm32f103Xb.dtsi) @@ -154,6 +161,7 @@ zephyr_udc0: &usb { * reference: RM0008 rev20 page 205 */ pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>; + pinctrl-names = "default"; status = "okay"; disconnect-gpios = <&gpiog 15 GPIO_ACTIVE_HIGH>; }; @@ -164,6 +172,7 @@ zephyr_udc0: &usb { pwm1: pwm { status = "okay"; pinctrl-0 = <&tim1_ch1_pwm_pa8>; + pinctrl-names = "default"; }; }; @@ -173,5 +182,6 @@ zephyr_udc0: &usb { &adc1 { pinctrl-0 = <&adc1_in0_pa0>; + pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/arm/waveshare_open103z/waveshare_open103z_defconfig b/boards/arm/waveshare_open103z/waveshare_open103z_defconfig index e86eadbf22bbb..765fc062bd7db 100644 --- a/boards/arm/waveshare_open103z/waveshare_open103z_defconfig +++ b/boards/arm/waveshare_open103z/waveshare_open103z_defconfig @@ -9,11 +9,11 @@ CONFIG_SERIAL=y CONFIG_CONSOLE=y CONFIG_UART_CONSOLE=y -# enable pinmux -CONFIG_PINMUX=y - # enable GPIO CONFIG_GPIO=y # enable clocks CONFIG_CLOCK_CONTROL=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/drivers/adc/adc_stm32.c b/drivers/adc/adc_stm32.c index 8b7d8ed5e4677..b26cca30b1aa7 100644 --- a/drivers/adc/adc_stm32.c +++ b/drivers/adc/adc_stm32.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -29,7 +30,6 @@ LOG_MODULE_REGISTER(adc_stm32); #include -#include #if defined(CONFIG_SOC_SERIES_STM32F3X) #if defined(ADC1_V2_5) @@ -259,8 +259,7 @@ struct adc_stm32_cfg { ADC_TypeDef *base; void (*irq_cfg_func)(void); struct stm32_pclken pclken; - const struct soc_gpio_pinctrl *pinctrl; - size_t pinctrl_len; + const struct pinctrl_dev_config *pcfg; }; static int check_buffer_size(const struct adc_sequence *sequence, @@ -838,9 +837,7 @@ static int adc_stm32_init(const struct device *dev) } /* Configure dt provided device signals when available */ - err = stm32_dt_pinctrl_configure(config->pinctrl, - config->pinctrl_len, - (uint32_t)config->base); + err = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); if (err < 0) { LOG_ERR("ADC pinctrl setup failed (%d)", err); return err; @@ -1046,8 +1043,7 @@ static const struct adc_driver_api api_stm32_driver_api = { \ static void adc_stm32_cfg_func_##index(void); \ \ -static const struct soc_gpio_pinctrl adc_pins_##index[] = \ - ST_STM32_DT_INST_PINCTRL(index, 0); \ +PINCTRL_DT_INST_DEFINE(index) \ \ static const struct adc_stm32_cfg adc_stm32_cfg_##index = { \ .base = (ADC_TypeDef *)DT_INST_REG_ADDR(index), \ @@ -1056,8 +1052,7 @@ static const struct adc_stm32_cfg adc_stm32_cfg_##index = { \ .enr = DT_INST_CLOCKS_CELL(index, bits), \ .bus = DT_INST_CLOCKS_CELL(index, bus), \ }, \ - .pinctrl = adc_pins_##index, \ - .pinctrl_len = ARRAY_SIZE(adc_pins_##index), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(index), \ }; \ static struct adc_stm32_data adc_stm32_data_##index = { \ ADC_CONTEXT_INIT_TIMER(adc_stm32_data_##index, ctx), \ diff --git a/drivers/can/can_stm32.c b/drivers/can/can_stm32.c index 2b0fbebbe9df1..cf55c4a9c0d77 100644 --- a/drivers/can/can_stm32.c +++ b/drivers/can/can_stm32.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include #include #include @@ -454,9 +454,7 @@ static int can_stm32_init(const struct device *dev) } /* Configure dt provided device signals when available */ - ret = stm32_dt_pinctrl_configure(cfg->pinctrl, - cfg->pinctrl_len, - (uint32_t)cfg->can); + ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("CAN pinctrl setup failed (%d)", ret); return ret; @@ -1133,8 +1131,7 @@ static const struct can_driver_api can_api_funcs = { static void config_can_1_irq(CAN_TypeDef *can); -static const struct soc_gpio_pinctrl pins_can_1[] = - ST_STM32_DT_PINCTRL(can1, 0); +PINCTRL_DT_DEFINE(DT_NODELABEL(can1)) static const struct can_stm32_config can_stm32_cfg_1 = { .can = (CAN_TypeDef *)DT_REG_ADDR(DT_NODELABEL(can1)), @@ -1150,8 +1147,7 @@ static const struct can_stm32_config can_stm32_cfg_1 = { .bus = DT_CLOCKS_CELL(DT_NODELABEL(can1), bus), }, .config_irq = config_can_1_irq, - .pinctrl = pins_can_1, - .pinctrl_len = ARRAY_SIZE(pins_can_1) + .pcfg = PINCTRL_DT_DEV_CONFIG_GET(DT_NODELABEL(can1)) }; static struct can_stm32_data can_stm32_dev_data_1; @@ -1231,8 +1227,7 @@ NET_DEVICE_INIT(socket_can_stm32_1, SOCKET_CAN_NAME_1, socket_can_init_1, static void config_can_2_irq(CAN_TypeDef *can); -static const struct soc_gpio_pinctrl pins_can_2[] = - ST_STM32_DT_PINCTRL(can2, 0); +PINCTRL_DT_DEFINE(DT_NODELABEL(can2)) static const struct can_stm32_config can_stm32_cfg_2 = { .can = (CAN_TypeDef *)DT_REG_ADDR(DT_NODELABEL(can2)), @@ -1249,8 +1244,7 @@ static const struct can_stm32_config can_stm32_cfg_2 = { .bus = DT_CLOCKS_CELL(DT_NODELABEL(can2), bus), }, .config_irq = config_can_2_irq, - .pinctrl = pins_can_2, - .pinctrl_len = ARRAY_SIZE(pins_can_2) + .pcfg = PINCTRL_DT_DEV_CONFIG_GET(DT_NODELABEL(can2)) }; static struct can_stm32_data can_stm32_dev_data_2; diff --git a/drivers/can/can_stm32.h b/drivers/can/can_stm32.h index 0e8241ca0a9ed..cf279197eabe6 100644 --- a/drivers/can/can_stm32.h +++ b/drivers/can/can_stm32.h @@ -77,8 +77,7 @@ struct can_stm32_config { uint8_t ts2; struct stm32_pclken pclken; void (*config_irq)(CAN_TypeDef *can); - const struct soc_gpio_pinctrl *pinctrl; - size_t pinctrl_len; + const struct pinctrl_dev_config *pcfg; }; #endif /*ZEPHYR_DRIVERS_CAN_STM32_CAN_H_*/ diff --git a/drivers/can/can_stm32fd.c b/drivers/can/can_stm32fd.c index ee610eba4c058..54c621c0e9be7 100644 --- a/drivers/can/can_stm32fd.c +++ b/drivers/can/can_stm32fd.c @@ -5,11 +5,11 @@ */ #include +#include #include #include #include #include "can_stm32fd.h" -#include #include LOG_MODULE_DECLARE(can_driver, CONFIG_CAN_LOG_LEVEL); @@ -72,9 +72,7 @@ static int can_stm32fd_init(const struct device *dev) int ret; /* Configure dt provided device signals when available */ - ret = stm32_dt_pinctrl_configure(cfg->pinctrl, - ARRAY_SIZE(cfg->pinctrl), - (uint32_t)mcan_cfg->can); + ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("CAN pinctrl setup failed (%d)", ret); return ret; @@ -235,6 +233,9 @@ static void config_can_##inst##_irq(void) \ #ifdef CONFIG_CAN_FD_MODE #define CAN_STM32FD_CFG_INST(inst) \ + \ +PINCTRL_DT_INST_DEFINE(inst) \ + \ static const struct can_stm32fd_config can_stm32fd_cfg_##inst = { \ .msg_sram = (struct can_mcan_msg_sram *) \ DT_INST_REG_ADDR_BY_NAME(inst, message_ram), \ @@ -258,12 +259,15 @@ static const struct can_stm32fd_config can_stm32fd_cfg_##inst = { \ .tx_delay_comp_offset = \ DT_INST_PROP(inst, tx_delay_comp_offset) \ }, \ - .pinctrl = ST_STM32_DT_INST_PINCTRL(inst, 0), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(inst), \ }; #else /* CONFIG_CAN_FD_MODE */ #define CAN_STM32FD_CFG_INST(inst) \ + \ +PINCTRL_DT_INST_DEFINE(inst) \ + \ static const struct can_stm32fd_config can_stm32fd_cfg_##inst = { \ .msg_sram = (struct can_mcan_msg_sram *) \ DT_INST_REG_ADDR_BY_NAME(inst, message_ram), \ @@ -278,7 +282,7 @@ static const struct can_stm32fd_config can_stm32fd_cfg_##inst = { \ DT_INST_PROP_OR(inst, phase_seg1, 0), \ .ts2 = DT_INST_PROP_OR(inst, phase_seg2, 0), \ }, \ - .pinctrl = ST_STM32_DT_INST_PINCTRL(inst, 0), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(inst), \ }; #endif /* CONFIG_CAN_FD_MODE */ diff --git a/drivers/can/can_stm32fd.h b/drivers/can/can_stm32fd.h index a6637adb8d5b3..3a35884842d0b 100644 --- a/drivers/can/can_stm32fd.h +++ b/drivers/can/can_stm32fd.h @@ -9,7 +9,6 @@ #define ZEPHYR_DRIVERS_CAN_STM32FD_H_ #include "can_mcan.h" -#include #define DEV_DATA(dev) ((struct can_stm32fd_data *)(dev)->data) #define DEV_CFG(dev) ((const struct can_stm32fd_config *)(dev)->config) @@ -18,8 +17,7 @@ struct can_stm32fd_config { struct can_mcan_msg_sram *msg_sram; void (*config_irq)(void); struct can_mcan_config mcan_cfg; - /* CAN always has an RX and TX pin. Hence, hardcode it to two*/ - const struct soc_gpio_pinctrl pinctrl[2]; + const struct pinctrl_dev_config *pcfg; }; struct can_stm32fd_data { diff --git a/drivers/dac/dac_stm32.c b/drivers/dac/dac_stm32.c index d4513c139a2a4..2892d211fc88b 100644 --- a/drivers/dac/dac_stm32.c +++ b/drivers/dac/dac_stm32.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -20,7 +21,6 @@ LOG_MODULE_REGISTER(dac_stm32); #include -#include /* some low-end MCUs have DAC with only one channel */ #ifdef LL_DAC_CHANNEL_2 @@ -47,9 +47,7 @@ struct dac_stm32_cfg { /* Clock configuration. */ struct stm32_pclken pclken; /* pinctrl configurations. */ - const struct soc_gpio_pinctrl *pinctrl; - /* Number of pinctrl configurations. */ - size_t pinctrl_len; + const struct pinctrl_dev_config *pcfg; }; /* Runtime driver data */ @@ -129,9 +127,7 @@ static int dac_stm32_init(const struct device *dev) } /* Configure dt provided device signals when available */ - err = stm32_dt_pinctrl_configure(cfg->pinctrl, - cfg->pinctrl_len, - (uint32_t)cfg->base); + err = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (err < 0) { LOG_ERR("DAC pinctrl setup failed (%d)", err); return err; @@ -148,8 +144,7 @@ static const struct dac_driver_api api_stm32_driver_api = { #define STM32_DAC_INIT(index) \ \ -static const struct soc_gpio_pinctrl dac_pins_##index[] = \ - ST_STM32_DT_INST_PINCTRL(index, 0); \ +PINCTRL_DT_INST_DEFINE(index) \ \ static const struct dac_stm32_cfg dac_stm32_cfg_##index = { \ .base = (DAC_TypeDef *)DT_INST_REG_ADDR(index), \ @@ -157,8 +152,7 @@ static const struct dac_stm32_cfg dac_stm32_cfg_##index = { \ .enr = DT_INST_CLOCKS_CELL(index, bits), \ .bus = DT_INST_CLOCKS_CELL(index, bus), \ }, \ - .pinctrl = dac_pins_##index, \ - .pinctrl_len = ARRAY_SIZE(dac_pins_##index), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(index), \ }; \ \ static struct dac_stm32_data dac_stm32_data_##index = { \ diff --git a/drivers/disk/sdmmc_stm32.c b/drivers/disk/sdmmc_stm32.c index 1eaa6822e3ffc..b5e0944b1788f 100644 --- a/drivers/disk/sdmmc_stm32.c +++ b/drivers/disk/sdmmc_stm32.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -45,10 +45,7 @@ struct stm32_sdmmc_priv { int flags; } pe; struct stm32_pclken pclken; - struct { - const struct soc_gpio_pinctrl *list; - size_t len; - } pinctrl; + const struct pinctrl_dev_config *pcfg; }; #ifdef CONFIG_SDMMC_STM32_HWFC @@ -444,9 +441,7 @@ static int disk_stm32_sdmmc_init(const struct device *dev) k_work_init(&priv->work, stm32_sdmmc_cd_handler); /* Configure dt provided device signals when available */ - err = stm32_dt_pinctrl_configure(priv->pinctrl.list, - priv->pinctrl.len, - (uint32_t)priv->hsd.Instance); + err = pinctrl_apply_state(priv->pcfg, PINCTRL_STATE_DEFAULT); if (err < 0) { return err; } @@ -489,8 +484,7 @@ static int disk_stm32_sdmmc_init(const struct device *dev) #if DT_NODE_HAS_STATUS(DT_DRV_INST(0), okay) -static const struct soc_gpio_pinctrl sdmmc_pins_1[] = - ST_STM32_DT_INST_PINCTRL(0, 0); +PINCTRL_DT_INST_DEFINE(0) static void stm32_sdmmc_irq_config_func(const struct device *dev) { @@ -524,10 +518,7 @@ static struct stm32_sdmmc_priv stm32_sdmmc_priv_1 = { .bus = DT_INST_CLOCKS_CELL(0, bus), .enr = DT_INST_CLOCKS_CELL(0, bits), }, - .pinctrl = { - .list = sdmmc_pins_1, - .len = ARRAY_SIZE(sdmmc_pins_1) - } + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(0), }; DEVICE_DT_INST_DEFINE(0, disk_stm32_sdmmc_init, NULL, diff --git a/drivers/ethernet/eth_dwmac_stm32h7x.c b/drivers/ethernet/eth_dwmac_stm32h7x.c index 107c17268a51d..6b01e70865c7b 100644 --- a/drivers/ethernet/eth_dwmac_stm32h7x.c +++ b/drivers/ethernet/eth_dwmac_stm32h7x.c @@ -23,12 +23,13 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include #include -#include +#include #include "eth_dwmac_priv.h" -static const struct soc_gpio_pinctrl eth0_pins[] = - ST_STM32_DT_INST_PINCTRL(0, 0); +PINCTRL_DT_INST_DEFINE(0) +static const struct pinctrl_dev_config *eth0_pcfg = + PINCTRL_DT_INST_DEV_CONFIG_GET(0); static const struct stm32_pclken pclken = { .bus = DT_INST_CLOCKS_CELL_BY_NAME(0, stmmaceth, bus), @@ -57,8 +58,7 @@ int dwmac_bus_init(struct dwmac_priv *p) return -EIO; } - ret = stm32_dt_pinctrl_configure(eth0_pins, ARRAY_SIZE(eth0_pins), - (uint32_t)p->base_addr); + ret = pinctrl_apply_state(eth0_pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("Could not configure ethernet pins"); return ret; diff --git a/drivers/ethernet/eth_stm32_hal.c b/drivers/ethernet/eth_stm32_hal.c index b41d145cbfdec..3275b1b31ba4d 100644 --- a/drivers/ethernet/eth_stm32_hal.c +++ b/drivers/ethernet/eth_stm32_hal.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME); #include #include #include -#include +#include #include "eth.h" #include "eth_stm32_hal_priv.h" @@ -658,8 +658,7 @@ static int eth_initialize(const struct device *dev) } /* configure pinmux */ - ret = stm32_dt_pinctrl_configure(cfg->pinctrl, cfg->pinctrl_len, - (uint32_t)dev_data->heth.Instance); + ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("Could not configure ethernet pins"); return ret; @@ -868,7 +867,7 @@ static void eth0_irq_config(void) irq_enable(DT_INST_IRQN(0)); } -static const struct soc_gpio_pinctrl eth0_pins[] = ST_STM32_DT_INST_PINCTRL(0, 0); +PINCTRL_DT_INST_DEFINE(0) static const struct eth_stm32_hal_dev_cfg eth0_config = { .config_func = eth0_irq_config, @@ -882,8 +881,7 @@ static const struct eth_stm32_hal_dev_cfg eth0_config = { .pclken_ptp = {.bus = DT_INST_CLOCKS_CELL_BY_NAME(0, mac_clk_ptp, bus), .enr = DT_INST_CLOCKS_CELL_BY_NAME(0, mac_clk_ptp, bits)}, #endif /* !CONFIG_SOC_SERIES_STM32H7X */ - .pinctrl = eth0_pins, - .pinctrl_len = ARRAY_SIZE(eth0_pins), + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(0), }; static struct eth_stm32_hal_dev_data eth0_data = { diff --git a/drivers/ethernet/eth_stm32_hal_priv.h b/drivers/ethernet/eth_stm32_hal_priv.h index b000b3685f757..ccc8d0dad2eb6 100644 --- a/drivers/ethernet/eth_stm32_hal_priv.h +++ b/drivers/ethernet/eth_stm32_hal_priv.h @@ -29,8 +29,7 @@ struct eth_stm32_hal_dev_cfg { #if !defined(CONFIG_SOC_SERIES_STM32H7X) struct stm32_pclken pclken_ptp; #endif /* !defined(CONFIG_SOC_SERIES_STM32H7X) */ - const struct soc_gpio_pinctrl *pinctrl; - size_t pinctrl_len; + const struct pinctrl_dev_config *pcfg; }; /* Device run time data */ diff --git a/drivers/flash/flash_stm32_qspi.c b/drivers/flash/flash_stm32_qspi.c index 48d2db25a02ae..83a0d14645d22 100644 --- a/drivers/flash/flash_stm32_qspi.c +++ b/drivers/flash/flash_stm32_qspi.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -63,8 +63,7 @@ struct flash_stm32_qspi_config { irq_config_func_t irq_config; size_t flash_size; uint32_t max_frequency; - const struct soc_gpio_pinctrl *pinctrl_list; - size_t pinctrl_list_size; + const struct pinctrl_dev_config *pcfg; }; struct flash_stm32_qspi_data { @@ -652,9 +651,7 @@ static int flash_stm32_qspi_init(const struct device *dev) int ret; /* Signals configuration */ - ret = stm32_dt_pinctrl_configure(dev_cfg->pinctrl_list, - dev_cfg->pinctrl_list_size, - (uint32_t)dev_cfg->regs); + ret = pinctrl_apply_state(dev_cfg->pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("QSPI pinctrl setup failed (%d)", ret); return ret; @@ -860,11 +857,10 @@ static int flash_stm32_qspi_init(const struct device *dev) static void flash_stm32_qspi_irq_config_func(const struct device *dev); -static const struct soc_gpio_pinctrl qspi_pins[] = - ST_STM32_DT_PINCTRL(quadspi, 0); - #define STM32_QSPI_NODE DT_PARENT(DT_DRV_INST(0)) +PINCTRL_DT_DEFINE(STM32_QSPI_NODE) + static const struct flash_stm32_qspi_config flash_stm32_qspi_cfg = { .regs = (QUADSPI_TypeDef *)DT_REG_ADDR(STM32_QSPI_NODE), .pclken = { @@ -874,8 +870,7 @@ static const struct flash_stm32_qspi_config flash_stm32_qspi_cfg = { .irq_config = flash_stm32_qspi_irq_config_func, .flash_size = DT_INST_PROP(0, size) / 8U, .max_frequency = DT_INST_PROP(0, qspi_max_frequency), - .pinctrl_list = qspi_pins, - .pinctrl_list_size = ARRAY_SIZE(qspi_pins), + .pcfg = PINCTRL_DT_DEV_CONFIG_GET(STM32_QSPI_NODE), }; static struct flash_stm32_qspi_data flash_stm32_qspi_dev_data = { diff --git a/drivers/i2c/i2c_ll_stm32.c b/drivers/i2c/i2c_ll_stm32.c index 484579480a9f3..cf7c5197a0501 100644 --- a/drivers/i2c/i2c_ll_stm32.c +++ b/drivers/i2c/i2c_ll_stm32.c @@ -14,8 +14,7 @@ #include #include #include -#include -#include +#include #include "i2c_ll_stm32.h" #define LOG_LEVEL CONFIG_I2C_LOG_LEVEL @@ -191,9 +190,7 @@ static int i2c_stm32_init(const struct device *dev) #endif /* Configure dt provided device signals when available */ - ret = stm32_dt_pinctrl_configure(cfg->pinctrl_list, - cfg->pinctrl_list_size, - (uint32_t)cfg->i2c); + ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("I2C pinctrl setup failed (%d)", ret); return ret; @@ -330,8 +327,7 @@ STM32_I2C_IRQ_HANDLER_DECL(name); \ \ DEFINE_TIMINGS(name) \ \ -static const struct soc_gpio_pinctrl i2c_pins_##name[] = \ - ST_STM32_DT_PINCTRL(name, 0); \ +PINCTRL_DT_DEFINE(DT_NODELABEL(name)) \ \ static const struct i2c_stm32_config i2c_stm32_cfg_##name = { \ .i2c = (I2C_TypeDef *)DT_REG_ADDR(DT_NODELABEL(name)), \ @@ -341,8 +337,7 @@ static const struct i2c_stm32_config i2c_stm32_cfg_##name = { \ }, \ STM32_I2C_IRQ_HANDLER_FUNCTION(name) \ .bitrate = DT_PROP(DT_NODELABEL(name), clock_frequency), \ - .pinctrl_list = i2c_pins_##name, \ - .pinctrl_list_size = ARRAY_SIZE(i2c_pins_##name), \ + .pcfg = PINCTRL_DT_DEV_CONFIG_GET(DT_NODELABEL(name)), \ USE_TIMINGS(name) \ }; \ \ diff --git a/drivers/i2c/i2c_ll_stm32.h b/drivers/i2c/i2c_ll_stm32.h index d72795dabcdd6..da822d9038993 100644 --- a/drivers/i2c/i2c_ll_stm32.h +++ b/drivers/i2c/i2c_ll_stm32.h @@ -32,8 +32,7 @@ struct i2c_stm32_config { struct stm32_pclken pclken; I2C_TypeDef *i2c; uint32_t bitrate; - const struct soc_gpio_pinctrl *pinctrl_list; - size_t pinctrl_list_size; + const struct pinctrl_dev_config *pcfg; #if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_i2c_v2) const struct i2c_config_timing *timings; size_t n_timings; diff --git a/drivers/i2s/i2s_ll_stm32.c b/drivers/i2s/i2s_ll_stm32.c index a95d1db401c9f..f7d7d525ee54b 100644 --- a/drivers/i2s/i2s_ll_stm32.c +++ b/drivers/i2s/i2s_ll_stm32.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "i2s_ll_stm32.h" #include @@ -669,9 +669,7 @@ static int i2s_stm32_initialize(const struct device *dev) } /* Configure dt provided device signals when available */ - ret = stm32_dt_pinctrl_configure(cfg->pinctrl_list, - cfg->pinctrl_list_size, - (uint32_t)cfg->i2s); + ret = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (ret < 0) { LOG_ERR("I2S pinctrl setup failed (%d)", ret); return ret; @@ -893,11 +891,11 @@ static const struct device *get_dev_from_tx_dma_channel(uint32_t dma_channel) } #define I2S_INIT(index, clk_sel) \ -static const struct soc_gpio_pinctrl i2s_pins_##index[] = \ - ST_STM32_DT_PINCTRL(i2s##index, 0);\ \ static void i2s_stm32_irq_config_func_##index(const struct device *dev);\ \ +PINCTRL_DT_DEFINE(DT_NODELABEL(i2s##index)) \ + \ static const struct i2s_stm32_cfg i2s_stm32_config_##index = { \ .i2s = (SPI_TypeDef *) DT_REG_ADDR(DT_NODELABEL(i2s##index)), \ .pclken = { \ @@ -905,8 +903,7 @@ static const struct i2s_stm32_cfg i2s_stm32_config_##index = { \ .bus = DT_CLOCKS_CELL(DT_NODELABEL(i2s##index), bus), \ }, \ .i2s_clk_sel = CLK_SEL_##clk_sel, \ - .pinctrl_list = i2s_pins_##index, \ - .pinctrl_list_size = ARRAY_SIZE(i2s_pins_##index), \ + .pcfg = PINCTRL_DT_DEV_CONFIG_GET(DT_NODELABEL(i2s##index)), \ .irq_config = i2s_stm32_irq_config_func_##index, \ }; \ \ diff --git a/drivers/i2s/i2s_ll_stm32.h b/drivers/i2s/i2s_ll_stm32.h index 5a4cede4b8f25..f0b24a623355d 100644 --- a/drivers/i2s/i2s_ll_stm32.h +++ b/drivers/i2s/i2s_ll_stm32.h @@ -72,8 +72,7 @@ struct i2s_stm32_cfg { SPI_TypeDef *i2s; struct stm32_pclken pclken; uint32_t i2s_clk_sel; - const struct soc_gpio_pinctrl *pinctrl_list; - size_t pinctrl_list_size; + const struct pinctrl_dev_config *pcfg; void (*irq_config)(const struct device *dev); }; diff --git a/drivers/memc/memc_stm32.c b/drivers/memc/memc_stm32.c index aa406ae5b194f..ceb59e5d50e1d 100644 --- a/drivers/memc/memc_stm32.c +++ b/drivers/memc/memc_stm32.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include LOG_MODULE_REGISTER(memc_stm32, CONFIG_MEMC_LOG_LEVEL); @@ -17,8 +17,7 @@ LOG_MODULE_REGISTER(memc_stm32, CONFIG_MEMC_LOG_LEVEL); struct memc_stm32_config { uint32_t fmc; struct stm32_pclken pclken; - const struct soc_gpio_pinctrl *pinctrl; - size_t pinctrl_len; + const struct pinctrl_dev_config *pcfg; }; static int memc_stm32_init(const struct device *dev) @@ -29,8 +28,7 @@ static int memc_stm32_init(const struct device *dev) const struct device *clk; /* configure pinmux */ - r = stm32_dt_pinctrl_configure(config->pinctrl, config->pinctrl_len, - config->fmc); + r = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); if (r < 0) { LOG_ERR("FMC pinctrl setup failed (%d)", r); return r; @@ -48,14 +46,13 @@ static int memc_stm32_init(const struct device *dev) return 0; } -static const struct soc_gpio_pinctrl pinctrl[] = ST_STM32_DT_INST_PINCTRL(0, 0); +PINCTRL_DT_INST_DEFINE(0) static const struct memc_stm32_config config = { .fmc = DT_INST_REG_ADDR(0), .pclken = { .bus = DT_INST_CLOCKS_CELL(0, bus), .enr = DT_INST_CLOCKS_CELL(0, bits) }, - .pinctrl = pinctrl, - .pinctrl_len = ARRAY_SIZE(pinctrl), + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(0), }; DEVICE_DT_INST_DEFINE(0, memc_stm32_init, NULL, NULL, diff --git a/drivers/pinctrl/CMakeLists.txt b/drivers/pinctrl/CMakeLists.txt index 4bee9b55c8a71..45fc7c2fa3658 100644 --- a/drivers/pinctrl/CMakeLists.txt +++ b/drivers/pinctrl/CMakeLists.txt @@ -5,3 +5,4 @@ zephyr_library() zephyr_library_sources(common.c) zephyr_library_sources_ifdef(CONFIG_PINCTRL_GD32_AF pinctrl_gd32_af.c) zephyr_library_sources_ifdef(CONFIG_PINCTRL_GD32_AFIO pinctrl_gd32_afio.c) +zephyr_library_sources_ifdef(CONFIG_PINCTRL_STM32 pinctrl_stm32.c) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 7744ea475b002..fbdc1f1349596 100644 --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig @@ -30,5 +30,6 @@ config PINCTRL_DYNAMIC peripheral at early boot stages depending on a certain input. source "drivers/pinctrl/Kconfig.gd32" +source "drivers/pinctrl/Kconfig.stm32" endif # PINCTRL diff --git a/drivers/pinctrl/Kconfig.stm32 b/drivers/pinctrl/Kconfig.stm32 new file mode 100644 index 0000000000000..c423d1bcedd28 --- /dev/null +++ b/drivers/pinctrl/Kconfig.stm32 @@ -0,0 +1,16 @@ +# Copyright (c) 2021 Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +config PINCTRL_STM32 + bool "Pin controller driver for STM32 MCUs" + depends on SOC_FAMILY_STM32 + default y + help + Enable pin controller driver for STM32 MCUs + +config PINCTRL_STM32_REMAP_INIT_PRIORITY + int "Remap initialization priority" + default 2 + help + Initialization priority for the routine in charge of configuring the + remap for pins PA11/12. diff --git a/drivers/pinctrl/pinctrl_stm32.c b/drivers/pinctrl/pinctrl_stm32.c new file mode 100644 index 0000000000000..1334b47aefe88 --- /dev/null +++ b/drivers/pinctrl/pinctrl_stm32.c @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2016 Open-RnD Sp. z o.o. + * Copyright (c) 2021 Linaro Limited + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include + +#include +#include +#include + +/** + * @brief Array containing pointers to each GPIO port. + * + * Entries will be NULL if the GPIO port is not enabled. + */ +static const struct device * const gpio_ports[] = { + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioa)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiob)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioc)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiod)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioe)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiof)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiog)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioh)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioi)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpioj)), + DEVICE_DT_GET_OR_NULL(DT_NODELABEL(gpiok)), +}; + +/** Number of GPIO ports. */ +static const size_t gpio_ports_cnt = ARRAY_SIZE(gpio_ports); + +#if DT_NODE_HAS_PROP(DT_NODELABEL(pinctrl), remap_pa11) +#define REMAP_PA11 DT_PROP(DT_NODELABEL(pinctrl), remap_pa11) +#endif +#if DT_NODE_HAS_PROP(DT_NODELABEL(pinctrl), remap_pa12) +#define REMAP_PA12 DT_PROP(DT_NODELABEL(pinctrl), remap_pa12) +#endif +#if DT_NODE_HAS_PROP(DT_NODELABEL(pinctrl), remap_pa11_pa12) +#define REMAP_PA11_PA12 DT_PROP(DT_NODELABEL(pinctrl), remap_pa11_pa12) +#endif + +#if REMAP_PA11 || REMAP_PA12 || REMAP_PA11_PA12 + +int stm32_pinmux_init_remap(const struct device *dev) +{ + ARG_UNUSED(dev); + +#if REMAP_PA11 || REMAP_PA12 + +#if !defined(CONFIG_SOC_SERIES_STM32G0X) +#error "Pin remap property available only on STM32G0 SoC series" +#endif + + LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SYSCFG); +#if REMAP_PA11 + LL_SYSCFG_EnablePinRemap(LL_SYSCFG_PIN_RMP_PA11); +#endif +#if REMAP_PA12 + LL_SYSCFG_EnablePinRemap(LL_SYSCFG_PIN_RMP_PA12); +#endif + +#elif REMAP_PA11_PA12 + +#if !defined(SYSCFG_CFGR1_PA11_PA12_RMP) +#error "Pin remap property available only on STM32F070x SoC series" +#endif + + LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_SYSCFG); + LL_SYSCFG_EnablePinRemap(); + +#endif /* (REMAP_PA11 || REMAP_PA12) || REMAP_PA11_PA12 */ + + return 0; +} + +SYS_INIT(stm32_pinmux_init_remap, PRE_KERNEL_1, + CONFIG_PINCTRL_STM32_REMAP_INIT_PRIORITY); + +#endif /* REMAP_PA11 || REMAP_PA12 || REMAP_PA11_PA12 */ + +#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) + +/** + * @brief Helper function to check and apply provided pinctrl remap + * configuration. + * + * Check operation verifies that pin remapping configuration is the same on all + * pins. If configuration is valid AFIO clock is enabled and remap is applied + * + * @param pins List of pins to be configured. + * @param pin_cnt Number of pins. + * + * @retval 0 If successful + * @retval -EINVAL If pins have an incompatible set of remaps. + */ +static int stm32_pins_remap(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt) +{ + uint8_t pos; + uint32_t reg_val; + volatile uint32_t *reg; + uint16_t remap; + + remap = (uint8_t)STM32_DT_PINMUX_REMAP(pins[0].pinmux); + + /* not remappable */ + if (remap == NO_REMAP) { + return 0; + } + + for (size_t i = 1U; i < pin_cnt; i++) { + if (STM32_DT_PINMUX_REMAP(pins[i].pinmux) != remap) { + return -EINVAL; + } + } + + /* A valid remapping configuration is available */ + /* Apply remapping before proceeding with pin configuration */ + LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_AFIO); + + if (STM32_REMAP_REG_GET(remap) == 0U) { + reg = &AFIO->MAPR; + } else { + reg = &AFIO->MAPR2; + } + + pos = STM32_REMAP_SHIFT_GET(remap); + + reg_val = *reg; + reg_val &= ~(STM32_REMAP_MASK_GET(remap) << pos); + reg_val |= STM32_REMAP_VAL_GET(remap) << pos; + *reg = reg_val; + + return 0; +} + +#endif /* DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) */ + +static int stm32_pin_configure(uint32_t pin, uint32_t func, uint32_t altf) +{ + const struct device *port_device; + int ret = 0; + + if (STM32_PORT(pin) >= gpio_ports_cnt) { + return -EINVAL; + } + + port_device = gpio_ports[STM32_PORT(pin)]; + + if ((port_device == NULL) || (!device_is_ready(port_device))) { + return -ENODEV; + } + +#ifdef CONFIG_PM_DEVICE_RUNTIME + ret = pm_device_runtime_get(port_device); + if (ret < 0) { + return ret; + } +#endif + + gpio_stm32_configure(port_device, STM32_PIN(pin), func, altf); + +#ifdef CONFIG_PM_DEVICE_RUNTIME + ret = pm_device_runtime_put(port_device); +#endif + + return ret; +} + +int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, + uintptr_t reg) +{ + uint32_t pin, mux; + uint32_t func = 0; + int ret = 0; + + ARG_UNUSED(reg); + +#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) + ret = stm32_pins_remap(pins, pin_cnt); + if (ret < 0) { + return ret; + } +#endif /* DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) */ + + for (uint8_t i = 0U; i < pin_cnt; i++) { + mux = pins[i].pinmux; + +#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) + uint32_t pupd; + + if (STM32_DT_PINMUX_FUNC(mux) == ALTERNATE) { + func = pins[i].pincfg | STM32_MODE_OUTPUT | STM32_CNF_ALT_FUNC; + } else if (STM32_DT_PINMUX_FUNC(mux) == ANALOG) { + func = pins[i].pincfg | STM32_MODE_INPUT | STM32_CNF_IN_ANALOG; + } else if (STM32_DT_PINMUX_FUNC(mux) == GPIO_IN) { + func = pins[i].pincfg | STM32_MODE_INPUT; + pupd = func & (STM32_PUPD_MASK << STM32_PUPD_SHIFT); + if (pupd == STM32_PUPD_NO_PULL) { + func = func | STM32_CNF_IN_FLOAT; + } else { + func = func | STM32_CNF_IN_PUPD; + } + } else { + /* Not supported */ + __ASSERT_NO_MSG(STM32_DT_PINMUX_FUNC(mux)); + } +#else + if (STM32_DT_PINMUX_FUNC(mux) < STM32_ANALOG) { + func = pins[i].pincfg | STM32_MODER_ALT_MODE; + } else if (STM32_DT_PINMUX_FUNC(mux) == STM32_ANALOG) { + func = STM32_MODER_ANALOG_MODE; + } else { + /* Not supported */ + __ASSERT_NO_MSG(STM32_DT_PINMUX_FUNC(mux)); + } +#endif /* DT_HAS_COMPAT_STATUS_OKAY(st_stm32f1_pinctrl) */ + + pin = STM32PIN(STM32_DT_PINMUX_PORT(mux), + STM32_DT_PINMUX_LINE(mux)); + + ret = stm32_pin_configure(pin, func, STM32_DT_PINMUX_FUNC(mux)); + if (ret < 0) { + return ret; + } + } + + return 0; +} diff --git a/drivers/pwm/pwm_stm32.c b/drivers/pwm/pwm_stm32.c index 167dd2d49ae27..443f99d04cd6d 100644 --- a/drivers/pwm/pwm_stm32.c +++ b/drivers/pwm/pwm_stm32.c @@ -13,12 +13,12 @@ #include #include #include +#include #include #include #include #include -#include #include LOG_MODULE_REGISTER(pwm_stm32, CONFIG_PWM_LOG_LEVEL); @@ -60,9 +60,7 @@ struct pwm_stm32_config { /** Clock configuration. */ struct stm32_pclken pclken; /** pinctrl configurations. */ - const struct soc_gpio_pinctrl *pinctrl; - /** Number of pinctrl configurations. */ - size_t pinctrl_len; + const struct pinctrl_dev_config *pcfg; #ifdef CONFIG_PWM_CAPTURE void (*irq_config_func)(const struct device *dev); #endif /* CONFIG_PWM_CAPTURE */ @@ -596,9 +594,7 @@ static int pwm_stm32_init(const struct device *dev) } /* configure pinmux */ - r = stm32_dt_pinctrl_configure(cfg->pinctrl, - cfg->pinctrl_len, - (uint32_t)cfg->timer); + r = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (r < 0) { LOG_ERR("PWM pinctrl setup failed (%d)", r); return r; @@ -666,8 +662,7 @@ replaced by 'st,prescaler' property in parent node, aka timers" static struct pwm_stm32_data pwm_stm32_data_##index; \ IRQ_CONFIG_FUNC(index) \ \ - static const struct soc_gpio_pinctrl pwm_pins_##index[] = \ - ST_STM32_DT_INST_PINCTRL(index, 0); \ + PINCTRL_DT_INST_DEFINE(index) \ \ static const struct pwm_stm32_config pwm_stm32_config_##index = { \ .timer = (TIM_TypeDef *)DT_REG_ADDR( \ @@ -678,8 +673,7 @@ replaced by 'st,prescaler' property in parent node, aka timers" (DT_PROP(DT_PARENT(DT_DRV_INST(index)), \ st_prescaler))), \ .pclken = DT_INST_CLK(index, timer), \ - .pinctrl = pwm_pins_##index, \ - .pinctrl_len = ARRAY_SIZE(pwm_pins_##index), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(index), \ CAPTURE_INIT(index) \ }; \ \ diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index a808c36c67b1e..0a9d5c0880933 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include @@ -1507,9 +1505,7 @@ static int uart_stm32_init(const struct device *dev) } /* Configure dt provided device signals when available */ - err = stm32_dt_pinctrl_configure(config->pinctrl_list, - config->pinctrl_list_size, - (uint32_t)UART_STRUCT(dev)); + err = pinctrl_apply_state(config->pcfg, PINCTRL_STATE_DEFAULT); if (err < 0) { return err; } @@ -1657,8 +1653,7 @@ static void uart_stm32_irq_config_func_##index(const struct device *dev) \ #define STM32_UART_INIT(index) \ STM32_UART_IRQ_HANDLER_DECL(index) \ \ -static const struct soc_gpio_pinctrl uart_pins_##index[] = \ - ST_STM32_DT_INST_PINCTRL(index, 0); \ +PINCTRL_DT_INST_DEFINE(index) \ \ static const struct uart_stm32_config uart_stm32_cfg_##index = { \ .uconf = { \ @@ -1670,9 +1665,8 @@ static const struct uart_stm32_config uart_stm32_cfg_##index = { \ }, \ .hw_flow_control = DT_INST_PROP(index, hw_flow_control), \ .parity = DT_INST_ENUM_IDX_OR(index, parity, UART_CFG_PARITY_NONE), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(index), \ STM32_UART_POLL_IRQ_HANDLER_FUNC(index) \ - .pinctrl_list = uart_pins_##index, \ - .pinctrl_list_size = ARRAY_SIZE(uart_pins_##index), \ }; \ \ static struct uart_stm32_data uart_stm32_data_##index = { \ diff --git a/drivers/serial/uart_stm32.h b/drivers/serial/uart_stm32.h index aa22070c83a15..aab48c29e2850 100644 --- a/drivers/serial/uart_stm32.h +++ b/drivers/serial/uart_stm32.h @@ -12,7 +12,7 @@ #ifndef ZEPHYR_DRIVERS_SERIAL_UART_STM32_H_ #define ZEPHYR_DRIVERS_SERIAL_UART_STM32_H_ -#include +#include /* device config */ struct uart_stm32_config { @@ -23,8 +23,7 @@ struct uart_stm32_config { bool hw_flow_control; /* initial parity, 0 for none, 1 for odd, 2 for even */ int parity; - const struct soc_gpio_pinctrl *pinctrl_list; - size_t pinctrl_list_size; + const struct pinctrl_dev_config *pcfg; #if defined(CONFIG_PM) \ && !defined(CONFIG_UART_INTERRUPT_DRIVEN) \ && !defined(CONFIG_UART_ASYNC_API) diff --git a/drivers/spi/spi_ll_stm32.c b/drivers/spi/spi_ll_stm32.c index e54096cca9a5a..cdb8e7b747fea 100644 --- a/drivers/spi/spi_ll_stm32.c +++ b/drivers/spi/spi_ll_stm32.c @@ -16,12 +16,12 @@ LOG_MODULE_REGISTER(spi_ll_stm32); #include #include #include +#include #include #ifdef CONFIG_SPI_STM32_DMA #include #include #endif -#include #include #include @@ -836,9 +836,7 @@ static int spi_stm32_init(const struct device *dev) } /* Configure dt provided device signals when available */ - err = stm32_dt_pinctrl_configure(cfg->pinctrl_list, - cfg->pinctrl_list_size, - (uint32_t)cfg->spi); + err = pinctrl_apply_state(cfg->pcfg, PINCTRL_STATE_DEFAULT); if (err < 0) { LOG_ERR("SPI pinctrl setup failed (%d)", err); return err; @@ -943,8 +941,7 @@ static void spi_stm32_irq_config_func_##id(const struct device *dev) \ #define STM32_SPI_INIT(id) \ STM32_SPI_IRQ_HANDLER_DECL(id); \ \ -static const struct soc_gpio_pinctrl spi_pins_##id[] = \ - ST_STM32_DT_INST_PINCTRL(id, 0); \ +PINCTRL_DT_INST_DEFINE(id) \ \ static const struct spi_stm32_config spi_stm32_cfg_##id = { \ .spi = (SPI_TypeDef *) DT_INST_REG_ADDR(id), \ @@ -952,8 +949,7 @@ static const struct spi_stm32_config spi_stm32_cfg_##id = { \ .enr = DT_INST_CLOCKS_CELL(id, bits), \ .bus = DT_INST_CLOCKS_CELL(id, bus) \ }, \ - .pinctrl_list = spi_pins_##id, \ - .pinctrl_list_size = ARRAY_SIZE(spi_pins_##id), \ + .pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(id), \ STM32_SPI_IRQ_HANDLER_FUNC(id) \ STM32_SPI_USE_SUBGHZSPI_NSS_CONFIG(id) \ }; \ diff --git a/drivers/spi/spi_ll_stm32.h b/drivers/spi/spi_ll_stm32.h index e8a109c255949..b46169d5b93c2 100644 --- a/drivers/spi/spi_ll_stm32.h +++ b/drivers/spi/spi_ll_stm32.h @@ -14,8 +14,7 @@ typedef void (*irq_config_func_t)(const struct device *port); struct spi_stm32_config { struct stm32_pclken pclken; SPI_TypeDef *spi; - const struct soc_gpio_pinctrl *pinctrl_list; - size_t pinctrl_list_size; + const struct pinctrl_dev_config *pcfg; #ifdef CONFIG_SPI_STM32_INTERRUPT irq_config_func_t irq_config; #endif diff --git a/drivers/usb/device/usb_dc_stm32.c b/drivers/usb/device/usb_dc_stm32.c index a4d7057902236..8e9f610dcbdaa 100644 --- a/drivers/usb/device/usb_dc_stm32.c +++ b/drivers/usb/device/usb_dc_stm32.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "stm32_hsem.h" #define LOG_LEVEL CONFIG_USB_DRIVER_LOG_LEVEL @@ -60,9 +60,10 @@ LOG_MODULE_REGISTER(usb_dc_stm32); #if DT_INST_NODE_HAS_PROP(0, maximum_speed) #define USB_MAXIMUM_SPEED DT_INST_PROP(0, maximum_speed) #endif -static const struct soc_gpio_pinctrl usb_pinctrl[] = - ST_STM32_DT_INST_PINCTRL(0, 0); +PINCTRL_DT_INST_DEFINE(0) +static const struct pinctrl_dev_config *usb_pcfg = + PINCTRL_DT_INST_DEV_CONFIG_GET(0); #define USB_OTG_HS_EMB_PHY (DT_HAS_COMPAT_STATUS_OKAY(st_stm32_usbphyc) && \ DT_HAS_COMPAT_STATUS_OKAY(st_stm32_otghs)) @@ -412,9 +413,7 @@ static int usb_dc_stm32_init(void) #endif LOG_DBG("Pinctrl signals configuration"); - status = stm32_dt_pinctrl_configure(usb_pinctrl, - ARRAY_SIZE(usb_pinctrl), - (uint32_t)usb_dc_stm32_state.pcd.Instance); + status = pinctrl_apply_state(usb_pcfg, PINCTRL_STATE_DEFAULT); if (status < 0) { LOG_ERR("USB pinctrl setup failed (%d)", status); return status; diff --git a/dts/arm/acsip/s76s.dtsi b/dts/arm/acsip/s76s.dtsi index 8881b5be125a9..44e918597287e 100644 --- a/dts/arm/acsip/s76s.dtsi +++ b/dts/arm/acsip/s76s.dtsi @@ -11,6 +11,7 @@ &spi2 { /* SX1276 SPI communication */ pinctrl-0 = <&spi2_sck_pb13 &spi2_miso_pb14 &spi2_mosi_pb15>; + pinctrl-names = "default"; cs-gpios = <&gpiob 12 GPIO_ACTIVE_LOW>; status = "okay"; @@ -37,4 +38,3 @@ power-amplifier-output = "pa-boost"; }; }; - diff --git a/dts/arm/st/mp1/stm32mp157.dtsi b/dts/arm/st/mp1/stm32mp157.dtsi index 30478940a8637..cce0fd521c744 100644 --- a/dts/arm/st/mp1/stm32mp157.dtsi +++ b/dts/arm/st/mp1/stm32mp157.dtsi @@ -171,6 +171,7 @@ clocks = <&rcc STM32_CLOCK_BUS_APB2 0x100>; interrupts = <35 5>; label = "SPI_1"; + status = "disabled"; }; spi2: spi@4000b000 { @@ -181,6 +182,7 @@ clocks = <&rcc STM32_CLOCK_BUS_APB1 0x800>; interrupts = <36 5>; label = "SPI_2"; + status = "disabled"; }; spi3: spi@4000c000 { @@ -191,6 +193,7 @@ clocks = <&rcc STM32_CLOCK_BUS_APB1 0x1000>; interrupts = <51 5>; label = "SPI_3"; + status = "disabled"; }; spi4: spi@44005000 { @@ -201,6 +204,7 @@ clocks = <&rcc STM32_CLOCK_BUS_APB2 0x200>; interrupts = <84 5>; label = "SPI_4"; + status = "disabled"; }; spi5: spi@44009000 { @@ -211,6 +215,7 @@ clocks = <&rcc STM32_CLOCK_BUS_APB2 0x400>; interrupts = <85 5>; label = "SPI_5"; + status = "disabled"; }; usart2: serial@4000e000 { diff --git a/dts/bindings/adc/st,stm32-adc.yaml b/dts/bindings/adc/st,stm32-adc.yaml index 3647097b53f69..ab4aa56c7d875 100644 --- a/dts/bindings/adc/st,stm32-adc.yaml +++ b/dts/bindings/adc/st,stm32-adc.yaml @@ -6,7 +6,7 @@ description: ST STM32 family ADC compatible: "st,stm32-adc" -include: adc-controller.yaml +include: [adc-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -15,19 +15,17 @@ properties: clocks: required: true - pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for ADC input. The phandles are - expected to reference pinctrl nodes, e.g. - pinctrl-0 = <&adc_in0_pa0 &adc_in1_pa1>; - interrupts: required: true "#io-channel-cells": const: 1 + pinctrl-0: + required: true + + pinctrl-names: + required: true + io-channel-cells: - input diff --git a/dts/bindings/can/st,stm32-can.yaml b/dts/bindings/can/st,stm32-can.yaml index 0d018bd6f8720..623733dcd0bc1 100644 --- a/dts/bindings/can/st,stm32-can.yaml +++ b/dts/bindings/can/st,stm32-can.yaml @@ -2,7 +2,7 @@ description: STM32 CAN controller compatible: "st,stm32-can" -include: can-controller.yaml +include: [can-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -15,13 +15,10 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for CAN RX and TX. The phandles are - expected to reference pinctrl nodes, e.g. + required: true - pinctrl-0 = <&can1_rx_pa11 &can1_tx_pa12>; + pinctrl-names: + required: true master-can-reg: type: int diff --git a/dts/bindings/can/st,stm32-fdcan.yaml b/dts/bindings/can/st,stm32-fdcan.yaml index 8a8ac3305296d..e111a7e0ee048 100644 --- a/dts/bindings/can/st,stm32-fdcan.yaml +++ b/dts/bindings/can/st,stm32-fdcan.yaml @@ -2,15 +2,4 @@ description: Bosch m_can CAN-FD controller compatible: "st,stm32-fdcan" -include: bosch,m-can.yaml - -properties: - pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for CAN signals (RX, TX). We expect - that the phandles will reference pinctrl nodes. - - For example the can1 would be - pinctrl-0 = <&fdcan1_rx_pa11 &fdcan1_tx_pa12>; +include: ["bosch,m-can.yaml", "pinctrl-device.yaml"] diff --git a/dts/bindings/dac/st,stm32-dac.yaml b/dts/bindings/dac/st,stm32-dac.yaml index 3b79fdada1513..c339bbb70a1d4 100644 --- a/dts/bindings/dac/st,stm32-dac.yaml +++ b/dts/bindings/dac/st,stm32-dac.yaml @@ -5,7 +5,7 @@ description: ST STM32 family DAC compatible: "st,stm32-dac" -include: dac-controller.yaml +include: [dac-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -14,17 +14,14 @@ properties: clocks: required: true - pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for DAC output. The phandles are - expected to reference pinctrl nodes, e.g. - - pinctrl-0 = <&dac_out1_pa4 &dac_out2_pa5>; - "#io-channel-cells": const: 1 + pinctrl-0: + required: true + + pinctrl-names: + required: true + io-channel-cells: - output diff --git a/dts/bindings/ethernet/st,stm32-ethernet.yaml b/dts/bindings/ethernet/st,stm32-ethernet.yaml index 330aa815c37c4..e7d5ae625fb05 100644 --- a/dts/bindings/ethernet/st,stm32-ethernet.yaml +++ b/dts/bindings/ethernet/st,stm32-ethernet.yaml @@ -5,7 +5,7 @@ description: ST STM32 Ethernet compatible: "st,stm32-ethernet" -include: ethernet.yaml +include: [ethernet.yaml, pinctrl-device.yaml] properties: reg: @@ -16,12 +16,7 @@ properties: required: true clock-names: required: true - pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for Ethernet signals. We expect that the phandles - will reference pinctrl nodes, e.g. - - pinctrl-0 = <ð_ref_clk_pa1 ð_mdio_pa2 ...>; + required: true + pinctrl-names: + required: true diff --git a/dts/bindings/i2c/st,stm32-i2c-v1.yaml b/dts/bindings/i2c/st,stm32-i2c-v1.yaml index 0c3352f73388d..d86cdb8aedd87 100644 --- a/dts/bindings/i2c/st,stm32-i2c-v1.yaml +++ b/dts/bindings/i2c/st,stm32-i2c-v1.yaml @@ -5,7 +5,7 @@ description: STM32 I2C V1 controller compatible: "st,stm32-i2c-v1" -include: i2c-controller.yaml +include: [i2c-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -15,11 +15,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for serial signals (SDA, SCL). We expect - that the phandles will reference pinctrl nodes. + required: true - For example the I2C1 would be - pinctrl-0 = <&i2c1_sda_pb11 &i2c1_scl_pb10>; + pinctrl-names: + required: true diff --git a/dts/bindings/i2c/st,stm32-i2c-v2.yaml b/dts/bindings/i2c/st,stm32-i2c-v2.yaml index ff795f0e51604..dad8205f4a4df 100644 --- a/dts/bindings/i2c/st,stm32-i2c-v2.yaml +++ b/dts/bindings/i2c/st,stm32-i2c-v2.yaml @@ -5,7 +5,7 @@ description: STM32 I2C V2 controller compatible: "st,stm32-i2c-v2" -include: i2c-controller.yaml +include: [i2c-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -15,14 +15,10 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for serial signals (SDA, SCL). We expect - that the phandles will reference pinctrl nodes. - - For example the I2C1 would be - pinctrl-0 = <&i2c1_sda_pb11 &i2c1_scl_pb10>; + required: true + + pinctrl-names: + required: true timings: type: array diff --git a/dts/bindings/i2s/st,stm32-i2s.yaml b/dts/bindings/i2s/st,stm32-i2s.yaml index 204d4f22a5076..d66a6c8d438ab 100644 --- a/dts/bindings/i2s/st,stm32-i2s.yaml +++ b/dts/bindings/i2s/st,stm32-i2s.yaml @@ -5,7 +5,7 @@ description: STM32 I2S controller compatible: "st,stm32-i2s" -include: [i2s-controller.yaml] +include: [i2s-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -21,11 +21,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - Pin configuration for I2S signals. - We expect that the phandles will reference pinctrl nodes. - - For example the I2S1 would be: - pinctrl-0 = <&i2s1_ck_pa5 &i2s1_sd_pa7>; + required: true + + pinctrl-names: + required: true diff --git a/dts/bindings/memory-controllers/st,stm32-fmc.yaml b/dts/bindings/memory-controllers/st,stm32-fmc.yaml index 347bbc7427aea..f958bd2c195d4 100644 --- a/dts/bindings/memory-controllers/st,stm32-fmc.yaml +++ b/dts/bindings/memory-controllers/st,stm32-fmc.yaml @@ -29,7 +29,7 @@ description: | compatible: "st,stm32-fmc" -include: base.yaml +include: [base.yaml, pinctrl-device.yaml] properties: reg: @@ -42,10 +42,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for FMC signals. We expect that the phandles - will reference pinctrl nodes, e.g. + required: true - pinctrl-0 = <&fmc_a0_pf0 &fmc_a1_pf1...>; + pinctrl-names: + required: true diff --git a/dts/bindings/mmc/st,stm32-sdmmc.yaml b/dts/bindings/mmc/st,stm32-sdmmc.yaml index 2ee86d0c1b91c..d83faf9a8e80c 100644 --- a/dts/bindings/mmc/st,stm32-sdmmc.yaml +++ b/dts/bindings/mmc/st,stm32-sdmmc.yaml @@ -2,7 +2,7 @@ description: stm32 sdmmc disk access compatible: "st,stm32-sdmmc" -include: mmc.yaml +include: [mmc.yaml, pinctrl-device.yaml] properties: clocks: @@ -14,6 +14,12 @@ properties: reg: required: true + pinctrl-0: + required: true + + pinctrl-names: + required: true + cd-gpios: type: phandle-array required: false @@ -23,15 +29,3 @@ properties: type: phandle-array required: false description: Power pin - - pinctrl-0: - type: phandles - required: false - description: | - Pin configuration for SDMMC signals. - We expect that the phandles will reference pinctrl nodes. - - For example - pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9 - &sdmmc1_d2_pc10 &sdmmc1_d3_pc11 - &sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>; diff --git a/dts/bindings/pwm/st,stm32-pwm.yaml b/dts/bindings/pwm/st,stm32-pwm.yaml index cee0ee51ee910..5ad0300a53226 100644 --- a/dts/bindings/pwm/st,stm32-pwm.yaml +++ b/dts/bindings/pwm/st,stm32-pwm.yaml @@ -2,12 +2,18 @@ description: STM32 PWM compatible: "st,stm32-pwm" -include: [pwm-controller.yaml, base.yaml] +include: [pwm-controller.yaml, base.yaml, pinctrl-device.yaml] properties: label: required: true + pinctrl-0: + required: true + + pinctrl-names: + required: true + st,prescaler: type: int required: false @@ -18,15 +24,6 @@ properties: binding of parent timer node. It is kept temporarily for compatibility reasons. - pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for PWM signal/s. We expect that the phandles - will reference pinctrl nodes, e.g. - - pinctrl-0 = <&tim1_ch1_pwm_pa8 &tim1_ch2_pwm_pa9>; - "#pwm-cells": const: 3 diff --git a/dts/bindings/qspi/st,stm32-qspi.yaml b/dts/bindings/qspi/st,stm32-qspi.yaml index 8281cfb9e8d1e..caf55428da038 100644 --- a/dts/bindings/qspi/st,stm32-qspi.yaml +++ b/dts/bindings/qspi/st,stm32-qspi.yaml @@ -18,7 +18,7 @@ description: | compatible: "st,stm32-qspi" -include: base.yaml +include: [base.yaml, pinctrl-device.yaml] bus: qspi @@ -29,6 +29,12 @@ properties: interrupts: required: true + pinctrl-0: + required: true + + pinctrl-names: + required: true + dmas: description: | Optional DMA channel specifier. If DMA should be used, specifier should @@ -44,7 +50,3 @@ properties: For example dma-names = "tx_rx"; - - pinctrl-0: - type: phandles - required: true diff --git a/dts/bindings/serial/st,stm32-lpuart.yaml b/dts/bindings/serial/st,stm32-lpuart.yaml index b2a44520a494f..5046d43de7369 100644 --- a/dts/bindings/serial/st,stm32-lpuart.yaml +++ b/dts/bindings/serial/st,stm32-lpuart.yaml @@ -2,7 +2,7 @@ description: STM32 LPUART compatible: "st,stm32-lpuart" -include: uart-controller.yaml +include: [uart-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -15,11 +15,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for serial signals (RX, TX, RTS, CTS). We expect - that the phandles will reference pinctrl nodes. + required: true - For example the USART1 would be - pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names: + required: true diff --git a/dts/bindings/serial/st,stm32-uart.yaml b/dts/bindings/serial/st,stm32-uart.yaml index e7f77f0e46892..6dba47044294e 100644 --- a/dts/bindings/serial/st,stm32-uart.yaml +++ b/dts/bindings/serial/st,stm32-uart.yaml @@ -2,7 +2,7 @@ description: STM32 UART compatible: "st,stm32-uart" -include: uart-controller.yaml +include: [uart-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -12,11 +12,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for serial signals (RX, TX, RTS, CTS). We expect - that the phandles will reference pinctrl nodes. + required: true - For example the USART1 would be - pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names: + required: true diff --git a/dts/bindings/serial/st,stm32-usart.yaml b/dts/bindings/serial/st,stm32-usart.yaml index ba514cdc5f942..8d82a827159b4 100644 --- a/dts/bindings/serial/st,stm32-usart.yaml +++ b/dts/bindings/serial/st,stm32-usart.yaml @@ -2,7 +2,7 @@ description: STM32 USART compatible: "st,stm32-usart" -include: uart-controller.yaml +include: [uart-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -12,11 +12,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - GPIO pin configuration for serial signals (RX, TX, RTS, CTS). We expect - that the phandles will reference pinctrl nodes. + required: true - For example the USART1 would be - pinctrl-0 = <&usart1_tx_pb6 &usart1_rx_pb7>; + pinctrl-names: + required: true diff --git a/dts/bindings/spi/st,stm32-spi-common.yaml b/dts/bindings/spi/st,stm32-spi-common.yaml index b64d332b86f0c..42b7462d6a512 100644 --- a/dts/bindings/spi/st,stm32-spi-common.yaml +++ b/dts/bindings/spi/st,stm32-spi-common.yaml @@ -3,7 +3,7 @@ # Common fields for STM32 SPI peripherals. -include: spi-controller.yaml +include: [spi-controller.yaml, pinctrl-device.yaml] properties: reg: @@ -13,14 +13,7 @@ properties: required: true pinctrl-0: - type: phandles - required: false - description: | - Pin configuration for SPI signals (MISO, MOSI, SCK and optional NSS). - We expect that the phandles will reference pinctrl nodes. - - For example the SPI3 would be - <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>; + required: true - Example with NSS Pin - <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12 &spi3_nss_pa15>; + pinctrl-names: + required: true diff --git a/dts/bindings/spi/st,stm32-spi-subghz.yaml b/dts/bindings/spi/st,stm32-spi-subghz.yaml index 6af76f8558b4f..10eb1e3119d84 100644 --- a/dts/bindings/spi/st,stm32-spi-subghz.yaml +++ b/dts/bindings/spi/st,stm32-spi-subghz.yaml @@ -5,7 +5,13 @@ description: STM32 SUBGHZ SPI controller compatible: "st,stm32-spi-subghz" -include: st,stm32-spi-common.yaml +include: + +include: + - name: st,stm32-spi-common.yaml + property-blocklist: + - pinctrl-0 + - pinctrl-names properties: use-subghzspi-nss: diff --git a/dts/bindings/usb/st,stm32-otgfs.yaml b/dts/bindings/usb/st,stm32-otgfs.yaml index 68c9ef7bd69c0..4f46a8d4a3012 100644 --- a/dts/bindings/usb/st,stm32-otgfs.yaml +++ b/dts/bindings/usb/st,stm32-otgfs.yaml @@ -5,7 +5,7 @@ description: STM32 OTGFS controller compatible: "st,stm32-otgfs" -include: usb-ep.yaml +include: [usb-ep.yaml, pinctrl-device.yaml] properties: reg: @@ -28,13 +28,3 @@ properties: clocks: required: true - - pinctrl-0: - type: phandles - required: false - description: | - Pin configuration for USB OTG FS signals (DM/DP/SOF/ID/VBUS). - We expect that the phandles will reference pinctrl nodes. - - For example: - <&usb_otg_fs_dm_pa11 &usb_otg_fs_dp_pa12>; diff --git a/dts/bindings/usb/st,stm32-otghs.yaml b/dts/bindings/usb/st,stm32-otghs.yaml index 533f710e26536..ea857222d855a 100644 --- a/dts/bindings/usb/st,stm32-otghs.yaml +++ b/dts/bindings/usb/st,stm32-otghs.yaml @@ -5,7 +5,7 @@ description: STM32 OTGHS controller compatible: "st,stm32-otghs" -include: usb-ep.yaml +include: [usb-ep.yaml, pinctrl-device.yaml] properties: reg: @@ -28,14 +28,3 @@ properties: clocks: required: true - - pinctrl-0: - type: phandles - required: false - description: | - Pin configuration for USB OTG HS signals (DM/DP/SOF/ID/VBUS and - ULPI_DIR/ULPI_STP/ULPI_NXT/ULPI_D[0-7]). - We expect that the phandles will reference pinctrl nodes. - - For example: - <&usb_otg_hs_dm_pa11 &usb_otg_hs_dp_pa12>; diff --git a/dts/bindings/usb/st,stm32-usb.yaml b/dts/bindings/usb/st,stm32-usb.yaml index d03d26c53be33..5b4d9596acd35 100644 --- a/dts/bindings/usb/st,stm32-usb.yaml +++ b/dts/bindings/usb/st,stm32-usb.yaml @@ -5,7 +5,7 @@ description: STM32 USB controller compatible: "st,stm32-usb" -include: usb-ep.yaml +include: [usb-ep.yaml, pinctrl-device.yaml] properties: reg: @@ -43,13 +43,3 @@ properties: clocks: required: true - - pinctrl-0: - type: phandles - required: false - description: | - Pin configuration for USB signals (DM/DP/NOE). - We expect that the phandles will reference pinctrl nodes. - - For example: - <&usb_dm_pa11 &usb_dp_pa12>; diff --git a/samples/drivers/led_pca9633/README.rst b/samples/drivers/led_pca9633/README.rst index fa1b54b9e0dc7..32e5ed14db96d 100644 --- a/samples/drivers/led_pca9633/README.rst +++ b/samples/drivers/led_pca9633/README.rst @@ -19,17 +19,17 @@ following pattern: Building and Running ******************** -Build the application for the :ref:`stm32373c_eval_board` board, and connect -a PCA9633 LED driver on the bus I2C-1 at the address 0x62. +Build the application for the :ref:`nucleo_f334r8_board` board, and connect +a PCA9633 LED driver on the bus I2C Arduino. .. zephyr-app-commands:: :zephyr-app: samples/drivers/led_pca9633 - :board: stm32373c_eval + :board: nucleo_f334r8_board :goals: build :compact: For flashing the application, refer to the Flashing section of the -:ref:`stm32373c_eval_board` board documentation. +:ref:`nucleo_f334r8_board` board documentation. References ********** diff --git a/samples/drivers/led_pca9633/boards/stm32373c_eval.overlay b/samples/drivers/led_pca9633/app.overlay similarity index 92% rename from samples/drivers/led_pca9633/boards/stm32373c_eval.overlay rename to samples/drivers/led_pca9633/app.overlay index a74156adfc7e2..58d52b891d4ab 100644 --- a/samples/drivers/led_pca9633/boards/stm32373c_eval.overlay +++ b/samples/drivers/led_pca9633/app.overlay @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ -&i2c1 { +&arduino_i2c { status = "okay"; clock-frequency = ; diff --git a/samples/drivers/led_pca9633/sample.yaml b/samples/drivers/led_pca9633/sample.yaml index 8996e30207c3f..df5c2646501ff 100644 --- a/samples/drivers/led_pca9633/sample.yaml +++ b/samples/drivers/led_pca9633/sample.yaml @@ -3,5 +3,5 @@ sample: name: PCA9633 sample tests: sample.drivers.led.pca9633: - platform_allow: stm32373c_eval + depends_on: arduino_i2c tags: LED diff --git a/soc/arm/st_stm32/common/pinctrl_soc.h b/soc/arm/st_stm32/common/pinctrl_soc.h new file mode 100644 index 0000000000000..57e4cf0e5d33b --- /dev/null +++ b/soc/arm/st_stm32/common/pinctrl_soc.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2020 Linaro Ltd. + * Copyright (c) 2021 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * @file + * STM32 SoC specific helpers for pinctrl driver + */ + +#ifndef ZEPHYR_SOC_ARM_ST_STM32_COMMON_PINCTRL_SOC_H_ +#define ZEPHYR_SOC_ARM_ST_STM32_COMMON_PINCTRL_SOC_H_ + +#include +#include + +#ifdef CONFIG_SOC_SERIES_STM32F1X +#include +#else +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/** @cond INTERNAL_HIDDEN */ + +/** Type for STM32 pin. */ +typedef struct pinctrl_soc_pin { + /** Pinmux settings (port, pin and function). */ + uint32_t pinmux; + /** Pin configuration (bias, drive and slew rate). */ + uint32_t pincfg; +} pinctrl_soc_pin_t; + +/** + * @brief Utility macro to initialize pinmux field in #pinctrl_pin_t. + * + * @param node_id Node identifier. + */ +#define Z_PINCTRL_STM32_PINMUX_INIT(node_id) DT_PROP(node_id, pinmux) + +#ifdef CONFIG_SOC_SERIES_STM32F1X +/** + * @brief Utility macro to initialize pincfg field in #pinctrl_pin_t (F1). + * + * @param node_id Node identifier. + */ +#define Z_PINCTRL_STM32_PINCFG_INIT(node_id) \ + (((STM32_NO_PULL * DT_PROP(node_id, bias_disable)) << STM32_PUPD_SHIFT) | \ + ((STM32_PULL_UP * DT_PROP(node_id, bias_pull_up)) << STM32_PUPD_SHIFT) | \ + ((STM32_PULL_DOWN * DT_PROP(node_id, bias_pull_down)) << STM32_PUPD_SHIFT) | \ + ((STM32_PUSH_PULL * DT_PROP(node_id, drive_push_pull)) << STM32_CNF_OUT_0_SHIFT) | \ + ((STM32_OPEN_DRAIN * DT_PROP(node_id, drive_open_drain)) << STM32_CNF_OUT_0_SHIFT) | \ + (DT_ENUM_IDX(node_id, slew_rate) << STM32_MODE_OSPEED_SHIFT)) +#else +/** + * @brief Utility macro to initialize pincfg field in #pinctrl_pin_t (non-F1). + * + * @param node_id Node identifier. + */ +#define Z_PINCTRL_STM32_PINCFG_INIT(node_id) \ + (((STM32_NO_PULL * DT_PROP(node_id, bias_disable)) << STM32_PUPDR_SHIFT) | \ + ((STM32_PULL_UP * DT_PROP(node_id, bias_pull_up)) << STM32_PUPDR_SHIFT) | \ + ((STM32_PULL_DOWN * DT_PROP(node_id, bias_pull_down)) << STM32_PUPDR_SHIFT) | \ + ((STM32_PUSH_PULL * DT_PROP(node_id, drive_push_pull)) << STM32_OTYPER_SHIFT) | \ + ((STM32_OPEN_DRAIN * DT_PROP(node_id, drive_open_drain)) << STM32_OTYPER_SHIFT) | \ + (DT_ENUM_IDX(node_id, slew_rate) << STM32_OSPEEDR_SHIFT)) +#endif /* CONFIG_SOC_SERIES_STM32F1X */ + +/** + * @brief Utility macro to initialize each pin. + * + * @param node_id Node identifier. + * @param state_prop State property name. + * @param idx State property entry index. + */ +#define Z_PINCTRL_STATE_PIN_INIT(node_id, state_prop, idx) \ + { .pinmux = Z_PINCTRL_STM32_PINMUX_INIT( \ + DT_PROP_BY_IDX(node_id, state_prop, idx)), \ + .pincfg = Z_PINCTRL_STM32_PINCFG_INIT( \ + DT_PROP_BY_IDX(node_id, state_prop, idx)) }, + +/** + * @brief Utility macro to initialize state pins contained in a given property. + * + * @param node_id Node identifier. + * @param prop Property name describing state pins. + */ +#define Z_PINCTRL_STATE_PINS_INIT(node_id, prop) \ + {DT_FOREACH_PROP_ELEM(node_id, prop, Z_PINCTRL_STATE_PIN_INIT)} + +/** @endcond */ + +#ifdef __cplusplus +} +#endif + +#endif /* ZEPHYR_SOC_ARM_ST_STM32_COMMON_PINCTRL_SOC_H_ */ diff --git a/tests/drivers/pwm/pwm_loopback/boards/disco_l475_iot1.overlay b/tests/drivers/pwm/pwm_loopback/boards/disco_l475_iot1.overlay index a7c3a8fdbf590..ed5429be0a117 100644 --- a/tests/drivers/pwm/pwm_loopback/boards/disco_l475_iot1.overlay +++ b/tests/drivers/pwm/pwm_loopback/boards/disco_l475_iot1.overlay @@ -21,6 +21,7 @@ pwm2: pwm { status = "okay"; pinctrl-0 = <&tim2_ch1_pa5>; /* CN1 D13 */ + pinctrl-names = "default"; }; }; @@ -29,6 +30,7 @@ pwm5: pwm { status = "okay"; pinctrl-0 = <&tim5_ch1_pa0>; /* CN3 D1 */ + pinctrl-names = "default"; }; }; @@ -39,6 +41,7 @@ pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch1_pa6>; /* CN1 D12 */ + pinctrl-names = "default"; }; }; @@ -48,5 +51,6 @@ pwm15: pwm { status = "okay"; pinctrl-0 = <&tim15_ch1_pa2>; /* CN1 D10 */ + pinctrl-names = "default"; }; }; diff --git a/tests/drivers/uart/uart_async_api/boards/nucleo_l152re.overlay b/tests/drivers/uart/uart_async_api/boards/nucleo_l152re.overlay index 8fd7fafabf3b2..1471b2872081d 100644 --- a/tests/drivers/uart/uart_async_api/boards/nucleo_l152re.overlay +++ b/tests/drivers/uart/uart_async_api/boards/nucleo_l152re.overlay @@ -2,6 +2,7 @@ &usart3 { pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>; + pinctrl-names = "default"; current-speed = <115200>; dmas = <&dma1 2 0x20440>, <&dma1 3 0x20480>;