Skip to contentSkip to conversation

arm: dts: atmel: graph_child_address warning fixes

PATCH New Rob Herring 6 participants 20 messages May 8, 2018 – May 15, 2018

Subsystems (6)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 arm: dts: atmel: graph_child_address warning fixes

Addresses for graph ports and endpoints are not necessary when there's only a single child. Fix the following warnings removing unnecessary addresses on OF graph nodes:

Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller/port at 0: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/isi at f0034000/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /panel/port at 0: graph node has single child node 'endpoint at 0', #address-cells/#size-cells are not necessary

Cc Nicolas Ferre <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts | 15 ++++-----------
 arch/arm/boot/dts/at91sam9g45.dtsi          |  2 --
 arch/arm/boot/dts/at91sam9n12.dtsi          |  8 +-------
 arch/arm/boot/dts/at91sam9n12ek.dts         | 14 ++++----------
 arch/arm/boot/dts/at91sam9x5_lcd.dtsi       |  7 +------
 arch/arm/boot/dts/at91sam9x5dm.dtsi         | 13 ++++---------
 arch/arm/boot/dts/sama5d3.dtsi              |  2 --
 arch/arm/boot/dts/sama5d3_lcd.dtsi          |  8 +-------
 arch/arm/boot/dts/sama5d4.dtsi              |  8 +-------
 9 files changed, 16 insertions(+), 61 deletions(-)
arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts +4 -11
index fe05aaa7ac87..72c3b077fb46 100644
@@ -49,9 +49,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -144,16 +143,10 @@
 		/* Actually Ampire 800480R2 */
 		compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
 		backlight = <&backlight>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		status = "okay";
 
-		port at 0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/at91sam9g45.dtsi +0 -2
index 1ee25a475be8..36729e3f2899 100644
@@ -1114,8 +1114,6 @@
 				clock-names = "isi_clk";
 				status = "disabled";
 				port {
-					#address-cells = <1>;
-					#size-cells = <0>;
 				};
 			};
 
arch/arm/boot/dts/at91sam9n12.dtsi +1 -7
index 37cb81f457b5..a071fccb729b 100644
@@ -475,13 +475,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/at91sam9n12ek.dts +4 -10
index c43095c5cb5c..eb0c1e11fa4d 100644
@@ -134,9 +134,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -246,13 +245,8 @@
 		#size-cells = <0>;
 		status = "okay";
 
-		port at 0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/at91sam9x5_lcd.dtsi +1 -6
index 1629db9dd563..e243dff67a67 100644
@@ -23,13 +23,8 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
 
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/at91sam9x5dm.dtsi +4 -9
index 34c089fe0bc0..5aea8fd09ad6 100644
@@ -29,9 +29,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -80,12 +79,8 @@
 		#size-cells = <0>;
 		status = "disabled";
 
-		port at 0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/sama5d3.dtsi +0 -2
index eae5e1ee9cd8..2c51042e1f6b 100644
@@ -239,8 +239,6 @@
 				clock-names = "isi_clk";
 				status = "disabled";
 				port {
-					#address-cells = <1>;
-					#size-cells = <0>;
 				};
 			};
 
arch/arm/boot/dts/sama5d3_lcd.dtsi +1 -7
index be7cfefc6c31..2d042d7ec531 100644
@@ -23,13 +23,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/sama5d4.dtsi +1 -7
index 0cf9beddd556..90d7b64915ec 100644
@@ -333,13 +333,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
Signature · 1 line
2.17.0
author maintainer
#1 lore raw

PATCH 1/1 arm: dts: imx: fix IPU OF graph endpoint node names

OF graph endpoint nodes are supposed to be named 'endpoint' with an address if there is more than one. The i.MX IPU binding graph has used unique endpoint names instead which now generate dtc warnings:

Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/disp0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/lvds1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/disp1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/lvds1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/disp0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/lvds1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/lvds1-endpoint: graph endpont node name should be 'endpoint'

Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/boot/dts/imx6q.dtsi             | 27 ++++++++++++++-------
 arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |  3 ---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi   |  3 ---
 arch/arm/boot/dts/imx6qdl.dtsi           | 30 ++++++++++++++++--------
 4 files changed, 38 insertions(+), 25 deletions(-)
arch/arm/boot/dts/imx6q.dtsi +18 -9
index ae7b3f107893..c2fda9d21a17 100644
@@ -162,22 +162,27 @@
 				#size-cells = <0>;
 				reg = <2>;
 
-				ipu2_di0_disp0: disp0-endpoint {
+				ipu2_di0_disp0: endpoint at 0 {
+					reg = <0>;
 				};
 
-				ipu2_di0_hdmi: hdmi-endpoint {
+				ipu2_di0_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_2>;
 				};
 
-				ipu2_di0_mipi: mipi-endpoint {
+				ipu2_di0_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_2>;
 				};
 
-				ipu2_di0_lvds0: lvds0-endpoint {
+				ipu2_di0_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_2>;
 				};
 
-				ipu2_di0_lvds1: lvds1-endpoint {
+				ipu2_di0_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_2>;
 				};
 			};
@@ -187,19 +192,23 @@
 				#size-cells = <0>;
 				reg = <3>;
 
-				ipu2_di1_hdmi: hdmi-endpoint {
+				ipu2_di1_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_3>;
 				};
 
-				ipu2_di1_mipi: mipi-endpoint {
+				ipu2_di1_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_3>;
 				};
 
