Skip to content

ST DTS lint #90611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions boards/st/b_l072z_lrwan1/b_l072z_lrwan1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ arduino_i2c: &i2c1 {};
&spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = "default";
status = "okay";

Copy link
Contributor

@etienne-lms etienne-lms May 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the specs, I guess we should rather have:

	pinctrl-names = "default";
+	cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;
	status = "okay";
-	cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;

	lora: lora@0 {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exists in a bunch of places. I think it falls into the category of splitting into paragraphs for readabillity. It's nice to have the cs-gpios right before the spi device sub-nodes because they go together logically

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must say I don't understand why you don't want to change this while still change other status properties placement.
(2 other occurrences).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did I fix all the inconsistancies?

cs-gpios = <&gpioa 15 GPIO_ACTIVE_LOW>;

lora: lora@0 {
Expand Down Expand Up @@ -148,8 +149,8 @@ arduino_i2c: &i2c1 {};
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&rtc {
Expand Down Expand Up @@ -180,8 +181,8 @@ zephyr_udc0: &usb {

/* Set aside 32KiB for data at the end of the 192KiB flash */
storage_partition: partition@28000 {
label = "storage";
reg = <0x00028000 DT_SIZE_K(32)>;
label = "storage";
};
};
};
19 changes: 8 additions & 11 deletions boards/st/b_l4s5i_iot01a/b_l4s5i_iot01a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";

lis3mdl-magn@1e {
compatible = "st,lis3mdl-magn";
Expand Down Expand Up @@ -182,24 +182,24 @@
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 DT_SIZE_K(64)>;
label = "mcuboot";
read-only;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x10000 DT_SIZE_K(976)>;
label = "image-0";
};

slot1_partition: partition@104000 {
label = "image-1";
reg = <0x104000 DT_SIZE_K(976)>;
label = "image-1";
};

storage_partition: partition@1f8000 {
label = "storage";
reg = <0x1f8000 DT_SIZE_K(32)>;
label = "storage";
};
};
};
Expand All @@ -208,9 +208,9 @@
status = "okay";

pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa15>;
pinctrl-names = "default";
status = "okay";
};
};

Expand Down Expand Up @@ -240,10 +240,8 @@ zephyr_udc0: &usbotg_fs {
&octospim_p1_io0_pe12 &octospim_p1_io1_pe13
&octospim_p1_io2_pe14 &octospim_p1_io3_pe15>;
pinctrl-names = "default";

dmas = <&dma1 0 40 STM32_DMA_PERIPH_RX>; /* request 40 for OCTOSPI1 */
dma-names = "tx_rx";

status = "okay";

mx25r6435f: ospi-nor-flash@90000000 {
Expand All @@ -253,7 +251,6 @@ zephyr_udc0: &usbotg_fs {
spi-bus-width = <OSPI_QUAD_MODE>;
data-rate = <OSPI_STR_TRANSFER>;
writeoc="PP_1_4_4";

status = "okay";

partitions {
Expand All @@ -262,8 +259,8 @@ zephyr_udc0: &usbotg_fs {
#size-cells = <1>;

store_partition: partition@000 {
label = "store";
reg = <0x00000000 DT_SIZE_M(8)>;
label = "store";
};
};
};
Expand Down
10 changes: 5 additions & 5 deletions boards/st/b_u585i_iot02a/b_u585i_iot02a.dts
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@
* Set the partitions with first MB to make use of the whole Bank1
*/
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
label = "mcuboot";
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(416)>;
label = "image-0";
};

slot1_partition: partition@78000 {
label = "image-1";
reg = <0x00078000 DT_SIZE_K(416)>;
label = "image-1";
};

scratch_partition: partition@e0000 {
label = "image-scratch";
reg = <0x000e0000 DT_SIZE_K(64)>;
label = "image-scratch";
};

storage_partition: partition@f0000 {
label = "storage";
reg = <0x000f0000 DT_SIZE_K(64)>;
label = "storage";
};
};
};
Expand Down
12 changes: 6 additions & 6 deletions boards/st/b_u585i_iot02a/b_u585i_iot02a_stm32u585xx_ns.dts
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,39 @@
*/

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(224)>;
label = "mcuboot";
read-only;
};

/* Secure image primary slot */
slot0_partition: partition@38000 {
label = "image-0";
reg = <0x00038000 DT_SIZE_K(384)>;
label = "image-0";
};

/* Non-secure image primary slot */
slot0_ns_partition: partition@98000 {
label = "image-0-nonsecure";
reg = <0x00098000 DT_SIZE_K(512)>;
label = "image-0-nonsecure";
};

/* Secure image secondary slot */
slot1_partition: partition@118000 {
label = "image-1";
reg = <0x00118000 DT_SIZE_K(384)>;
label = "image-1";
};

/* Non-secure image secondary slot */
slot1_ns_partition: partition@178000 {
label = "image-1-nonsecure";
reg = <0x00178000 DT_SIZE_K(512)>;
label = "image-1-nonsecure";
};

