Skip to contentSkip to conversation

dt-bindings: display: rockchip: rockchip,dw-hdmi: remove port property

PATCH Applied Johan Jonker 4 participants 10 messages Jan 31, 2024 – Feb 13, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/6 dt-bindings: display: rockchip: rockchip,dw-hdmi: remove port property

The hdmi-connector nodes are now functional and the new way to model hdmi ports nodes with both in and output port subnodes. Unfortunately with the conversion to YAML the old method with only an input port node was used. Later the new method was also added to the binding. A binding must be unambiguously, so remove the old port property entirely and make port@0 and port@1 a requirement as all upstream dts files are updated as well and because checking deprecated stuff is a bit pointless.
Update the example to avoid use of the removed property.

---

Changed V2:
rename title from deprecate to remove
reword

---
 .../display/rockchip/rockchip,dw-hdmi.yaml    | 24 +++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml +20 -4
index 7e59dee15a5f..391c2a7e79de 100644
@@ -97,8 +97,8 @@ properties:
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
 
-    patternProperties:
-      "^port(@0)?$":
+    properties:
+      port@0:
         $ref: /schemas/graph.yaml#/properties/port
         description: Input of the DWC HDMI TX
         properties:
@@ -108,11 +108,14 @@ properties:
             description: Connection to the VOPB
           endpoint@1:
             description: Connection to the VOPL
-    properties:
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
         description: Output of the DWC HDMI TX
 
+    required:
+      - port@0
+      - port@1
+
   rockchip,grf:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -147,7 +150,11 @@ examples:
         clock-names = "iahb", "isfr";
 
         ports {
-            port {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
                 #address-cells = <1>;
                 #size-cells = <0>;
 
@@ -155,11 +162,20 @@ examples:
                     reg = <0>;
                     remote-endpoint = <&vopb_out_hdmi>;
                 };
+
                 hdmi_in_vopl: endpoint@1 {
                     reg = <1>;
                     remote-endpoint = <&vopl_out_hdmi>;
                 };
             };
+
+            port@1 {
+                reg = <1>;
+
+                hdmi_out_con: endpoint {
+                    remote-endpoint = <&hdmi_con_in>;
+                };
+            };
         };
     };
 

--
2.39.2

#1 lore raw

PATCH v2 2/6 dt-bindings: display: rockchip,dw-hdmi: add power-domains property

Most Rockchip hdmi nodes are part of a power domain. Add a power-domains property and include it to the example with some reordering to align with the (new) documentation about property ordering.

---

Changed V2:
keep reg-io-width together with reg
explain reordering

---
 .../bindings/display/rockchip/rockchip,dw-hdmi.yaml      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml +7 -2
index 391c2a7e79de..af638b6c0d21 100644
@@ -94,6 +94,9 @@ properties:
       - const: default
       - const: unwedge
 
+  power-domains:
+    maxItems: 1
+
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
 