-				ipu2_di1_lvds0: lvds0-endpoint {
+				ipu2_di1_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_3>;
 				};
 
-				ipu2_di1_lvds1: lvds1-endpoint {
+				ipu2_di1_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_3>;
 				};
 			};
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +0 -3
index 18b65052553d..654cf2c9b073 100644
@@ -379,9 +379,6 @@
 		powerdown-gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* NANDF_WP_B */
 
 		port {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
 			ov5640_to_mipi_csi2: endpoint {
 				remote-endpoint = <&mipi_csi2_in>;
 				clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -3
index f019f9900369..c2de2250718c 100644
@@ -294,9 +294,6 @@
 		reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 
 		port {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
 			ov5640_to_mipi_csi2: endpoint {
 				remote-endpoint = <&mipi_csi2_in>;
 				clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl.dtsi +20 -10
index c003e62bf290..0ebcf057961e 100644
@@ -1300,22 +1300,27 @@
 				#size-cells = <0>;
 				reg = <2>;
 
-				ipu1_di0_disp0: disp0-endpoint {
+				ipu1_di0_disp0: endpoint at 0 {
+					reg = <0>;
 				};
 
-				ipu1_di0_hdmi: hdmi-endpoint {
+				ipu1_di0_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_0>;
 				};
 
-				ipu1_di0_mipi: mipi-endpoint {
+				ipu1_di0_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_0>;
 				};
 
-				ipu1_di0_lvds0: lvds0-endpoint {
+				ipu1_di0_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_0>;
 				};
 
-				ipu1_di0_lvds1: lvds1-endpoint {
+				ipu1_di0_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_0>;
 				};
 			};
@@ -1325,22 +1330,27 @@
 				#size-cells = <0>;
 				reg = <3>;
 
-				ipu1_di1_disp1: disp1-endpoint {
+				ipu1_di1_disp1: endpoint at 0 {
+					reg = <0>;
 				};
 
-				ipu1_di1_hdmi: hdmi-endpoint {
+				ipu1_di1_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_1>;
 				};
 
-				ipu1_di1_mipi: mipi-endpoint {
+				ipu1_di1_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_1>;
 				};
 
-				ipu1_di1_lvds0: lvds0-endpoint {
+				ipu1_di1_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_1>;
 				};
 
-				ipu1_di1_lvds1: lvds1-endpoint {
+				ipu1_di1_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_1>;
 				};
 			};
Signature · 1 line
2.17.0
reviewer
#2 lore raw

PATCH 1/1 arm: dts: imx: fix IPU OF graph endpoint node names

Hi Rob,

Quoted 19 lines · Rob Herring
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +0 -3
index 18b65052553d..654cf2c9b073 100644
@@ -379,9 +379,6 @@
                powerdown-gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* NANDF_WP_B */
 
                port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
                        ov5640_to_mipi_csi2: endpoint {
                                remote-endpoint = <&mipi_csi2_in>;
                                clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -0
index f019f9900369..c2de2250718c 100644

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 297

Quoted 7 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -3
@@ -294,9 +294,6 @@
                reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 
                port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
                        ov5640_to_mipi_csi2: endpoint {

These two changes seem unrelated and I have already fixed them at:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/commit/?h=imx/dt&id=1b215c73d1586e6f2586e9a6d6dfaf49cc142b3a

BTW, linux-next from today shows no W=1 DTC warnings on imx_v6_v7_defconfig, but maybe new ones are coming soon :-)

author maintainer
#3 lore raw

PATCH 1/1 arm: dts: imx: fix IPU OF graph endpoint node names

Quoted 25 lines · Fabio Estevam

Hi Rob,

Quoted 21 lines · Rob Herring
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +0 -3
index 18b65052553d..654cf2c9b073 100644
@@ -379,9 +379,6 @@
                powerdown-gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* NANDF_WP_B */
 
                port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
                        ov5640_to_mipi_csi2: endpoint {
                                remote-endpoint = <&mipi_csi2_in>;
                                clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -0
index f019f9900369..c2de2250718c 100644
@@ -294,9 +294,6 @@
                reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 
Quoted 8 lines

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 297

Quoted 5 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -3
                port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
                        ov5640_to_mipi_csi2: endpoint {

These two changes seem unrelated and I have already fixed them at:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/commit/?h=imx/dt&id=1b215c73d1586e6f2586e9a6d6dfaf49cc142b3a

Right. Will drop them.

Quoted 3 lines

BTW, linux-next from today shows no W=1 DTC warnings on imx_v6_v7_defconfig, but maybe new ones are coming soon :-)

I just sent out the dtc update patch shortly before this one. I'll probably add it to -next today.

Rob

Applied
#4 lore raw

PATCH 1/1 arm: dts: imx: fix IPU OF graph endpoint node names

Quoted 35 lines · Rob Herring
Quoted 25 lines · Fabio Estevam

Hi Rob,

Quoted 21 lines · Rob Herring
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +0 -3
index 18b65052553d..654cf2c9b073 100644
@@ -379,9 +379,6 @@
                powerdown-gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* NANDF_WP_B */
 
                port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
                        ov5640_to_mipi_csi2: endpoint {
                                remote-endpoint = <&mipi_csi2_in>;
                                clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -0
index f019f9900369..c2de2250718c 100644
@@ -294,9 +294,6 @@
                reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 
Quoted 8 lines

arch/arm/boot/dts/imx6qdl-sabresd.dtsi line 297

Quoted 5 lines
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -3
                port {
-                       #address-cells = <1>;
-                       #size-cells = <0>;
-
                        ov5640_to_mipi_csi2: endpoint {

These two changes seem unrelated and I have already fixed them at:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/commit/?h=imx/dt&id=1b215c73d1586e6f2586e9a6d6dfaf49cc142b3a

Quoted 1 line

Right. Will drop them.

Applied. The git am command dropped them automatically. Thanks.

Shawn

#5 lore raw

PATCH 1/1 arm: dts: imx: fix IPU OF graph endpoint node names

In reply to Rob Herring
Quoted 3 lines · Rob Herring

OF graph endpoint nodes are supposed to be named 'endpoint' with an address if there is more than one. The i.MX IPU binding graph has used unique endpoint names instead which now generate dtc warnings:

This partially reverts commit 416196cd9099 ("ARM: dts: imx6: fix dtc warnings for ipu endpoints") and also solves the same issue differently by adding reg properties. Should this get a Fixes: tag for these changes?

regards
Philipp

Quoted 195 lines

Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/disp0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 2/lvds1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/disp1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2400000/port at 3/lvds1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/disp0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 2/lvds1-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/hdmi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/mipi-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/lvds0-endpoint: graph endpont node name should be 'endpoint' Warning (graph_endpoint): /soc/ipu at 2800000/port at 3/lvds1-endpoint: graph endpont node name should be 'endpoint'

Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/boot/dts/imx6q.dtsi             | 27 ++++++++++++++-------
 arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |  3 ---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi   |  3 ---
 arch/arm/boot/dts/imx6qdl.dtsi           | 30 ++++++++++++++++--------
 4 files changed, 38 insertions(+), 25 deletions(-)
arch/arm/boot/dts/imx6q.dtsi +18 -9
index ae7b3f107893..c2fda9d21a17 100644
@@ -162,22 +162,27 @@
 				#size-cells = <0>;
 				reg = <2>;
 
-				ipu2_di0_disp0: disp0-endpoint {
+				ipu2_di0_disp0: endpoint at 0 {
+					reg = <0>;
 				};
 
-				ipu2_di0_hdmi: hdmi-endpoint {
+				ipu2_di0_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_2>;
 				};
 
-				ipu2_di0_mipi: mipi-endpoint {
+				ipu2_di0_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_2>;
 				};
 
-				ipu2_di0_lvds0: lvds0-endpoint {
+				ipu2_di0_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_2>;
 				};
 
-				ipu2_di0_lvds1: lvds1-endpoint {
+				ipu2_di0_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_2>;
 				};
 			};
@@ -187,19 +192,23 @@
 				#size-cells = <0>;
 				reg = <3>;
 
-				ipu2_di1_hdmi: hdmi-endpoint {
+				ipu2_di1_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_3>;
 				};
 
-				ipu2_di1_mipi: mipi-endpoint {
+				ipu2_di1_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_3>;
 				};
 
-				ipu2_di1_lvds0: lvds0-endpoint {
+				ipu2_di1_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_3>;
 				};
 
-				ipu2_di1_lvds1: lvds1-endpoint {
+				ipu2_di1_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_3>;
 				};
 			};
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +0 -3
index 18b65052553d..654cf2c9b073 100644
@@ -379,9 +379,6 @@
 		powerdown-gpios = <&gpio6 9 GPIO_ACTIVE_HIGH>; /* NANDF_WP_B */
 
 		port {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
 			ov5640_to_mipi_csi2: endpoint {
 				remote-endpoint = <&mipi_csi2_in>;
 				clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +0 -3
index f019f9900369..c2de2250718c 100644
@@ -294,9 +294,6 @@
 		reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
 
 		port {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
 			ov5640_to_mipi_csi2: endpoint {
 				remote-endpoint = <&mipi_csi2_in>;
 				clock-lanes = <0>;
arch/arm/boot/dts/imx6qdl.dtsi +20 -10
index c003e62bf290..0ebcf057961e 100644
@@ -1300,22 +1300,27 @@
 				#size-cells = <0>;
 				reg = <2>;
 
-				ipu1_di0_disp0: disp0-endpoint {
+				ipu1_di0_disp0: endpoint at 0 {
+					reg = <0>;
 				};
 
-				ipu1_di0_hdmi: hdmi-endpoint {
+				ipu1_di0_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_0>;
 				};
 
-				ipu1_di0_mipi: mipi-endpoint {
+				ipu1_di0_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_0>;
 				};
 
-				ipu1_di0_lvds0: lvds0-endpoint {
+				ipu1_di0_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_0>;
 				};
 
-				ipu1_di0_lvds1: lvds1-endpoint {
+				ipu1_di0_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_0>;
 				};
 			};
@@ -1325,22 +1330,27 @@
 				#size-cells = <0>;
 				reg = <3>;
 
-				ipu1_di1_disp1: disp1-endpoint {
+				ipu1_di1_disp1: endpoint at 0 {
+					reg = <0>;
 				};
 
-				ipu1_di1_hdmi: hdmi-endpoint {
+				ipu1_di1_hdmi: endpoint at 1 {
+					reg = <1>;
 					remote-endpoint = <&hdmi_mux_1>;
 				};
 
-				ipu1_di1_mipi: mipi-endpoint {
+				ipu1_di1_mipi: endpoint at 2 {
+					reg = <2>;
 					remote-endpoint = <&mipi_mux_1>;
 				};
 
-				ipu1_di1_lvds0: lvds0-endpoint {
+				ipu1_di1_lvds0: endpoint at 3 {
+					reg = <3>;
 					remote-endpoint = <&lvds0_mux_1>;
 				};
 
-				ipu1_di1_lvds1: lvds1-endpoint {
+				ipu1_di1_lvds1: endpoint at 4 {
+					reg = <4>;
 					remote-endpoint = <&lvds1_mux_1>;
 				};
 			};
author maintainer
#6 lore raw

PATCH 1/1 arm: dts: imx: fix IPU OF graph endpoint node names

Quoted 9 lines · Philipp Zabel
Quoted 3 lines · Rob Herring

OF graph endpoint nodes are supposed to be named 'endpoint' with an address if there is more than one. The i.MX IPU binding graph has used unique endpoint names instead which now generate dtc warnings:

This partially reverts commit 416196cd9099 ("ARM: dts: imx6: fix dtc warnings for ipu endpoints") and also solves the same issue differently by adding reg properties. Should this get a Fixes: tag for these changes?

Yes, I'd missed that. This has become my concern with the dtc warnings. They are often fixed in the wrong way to silence warnings. This one is trivial, but sometimes they point to deeper issues like poor binding design. This is certainly true for the new unique_unit_address check.

Rob

author maintainer
#7 lore raw

PATCH 1/1 arm: dts: imx53: Fix LDB OF graph warning

In reply to Rob Herring

Single child nodes in OF graph don't need an address and now dtc will warn about this:

Warning (graph_child_address): /soc/aips at 50000000/ldb at 53fa8008/lvds-channel at 0: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary

Since the LDB should always have an output port, fix the warning by adding the output port, 2, to the DT.

Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/imx53.dtsi +8 -0
index 7d647d043f52..1cf2fc9d0a58 100644
@@ -488,6 +488,10 @@
 							remote-endpoint = <&ipu_di0_lvds0>;
 						};
 					};
+
+					port at 2 {
+						reg = <2>;
+					};
 				};
 
 				lvds-channel at 1 {
@@ -503,6 +507,10 @@
 							remote-endpoint = <&ipu_di1_lvds1>;
 						};
 					};
+
+					port at 2 {
+						reg = <2>;
+					};
 				};
 			};
 
Signature · 1 line
2.17.0
#8 lore raw

PATCH 1/1 arm: dts: imx53: Fix LDB OF graph warning

Quoted 22 lines · Rob Herring

Single child nodes in OF graph don't need an address and now dtc will warn about this:

Warning (graph_child_address): /soc/aips at 50000000/ldb at 53fa8008/lvds-channel at 0: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary

Since the LDB should always have an output port, fix the warning by adding the output port, 2, to the DT.

Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/imx53.dtsi +0 -0
index 7d647d043f52..1cf2fc9d0a58 100644

arch/arm/boot/dts/imx53.dtsi line 494

Quoted 7 lines
arch/arm/boot/dts/imx53.dtsi +4 -0
@@ -488,6 +488,10 @@
 							remote-endpoint = <&ipu_di0_lvds0>;
 						};
 					};
+
+					port at 2 {
+						reg = <2>;
+					};

Now that the reg property of port at 2 is added in the .dtsi, it could be removed from the one .dts files that use it:

----------8<----------

arch/arm/boot/dts/imx53-ppd.dts +0 -2
@@ -559,8 +559,6 @@
                status = "okay";
 
                port@2 {
-                       reg = <2>;
-
                        lvds0_out: endpoint {
                                remote-endpoint = <&panel_in_lvds0>;
                        };

---------->8----------

Quoted 4 lines
arch/arm/boot/dts/imx53.dtsi +0 -0
 				};
 
 				lvds-channel at 1 {

arch/arm/boot/dts/imx53.dtsi line 516

Quoted 10 lines
arch/arm/boot/dts/imx53.dtsi +4 -0
@@ -503,6 +507,10 @@
 							remote-endpoint = <&ipu_di1_lvds1>;
 						};
 					};
+
+					port at 2 {
+						reg = <2>;
+					};
 				};
 			};
 

regards
Philipp

#9 lore raw

PATCH 1/1 arm: dts: imx53: Fix LDB OF graph warning

Quoted 38 lines · Philipp Zabel
Quoted 22 lines · Rob Herring

Single child nodes in OF graph don't need an address and now dtc will warn about this:

Warning (graph_child_address): /soc/aips at 50000000/ldb at 53fa8008/lvds-channel at 0: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary

Since the LDB should always have an output port, fix the warning by adding the output port, 2, to the DT.

Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/imx53.dtsi +0 -0
index 7d647d043f52..1cf2fc9d0a58 100644

arch/arm/boot/dts/imx53.dtsi line 494

Quoted 7 lines
arch/arm/boot/dts/imx53.dtsi +4 -0
@@ -488,6 +488,10 @@
 							remote-endpoint = <&ipu_di0_lvds0>;
 						};
 					};
+
+					port at 2 {
+						reg = <2>;
+					};

Now that the reg property of port at 2 is added in the .dtsi, it could be removed from the one .dts files that use it:

----------8<----------

arch/arm/boot/dts/imx53-ppd.dts line 564

Quoted 8 lines
arch/arm/boot/dts/imx53-ppd.dts +0 -2
@@ -559,8 +559,6 @@
                status = "okay";
 
                port at 2 {
-                       reg = <2>;
-
                        lvds0_out: endpoint {
                                remote-endpoint = <&panel_in_lvds0>;
                        };

I incorporate the change and applied patch. Thanks.

Shawn

author maintainer
#10 lore raw

PATCH 1/1 arm: dts: imx7: Fix error in coresight TPIU graph connection

In reply to Rob Herring

OF graph endpoint connections must be bidirectional and dtc will now warn if they are not. i.MX7 based DTs have an error and generate warnings:

Warning (graph_endpoint): /replicator/ports/port at 0/endpoint: graph connection to node '/soc/tpiu at 30087000/port/endpoint' is not bidirectional Warning (graph_endpoint): /soc/tpiu at 30087000/port/endpoint: graph connection to node '/replicator/ports/port at 1/endpoint' is not bidirectional

This appears to be a copy-n-paste error and the TPIU input should be connected to replicator port 0 instead of port 1.

Cc Shawn Guo <[email protected]>
Cc Sascha Hauer <[email protected]>
Cc Pengutronix Kernel Team <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/boot/dts/imx7s.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx7s.dtsi +1 -1
index 4d42335c0dee..5db530ec756e 100644
@@ -321,7 +321,7 @@
 			port {
 				tpiu_in_port: endpoint {
 					slave-mode;
-					remote-endpoint = <&replicator_out_port1>;
+					remote-endpoint = <&replicator_out_port0>;
 				};
 			};
 		};
Signature · 1 line
2.17.0
author maintainer
#11 lore raw

PATCH 1/1 arm: dts: omap: fix OF graph in omap3-devkit8000

In reply to Rob Herring

omap3-devkit8000-common.dtsi defines a graph connection for DVI, but then omap3-devkit8000-lcd-common.dtsi overrides that with a graph connection for the LCD as the same output signals are used. This leaves an incomplete graph as the TFP410 output has only half a connection. The result is the following warning:

arch/arm/boot/dts/omap3-devkit8000-lcd70.dtb: Warning (graph_endpoint): /encoder0/ports/port at 0/endpoint: graph connection to node '/ocp at 68000000/dss at 48050000/port/endpoint' is not bidirectional

Fix this by defining multiple endpoints which is the correct way to show a 1 to many connection.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/boot/dts/omap3-devkit8000-common.dtsi     | 9 ++++++++-
 arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi | 5 ++++-
 2 files changed, 12 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap3-devkit8000-common.dtsi +8 -1
index 0c0bb1b01b0b..746a658e84b6 100644
@@ -349,10 +349,17 @@
 	vdda_dac-supply = <&vdac>;
 
 	port {
-		dpi_dvi_out: endpoint {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		dpi_dvi_out: endpoint at 0 {
+			reg = <0>;
 			remote-endpoint = <&tfp410_in>;
 			data-lines = <24>;
 		};
+
+		endpoint at 1 {
+			reg = <1>;
+		};
 	};
 };
 
arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi +4 -1
index 2d64bcffaaa8..1093387259e2 100644
@@ -30,7 +30,10 @@
 
 &dss {
 	port {
-		dpi_lcd_out: endpoint {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		dpi_lcd_out: endpoint at 1 {
+			reg = <1>;
 			remote-endpoint = <&lcd_in>;
 			data-lines = <24>;
 		};
Signature · 1 line
2.17.0
#12 lore raw

PATCH 1/1 arm: dts: omap: fix OF graph in omap3-devkit8000

Quoted 10 lines · Rob Herring

omap3-devkit8000-common.dtsi defines a graph connection for DVI, but then omap3-devkit8000-lcd-common.dtsi overrides that with a graph connection for the LCD as the same output signals are used. This leaves an incomplete graph as the TFP410 output has only half a connection. The result is the following warning:

arch/arm/boot/dts/omap3-devkit8000-lcd70.dtb: Warning (graph_endpoint): /encoder0/ports/port at 0/endpoint: graph connection to node '/ocp at 68000000/dss at 48050000/port/endpoint' is not bidirectional

Fix this by defining multiple endpoints which is the correct way to show a 1 to many connection.

Applying into omap-for-v4.18/dt-fixes thanks.

Tony

author maintainer
#13 lore raw

PATCH 1/1 arm: dts: omap: fix OMAP3 CM-T3x OF graph video connectors

In reply to Rob Herring

The OMAP3 CM-T3x based boards define 2 /connector nodes for S-Video and DVI output. However, since they have the same node name, the S-Video connector overwritten. This leaves a dangling graph connection which gives the following warning:

arch/arm/boot/dts/omap3-sbc-t3517.dtb: Warning (graph_endpoint): /ocp at 68000000/dss at 48050000/encoder at 48050c00/port/endpoint: graph connection to node '/connector/port/endpoint' is not bidirectional

Fix this by renaming the nodes to s-video-connector and dvi-connector.

Cc "Beno?t Cousson" <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +-
 arch/arm/boot/dts/omap3-sb-t35.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap3-cm-t3x.dtsi +1 -1
index 9dcb18d22cde..cdb632df152a 100644
@@ -60,7 +60,7 @@
 		regulator-max-microvolt = <3300000>;
 	};
 
-	tv0: connector {
+	tv0: svideo-connector {
 		compatible = "svideo-connector";
 		label = "tv";
 
arch/arm/boot/dts/omap3-sb-t35.dtsi +1 -1
index 22b4c8bdcc65..fb9842fa922c 100644
@@ -34,7 +34,7 @@
 		};
 	};
 
-	dvi0: connector {
+	dvi0: dvi-connector {
 		compatible = "dvi-connector";
 		label = "dvi";
 
Signature · 1 line
2.17.0
#14 lore raw

PATCH 1/1 arm: dts: omap: fix OMAP3 CM-T3x OF graph video connectors

Quoted 8 lines · Rob Herring

The OMAP3 CM-T3x based boards define 2 /connector nodes for S-Video and DVI output. However, since they have the same node name, the S-Video connector overwritten. This leaves a dangling graph connection which gives the following warning:

arch/arm/boot/dts/omap3-sbc-t3517.dtb: Warning (graph_endpoint): /ocp at 68000000/dss at 48050000/encoder at 48050c00/port/endpoint: graph connection to node '/connector/port/endpoint' is not bidirectional

Fix this by renaming the nodes to s-video-connector and dvi-connector.

Applying this too into omap-for-v4.18/dt-fixes.

Regards,

Tony

#15 lore raw

PATCH 1/1 arm: dts: atmel: graph_child_address warning fixes

In reply to Rob Herring
Quoted 8 lines · On Tue, 8 May 2018 08:59:25 -0500 Rob Herring <[email protected]> wrote:

Addresses for graph ports and endpoints are not necessary when there's only a single child. Fix the following warnings removing unnecessary addresses on OF graph nodes:

Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller/port at 0: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/isi at f0034000/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /panel/port at 0: graph node has single child node 'endpoint at 0', #address-cells/#size-cells are not necessary

Unfortunately that's not going to work, because the driver calls drm_of_find_panel_or_bridge() with a positive port and endpoint, not -1. While we could switch port arg from 0 to -1, that's not that simple for the endpoint arg, because we don't know in advance how many devices will be connected to the RGB/DPI port.

[1]https://elixir.bootlin.com/linux/v4.17-rc3/source/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c#L41

Quoted 216 lines
Cc Nicolas Ferre <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts | 15 ++++-----------
 arch/arm/boot/dts/at91sam9g45.dtsi          |  2 --
 arch/arm/boot/dts/at91sam9n12.dtsi          |  8 +-------
 arch/arm/boot/dts/at91sam9n12ek.dts         | 14 ++++----------
 arch/arm/boot/dts/at91sam9x5_lcd.dtsi       |  7 +------
 arch/arm/boot/dts/at91sam9x5dm.dtsi         | 13 ++++---------
 arch/arm/boot/dts/sama5d3.dtsi              |  2 --
 arch/arm/boot/dts/sama5d3_lcd.dtsi          |  8 +-------
 arch/arm/boot/dts/sama5d4.dtsi              |  8 +-------
 9 files changed, 16 insertions(+), 61 deletions(-)
arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts +4 -11
index fe05aaa7ac87..72c3b077fb46 100644
@@ -49,9 +49,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -144,16 +143,10 @@
 		/* Actually Ampire 800480R2 */
 		compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
 		backlight = <&backlight>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		status = "okay";
 
-		port at 0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/at91sam9g45.dtsi +0 -2
index 1ee25a475be8..36729e3f2899 100644
@@ -1114,8 +1114,6 @@
 				clock-names = "isi_clk";
 				status = "disabled";
 				port {
-					#address-cells = <1>;
-					#size-cells = <0>;
 				};
 			};
 
arch/arm/boot/dts/at91sam9n12.dtsi +1 -7
index 37cb81f457b5..a071fccb729b 100644
@@ -475,13 +475,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/at91sam9n12ek.dts +4 -10
index c43095c5cb5c..eb0c1e11fa4d 100644
@@ -134,9 +134,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -246,13 +245,8 @@
 		#size-cells = <0>;
 		status = "okay";
 
-		port at 0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/at91sam9x5_lcd.dtsi +1 -6
index 1629db9dd563..e243dff67a67 100644
@@ -23,13 +23,8 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
 
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/at91sam9x5dm.dtsi +4 -9
index 34c089fe0bc0..5aea8fd09ad6 100644
@@ -29,9 +29,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -80,12 +79,8 @@
 		#size-cells = <0>;
 		status = "disabled";
 
-		port at 0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/sama5d3.dtsi +0 -2
index eae5e1ee9cd8..2c51042e1f6b 100644
@@ -239,8 +239,6 @@
 				clock-names = "isi_clk";
 				status = "disabled";
 				port {
-					#address-cells = <1>;
-					#size-cells = <0>;
 				};
 			};
 
arch/arm/boot/dts/sama5d3_lcd.dtsi +1 -7
index be7cfefc6c31..2d042d7ec531 100644
@@ -23,13 +23,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/sama5d4.dtsi +1 -7
index 0cf9beddd556..90d7b64915ec 100644
@@ -333,13 +333,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
author maintainer
#16 lore raw

PATCH 1/1 arm: dts: atmel: graph_child_address warning fixes

Quoted 12 lines · Boris Brezillon
Quoted 8 lines · On Tue, 8 May 2018 08:59:25 -0500 Rob Herring <[email protected]> wrote:

Addresses for graph ports and endpoints are not necessary when there's only a single child. Fix the following warnings removing unnecessary addresses on OF graph nodes:

Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller/port at 0: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/isi at f0034000/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /panel/port at 0: graph node has single child node 'endpoint at 0', #address-cells/#size-cells are not necessary

Quoted 5 lines

Unfortunately that's not going to work, because the driver calls drm_of_find_panel_or_bridge() with a positive port and endpoint, not -1. While we could switch port arg from 0 to -1, that's not that simple for the endpoint arg, because we don't know in advance how many devices will be connected to the RGB/DPI port.

0 and -1 are treated the same way in the graph code.

Ports should be separate data streams. Can the hlcdc have more than 1 data stream (I think I checked that)? If not, then more than 1 port will never be needed. Likewise, a panel is pretty much never going to have 2 ports (or endpoints). The hlcdc could have more than 1 endpoint if you have multiple connections, but that's not what's defined. If you have an 'endpoint' node, then having #address-cells/#size-cells is wrong without a reg prop and unit-address.

Rob

#17 lore raw

PATCH 1/1 arm: dts: atmel: graph_child_address warning fixes

Quoted 14 lines · On Tue, 8 May 2018 15:41:51 -0500 Rob Herring <[email protected]> wrote:
Quoted 12 lines · Boris Brezillon
Quoted 8 lines · On Tue, 8 May 2018 08:59:25 -0500 Rob Herring <[email protected]> wrote:

Addresses for graph ports and endpoints are not necessary when there's only a single child. Fix the following warnings removing unnecessary addresses on OF graph nodes:

Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller/port at 0: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/isi at f0034000/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /panel/port at 0: graph node has single child node 'endpoint at 0', #address-cells/#size-cells are not necessary

Quoted 7 lines
Quoted 5 lines

Unfortunately that's not going to work, because the driver calls drm_of_find_panel_or_bridge() with a positive port and endpoint, not -1. While we could switch port arg from 0 to -1, that's not that simple for the endpoint arg, because we don't know in advance how many devices will be connected to the RGB/DPI port.

0 and -1 are treated the same way in the graph code.

Oh, you're right, I didn't check the of_graph_parse_endpoint() code.

Quoted 3 lines

Ports should be separate data streams. Can the hlcdc have more than 1 data stream (I think I checked that)?

Yes, there's only one port.

Quoted 3 lines

If not, then more than 1 port
will never be needed. Likewise, a panel is pretty much never going to have 2 ports (or endpoints).

True.

Quoted 4 lines

The hlcdc could have more than 1 endpoint
if you have multiple connections, but that's not what's defined. If you have an 'endpoint' node, then having #address-cells/#size-cells is wrong without a reg prop and unit-address.

The reg and unit-address were present in the endpoint nodes (maybe not in all dts though). AFAICT, the problem is more that the port only has a single child, and dtc complains that such nodes should not have a reg prop.

#18 lore raw

PATCH 1/1 arm: dts: atmel: graph_child_address warning fixes

In reply to Boris Brezillon
Quoted 12 lines · On Tue, 8 May 2018 22:18:19 +0200 Boris Brezillon…
Quoted 8 lines · On Tue, 8 May 2018 08:59:25 -0500 Rob Herring <[email protected]> wrote:

Addresses for graph ports and endpoints are not necessary when there's only a single child. Fix the following warnings removing unnecessary addresses on OF graph nodes:

Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller/port at 0: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/isi at f0034000/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /panel/port at 0: graph node has single child node 'endpoint at 0', #address-cells/#size-cells are not necessary

Quoted 8 lines

Unfortunately that's not going to work, because the driver calls drm_of_find_panel_or_bridge() with a positive port and endpoint, not -1. While we could switch port arg from 0 to -1, that's not that simple for the endpoint arg, because we don't know in advance how many devices will be connected to the RGB/DPI port.

[1]https://elixir.bootlin.com/linux/v4.17-rc3/source/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c#L41

I can prepare patches containing the following changes, but I need to test them first.

To be honest, I still don't see the problem with the "single child having a reg" case. Sure, it's not required, but it's also not an invalid representation. Also note that, depending on the board, we'll have to define addresses in endpoints if there's more than one endpoint, which IMO makes things even harder to follow, because in some cases endpoints will be numbered and in the others they won't.

--->8---

Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt +6 -14
index 82f2acb3d374..bc01c431d624 100644
@@ -7,13 +7,12 @@ Required properties:
  - compatible: value should be "atmel,hlcdc-display-controller"
  - pinctrl-names: the pin control state names. Should contain "default".
  - pinctrl-0: should contain the default pinctrl states.
- - #address-cells: should be set to 1.
- - #size-cells: should be set to 0.
 
 Required children nodes:
- Children nodes are encoding available output ports and their connections
- to external devices using the OF graph reprensentation (see ../graph.txt).
- At least one port node is required.
+ The port node represent the RGB/DPI output and can contain 0 to N endpoints
+ which encode connections to devices present on the RGB/DPI bus.
+ These connections are represented using the OF graph representation (see
+ ../graph.txt).
 
 Example:
 
@@ -28,16 +27,9 @@ Example:
                        compatible = "atmel,hlcdc-display-controller";
                        pinctrl-names = "default";
                        pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
-                       #address-cells = <1>;
-                       #size-cells = <0>;
 
-                       port at 0 {
-                               #address-cells = <1>;
-                               #size-cells = <0>;
-                               reg = <0>;
-
-                               hlcdc_panel_output: endpoint at 0 {
-                                       reg = <0>;
+                       port {
+                               hlcdc_panel_output: endpoint {
                                        remote-endpoint = <&panel_input>;
                                };
                        };
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +7 -2
index 8db51fb131db..0dc8f124a95e 100644
@@ -38,7 +38,7 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
        struct drm_bridge *bridge;
        int ret;
 
-       ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
+       ret = drm_of_find_panel_or_bridge(dev->dev->of_node, -1, endpoint,
                                          &panel, &bridge);
        if (ret)
                return ret;
@@ -86,5 +86,10 @@ int atmel_hlcdc_create_outputs(struct drm_device *dev)
        if (ret == -ENODEV && endpoint)
                return 0;
 
-       return ret;
+       /*
+        * If there's only one endpoint, the reg field will not be specified
+        * and no specific ID will be attached to this endpoint. Try with
+        * endpoint = -1 to handle this case.
+        */
+       return atmel_hlcdc_attach_endpoint(dev, -1);
 }
#19 lore raw

PATCH 1/1 arm: dts: atmel: graph_child_address warning fixes

In reply to Rob Herring
Quoted 12 lines · On Tue, 8 May 2018 08:59:25 -0500 Rob Herring <[email protected]> wrote:

Addresses for graph ports and endpoints are not necessary when there's only a single child. Fix the following warnings removing unnecessary addresses on OF graph nodes:

Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller: graph node has single child node 'port at 0', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/hlcdc at f0030000/hlcdc-display-controller/port at 0: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /ahb/apb/isi at f0034000/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary Warning (graph_child_address): /panel/port at 0: graph node has single child node 'endpoint at 0', #address-cells/#size-cells are not necessary

Cc Nicolas Ferre <[email protected]>
Cc Alexandre Belloni <[email protected]>
Quoted 10 lines
---
 arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts | 15 ++++-----------
 arch/arm/boot/dts/at91sam9g45.dtsi          |  2 --
 arch/arm/boot/dts/at91sam9n12.dtsi          |  8 +-------
 arch/arm/boot/dts/at91sam9n12ek.dts         | 14 ++++----------
 arch/arm/boot/dts/at91sam9x5_lcd.dtsi       |  7 +------
 arch/arm/boot/dts/at91sam9x5dm.dtsi         | 13 ++++---------
 arch/arm/boot/dts/sama5d3.dtsi              |  2 --
 arch/arm/boot/dts/sama5d3_lcd.dtsi          |  8 +-------
 arch/arm/boot/dts/sama5d4.dtsi              |  8 +-------

For the hlcdc changes

I'll update the DT bindinds doc accordingly.

Thanks,

Boris

Quoted 202 lines
 9 files changed, 16 insertions(+), 61 deletions(-)
arch/arm/boot/dts/at91-sama5d4_ma5d4evk.dts +4 -11
index fe05aaa7ac87..72c3b077fb46 100644
@@ -49,9 +49,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -144,16 +143,10 @@
 		/* Actually Ampire 800480R2 */
 		compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
 		backlight = <&backlight>;
-		#address-cells = <1>;
-		#size-cells = <0>;
 		status = "okay";
 
-		port at 0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/at91sam9g45.dtsi +0 -2
index 1ee25a475be8..36729e3f2899 100644
@@ -1114,8 +1114,6 @@
 				clock-names = "isi_clk";
 				status = "disabled";
 				port {
-					#address-cells = <1>;
-					#size-cells = <0>;
 				};
 			};
 
arch/arm/boot/dts/at91sam9n12.dtsi +1 -7
index 37cb81f457b5..a071fccb729b 100644
@@ -475,13 +475,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/at91sam9n12ek.dts +4 -10
index c43095c5cb5c..eb0c1e11fa4d 100644
@@ -134,9 +134,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -246,13 +245,8 @@
 		#size-cells = <0>;
 		status = "okay";
 
-		port at 0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/at91sam9x5_lcd.dtsi +1 -6
index 1629db9dd563..e243dff67a67 100644
@@ -23,13 +23,8 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
 
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/at91sam9x5dm.dtsi +4 -9
index 34c089fe0bc0..5aea8fd09ad6 100644
@@ -29,9 +29,8 @@
 					pinctrl-names = "default";
 					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
 
-					port at 0 {
-						hlcdc_panel_output: endpoint at 0 {
-							reg = <0>;
+					port {
+						hlcdc_panel_output: endpoint {
 							remote-endpoint = <&panel_input>;
 						};
 					};
@@ -80,12 +79,8 @@
 		#size-cells = <0>;
 		status = "disabled";
 
-		port at 0 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			panel_input: endpoint at 0 {
-				reg = <0>;
+		port {
+			panel_input: endpoint {
 				remote-endpoint = <&hlcdc_panel_output>;
 			};
 		};
arch/arm/boot/dts/sama5d3.dtsi +0 -2
index eae5e1ee9cd8..2c51042e1f6b 100644
@@ -239,8 +239,6 @@
 				clock-names = "isi_clk";
 				status = "disabled";
 				port {
-					#address-cells = <1>;
-					#size-cells = <0>;
 				};
 			};
 
arch/arm/boot/dts/sama5d3_lcd.dtsi +1 -7
index be7cfefc6c31..2d042d7ec531 100644
@@ -23,13 +23,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};
 
arch/arm/boot/dts/sama5d4.dtsi +1 -7
index 0cf9beddd556..90d7b64915ec 100644
@@ -333,13 +333,7 @@
 
 				hlcdc-display-controller {
 					compatible = "atmel,hlcdc-display-controller";
-					#address-cells = <1>;
-					#size-cells = <0>;
-
-					port at 0 {
-						#address-cells = <1>;
-						#size-cells = <0>;
-						reg = <0>;
+					port {
 					};
 				};