boards: st: fix STM32G4 boards DTS files coding style

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]:
- Insert a single empty line to separate nodes at the same hierarchy level.

By the way, also correct indentation in node stm32_lp_tick_source of
b_g474e_dpow1.dts.

No functional change.

Link: https://docs.zephyrproject.org/latest/contribute/style/devicetree.html [1]
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This commit is contained in:
Etienne Carriere 2025-05-21 19:01:12 +02:00 committed by Benjamin Cabé
commit 1aa8f51374
4 changed files with 21 additions and 3 deletions

View file

@ -22,18 +22,22 @@
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
blue_led_2: led2 { blue_led_2: led2 {
gpios = <&gpioa 15 GPIO_ACTIVE_HIGH>; gpios = <&gpioa 15 GPIO_ACTIVE_HIGH>;
label = "LED_DOWN_BLUE"; label = "LED_DOWN_BLUE";
}; };
orange_led_3: led3 { orange_led_3: led3 {
gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>; gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>;
label = "LED_LEFT_ORANGE"; label = "LED_LEFT_ORANGE";
}; };
green_led_4: led4 { green_led_4: led4 {
gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>; gpios = <&gpiob 7 GPIO_ACTIVE_HIGH>;
label = "LED_RIGHT_GREEN"; label = "LED_RIGHT_GREEN";
}; };
red_led_5: led5 { red_led_5: led5 {
gpios = <&gpiob 5 GPIO_ACTIVE_HIGH>; gpios = <&gpiob 5 GPIO_ACTIVE_HIGH>;
label = "LED_UP_RED"; label = "LED_UP_RED";
@ -42,26 +46,31 @@
gpio_keys { gpio_keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
joystick_sel: button0 { joystick_sel: button0 {
label = "JOYSTICK_SEL"; label = "JOYSTICK_SEL";
gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_ENTER>; zephyr,code = <INPUT_KEY_ENTER>;
}; };
joystick_left: button1 { joystick_left: button1 {
label = "JOYSTICK_LEFT"; label = "JOYSTICK_LEFT";
gpios = <&gpioc 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; gpios = <&gpioc 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_LEFT>; zephyr,code = <INPUT_KEY_LEFT>;
}; };
joystick_down: button2 { joystick_down: button2 {
label = "JOYSTICK_DOWN"; label = "JOYSTICK_DOWN";
gpios = <&gpioc 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; gpios = <&gpioc 5 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_DOWN>; zephyr,code = <INPUT_KEY_DOWN>;
}; };
joystick_right: button3 { joystick_right: button3 {
label = "JOYSTICK_RIGHT"; label = "JOYSTICK_RIGHT";
gpios = <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; gpios = <&gpiob 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
zephyr,code = <INPUT_KEY_RIGHT>; zephyr,code = <INPUT_KEY_RIGHT>;
}; };
joystick_up: button4 { joystick_up: button4 {
label = "JOYSTICK_UP"; label = "JOYSTICK_UP";
gpios = <&gpiob 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; gpios = <&gpiob 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
@ -97,7 +106,7 @@
stm32_lp_tick_source: &lptim1 { stm32_lp_tick_source: &lptim1 {
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>, clocks = <&rcc STM32_CLOCK_BUS_APB1 0x80000000>,
<&rcc STM32_SRC_LSI LPTIM1_SEL(1)>; <&rcc STM32_SRC_LSI LPTIM1_SEL(1)>;
status = "okay"; status = "okay";
}; };

View file

@ -21,6 +21,7 @@
leds: leds { leds: leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
green_led: led_0 { green_led: led_0 {
gpios = <&gpiob 8 GPIO_ACTIVE_HIGH>; gpios = <&gpiob 8 GPIO_ACTIVE_HIGH>;
label = "User LD2"; label = "User LD2";
@ -102,7 +103,6 @@ stm32_lp_tick_source: &lptim1 {
}; };
&flash0 { &flash0 {
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;

View file

@ -25,6 +25,7 @@
leds: leds { leds: leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
green_led: led_0 { green_led: led_0 {
gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
label = "User LD2"; label = "User LD2";
@ -41,6 +42,7 @@
gpio_keys { gpio_keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
user_button: button { user_button: button {
label = "User"; label = "User";
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>; gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
@ -163,7 +165,6 @@ stm32_lp_tick_source: &lptim1 {
}; };
&flash0 { &flash0 {
partitions { partitions {
compatible = "fixed-partitions"; compatible = "fixed-partitions";
#address-cells = <1>; #address-cells = <1>;
@ -173,14 +174,17 @@ stm32_lp_tick_source: &lptim1 {
label = "mcuboot"; label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(34)>; reg = <0x00000000 DT_SIZE_K(34)>;
}; };
slot0_partition: partition@8800 { slot0_partition: partition@8800 {
label = "image-0"; label = "image-0";
reg = <0x00008800 DT_SIZE_K(48)>; reg = <0x00008800 DT_SIZE_K(48)>;
}; };
slot1_partition: partition@14800 { slot1_partition: partition@14800 {
label = "image-1"; label = "image-1";
reg = <0x00014800 DT_SIZE_K(42)>; reg = <0x00014800 DT_SIZE_K(42)>;
}; };
/* Set 4Kb of storage at the end of the 128Kb of flash */ /* Set 4Kb of storage at the end of the 128Kb of flash */
storage_partition: partition@1f000 { storage_partition: partition@1f000 {
label = "storage"; label = "storage";

View file

@ -26,6 +26,7 @@
leds: leds { leds: leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
green_led: led_0 { green_led: led_0 {
gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>; gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
label = "User LD2"; label = "User LD2";
@ -42,6 +43,7 @@
gpio_keys { gpio_keys {
compatible = "gpio-keys"; compatible = "gpio-keys";
user_button: button { user_button: button {
label = "User"; label = "User";
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>; gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
@ -177,14 +179,17 @@ stm32_lp_tick_source: &lptim1 {
label = "mcuboot"; label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(34)>; reg = <0x00000000 DT_SIZE_K(34)>;
}; };
slot0_partition: partition@8800 { slot0_partition: partition@8800 {
label = "image-0"; label = "image-0";
reg = <0x00008800 DT_SIZE_K(240)>; reg = <0x00008800 DT_SIZE_K(240)>;
}; };
slot1_partition: partition@44800 { slot1_partition: partition@44800 {
label = "image-1"; label = "image-1";
reg = <0x00044800 DT_SIZE_K(234)>; reg = <0x00044800 DT_SIZE_K(234)>;
}; };
/* Set 4Kb of storage at the end of the 512Kb of flash */ /* Set 4Kb of storage at the end of the 512Kb of flash */
storage_partition: partition@7f000 { storage_partition: partition@7f000 {
label = "storage"; label = "storage";