@@ -138,16 +141,18 @@ examples:
     #include <dt-bindings/clock/rk3288-cru.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/power/rk3288-power.h>
 
     hdmi: hdmi@ff980000 {
         compatible = "rockchip,rk3288-dw-hdmi";
         reg = <0xff980000 0x20000>;
         reg-io-width = <4>;
-        ddc-i2c-bus = <&i2c5>;
-        rockchip,grf = <&grf>;
         interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
         clocks = <&cru  PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>;
         clock-names = "iahb", "isfr";
+        ddc-i2c-bus = <&i2c5>;
+        power-domains = <&power RK3288_PD_VIO>;
+        rockchip,grf = <&grf>;
 
         ports {
             #address-cells = <1>;

--
2.39.2

#2 lore raw

PATCH v2 3/6 ARM: dts: rockchip: fix rk3288 hdmi ports node

In reply to Johan Jonker

Fix rk3288 hdmi ports node so that it matches the rockchip,dw-hdmi.yaml binding with some reordering to align with the (new) documentation about property ordering.

---

Changed V2:
keep reg-io-width together with reg
reword

---
 arch/arm/boot/dts/rockchip/rk3288.dtsi | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
arch/arm/boot/dts/rockchip/rk3288.dtsi +13 -3
index ead343dc3df1..3f1d640afafa 100644
@@ -1240,27 +1240,37 @@ hdmi: hdmi@ff980000 {
 		compatible = "rockchip,rk3288-dw-hdmi";
 		reg = <0x0 0xff980000 0x0 0x20000>;
 		reg-io-width = <4>;
-		#sound-dai-cells = <0>;
-		rockchip,grf = <&grf>;
 		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru  PCLK_HDMI_CTRL>, <&cru SCLK_HDMI_HDCP>, <&cru SCLK_HDMI_CEC>;
 		clock-names = "iahb", "isfr", "cec";
 		power-domains = <&power RK3288_PD_VIO>;
+		rockchip,grf = <&grf>;
+		#sound-dai-cells = <0>;
 		status = "disabled";
 
 		ports {
-			hdmi_in: port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hdmi_in: port@0 {
+				reg = <0>;
 				#address-cells = <1>;
 				#size-cells = <0>;
+
 				hdmi_in_vopb: endpoint@0 {
 					reg = <0>;
 					remote-endpoint = <&vopb_out_hdmi>;
 				};
+
 				hdmi_in_vopl: endpoint@1 {
 					reg = <1>;
 					remote-endpoint = <&vopl_out_hdmi>;
 				};
 			};
+
+			hdmi_out: port@1 {
+				reg = <1>;
+			};
 		};
 	};
 

--
2.39.2

#3 lore raw

PATCH v2 4/6 ARM: dts: rockchip: fix rk322x hdmi ports node

In reply to Johan Jonker

Fix rk322x hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

---

Changed V2:
keep reg-io-width together with reg

---
 arch/arm/boot/dts/rockchip/rk322x.dtsi | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
arch/arm/boot/dts/rockchip/rk322x.dtsi +11 -5
index 831561fc1814..96421355c274 100644
@@ -736,14 +736,20 @@ hdmi: hdmi@200a0000 {
 		status = "disabled";
 
 		ports {
-			hdmi_in: port {
-				#address-cells = <1>;
-				#size-cells = <0>;
-				hdmi_in_vop: endpoint@0 {
-					reg = <0>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hdmi_in: port@0 {
+				reg = <0>;
+
+				hdmi_in_vop: endpoint {
 					remote-endpoint = <&vop_out_hdmi>;
 				};
 			};
+
+			hdmi_out: port@1 {
+				reg = <1>;
+			};
 		};
 	};
 

--
2.39.2

#4 lore raw

PATCH v2 5/6 arm64: dts: rockchip: fix rk3328 hdmi ports node

In reply to Johan Jonker

Fix rk3328 hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

---

Changed V2:
keep reg-io-width together with reg

---
 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3328.dtsi +10 -1
index fb5dcf6e9327..a73234b11ff1 100644
@@ -745,11 +745,20 @@ hdmi: hdmi@ff3c0000 {
 		status = "disabled";
 
 		ports {
-			hdmi_in: port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hdmi_in: port@0 {
+				reg = <0>;
+
 				hdmi_in_vop: endpoint {
 					remote-endpoint = <&vop_out_hdmi>;
 				};
 			};
+
+			hdmi_out: port@1 {
+				reg = <1>;
+			};
 		};
 	};
 

--
2.39.2

#5 lore raw

PATCH v2 6/6 arm64: dts: rockchip: fix rk3399 hdmi ports node

In reply to Johan Jonker

Fix rk3399 hdmi ports node so that it matches the
rockchip,dw-hdmi.yaml binding.

---

Changed V2:
keep reg-io-width together with reg

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +10 -2
index 0caa842bba0e..9d5f5b083e3c 100644
@@ -2022,6 +2022,7 @@ simple-audio-card,codec {
 	hdmi: hdmi@ff940000 {
 		compatible = "rockchip,rk3399-dw-hdmi";
 		reg = <0x0 0xff940000 0x0 0x20000>;
+		reg-io-width = <4>;
 		interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH 0>;
 		clocks = <&cru PCLK_HDMI_CTRL>,
 			 <&cru SCLK_HDMI_SFR>,
@@ -2030,13 +2031,16 @@ hdmi: hdmi@ff940000 {
 			 <&cru PLL_VPLL>;
 		clock-names = "iahb", "isfr", "cec", "grf", "ref";
 		power-domains = <&power RK3399_PD_HDCP>;
-		reg-io-width = <4>;
 		rockchip,grf = <&grf>;
 		#sound-dai-cells = <0>;
 		status = "disabled";
 
 		ports {
-			hdmi_in: port {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			hdmi_in: port@0 {
+				reg = <0>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 
@@ -2049,6 +2053,10 @@ hdmi_in_vopl: endpoint@1 {
 					remote-endpoint = <&vopl_out_hdmi>;
 				};
 			};
+
+			hdmi_out: port@1 {
+				reg = <1>;
+			};
 		};
 	};
 

--
2.39.2

Acked-by on v2 1/6
#6 lore raw
In reply to Johan Jonker
Quoted 11 lines · Johan Jonker

The hdmi-connector nodes are now functional and the new way to model hdmi ports nodes with both in and output port subnodes. Unfortunately with the conversion to YAML the old method with only an input port node was used. Later the new method was also added to the binding. A binding must be unambiguously, so remove the old port property entirely and make port@0 and port@1 a requirement as all upstream dts files are updated as well and because checking deprecated stuff is a bit pointless.
Update the example to avoid use of the removed property.

Thanks,
Conor.

Quoted 77 lines

---

Changed V2:
rename title from deprecate to remove
reword

---
 .../display/rockchip/rockchip,dw-hdmi.yaml    | 24 +++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/display/rockchip/rockchip,dw-hdmi.yaml +20 -5
index 7e59dee15a5f..391c2a7e79de 100644
@@ -97,8 +97,8 @@ properties:
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
 
-    patternProperties:
-      "^port(@0)?$":
+    properties:
+      port@0:
         $ref: /schemas/graph.yaml#/properties/port
         description: Input of the DWC HDMI TX
         properties:
@@ -108,11 +108,14 @@ properties:
             description: Connection to the VOPB
           endpoint@1:
             description: Connection to the VOPL
-    properties:
       port@1:
         $ref: /schemas/graph.yaml#/properties/port
         description: Output of the DWC HDMI TX
 
+    required:
+      - port@0
+      - port@1
+
   rockchip,grf:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -147,7 +150,11 @@ examples:
         clock-names = "iahb", "isfr";
 
         ports {
-            port {
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            port@0 {
+                reg = <0>;
                 #address-cells = <1>;
                 #size-cells = <0>;
 
@@ -155,11 +162,20 @@ examples:
                     reg = <0>;
                     remote-endpoint = <&vopb_out_hdmi>;
                 };
+
                 hdmi_in_vopl: endpoint@1 {
                     reg = <1>;
                     remote-endpoint = <&vopl_out_hdmi>;
                 };
             };
+
+            port@1 {
+                reg = <1>;
+
+                hdmi_out_con: endpoint {
+                    remote-endpoint = <&hdmi_con_in>;
+                };
+            };
         };
     };
 
--

2.39.2

maintainer Reviewed-by on v2 1/6
#7 lore raw
In reply to Johan Jonker
Quoted 11 lines · Johan Jonker

The hdmi-connector nodes are now functional and the new way to model hdmi ports nodes with both in and output port subnodes. Unfortunately with the conversion to YAML the old method with only an input port node was used. Later the new method was also added to the binding. A binding must be unambiguously, so remove the old port property entirely and make port@0 and port@1 a requirement as all upstream dts files are updated as well and because checking deprecated stuff is a bit pointless.
Update the example to avoid use of the removed property.

Quoted 9 lines

---

Changed V2:
rename title from deprecate to remove
reword

---
 .../display/rockchip/rockchip,dw-hdmi.yaml    | 24 +++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
maintainer Applied
#8 lore raw

Re: (subset) [PATCH v2 1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: remove port property

In reply to Johan Jonker
Quoted 11 lines · Johan Jonker

The hdmi-connector nodes are now functional and the new way to model hdmi ports nodes with both in and output port subnodes. Unfortunately with the conversion to YAML the old method with only an input port node was used. Later the new method was also added to the binding. A binding must be unambiguously, so remove the old port property entirely and make port@0 and port@1 a requirement as all upstream dts files are updated as well and because checking deprecated stuff is a bit pointless.
Update the example to avoid use of the removed property.

[...]

Applied, thanks!

[1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: remove port property

      commit: 0d192c4c72ce00ab07a6b27f068607e21f754a46
[2/6] dt-bindings: display: rockchip,dw-hdmi: add power-domains property
      commit: 6b1f93ea345947c94bf3a7a6e668a2acfd310918

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>
maintainer Applied
#9 lore raw

Re: (subset) [PATCH v2 1/6] dt-bindings: display: rockchip: rockchip,dw-hdmi: remove port property

In reply to Johan Jonker
Quoted 11 lines · Johan Jonker

The hdmi-connector nodes are now functional and the new way to model hdmi ports nodes with both in and output port subnodes. Unfortunately with the conversion to YAML the old method with only an input port node was used. Later the new method was also added to the binding. A binding must be unambiguously, so remove the old port property entirely and make port@0 and port@1 a requirement as all upstream dts files are updated as well and because checking deprecated stuff is a bit pointless.
Update the example to avoid use of the removed property.

[...]

Applied, thanks!

[3/6] ARM: dts: rockchip: fix rk3288 hdmi ports node

      commit: 585e4dc07100a6465b3da8d24e46188064c1c925
[4/6] ARM: dts: rockchip: fix rk322x hdmi ports node
      commit: 15a5ed03000cf61daf87d14628085cb1bc8ae72c
[5/6] arm64: dts: rockchip: fix rk3328 hdmi ports node
      commit: 1d00ba4700d1e0f88ae70d028d2e17e39078fa1c
[6/6] arm64: dts: rockchip: fix rk3399 hdmi ports node
      commit: f051b6ace7ffcc48d6d1017191f167c0a85799f6

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>