2023-05-29 09:28:29

by Raphael Gallais-Pou

[permalink] [raw]
Subject: [PATCH v4 0/4] STM32 warning cleanup

This serie aims to reduce the number of device-tree warnings of
following boards :

- STM32F469-DISCO
- STM32MP15*

Those warnings were appearing either during build or when checking
dt-bindings and concern mostly LTDC and DSI IPs. They were due to the
following cases:

- 'panel-dsi@0' instead of 'panel@0' according to the YAML
- unnecessary #address-cells and #size-cells properties
- residual 'reg' field on single endpoints

First patch fixes stm32f469-disco device-tree.
Second patch fixes st,stm32-dsi.yaml dt-bindings.
Third patch fixes DSI warnings on stm32mp15* device-trees.
Last patch fixes LTDC warnings on stm32mp15* device-trees.

Changes since v3:
* Added Conor's acked-by
* Added Marek's reviewed-by
* Split last patch into two separate for clearer review

Changes since v2:
* Added changelog
* Enhanced commit descriptions

Changes since v1:
* Added DSI subnode name change
* Included stm32f469-disco DT in the cleanup
* Included YAML fix to prevent regression

Raphael Gallais-Pou (4):
ARM: dts: stm32: fix warnings on stm32f469-disco board
dt-bindings: display: st,stm32-dsi: Remove unnecessary fields
ARM: dts: stm32: fix dsi warnings on stm32mp15 boards
ARM: dts: stm32: fix ltdc warnings in stm32mp15 boards

.../bindings/display/st,stm32-dsi.yaml | 2 --
arch/arm/boot/dts/stm32f469-disco.dts | 4 ++--
arch/arm/boot/dts/stm32mp151.dtsi | 5 -----
arch/arm/boot/dts/stm32mp157.dtsi | 7 -------
arch/arm/boot/dts/stm32mp157a-dk1.dts | 20 +++++++++++++++++++
...tm32mp157a-icore-stm32mp1-ctouch2-of10.dts | 6 ++++--
.../stm32mp157a-icore-stm32mp1-edimm2.2.dts | 6 ++++--
...157a-microgea-stm32mp1-microdev2.0-of7.dts | 3 +--
arch/arm/boot/dts/stm32mp157c-dk2.dts | 8 ++++++++
arch/arm/boot/dts/stm32mp157c-ev1.dts | 10 +++++++---
arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 3 +--
.../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 6 +-----
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 18 +----------------
13 files changed, 49 insertions(+), 49 deletions(-)

--
2.25.1



2023-05-29 09:30:13

by Raphael Gallais-Pou

[permalink] [raw]
Subject: [PATCH v4 2/4] dt-bindings: display: st,stm32-dsi: Remove unnecessary fields

"#address-cells" and "#size-cells" are two properties that are not
mandatory. For instance, the DSI could refer to a bridge outside the scope
of the node rather than include a 'panel@0' subnode. By doing so, address
and size fields become then unnecessary, creating a warning at build time.

Signed-off-by: Raphael Gallais-Pou <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
---
Documentation/devicetree/bindings/display/st,stm32-dsi.yaml | 2 --
1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml b/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml
index c488308d7be1..53560052aaf0 100644
--- a/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml
+++ b/Documentation/devicetree/bindings/display/st,stm32-dsi.yaml
@@ -74,8 +74,6 @@ properties:
- const: 2

required:
- - "#address-cells"
- - "#size-cells"
- compatible
- reg
- clocks
--
2.25.1


2023-05-29 09:30:58

by Raphael Gallais-Pou

[permalink] [raw]
Subject: [PATCH v4 4/4] ARM: dts: stm32: fix ltdc warnings in stm32mp15 boards

Those concern:
* "#size-cells" and "#address-cells" wrongly used
* residual "reg" property appearing on endpoints where it could be
avoided

Signed-off-by: Raphael Gallais-Pou <[email protected]>
---
arch/arm/boot/dts/stm32mp151.dtsi | 5 -----
.../boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts | 3 +--
arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts | 3 +--
.../dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts | 3 +--
arch/arm/boot/dts/stm32mp157c-dk2.dts | 3 +++
arch/arm/boot/dts/stm32mp157c-ev1.dts | 3 +--
arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 3 +--
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 6 +-----
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 3 +--
9 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
index a98ae58e2c1c..bf3830dca742 100644
--- a/arch/arm/boot/dts/stm32mp151.dtsi
+++ b/arch/arm/boot/dts/stm32mp151.dtsi
@@ -1529,11 +1529,6 @@ ltdc: display-controller@5a001000 {
clock-names = "lcd";
resets = <&rcc LTDC_R>;
status = "disabled";
-
- port {
- #address-cells = <1>;
- #size-cells = <0>;
- };
};

