Skip to content

Commit e8e3560

Browse files
etienne-lmskartben
authored andcommitted
boards: st: fix STM32G0 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. No functional change. Link: https://docs.zephyrproject.org/latest/contribute/style/devicetree.html [1] Signed-off-by: Etienne Carriere <[email protected]>
1 parent 3782c24 commit e8e3560

File tree

7 files changed

+36
-1
lines changed

7 files changed

+36
-1
lines changed

boards/st/nucleo_g031k8/nucleo_g031k8.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
leds: leds {
2424
compatible = "gpio-leds";
25+
2526
green_led_3: led_3 {
2627
gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>;
2728
label = "User LD3";

boards/st/nucleo_g070rb/nucleo_g070rb.dts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
leds: leds {
2727
compatible = "gpio-leds";
28+
2829
green_led_1: led_4 {
2930
gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
3031
label = "User LD4";
@@ -33,6 +34,7 @@
3334

3435
gpio_keys {
3536
compatible = "gpio-keys";
37+
3638
user_button: button {
3739
label = "User";
3840
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
@@ -101,6 +103,7 @@
101103
&timers3 {
102104
st,prescaler = <10000>;
103105
status = "okay";
106+
104107
pwm3: pwm {
105108
status = "okay";
106109
pinctrl-0 = <&tim3_ch1_pa6>;

boards/st/nucleo_g071rb/nucleo_g071rb.dts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
zephyr,flash = &flash0;
2424
};
2525

26-
2726
leds: leds {
2827
compatible = "gpio-leds";
28+
2929
green_led_1: led_4 {
3030
gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
3131
label = "User LD4";
@@ -34,6 +34,7 @@
3434

3535
gpio_keys {
3636
compatible = "gpio-keys";
37+
3738
user_button: button {
3839
label = "User";
3940
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
@@ -107,6 +108,7 @@
107108
&timers3 {
108109
st,prescaler = <10000>;
109110
status = "okay";
111+
110112
pwm3: pwm {
111113
status = "okay";
112114
pinctrl-0 = <&tim3_ch1_pa6>;

boards/st/nucleo_g0b1re/nucleo_g0b1re.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
leds: leds {
2929
compatible = "gpio-leds";
30+
3031
green_led_1: led_4 {
3132
gpios = <&gpioa 5 GPIO_ACTIVE_HIGH>;
3233
label = "User LD4";
@@ -35,6 +36,7 @@
3536

3637
gpio_keys {
3738
compatible = "gpio-keys";
39+
3840
user_button: button {
3941
label = "User";
4042
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
@@ -115,6 +117,7 @@ zephyr_udc0: &usb {
115117
&timers3 {
116118
st,prescaler = <10000>;
117119
status = "okay";
120+
118121
pwm3: pwm {
119122
status = "okay";
120123
pinctrl-0 = <&tim3_ch1_pb4>;
@@ -125,6 +128,7 @@ zephyr_udc0: &usb {
125128
&timers15 {
126129
st,prescaler = <10000>;
127130
status = "okay";
131+
128132
pwm15: pwm {
129133
status = "okay";
130134
pinctrl-0 = <&tim15_ch1_pb14>;
@@ -205,14 +209,17 @@ zephyr_udc0: &usb {
205209
reg = <0x00000000 DT_SIZE_K(48)>;
206210
read-only;
207211
};
212+
208213
slot0_partition: partition@C000 {
209214
label = "image-0";
210215
reg = <0x0000C000 DT_SIZE_K(200)>;
211216
};
217+
212218
slot1_partition: partition@3E000 {
213219
label = "image-1";
214220
reg = <0x0003E000 DT_SIZE_K(200)>;
215221
};
222+
216223
/* final 64KiB reserved for app storage partition */
217224
storage_partition: partition@70000 {
218225
label = "storage";

boards/st/stm32g0316_disco/stm32g0316_disco.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
leds {
3030
compatible = "gpio-leds";
31+
3132
green_led_1: led_2 {
3233
gpios = <&gpioa 12 GPIO_ACTIVE_LOW>;
3334
label = "User LD2";
@@ -36,6 +37,7 @@
3637

3738
gpio_keys {
3839
compatible = "gpio-keys";
40+
3941
user_button: button {
4042
label = "User";
4143
gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;

boards/st/stm32g071b_disco/stm32g071b_disco.dts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,22 @@
2323

2424
leds {
2525
compatible = "gpio-leds";
26+
2627
red_led_4: led4 {
2728
gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
2829
label = "TO_REC";
2930
};
31+
3032
red_led_5: led5 {
3133
gpios = <&gpiod 8 GPIO_ACTIVE_HIGH>;
3234
label = "TO_PLUG";
3335
};
36+
3437
green_led_6: led6 {
3538
gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>;
3639
label = "SINK_SPY";
3740
};
41+
3842
green_led_7: led7 {
3943
gpios = <&gpioc 12 GPIO_ACTIVE_HIGH>;
4044
label = "SOURCE";
@@ -43,26 +47,31 @@
4347

4448
gpio_keys {
4549
compatible = "gpio-keys";
50+
4651
joy_sel: button0 {
4752
label = "JOY_SEL";
4853
gpios = <&gpioc 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
4954
zephyr,code = <INPUT_KEY_ENTER>;
5055
};
56+
5157
joy_left: button1 {
5258
label = "JOY_LEFT";
5359
gpios = <&gpioc 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
5460
zephyr,code = <INPUT_KEY_LEFT>;
5561
};
62+
5663
joy_down: button2 {
5764
label = "JOY_DOWN";
5865
gpios = <&gpioc 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
5966
zephyr,code = <INPUT_KEY_DOWN>;
6067
};
68+
6169
joy_right: button3 {
6270
label = "JOY_RIGHT";
6371
gpios = <&gpioc 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
6472
zephyr,code = <INPUT_KEY_RIGHT>;
6573
};
74+
6675
joy_up: button4 {
6776
label = "JOY_UP";
6877
gpios = <&gpioc 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
@@ -72,6 +81,7 @@
7281

7382
cc_config {
7483
compatible = "gpio-leds";
84+
7585
encc1 {
7686
gpios = <&gpiob 10 GPIO_ACTIVE_HIGH>;
7787
label = "ENCC1";

boards/st/stm32g081b_eval/stm32g081b_eval.dts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,22 @@
2222

2323
leds {
2424
compatible = "gpio-leds";
25+
2526
led_1: led1 {
2627
gpios = <&gpiod 5 GPIO_ACTIVE_HIGH>;
2728
label = "LED1";
2829
};
30+
2931
led_2: led2 {
3032
gpios = <&gpiod 6 GPIO_ACTIVE_HIGH>;
3133
label = "LED2";
3234
};
35+
3336
led_3: led3 {
3437
gpios = <&gpiod 8 GPIO_ACTIVE_HIGH>;
3538
label = "LED3";
3639
};
40+
3741
led_4: led4 {
3842
gpios = <&gpiod 9 GPIO_ACTIVE_HIGH>;
3943
label = "LED4";
@@ -42,26 +46,31 @@
4246

4347
gpio_keys {
4448
compatible = "gpio-keys";
49+
4550
joy_sel: button0 {
4651
label = "JOY_SEL";
4752
gpios = <&gpioa 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
4853
zephyr,code = <INPUT_KEY_ENTER>;
4954
};
55+
5056
joy_left: button1 {
5157
label = "JOY_LEFT";
5258
gpios = <&gpioc 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
5359
zephyr,code = <INPUT_KEY_LEFT>;
5460
};
61+
5562
joy_down: button2 {
5663
label = "JOY_DOWN";
5764
gpios = <&gpioc 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
5865
zephyr,code = <INPUT_KEY_DOWN>;
5966
};
67+
6068
joy_right: button3 {
6169
label = "JOY_RIGHT";
6270
gpios = <&gpioc 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
6371
zephyr,code = <INPUT_KEY_RIGHT>;
6472
};
73+
6574
joy_up: button4 {
6675
label = "JOY_UP";
6776
gpios = <&gpioc 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
@@ -121,6 +130,7 @@
121130

122131
&timers15 {
123132
status = "okay";
133+
124134
pwm15: pwm {
125135
status = "okay";
126136
pinctrl-0 = <&tim15_ch1_pc1>;

0 commit comments

Comments
 (0)