/* Applicative Non Volatile Storage */
storage_partition: partition@1f8000 {
label = "storage";
reg = <0x001f8000 DT_SIZE_K(16)>;
label = "storage";
};
};
};
28 changes: 13 additions & 15 deletions boards/st/disco_l475_iot1/disco_l475_iot1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
};

&clk_msi {
status = "okay";
msi-pll-mode;
msi-range = <11>; /* 48MHz USB bus clk */
status = "okay";
};

&pll {
Expand Down Expand Up @@ -136,15 +136,15 @@
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&i2c2 {
pinctrl-0 = <&i2c2_scl_pb10 &i2c2_sda_pb11>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";

lis3mdl-magn@1e {
compatible = "st,lis3mdl-magn";
Expand Down Expand Up @@ -178,8 +178,8 @@
&i2c3 {
pinctrl-0 = <&i2c3_scl_pc0 &i2c3_sda_pc1>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&spi1 {
Expand All @@ -192,10 +192,9 @@
&spi3_miso_pc11 { slew-rate = "very-high-speed"; };

&spi3 {
status = "okay";

pinctrl-0 = <&spi3_sck_pc10 &spi3_miso_pc11 &spi3_mosi_pc12>;
pinctrl-names = "default";
status = "okay";

cs-gpios = <&gpiod 13 GPIO_ACTIVE_LOW>,
<&gpioe 0 GPIO_ACTIVE_LOW>;
Expand Down Expand Up @@ -227,19 +226,19 @@
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 DT_SIZE_K(64)>;
label = "mcuboot";
read-only;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x10000 DT_SIZE_K(928)>;
label = "image-0";
};

storage_partition: partition@f8000 {
label = "storage";
reg = <0xf8000 DT_SIZE_K(32)>;
label = "storage";
};
};
};
Expand All @@ -249,9 +248,9 @@
status = "okay";

pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa15>; /* CN1 pin 2 (ARD.D9-PWM) */
pinctrl-names = "default";
status = "okay";
};
};

Expand All @@ -260,9 +259,9 @@
status = "okay";

pwm15: pwm {
status = "okay";
pinctrl-0 = <&tim15_ch1_pb14>; /* LED2 */
pinctrl-names = "default";
status = "okay";
};
};

Expand Down Expand Up @@ -307,9 +306,9 @@ zephyr_udc0: &usbotg_fs {
};

&dac1 {
status = "okay";
pinctrl-0 = <&dac1_out1_pa4>;
pinctrl-names = "default";
status = "okay";
};

&dma1 {
Expand All @@ -323,7 +322,6 @@ zephyr_udc0: &usbotg_fs {
pinctrl-names = "default";
dmas = <&dma1 5 5 0x0000>;
dma-names = "tx_rx";

status = "okay";

mx25r6435f: qspi-nor-flash@90000000 {
Expand All @@ -338,13 +336,13 @@ zephyr_udc0: &usbotg_fs {
#size-cells = <1>;

slot1_partition: partition@0 {
label = "image-1";
reg = <0x00000000 DT_SIZE_K(864)>;
label = "image-1";
};

slot2_partition: partition@d8000 {
label = "image-3";
reg = <0x000d8000 DT_SIZE_M(7)>;
label = "image-3";
};
};
};
Expand Down
6 changes: 3 additions & 3 deletions boards/st/nucleo_f091rc/nucleo_f091rc.dts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
&i2c1 {
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&i2c2 {
Expand Down Expand Up @@ -151,8 +151,8 @@

/* Set 6Kb of storage at the end of the 256Kb of flash */
storage_partition: partition@3e800 {
label = "storage";
reg = <0x0003e800 DT_SIZE_K(6)>;
label = "storage";
};
};
};
Expand All @@ -170,9 +170,9 @@
};

&dac1 {
status = "okay";
pinctrl-0 = <&dac_out1_pa4>;
pinctrl-names = "default";
status = "okay";
};

&dma1 {
Expand Down
8 changes: 4 additions & 4 deletions boards/st/nucleo_f103rb/nucleo_f103rb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
&i2c1 {
pinctrl-0 = <&i2c1_scl_remap1_pb8 &i2c1_sda_remap1_pb9>;
pinctrl-names = "default";
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&spi1 {
Expand All @@ -120,9 +120,9 @@
status = "okay";

pwm1: pwm {
status = "okay";
pinctrl-0 = <&tim1_ch1_pwm_out_pa8>;
pinctrl-names = "default";
status = "okay";
};
};

Expand All @@ -131,9 +131,9 @@
status = "okay";

pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch2_pwm_in_pa1>;
pinctrl-names = "default";
status = "okay";
};
};

Expand Down Expand Up @@ -169,8 +169,8 @@

/* Set 2KB of storage at the end of 128KB flash */
storage_partition: partition@1f800 {
label = "storage";
reg = <0x0001f800 DT_SIZE_K(2)>;
label = "storage";
};
};
};
Loading
Loading