From 2418d03869ba5ebf37ab39c7d44d81e0873e8deb Mon Sep 17 00:00:00 2001 From: Etienne Carriere Date: Wed, 21 May 2025 19:19:31 +0200 Subject: [PATCH] boards: st: fix STM3U5 boards DTS files coding style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix board DTS coding style issues to prevent they spread when a new board is introduced and used this DTS as example start point. Issues addressed from Zephyr devicetree style guidelines [1]: - Indent with tabs. - Don’t insert empty lines before a dedenting };. - Insert a single empty line to separate nodes at the same hierarchy level. Also remove a few spurious space characters. No functional change. Link: https://docs.zephyrproject.org/latest/contribute/style/devicetree.html [1] Signed-off-by: Etienne Carriere --- .../st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi | 5 +++++ boards/st/b_u585i_iot02a/b_u585i_iot02a.dts | 5 ++++- .../b_u585i_iot02a_stm32u585xx_ns.dts | 6 +++++- .../nucleo_u575zi_q/nucleo_u575zi_q-common.dtsi | 6 +++++- .../nucleo_u5a5zj_q/nucleo_u5a5zj_q-common.dtsi | 6 +++++- boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts | 3 +++ .../st/sensortile_box_pro/sensortile_box_pro.dts | 13 ++++++++++++- boards/st/steval_stwinbx1/steval_stwinbx1.dts | 16 ++++++++++++---- boards/st/stm32u5a9j_dk/stm32u5a9j_dk.dts | 6 ++++++ 9 files changed, 57 insertions(+), 9 deletions(-) diff --git a/boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi b/boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi index 39a42c9934a..ed60dcb0c40 100644 --- a/boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi +++ b/boards/st/b_u585i_iot02a/b_u585i_iot02a-common.dtsi @@ -13,10 +13,12 @@ / { leds { compatible = "gpio-leds"; + green_led_1: led_1 { gpios = <&gpioh 7 GPIO_ACTIVE_LOW>; label = "User LD7"; }; + red_led_1: led_3 { gpios = <&gpioh 6 GPIO_ACTIVE_LOW>; label = "User LD6"; @@ -25,6 +27,7 @@ gpio_keys { compatible = "gpio-keys"; + user_button: button { label = "User"; gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; @@ -104,6 +107,7 @@ stm32_lp_tick_source: &lptim1 { &timers4 { status = "okay"; st,prescaler = <1>; + pwm4: pwm { status = "okay"; pinctrl-0 = <&tim4_ch1_pb6>; @@ -114,6 +118,7 @@ stm32_lp_tick_source: &lptim1 { &timers3 { status = "okay"; st,prescaler = <255>; + pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch2_pe4>; diff --git a/boards/st/b_u585i_iot02a/b_u585i_iot02a.dts b/boards/st/b_u585i_iot02a/b_u585i_iot02a.dts index 0ac55be54ce..fc824417d20 100644 --- a/boards/st/b_u585i_iot02a/b_u585i_iot02a.dts +++ b/boards/st/b_u585i_iot02a/b_u585i_iot02a.dts @@ -53,23 +53,26 @@ label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(64)>; }; + slot0_partition: partition@10000 { label = "image-0"; reg = <0x00010000 DT_SIZE_K(416)>; }; + slot1_partition: partition@78000 { label = "image-1"; reg = <0x00078000 DT_SIZE_K(416)>; }; + scratch_partition: partition@e0000 { label = "image-scratch"; reg = <0x000e0000 DT_SIZE_K(64)>; }; + storage_partition: partition@f0000 { label = "storage"; reg = <0x000f0000 DT_SIZE_K(64)>; }; - }; }; diff --git a/boards/st/b_u585i_iot02a/b_u585i_iot02a_stm32u585xx_ns.dts b/boards/st/b_u585i_iot02a/b_u585i_iot02a_stm32u585xx_ns.dts index e8a7d0f5f29..04e24e71494 100644 --- a/boards/st/b_u585i_iot02a/b_u585i_iot02a_stm32u585xx_ns.dts +++ b/boards/st/b_u585i_iot02a/b_u585i_iot02a_stm32u585xx_ns.dts @@ -27,7 +27,6 @@ }; &flash0 { - partitions { compatible = "fixed-partitions"; #address-cells = <1>; @@ -44,26 +43,31 @@ reg = <0x00000000 DT_SIZE_K(224)>; read-only; }; + /* Secure image primary slot */ slot0_partition: partition@38000 { label = "image-0"; reg = <0x00038000 DT_SIZE_K(384)>; }; + /* Non-secure image primary slot */ slot0_ns_partition: partition@98000 { label = "image-0-nonsecure"; reg = <0x00098000 DT_SIZE_K(512)>; }; + /* Secure image secondary slot */ slot1_partition: partition@118000 { label = "image-1"; reg = <0x00118000 DT_SIZE_K(384)>; }; + /* Non-secure image secondary slot */ slot1_ns_partition: partition@178000 { label = "image-1-nonsecure"; reg = <0x00178000 DT_SIZE_K(512)>; }; + /* Applicative Non Volatile Storage */ storage_partition: partition@1f8000 { label = "storage"; diff --git a/boards/st/nucleo_u575zi_q/nucleo_u575zi_q-common.dtsi b/boards/st/nucleo_u575zi_q/nucleo_u575zi_q-common.dtsi index 171aa412658..d9579a8a0c4 100644 --- a/boards/st/nucleo_u575zi_q/nucleo_u575zi_q-common.dtsi +++ b/boards/st/nucleo_u575zi_q/nucleo_u575zi_q-common.dtsi @@ -13,14 +13,17 @@ / { leds: leds { compatible = "gpio-leds"; + green_led_1: led_1 { gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>; label = "User LD1"; }; + blue_led_1: led_2 { gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; + red_led_1: led_3 { gpios = <&gpiog 2 GPIO_ACTIVE_HIGH>; label = "User LD3"; @@ -29,6 +32,7 @@ gpio_keys { compatible = "gpio-keys"; + user_button: button { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; @@ -147,7 +151,7 @@ status = "okay"; pwm3: pwm { - pinctrl-0 = <&tim3_ch2_pc7>; + pinctrl-0 = <&tim3_ch2_pc7>; pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q-common.dtsi b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q-common.dtsi index 45d7c817ec6..daa0ce9a377 100644 --- a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q-common.dtsi +++ b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q-common.dtsi @@ -12,14 +12,17 @@ / { leds: leds { compatible = "gpio-leds"; + green_led_1: led_1 { gpios = <&gpioc 7 GPIO_ACTIVE_HIGH>; label = "User LD1"; }; + blue_led_1: led_2 { gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; label = "User LD2"; }; + red_led_1: led_3 { gpios = <&gpiog 2 GPIO_ACTIVE_HIGH>; label = "User LD3"; @@ -28,6 +31,7 @@ gpio_keys { compatible = "gpio-keys"; + user_button: button { label = "User"; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; @@ -146,7 +150,7 @@ status = "okay"; pwm3: pwm { - pinctrl-0 = <&tim3_ch2_pc7>; + pinctrl-0 = <&tim3_ch2_pc7>; pinctrl-names = "default"; status = "okay"; }; diff --git a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts index e34b10024ab..4f23195bff8 100644 --- a/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts +++ b/boards/st/nucleo_u5a5zj_q/nucleo_u5a5zj_q.dts @@ -48,14 +48,17 @@ label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(64)>; }; + slot0_partition: partition@10000 { label = "image-0"; reg = <0x00010000 DT_SIZE_K(1952)>; }; + slot1_partition: partition@1f8000 { label = "image-1"; reg = <0x001f8000 DT_SIZE_K(1960)>; }; + storage_partition: partition@3e2000 { label = "storage"; reg = <0x003e2000 DT_SIZE_K(120)>; diff --git a/boards/st/sensortile_box_pro/sensortile_box_pro.dts b/boards/st/sensortile_box_pro/sensortile_box_pro.dts index 99a85f6e32c..4fe234d7c89 100644 --- a/boards/st/sensortile_box_pro/sensortile_box_pro.dts +++ b/boards/st/sensortile_box_pro/sensortile_box_pro.dts @@ -22,18 +22,22 @@ leds { compatible = "gpio-leds"; + green_led_1: led_1 { gpios = <&gpiof 6 GPIO_ACTIVE_HIGH>; label = "User GREEN led"; }; + red_led_1: led_2 { gpios = <&gpioh 11 GPIO_ACTIVE_HIGH>; label = "User RED led"; }; + yellow_led_1: led_3 { gpios = <&gpioh 12 GPIO_ACTIVE_HIGH>; label = "User YELLOW led"; }; + blue_led_1: led_4 { gpios = <&gpiof 9 GPIO_ACTIVE_HIGH>; label = "User YELLOW led"; @@ -42,11 +46,13 @@ gpio_keys { compatible = "gpio-keys"; + button1: button1 { label = "User BT1"; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; zephyr,code = ; }; + button2: button2 { label = "User BT2"; gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>; @@ -202,6 +208,7 @@ stm32_lp_tick_source: &lptim1 { &timers4 { status = "okay"; st,prescaler = <1>; + pwm4: pwm { status = "okay"; pinctrl-0 = <&tim4_ch1_pb6>; @@ -212,6 +219,7 @@ stm32_lp_tick_source: &lptim1 { &timers3 { status = "okay"; st,prescaler = <255>; + pwm3: pwm { status = "okay"; pinctrl-0 = <&tim3_ch2_pe4>; @@ -338,23 +346,26 @@ zephyr_udc0: &usbotg_fs { label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(64)>; }; + slot0_partition: partition@10000 { label = "image-0"; reg = <0x00010000 DT_SIZE_K(416)>; }; + slot1_partition: partition@78000 { label = "image-1"; reg = <0x00078000 DT_SIZE_K(416)>; }; + scratch_partition: partition@e0000 { label = "image-scratch"; reg = <0x000e0000 DT_SIZE_K(64)>; }; + storage_partition: partition@f0000 { label = "storage"; reg = <0x000f0000 DT_SIZE_K(64)>; }; - }; }; diff --git a/boards/st/steval_stwinbx1/steval_stwinbx1.dts b/boards/st/steval_stwinbx1/steval_stwinbx1.dts index 5ab30c62f02..d5208be8bdf 100644 --- a/boards/st/steval_stwinbx1/steval_stwinbx1.dts +++ b/boards/st/steval_stwinbx1/steval_stwinbx1.dts @@ -23,10 +23,12 @@ leds { compatible = "gpio-leds"; + green_led: led_1 { gpios = <&gpioh 12 GPIO_ACTIVE_HIGH>; label = "LED_1"; }; + orange_led: led_2 { gpios = <&gpioh 10 GPIO_ACTIVE_HIGH>; label = "LED_2"; @@ -44,6 +46,7 @@ gpio_keys { compatible = "gpio-keys"; + user_button: button { label = "User"; gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>; @@ -154,19 +157,20 @@ stm32_lp_tick_source: &lptim1 { cs-gpios = <&gpioh 6 GPIO_ACTIVE_LOW>, <&gpioh 15 GPIO_ACTIVE_LOW>, <&gpioi 7 GPIO_ACTIVE_LOW>; + iis2dlpc: iis2dlpc@0 { compatible = "st,iis2dlpc"; spi-max-frequency = ; reg = <0>; drdy-gpios = <&gpiof 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; - drdy-int = <1>; + drdy-int = <1>; }; ism330dhcx: ism330dhcx@1 { compatible = "st,ism330dhcx"; spi-max-frequency = ; reg = <1>; - drdy-gpios = <&gpiob 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + drdy-gpios = <&gpiob 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; int-pin = <1>; }; @@ -175,7 +179,7 @@ stm32_lp_tick_source: &lptim1 { spi-max-frequency = ; reg = <2>; drdy-gpios = <&gpiof 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; - int-pin = <2>; + int-pin = <2>; }; }; @@ -184,6 +188,7 @@ stm32_lp_tick_source: &lptim1 { pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpioe 1 GPIO_ACTIVE_LOW>; + hci_spi: bluenrg-2@0 { compatible = "st,hci-spi-v2"; reg = <0>; @@ -312,23 +317,26 @@ zephyr_udc0: &usbotg_fs { label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(64)>; }; + slot0_partition: partition@10000 { label = "image-0"; reg = <0x00010000 DT_SIZE_K(416)>; }; + slot1_partition: partition@78000 { label = "image-1"; reg = <0x00078000 DT_SIZE_K(416)>; }; + scratch_partition: partition@e0000 { label = "image-scratch"; reg = <0x000e0000 DT_SIZE_K(64)>; }; + storage_partition: partition@f0000 { label = "storage"; reg = <0x000f0000 DT_SIZE_K(64)>; }; - }; }; diff --git a/boards/st/stm32u5a9j_dk/stm32u5a9j_dk.dts b/boards/st/stm32u5a9j_dk/stm32u5a9j_dk.dts index 96726131f64..0853849cb30 100644 --- a/boards/st/stm32u5a9j_dk/stm32u5a9j_dk.dts +++ b/boards/st/stm32u5a9j_dk/stm32u5a9j_dk.dts @@ -23,10 +23,12 @@ leds { compatible = "gpio-leds"; + green_led_0: led_3 { gpios = <&gpioe 0 GPIO_ACTIVE_HIGH>; label = "User LD3"; }; + red_led_0: led_4 { gpios = <&gpioe 1 GPIO_ACTIVE_HIGH>; label = "User LD4"; @@ -35,6 +37,7 @@ gpio_keys { compatible = "gpio-keys"; + user_button: button_0 { label = "User"; gpios = <&gpioc 13 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; @@ -267,14 +270,17 @@ zephyr_udc0: &usbotg_hs { label = "mcuboot"; reg = <0x00000000 DT_SIZE_K(64)>; }; + slot0_partition: partition@10000 { label = "image-0"; reg = <0x00010000 DT_SIZE_K(1952)>; }; + slot1_partition: partition@1f8000 { label = "image-1"; reg = <0x001f8000 DT_SIZE_K(1960)>; }; + storage_partition: partition@3e2000 { label = "storage"; reg = <0x003e2000 DT_SIZE_K(120)>;