ARM: dts: stm32: Deduplicate DSI node
Subsystems (2)
PATCH 1/1 ARM: dts: stm32: Deduplicate DSI node
All boards using the DSI node duplicate the same pattern common pattern in board DTs, that pattern is ports with endpoint labels and the same in-SoC regulator connection. Move that common pattern into stm32mp157.dtsi instead.
The two boards which do define panel@0 directly in the DSI bridge node now have #address-cells/#size-cells in their board DT instead of it being in stm32mp157.dtsi and activated incorrectly for all boards, even the ones which use e.g. another DSI-to-something bridge.
---
Cc: Alexandre Torgue <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- arch/arm/boot/dts/stm32mp157.dtsi | 18 ++++++++++++ ...tm32mp157a-icore-stm32mp1-ctouch2-of10.dts | 24 ++++------------ .../stm32mp157a-icore-stm32mp1-edimm2.2.dts | 28 ++++++------------- arch/arm/boot/dts/stm32mp157c-dk2.dts | 28 ++++++------------- arch/arm/boot/dts/stm32mp157c-ev1.dts | 28 ++++++------------- 5 files changed, 48 insertions(+), 78 deletions(-)
arch/arm/boot/dts/stm32mp157.dtsi +18 -0
@@ -22,9 +22,27 @@ dsi: dsi@5a000000 { reg = <0x5a000000 0x800>; clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>; clock-names = "pclk", "ref", "px_clk"; + phy-dsi-supply = <®18>; resets = <&rcc DSI_R>; reset-names = "apb"; status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + }; + }; + }; }; }; };
arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts +6 -18
@@ -46,26 +46,14 @@ panel_in_lvds: endpoint { &dsi { status = "okay"; - phy-dsi-supply = <®18>; - - ports { - #address-cells = <1>; - #size-cells = <0>; +}; - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep0_out>; - }; - }; +&dsi_in { + remote-endpoint = <<dc_ep0_out>; +}; - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&bridge_in>; - }; - }; - }; +&dsi_out { + remote-endpoint = <&bridge_in>; }; &i2c6 {
arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts +8 -20
@@ -46,26 +46,14 @@ panel_out_bridge: endpoint { &dsi { status = "okay"; - phy-dsi-supply = <®18>; - - ports { - #address-cells = <1>; - #size-cells = <0>; +}; - port@0 { - reg = <0>; - dsi_in_ltdc: endpoint { - remote-endpoint = <<dc_out_dsi>; - }; - }; +&dsi_in { + remote-endpoint = <<dc_out_dsi>; +}; - port@1 { - reg = <1>; - dsi_out_bridge: endpoint { - remote-endpoint = <&bridge_in_dsi>; - }; - }; - }; +&dsi_out { + remote-endpoint = <&bridge_in_dsi>; }; &i2c6 {
@@ -88,7 +76,7 @@ ports { port@0 { reg = <0>; bridge_in_dsi: endpoint { - remote-endpoint = <&dsi_out_bridge>; + remote-endpoint = <&dsi_out>; data-lanes = <1 2>; }; };
@@ -108,7 +96,7 @@ <dc { port { ltdc_out_dsi: endpoint { - remote-endpoint = <&dsi_in_ltdc>; + remote-endpoint = <&dsi_in>; }; }; };
arch/arm/boot/dts/stm32mp157c-dk2.dts +8 -20
@@ -34,26 +34,6 @@ &dsi { #address-cells = <1>; #size-cells = <0>; status = "okay"; - phy-dsi-supply = <®18>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep1_out>; - }; - }; - - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&panel_in>; - }; - }; - }; panel@0 { compatible = "orisetech,otm8009a";
@@ -70,6 +50,14 @@ panel_in: endpoint { }; }; +&dsi_in { + remote-endpoint = <<dc_ep1_out>; +}; + +&dsi_out { + remote-endpoint = <&panel_in>; +}; + &i2c1 { touchscreen@38 { compatible = "focaltech,ft6236";
arch/arm/boot/dts/stm32mp157c-ev1.dts +8 -20
@@ -100,30 +100,10 @@ dcmi_0: endpoint { }; &dsi { - phy-dsi-supply = <®18>; #address-cells = <1>; #size-cells = <0>; status = "okay"; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep0_out>; - }; - }; - - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&dsi_panel_in>; - }; - }; - }; - panel@0 { compatible = "raydium,rm68200"; reg = <0>;
@@ -140,6 +120,14 @@ dsi_panel_in: endpoint { }; }; +&dsi_in { + remote-endpoint = <<dc_ep0_out>; +}; + +&dsi_out { + remote-endpoint = <&dsi_panel_in>; +}; + ðernet0 { status = "okay"; pinctrl-0 = <ðernet0_rgmii_pins_a>;
Signature · 1 line
2.39.2
Hi Marek,
Quoted 4 lines · Marek Vasut
All boards using the DSI node duplicate the same pattern common pattern in board DTs, that pattern is ports with endpoint labels and the same in-SoC regulator connection. Move that common pattern into
stm32mp157.dtsiinstead.
I think that is a good idea, while it did not crossed my mind implementing it this way on the first time.
I'll let my peers Philippe and Yannick review and ack it this time. I tested it on DK2, it seems fine.
Thanks :)
Quoted 6 lines
The two boards which do define panel@0 directly in the DSI bridge node now have #address-cells/#size-cells in their board DT instead of it being in
stm32mp157.dtsiand activated incorrectly for all boards, even the ones which use e.g. another DSI-to-something bridge.Signed-off-by Marek Vasut <[email protected]>
Quoted 17 lines
---
Cc: Alexandre Torgue <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]--- arch/arm/boot/dts/stm32mp157.dtsi | 18 ++++++++++++ ...tm32mp157a-icore-stm32mp1-ctouch2-of10.dts | 24 ++++------------ .../stm32mp157a-icore-stm32mp1-edimm2.2.dts | 28 ++++++------------- arch/arm/boot/dts/stm32mp157c-dk2.dts | 28 ++++++------------- arch/arm/boot/dts/stm32mp157c-ev1.dts | 28 ++++++------------- 5 files changed, 48 insertions(+), 78 deletions(-)
Quoted 1 line · Raphael Gallais-Pou
Hi Marek,
Hi,
Quoted 11 lines · Marek Vasut
Quoted 4 lines
All boards using the DSI node duplicate the same pattern common pattern in board DTs, that pattern is ports with endpoint labels and the same in-SoC regulator connection. Move that common pattern into
stm32mp157.dtsiinstead.I think that is a good idea, while it did not crossed my mind implementing it this way on the first time.
I'll let my peers Philippe and Yannick review and ack it this time. I tested it on DK2, it seems fine.
Thanks for testing. There's no rush, so take your time.
Raphael Gallais-Pou
Acked-byHi Marek,
Quoted 11 lines · Marek Vasut
Quoted 1 line · Raphael Gallais-Pou
Hi Marek,
Hi,
Quoted 6 lines · Marek Vasut
Quoted 4 lines
All boards using the DSI node duplicate the same pattern common pattern in board DTs, that pattern is ports with endpoint labels and the same in-SoC regulator connection. Move that common pattern into
stm32mp157.dtsiinstead.
Quoted 7 lines
Quoted 5 lines
I think that is a good idea, while it did not crossed my mind implementing it this way on the first time.
I'll let my peers Philippe and Yannick review and ack it this time. I tested it on DK2, it seems fine.
Thanks for testing. There's no rush, so take your time.
Thank you,
Raphaël
Alexandre TORGUE
maintainerHi Marek
Quoted 11 lines · Marek Vasut
All boards using the DSI node duplicate the same pattern common pattern in board DTs, that pattern is ports with endpoint labels and the same in-SoC regulator connection. Move that common pattern into
stm32mp157.dtsiinstead.The two boards which do define panel@0 directly in the DSI bridge node now have #address-cells/#size-cells in their board DT instead of it being in
stm32mp157.dtsiand activated incorrectly for all boards, even the ones which use e.g. another DSI-to-something bridge.Signed-off-by Marek Vasut <[email protected]>
Applied on stm32-next.
Thanks.
Alex
Quoted 238 lines
---
Cc: Alexandre Torgue <[email protected]>
Cc: Conor Dooley <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: Raphael Gallais-Pou <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]--- arch/arm/boot/dts/stm32mp157.dtsi | 18 ++++++++++++ ...tm32mp157a-icore-stm32mp1-ctouch2-of10.dts | 24 ++++------------ .../stm32mp157a-icore-stm32mp1-edimm2.2.dts | 28 ++++++------------- arch/arm/boot/dts/stm32mp157c-dk2.dts | 28 ++++++------------- arch/arm/boot/dts/stm32mp157c-ev1.dts | 28 ++++++------------- 5 files changed, 48 insertions(+), 78 deletions(-)arch/arm/boot/dts/stm32mp157.dtsi +18
-0@@ -22,9 +22,27 @@ dsi: dsi@5a000000 { reg = <0x5a000000 0x800>; clocks = <&rcc DSI_K>, <&clk_hse>, <&rcc DSI_PX>; clock-names = "pclk", "ref", "px_clk"; + phy-dsi-supply = <®18>; resets = <&rcc DSI_R>; reset-names = "apb"; status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dsi_in: endpoint { + }; + }; + + port@1 { + reg = <1>; + dsi_out: endpoint { + }; + }; + }; }; }; };arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-ctouch2-of10.dts +6
-18@@ -46,26 +46,14 @@ panel_in_lvds: endpoint { &dsi { status = "okay"; - phy-dsi-supply = <®18>; - - ports { - #address-cells = <1>; - #size-cells = <0>; +}; - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep0_out>; - }; - }; +&dsi_in { + remote-endpoint = <<dc_ep0_out>; +}; - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&bridge_in>; - }; - }; - }; +&dsi_out { + remote-endpoint = <&bridge_in>; }; &i2c6 {arch/arm/boot/dts/stm32mp157a-icore-stm32mp1-edimm2.2.dts +8
-20@@ -46,26 +46,14 @@ panel_out_bridge: endpoint { &dsi { status = "okay"; - phy-dsi-supply = <®18>; - - ports { - #address-cells = <1>; - #size-cells = <0>; +}; - port@0 { - reg = <0>; - dsi_in_ltdc: endpoint { - remote-endpoint = <<dc_out_dsi>; - }; - }; +&dsi_in { + remote-endpoint = <<dc_out_dsi>; +}; - port@1 { - reg = <1>; - dsi_out_bridge: endpoint { - remote-endpoint = <&bridge_in_dsi>; - }; - }; - }; +&dsi_out { + remote-endpoint = <&bridge_in_dsi>; }; &i2c6 {@@ -88,7 +76,7 @@ ports { port@0 { reg = <0>; bridge_in_dsi: endpoint { - remote-endpoint = <&dsi_out_bridge>; + remote-endpoint = <&dsi_out>; data-lanes = <1 2>; }; };@@ -108,7 +96,7 @@ <dc { port { ltdc_out_dsi: endpoint { - remote-endpoint = <&dsi_in_ltdc>; + remote-endpoint = <&dsi_in>; }; }; };arch/arm/boot/dts/stm32mp157c-dk2.dts +8
-20@@ -34,26 +34,6 @@ &dsi { #address-cells = <1>; #size-cells = <0>; status = "okay"; - phy-dsi-supply = <®18>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep1_out>; - }; - }; - - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&panel_in>; - }; - }; - }; panel@0 { compatible = "orisetech,otm8009a";@@ -70,6 +50,14 @@ panel_in: endpoint { }; }; +&dsi_in { + remote-endpoint = <<dc_ep1_out>; +}; + +&dsi_out { + remote-endpoint = <&panel_in>; +}; + &i2c1 { touchscreen@38 { compatible = "focaltech,ft6236";arch/arm/boot/dts/stm32mp157c-ev1.dts +8
-20@@ -100,30 +100,10 @@ dcmi_0: endpoint { }; &dsi { - phy-dsi-supply = <®18>; #address-cells = <1>; #size-cells = <0>; status = "okay"; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dsi_in: endpoint { - remote-endpoint = <<dc_ep0_out>; - }; - }; - - port@1 { - reg = <1>; - dsi_out: endpoint { - remote-endpoint = <&dsi_panel_in>; - }; - }; - }; - panel@0 { compatible = "raydium,rm68200"; reg = <0>;@@ -140,6 +120,14 @@ dsi_panel_in: endpoint { }; }; +&dsi_in { + remote-endpoint = <<dc_ep0_out>; +}; + +&dsi_out { + remote-endpoint = <&dsi_panel_in>; +}; + ðernet0 { status = "okay"; pinctrl-0 = <ðernet0_rgmii_pins_a>;