Skip to contentSkip to conversation

arm64: dts: qcom: sc7280: Add Display Port node

PATCH In review Kuogee Hsieh 3 participants 3 messages Aug 30, 2021 – Aug 31, 2021

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

PATCH v2 1/1 arm64: dts: qcom: sc7280: Add Display Port node

Changes in v2:
-- break this patch into 3 patches

---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 88 +++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +87 -1
index c29226b..f224029 100644
@@ -3202,6 +3202,13 @@
 							remote-endpoint = <&edp_in>;
 						};
 					};
+
+					port@2 {
+                                                reg = <2>;
+                                                dpu_intf0_out: endpoint {
+                                                        remote-endpoint = <&dp_in>;
+                                                };
+                                        };
 				};
 
 				mdp_opp_table: mdp-opp-table {
@@ -3389,6 +3396,78 @@
 					};
 				};
 			};
+
+			msm_dp: displayport-controller@ae90000 {
+				status = "disabled";
+				compatible = "qcom,sc7180-dp", "qcom,sc7280-dp";
+
+				reg = <0 0x0ae90000 0 0x1400>;
+
+				interrupt-parent = <&mdss>;
+				interrupts = <12>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
+				clock-names =	"core_iface",
+						"core_aux",
+						"ctrl_link",
+					     	"ctrl_link_iface",
+						"stream_pixel";
+				#clock-cells = <1>;
+				assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
+						  <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
+				assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
+				phys = <&dp_phy>;
+				phy-names = "dp";
+
+				operating-points-v2 = <&dp_opp_table>;
+				power-domains = <&rpmhpd SC7280_CX>;
+
+				#sound-dai-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+					port@0 {
+						reg = <0>;
+						dp_in: endpoint {
+							remote-endpoint = <&dpu_intf0_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dp_out: endpoint { };
+					};
+				};
+
+				dp_opp_table: opp-table {
+					compatible = "operating-points-v2";
+
+					opp-160000000 {
+						opp-hz = /bits/ 64 <160000000>;
+						required-opps = <&rpmhpd_opp_low_svs>;
+					};
+
+					opp-270000000 {
+						opp-hz = /bits/ 64 <270000000>;
+						required-opps = <&rpmhpd_opp_svs>;
+					};
+
+					opp-540000000 {
+						opp-hz = /bits/ 64 <540000000>;
+						required-opps = <&rpmhpd_opp_svs_l1>;
+					};
+
+					opp-810000000 {
+						opp-hz = /bits/ 64 <810000000>;
+						required-opps = <&rpmhpd_opp_nom>;
+					};
+				};
+			};
 		};
 
 		dispcc: clock-controller@af00000 {
@@ -3398,7 +3477,8 @@
 				 <&gcc GCC_DISP_GPLL0_CLK_SRC>,
 				 <&dsi_phy 0>,
 				 <&dsi_phy 1>,
-				 <0>, <0>,
+			  	 <&dp_phy 0>,
+			  	 <&dp_phy 1>,
 				 <&msm_edp 0>,
 				 <&msm_edp 1>;
 			clock-names = "bi_tcxo", "gcc_disp_gpll0_clk",
@@ -3525,6 +3605,12 @@
                                 };
                         };
 
+			dp_hot_plug_det: dp-hot-plug-det {
+				pins = "gpio47";
+				function = "dp_hot";
+				bias-disable;
+                        };
+
 			qspi_clk: qspi-clk {
 				pins = "gpio14";
 				function = "qspi_clk";
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw

Quoting Kuogee Hsieh (2021-08-30 09:04:49)

Quoted 2 lines

Changes in v2:
-- break this patch into 3 patches

Are there two more somewhere?

Quoted 25 lines
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 88 +++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +7 -0
index c29226b..f224029 100644
@@ -3202,6 +3202,13 @@
                                                        remote-endpoint = <&edp_in>;
                                                };
                                        };
+
+                                       port@2 {
+                                                reg = <2>;
+                                                dpu_intf0_out: endpoint {
+                                                        remote-endpoint = <&dp_in>;
+                                                };
+                                        };
                                };
 
                                mdp_opp_table: mdp-opp-table {

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3402

Quoted 7 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +4 -0
@@ -3389,6 +3396,78 @@
                                        };
                                };
                        };