iwdg2: watchdog@5a002000 {
diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
index 47d03bd9ef0b..4279b26547df 100644
--- a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
+++ b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts
@@ -107,8 +107,7 @@ &ltdc {
status = "okay";

port {
- ltdc_ep0_out: endpoint@0 {
- reg = <0>;
+ ltdc_ep0_out: endpoint {
remote-endpoint = <&dsi_in>;
};
};
diff --git a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
index d2f68997a471..efba54289820 100644
--- a/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
+++ b/arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts
@@ -107,8 +107,7 @@ &ltdc {
status = "okay";

port {
- ltdc_out_dsi: endpoint@0 {
- reg = <0>;
+ ltdc_out_dsi: endpoint {
remote-endpoint = <&dsi_in_ltdc>;
};
};
diff --git a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
index 0d7560ba2950..5116a7785201 100644
--- a/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
+++ b/arch/arm/boot/dts/stm32mp157a-microgea-stm32mp1-microdev2.0-of7.dts
@@ -81,8 +81,7 @@ &ltdc {
status = "okay";

port {
- ltdc_ep0_out: endpoint@0 {
- reg = <0>;
+ ltdc_ep0_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
diff --git a/arch/arm/boot/dts/stm32mp157c-dk2.dts b/arch/arm/boot/dts/stm32mp157c-dk2.dts
index 0067c6248cd1..4bef2300ed7c 100644
--- a/arch/arm/boot/dts/stm32mp157c-dk2.dts
+++ b/arch/arm/boot/dts/stm32mp157c-dk2.dts
@@ -87,6 +87,9 @@ &ltdc {
status = "okay";

port {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
ltdc_ep1_out: endpoint@1 {
reg = <1>;
remote-endpoint = <&dsi_in>;
diff --git a/arch/arm/boot/dts/stm32mp157c-ev1.dts b/arch/arm/boot/dts/stm32mp157c-ev1.dts
index 67c6b9440878..49ca94c19b02 100644
--- a/arch/arm/boot/dts/stm32mp157c-ev1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-ev1.dts
@@ -244,8 +244,7 @@ &ltdc {
status = "okay";

port {
- ltdc_ep0_out: endpoint@0 {
- reg = <0>;
+ ltdc_ep0_out: endpoint {
remote-endpoint = <&dsi_in>;
};
};
diff --git a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
index 407ed3952f75..eada9cf257be 100644
--- a/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
+++ b/arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts
@@ -161,8 +161,7 @@ &ltdc {
status = "okay";

port {
- ltdc_ep0_out: endpoint@0 {
- reg = <0>;
+ ltdc_ep0_out: endpoint {
remote-endpoint = <&panel_input>;
};
};
diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
index 302efac5d26f..e1306f92fd82 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi
@@ -336,11 +336,7 @@ &ltdc {
status = "okay";

port {
- #address-cells = <1>;
- #size-cells = <0>;
-
- ltdc_ep0_out: endpoint@0 {
- reg = <0>;
+ ltdc_ep0_out: endpoint {
remote-endpoint = <&adv7513_in>;
};
};
diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
index 0f1110e42c93..a6e2e20f12fa 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
@@ -457,8 +457,7 @@ &ltdc {
status = "okay";

port {
- ltdc_ep0_out: endpoint@0 {
- reg = <0>;
+ ltdc_ep0_out: endpoint {
remote-endpoint = <&sii9022_in>;
};
};
--
2.25.1


2023-05-29 10:24:51

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH v4 4/4] ARM: dts: stm32: fix ltdc warnings in stm32mp15 boards

On 5/29/23 11:13, Raphael Gallais-Pou wrote:
> Those concern:
> * "#size-cells" and "#address-cells" wrongly used
> * residual "reg" property appearing on endpoints where it could be
> avoided
>
> Signed-off-by: Raphael Gallais-Pou <[email protected]>

Reviewed-by: Marek Vasut <[email protected]>

2023-05-30 08:41:56

by Alexandre TORGUE

[permalink] [raw]
Subject: Re: [PATCH v4 0/4] STM32 warning cleanup

Hi Raphael

On 5/29/23 11:13, Raphael Gallais-Pou wrote:
> This serie aims to reduce the number of device-tree warnings of
> following boards :
>
> - STM32F469-DISCO
> - STM32MP15*
>
> Those warnings were appearing either during build or when checking
> dt-bindings and concern mostly LTDC and DSI IPs. They were due to the
> following cases:
>
> - 'panel-dsi@0' instead of 'panel@0' according to the YAML
> - unnecessary #address-cells and #size-cells properties
> - residual 'reg' field on single endpoints
>
> First patch fixes stm32f469-disco device-tree.
> Second patch fixes st,stm32-dsi.yaml dt-bindings.
> Third patch fixes DSI warnings on stm32mp15* device-trees.
> Last patch fixes LTDC warnings on stm32mp15* device-trees.
>
> Changes since v3:
> * Added Conor's acked-by
> * Added Marek's reviewed-by
> * Split last patch into two separate for clearer review
>
> Changes since v2:
> * Added changelog
> * Enhanced commit descriptions
>
> Changes since v1:
> * Added DSI subnode name change
> * Included stm32f469-disco DT in the cleanup
> * Included YAML fix to prevent regression
>
> Raphael Gallais-Pou (4):
> ARM: dts: stm32: fix warnings on stm32f469-disco board
> dt-bindings: display: st,stm32-dsi: Remove unnecessary fields
> ARM: dts: stm32: fix dsi warnings on stm32mp15 boards
> ARM: dts: stm32: fix ltdc warnings in stm32mp15 boards
>
> .../bindings/display/st,stm32-dsi.yaml | 2 --
> arch/arm/boot/dts/stm32f469-disco.dts | 4 ++--
> arch/arm/boot/dts/stm32mp151.dtsi | 5 -----
> arch/arm/boot/dts/stm32mp157.dtsi | 7 -------
> arch/arm/boot/dts/stm32mp157a-dk1.dts | 20 +++++++++++++++++++
> ...tm32mp157a-icore-stm32mp1-ctouch2-of10.dts | 6 ++++--
> .../stm32mp157a-icore-stm32mp1-edimm2.2.dts | 6 ++++--
> ...157a-microgea-stm32mp1-microdev2.0-of7.dts | 3 +--
> arch/arm/boot/dts/stm32mp157c-dk2.dts | 8 ++++++++
> arch/arm/boot/dts/stm32mp157c-ev1.dts | 10 +++++++---
> arch/arm/boot/dts/stm32mp157c-lxa-mc1.dts | 3 +--
> .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 6 +-----
> arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 18 +----------------
> 13 files changed, 49 insertions(+), 49 deletions(-)
>

Thanks for this series! No more W=1 Warnings and no more YAML issue
regarding DSI/LTDC stuff. Thanks Marek for reviews and feedback.

Series applied on stm32-next.

Cheers
Alx

2023-05-30 12:52:10

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] dt-bindings: display: st,stm32-dsi: Remove unnecessary fields

On Mon, 29 May 2023 11:13:57 +0200, Raphael Gallais-Pou wrote:
> "#address-cells" and "#size-cells" are two properties that are not
> mandatory. For instance, the DSI could refer to a bridge outside the scope
> of the node rather than include a 'panel@0' subnode. By doing so, address
> and size fields become then unnecessary, creating a warning at build time.
>
> Signed-off-by: Raphael Gallais-Pou <[email protected]>
> Acked-by: Conor Dooley <[email protected]>
> Reviewed-by: Marek Vasut <[email protected]>
> ---
> Documentation/devicetree/bindings/display/st,stm32-dsi.yaml | 2 --
> 1 file changed, 2 deletions(-)
>

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/1787034


dsi@40016c00: Unevaluated properties are not allowed ('panel-dsi@0' was unexpected)
arch/arm/boot/dts/stm32f469-disco.dtb

dsi@5a000000: Unevaluated properties are not allowed ('panel-dsi@0' was unexpected)
arch/arm/boot/dts/stm32mp157c-ev1.dtb
arch/arm/boot/dts/stm32mp157c-ev1-scmi.dtb

2023-05-30 13:46:50

by Alexandre TORGUE

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] dt-bindings: display: st,stm32-dsi: Remove unnecessary fields

On 5/30/23 14:27, Krzysztof Kozlowski wrote:
> On Mon, 29 May 2023 11:13:57 +0200, Raphael Gallais-Pou wrote:
>> "#address-cells" and "#size-cells" are two properties that are not
>> mandatory. For instance, the DSI could refer to a bridge outside the scope
>> of the node rather than include a 'panel@0' subnode. By doing so, address
>> and size fields become then unnecessary, creating a warning at build time.
>>
>> Signed-off-by: Raphael Gallais-Pou <[email protected]>
>> Acked-by: Conor Dooley <[email protected]>
>> Reviewed-by: Marek Vasut <[email protected]>
>> ---
>> Documentation/devicetree/bindings/display/st,stm32-dsi.yaml | 2 --
>> 1 file changed, 2 deletions(-)
>>
>
> Running 'make dtbs_check' with the schema in this patch gives the
> following warnings. Consider if they are expected or the schema is
> incorrect. These may not be new warnings
I checked it before merging the series on stm32-next tree. I didn't get
this error. I didn't check commit per commit.

Do you get this error after merging the whole series ?


>
> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
> This will change in the future.
>
> Full log is available here: https://patchwork.ozlabs.org/patch/1787034
>
>
> dsi@40016c00: Unevaluated properties are not allowed ('panel-dsi@0' was unexpected)
> arch/arm/boot/dts/stm32f469-disco.dtb
>
> dsi@5a000000: Unevaluated properties are not allowed ('panel-dsi@0' was unexpected)
> arch/arm/boot/dts/stm32mp157c-ev1.dtb
> arch/arm/boot/dts/stm32mp157c-ev1-scmi.dtb


2023-05-30 13:48:37

by Raphael Gallais-Pou

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] dt-bindings: display: st,stm32-dsi: Remove unnecessary fields


On 5/30/23 15:30, Alexandre TORGUE wrote:
> On 5/30/23 14:27, Krzysztof Kozlowski wrote:
>> On Mon, 29 May 2023 11:13:57 +0200, Raphael Gallais-Pou wrote:
>>> "#address-cells" and "#size-cells" are two properties that are not
>>> mandatory. For instance, the DSI could refer to a bridge outside the scope
>>> of the node rather than include a 'panel@0' subnode. By doing so, address
>>> and size fields become then unnecessary, creating a warning at build time.
>>>
>>> Signed-off-by: Raphael Gallais-Pou <[email protected]>
>>> Acked-by: Conor Dooley <[email protected]>
>>> Reviewed-by: Marek Vasut <[email protected]>
>>> ---
>>>   Documentation/devicetree/bindings/display/st,stm32-dsi.yaml | 2 --
>>>   1 file changed, 2 deletions(-)
>>>
>>
>> Running 'make dtbs_check' with the schema in this patch gives the
>> following warnings. Consider if they are expected or the schema is
>> incorrect. These may not be new warnings
> I checked it before merging the series on stm32-next tree. I didn't get this
> error. I didn't check commit per commit.
>
> Do you get this error after merging the whole series ?


I think this is because of the order of the patches within the serie. The patch
correcting the yaml is before those modifying the device-trees. This could
explain warnings rise up when checking patch per patch. However I did not get
any errors on top of  the whole serie.

>
>
>>
>> Note that it is not yet a requirement to have 0 warnings for dtbs_check.
>> This will change in the future.
>>
>> Full log is available here: https://patchwork.ozlabs.org/patch/1787034
>>
>>
>> dsi@40016c00: Unevaluated properties are not allowed ('panel-dsi@0' was
>> unexpected)
>>     arch/arm/boot/dts/stm32f469-disco.dtb
>>
>> dsi@5a000000: Unevaluated properties are not allowed ('panel-dsi@0' was
>> unexpected)
>>     arch/arm/boot/dts/stm32mp157c-ev1.dtb
>>     arch/arm/boot/dts/stm32mp157c-ev1-scmi.dtb
>

2023-05-30 15:28:53

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] dt-bindings: display: st,stm32-dsi: Remove unnecessary fields

On 30/05/2023 15:38, Raphael Gallais-Pou wrote:
>
> On 5/30/23 15:30, Alexandre TORGUE wrote:
>> On 5/30/23 14:27, Krzysztof Kozlowski wrote:
>>> On Mon, 29 May 2023 11:13:57 +0200, Raphael Gallais-Pou wrote:
>>>> "#address-cells" and "#size-cells" are two properties that are not
>>>> mandatory. For instance, the DSI could refer to a bridge outside the scope
>>>> of the node rather than include a 'panel@0' subnode. By doing so, address
>>>> and size fields become then unnecessary, creating a warning at build time.
>>>>
>>>> Signed-off-by: Raphael Gallais-Pou <[email protected]>
>>>> Acked-by: Conor Dooley <[email protected]>
>>>> Reviewed-by: Marek Vasut <[email protected]>
>>>> ---
>>>>   Documentation/devicetree/bindings/display/st,stm32-dsi.yaml | 2 --
>>>>   1 file changed, 2 deletions(-)
>>>>
>>>
>>> Running 'make dtbs_check' with the schema in this patch gives the
>>> following warnings. Consider if they are expected or the schema is
>>> incorrect. These may not be new warnings
>> I checked it before merging the series on stm32-next tree. I didn't get this
>> error. I didn't check commit per commit.
>>
>> Do you get this error after merging the whole series ?
>
>
> I think this is because of the order of the patches within the serie. The patch
> correcting the yaml is before those modifying the device-trees. This could
> explain warnings rise up when checking patch per patch. However I did not get
> any errors on top of  the whole serie.

Yeah. Ignore the report if you tested it by yourself.

Best regards,
Krzysztof