+
+                       msm_dp: displayport-controller@ae90000 {
+                               status = "disabled";
+                               compatible = "qcom,sc7180-dp", "qcom,sc7280-dp";

It should be most specific to least specific from left to right. I'd rather see "qcom,sc7180-dp" dropped entirely as it will become important to know that sc7280 has eDP and DP whereas sc7180 only has DP. We should key that knowledge off the compatible string, so having sc7180-dp here makes that harder, not easier.

Quoted 13 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +13 -0
+
+                               reg = <0 0x0ae90000 0 0x1400>;
+
+                               interrupt-parent = <&mdss>;
+                               interrupts = <12>;
+
+                               clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+                                        <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
+                                        <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
+                                        <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
+                                        <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
+                               clock-names =   "core_iface",
+                                               "core_aux",
#2 lore raw
In reply to Kuogee Hsieh
Quoted 3 lines · Kuogee Hsieh

Changes in v2:
-- break this patch into 3 patches

It's only the DRM tree that want the changelog above '---', please move it down.

Also, why isn't this "patch n/3" if there's three patches?

Quoted 10 lines
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 88 +++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +0 -0
index c29226b..f224029 100644

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3211

Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +7 -0
@@ -3202,6 +3202,13 @@
 							remote-endpoint = <&edp_in>;
 						};
 					};
+
+					port@2 {
+                                                reg = <2>;
+                                                dpu_intf0_out: endpoint {
+                                                        remote-endpoint = <&dp_in>;
+                                                };
+                                        };

This block seems to be indented with spaces?

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3400

Quoted 9 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -0
 				};
 
 				mdp_opp_table: mdp-opp-table {
@@ -3389,6 +3396,78 @@
 					};
 				};
 			};
+
+			msm_dp: displayport-controller@ae90000 {

Prefixing the labels of all the mdss children mdss_ instead has the benefit that the nodes group naturally in the board dts.

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3402

Quoted 2 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -0
+				status = "disabled";
+				compatible = "qcom,sc7180-dp", "qcom,sc7280-dp";

This isn't a sc7180-dp block.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +5 -0
+
+				reg = <0 0x0ae90000 0 0x1400>;
+
+				interrupt-parent = <&mdss>;
+				interrupts = <12>;

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3417

Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +10 -0
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_AUX_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_LINK_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_LINK_INTF_CLK>,
+					 <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK>;
+				clock-names =	"core_iface",
+						"core_aux",
+						"ctrl_link",
+					     	"ctrl_link_iface",

There seems to be some spaced among the tabs here.

Quoted 57 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +53 -0
+						"stream_pixel";
+				#clock-cells = <1>;
+				assigned-clocks = <&dispcc DISP_CC_MDSS_DP_LINK_CLK_SRC>,
+						  <&dispcc DISP_CC_MDSS_DP_PIXEL_CLK_SRC>;
+				assigned-clock-parents = <&dp_phy 0>, <&dp_phy 1>;
+				phys = <&dp_phy>;
+				phy-names = "dp";
+
+				operating-points-v2 = <&dp_opp_table>;
+				power-domains = <&rpmhpd SC7280_CX>;
+
+				#sound-dai-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+					port@0 {
+						reg = <0>;
+						dp_in: endpoint {
+							remote-endpoint = <&dpu_intf0_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dp_out: endpoint { };
+					};
+				};
+
+				dp_opp_table: opp-table {
+					compatible = "operating-points-v2";
+
+					opp-160000000 {
+						opp-hz = /bits/ 64 <160000000>;
+						required-opps = <&rpmhpd_opp_low_svs>;
+					};
+
+					opp-270000000 {
+						opp-hz = /bits/ 64 <270000000>;
+						required-opps = <&rpmhpd_opp_svs>;
+					};
+
+					opp-540000000 {
+						opp-hz = /bits/ 64 <540000000>;
+						required-opps = <&rpmhpd_opp_svs_l1>;
+					};
+
+					opp-810000000 {
+						opp-hz = /bits/ 64 <810000000>;
+						required-opps = <&rpmhpd_opp_nom>;
+					};
+				};
+			};
 		};
 
 		dispcc: clock-controller@af00000 {

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3481

Quoted 6 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +2 -1
@@ -3398,7 +3477,8 @@
 				 <&gcc GCC_DISP_GPLL0_CLK_SRC>,
 				 <&dsi_phy 0>,
 				 <&dsi_phy 1>,
-				 <0>, <0>,
+			  	 <&dp_phy 0>,
+			  	 <&dp_phy 1>,

Same here, seems to be some spaces among the tabs on both of these lines.

arch/arm64/boot/dts/qcom/sc7280.dtsi line 3612

Quoted 12 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +5 -0
 				 <&msm_edp 0>,
 				 <&msm_edp 1>;
 			clock-names = "bi_tcxo", "gcc_disp_gpll0_clk",
@@ -3525,6 +3605,12 @@
                                 };
                         };
 
+			dp_hot_plug_det: dp-hot-plug-det {
+				pins = "gpio47";
+				function = "dp_hot";
+				bias-disable;
+                        };

This seems to be indented with spaces?

Regards,
Bjorn

Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -0
+
 			qspi_clk: qspi-clk {
 				pins = "gpio14";
 				function = "qspi_clk";
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project