Skip to contentSkip to conversation

Add display nodes to SDM845 dtsi

PATCH New Jeykumar Sankaran 4 participants 6 messages Nov 2, 2018 – Nov 28, 2018 3 messages not in the archive

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

PATCH v3 1/1 Add display nodes to SDM845 dtsi

Reviving the patch posted by Sean initially.

This patch set adds MDSS and DSI nodes to SDM845 dtsi to enable display. The patches are tested on SDM845 MTP platform using the kernel based on [1].

Part of the dependent drivers are already posted on list. Rest of the dependencies are met using using downstream version of the driver(s) which are yet to make it to the list.

References to the driver patches used for testing:

display controller: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm64/boot/dts/qcom/sdm845.dtsi?id=40019e8452fe76867bdb2e7
WLED: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=11023&archive=both&state=*
Panel: https://patchwork.freedesktop.org/series/50657/
iommu: https://patchwork.kernel.org/patch/10534999/

[1] https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=integration-linux-qcomlt

Thanks and Regards,
Jeykumar S.

Jeykumar Sankaran (1):
arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

 arch/arm64/boot/dts/qcom/sdm845.dtsi | 191 +++++++++++++++++++++++++++++++++++
 1 file changed, 191 insertions(+)
Signature · 7 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

A message that is not in the archive (sent off-list or not yet received): 1541125523-28358-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org

#2 lore raw

PATCH v3 1/1 arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

DPU is short for the Display Processing Unit. It is the display controller on Qualcomm SDM845 chips.

This change adds MDSS and DSI nodes to enable display on the target device.

Changes in v2:
- Beefed up commit message
- Use SoC specific compatibles for mdss and dpu (Rob H)
- Use assigned-clocks to set initial clock frequency(Rob H)
Changes in v3:
- added IOMMU node
- Fix device naming (remove _phys)
- Use correct IRQ_TYPE in interrupt specifiers

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 191 +++++++++++++++++++++++++++++++++++
 1 file changed, 191 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +191 -0
index 0c9a2aa..dd612ac 100644
@@ -978,6 +978,197 @@
 			#thermal-sensor-cells = <1>;
 		};
 
+		mdss: mdss@ae00000 {
+			compatible = "qcom,sdm845-mdss";
+			reg = <0xae00000 0x1000>;
+			reg-names = "mdss";
+
+			power-domains = <&dispcc 0>;
+
+			clocks = <&gcc GCC_DISP_AHB_CLK>,
+				 <&gcc GCC_DISP_AXI_CLK>,
+				 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+			clock-names = "iface", "bus", "core";
+
+			assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>;
+			assigned-clock-rates = <300000000>;
+
+			interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <1>;
+
+			iommus = <&apps_smmu 0x880 0x8>,
+			         <&apps_smmu 0xc80 0x8>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			mdss_mdp: mdp@ae01000 {
+				compatible = "qcom,sdm845-dpu";
+				reg = <0x0ae01000 0x8f000>,
+				      <0x0aeb0000 0x2008>;
+				reg-names = "mdp", "vbif";
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>,
+					 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+					 <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+				clock-names = "iface", "bus", "core", "vsync";
+
+				assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>,
+						  <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+				assigned-clock-rates = <300000000>,
+						       <19200000>;
+
+				interrupt-parent = <&mdss>;
+				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dpu_intf1_out: endpoint {
+							remote-endpoint = <&dsi0_in>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dpu_intf2_out: endpoint {
+							remote-endpoint = <&dsi1_in>;
+						};
+					};
+				};
+			};
+
+			dsi0: dsi@ae94000 {
+				compatible = "qcom,mdss-dsi-ctrl";
+				reg = <0xae94000 0x400>;
+				reg-names = "dsi_ctrl";
+
+				interrupt-parent = <&mdss>;
+				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+
+				clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+					 <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+					 <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+					 <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+					 <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>;
+				clock-names = "byte_clk",
+					      "byte_intf_clk",
+					      "pixel_clk",
+					      "core_clk",
+					      "iface_clk",
+					      "bus_clk";
+
+				phys = <&dsi0_phy>;
+				phy-names = "dsi-phy";
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dsi0_in: endpoint {
+							remote-endpoint = <&dpu_intf1_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dsi0_out: endpoint {
+						};
+					};
+				};
+			};
+
+			dsi0_phy: dsi-phy@ae94400 {
+				compatible = "qcom,dsi-phy-10nm";
+				reg = <0xae94400 0x200>,
+				      <0xae94a00 0x1e0>,
+				      <0xae94600 0x280>;
+				reg-names = "dsi_phy",
+					    "dsi_pll",
+					    "dsi_phy_lane";
+
+				#clock-cells = <1>;
+				#phy-cells = <0>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+				clock-names = "iface_clk";
+			};
+
+			dsi1: dsi@ae96000 {
+				compatible = "qcom,mdss-dsi-ctrl";
+				reg = <0xae96000 0x400>;
+				reg-names = "dsi_ctrl";
+
+				interrupt-parent = <&mdss>;
+				interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+
+				clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+					 <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,
+					 <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+					 <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+					 <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>;
+				clock-names = "byte_clk",
+					      "byte_intf_clk",
+					      "pixel_clk",
+					      "core_clk",
+					      "iface_clk",
+					      "bus_clk";
+
+				phys = <&dsi1_phy>;
+				phy-names = "dsi-phy";
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dsi1_in: endpoint {
+							remote-endpoint = <&dpu_intf2_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dsi1_out: endpoint {
+						};
+					};
+				};
+			};
+
+			dsi1_phy: dsi-phy@ae96400 {
+				compatible = "qcom,dsi-phy-10nm";
+				reg = <0xae96400 0x200>,
+				      <0xae96a00 0x10e>,
+				      <0xae96600 0x280>;
+				reg-names = "dsi_phy",
+					    "dsi_pll",
+					    "dsi_phy_lane";
+
+				#clock-cells = <1>;
+				#phy-cells = <0>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+				clock-names = "iface_clk";
+			};
+		};
+
 		spmi_bus: spmi@c440000 {
 			compatible = "qcom,spmi-pmic-arb";
 			reg = <0xc440000 0x1100>,
Signature · 7 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

A message that is not in the archive (sent off-list or not yet received): 1541125523-28358-2-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org

#4 lore raw

Re: [PATCH v3] arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

Hi,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 979

Quoted 5 lines · Jeykumar Sankaran
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
@@ -978,6 +978,197 @@
                        #thermal-sensor-cells = <1>;
                };

Note that your patch doesn't cleanly apply to Andy's tree. Context here shows that you have it between the thermal sensor and the SPMI bus but the "qcom,sdm845-aoss-cc" node is there in. It's easy enough to resolve, but it's usually considered nice to post patches that the maintainers can apply.

When resolving this myself, I realized that you have the node in the wrong place anyway. Nodes with a unit address should be sorted by unit address. As you unit address is ae00000 you should be right above 'dispcc: clock-controller@af00000'.

Quoted 76 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +76 -0
+               mdss: mdss@ae00000 {
+                       compatible = "qcom,sdm845-mdss";
+                       reg = <0xae00000 0x1000>;
+                       reg-names = "mdss";
+
+                       power-domains = <&dispcc 0>;
+
+                       clocks = <&gcc GCC_DISP_AHB_CLK>,
+                                <&gcc GCC_DISP_AXI_CLK>,
+                                <&dispcc DISP_CC_MDSS_MDP_CLK>;
+                       clock-names = "iface", "bus", "core";
+
+                       assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>;
+                       assigned-clock-rates = <300000000>;
+
+                       interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-controller;
+                       #interrupt-cells = <1>;
+
+                       iommus = <&apps_smmu 0x880 0x8>,
+                                <&apps_smmu 0xc80 0x8>;
+
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       mdss_mdp: mdp@ae01000 {
+                               compatible = "qcom,sdm845-dpu";
+                               reg = <0x0ae01000 0x8f000>,
+                                     <0x0aeb0000 0x2008>;
+                               reg-names = "mdp", "vbif";
+
+                               clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+                                        <&dispcc DISP_CC_MDSS_AXI_CLK>,
+                                        <&dispcc DISP_CC_MDSS_MDP_CLK>,
+                                        <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+                               clock-names = "iface", "bus", "core", "vsync";
+
+                               assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>,
+                                                 <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+                               assigned-clock-rates = <300000000>,
+                                                      <19200000>;
+
+                               interrupt-parent = <&mdss>;
+                               interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               reg = <0>;
+                                               dpu_intf1_out: endpoint {
+                                                       remote-endpoint = <&dsi0_in>;
+                                               };
+                                       };
+
+                                       port@1 {
+                                               reg = <1>;
+                                               dpu_intf2_out: endpoint {
+                                                       remote-endpoint = <&dsi1_in>;
+                                               };
+                                       };
+                               };
+                       };
+
+                       dsi0: dsi@ae94000 {
+                               compatible = "qcom,mdss-dsi-ctrl";
+                               reg = <0xae94000 0x400>;
+                               reg-names = "dsi_ctrl";
+
+                               interrupt-parent = <&mdss>;
+                               interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+
+                               clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+                                        <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1066

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+                                        <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+                                        <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+                                        <&dispcc DISP_CC_MDSS_AHB_CLK>,
+                                        <&dispcc DISP_CC_MDSS_AXI_CLK>;
+                               clock-names = "byte_clk",
+                                             "byte_intf_clk",
+                                             "pixel_clk",
+                                             "core_clk",
+                                             "iface_clk",
+                                             "bus_clk";

msm_dsi ae94000.dsi: Using legacy clk name binding. Use "iface" instead of "iface_clk"
msm_dsi ae94000.dsi: Using legacy clk name binding. Use "bus" instead of "bus_clk"
msm_dsi ae94000.dsi: Using legacy clk name binding. Use "byte" instead of "byte_clk"
msm_dsi ae94000.dsi: Using legacy clk name binding. Use "pixel" instead of "pixel_clk"
msm_dsi ae94000.dsi: Using legacy clk name binding. Use "core" instead of "core_clk"
msm_dsi ae94000.dsi: Using legacy clk name binding. Use "byte_intf" instead of "byte_intf_clk"

Quoted 30 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +30 -0
+
+                               phys = <&dsi0_phy>;
+                               phy-names = "dsi-phy";
+
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               reg = <0>;
+                                               dsi0_in: endpoint {
+                                                       remote-endpoint = <&dpu_intf1_out>;
+                                               };
+                                       };
+
+                                       port@1 {
+                                               reg = <1>;
+                                               dsi0_out: endpoint {
+                                               };
+                                       };
+                               };
+                       };
+
+                       dsi0_phy: dsi-phy@ae94400 {
+                               compatible = "qcom,dsi-phy-10nm";
+                               reg = <0xae94400 0x200>,
+                                     <0xae94a00 0x1e0>,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1106

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+                                     <0xae94600 0x280>;
+                               reg-names = "dsi_phy",
+                                           "dsi_pll",
+                                           "dsi_phy_lane";
+
+                               #clock-cells = <1>;
+                               #phy-cells = <0>;
+
+                               clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+                               clock-names = "iface_clk";

msm_dsi_phy ae94400.dsi-phy: Using legacy clk name binding. Use "iface" instead of "iface_clk"

Quoted 12 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +12 -0
+                       };
+
+                       dsi1: dsi@ae96000 {
+                               compatible = "qcom,mdss-dsi-ctrl";
+                               reg = <0xae96000 0x400>;
+                               reg-names = "dsi_ctrl";
+
+                               interrupt-parent = <&mdss>;
+                               interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+
+                               clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+                                        <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1128

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+                                        <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+                                        <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+                                        <&dispcc DISP_CC_MDSS_AHB_CLK>,
+                                        <&dispcc DISP_CC_MDSS_AXI_CLK>;
+                               clock-names = "byte_clk",
+                                             "byte_intf_clk",
+                                             "pixel_clk",
+                                             "core_clk",
+                                             "iface_clk",
+                                             "bus_clk";

More places to remove "_clk"

Quoted 30 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +30 -0
+
+                               phys = <&dsi1_phy>;
+                               phy-names = "dsi-phy";
+
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+
+                               ports {
+                                       #address-cells = <1>;
+                                       #size-cells = <0>;
+
+                                       port@0 {
+                                               reg = <0>;
+                                               dsi1_in: endpoint {
+                                                       remote-endpoint = <&dpu_intf2_out>;
+                                               };
+                                       };
+
+                                       port@1 {
+                                               reg = <1>;
+                                               dsi1_out: endpoint {
+                                               };
+                                       };
+                               };
+                       };
+
+                       dsi1_phy: dsi-phy@ae96400 {
+                               compatible = "qcom,dsi-phy-10nm";
+                               reg = <0xae96400 0x200>,
+                                     <0xae96a00 0x10e>,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1168

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+                                     <0xae96600 0x280>;
+                               reg-names = "dsi_phy",
+                                           "dsi_pll",
+                                           "dsi_phy_lane";
+
+                               #clock-cells = <1>;
+                               #phy-cells = <0>;
+
+                               clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+                               clock-names = "iface_clk";

...and another "_clk" to remove.

-Doug
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

#5 lore raw

Re: [PATCH v3] arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

In reply to a message not in the archive
Quoted 6 lines · Jeykumar Sankaran

DPU is short for the Display Processing Unit. It is the display controller on Qualcomm SDM845 chips.

This change adds MDSS and DSI nodes to enable display on the target device.

Happy to see support reaching the level where we can introduce this in the dtsi!

But, not all devices has a display and not all devices with display has DSI, so I would suggest that you mark these status = "disabled" and enable them in the board dts.

Regards,
Bjorn

Quoted 221 lines

Changes in v2:
- Beefed up commit message
- Use SoC specific compatibles for mdss and dpu (Rob H)
- Use assigned-clocks to set initial clock frequency(Rob H)
Changes in v3:
- added IOMMU node
- Fix device naming (remove _phys)
- Use correct IRQ_TYPE in interrupt specifiers

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 191 +++++++++++++++++++++++++++++++++++
 1 file changed, 191 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +191 -0
index 0c9a2aa..dd612ac 100644
@@ -978,6 +978,197 @@
 			#thermal-sensor-cells = <1>;
 		};
 
+		mdss: mdss@ae00000 {
+			compatible = "qcom,sdm845-mdss";
+			reg = <0xae00000 0x1000>;
+			reg-names = "mdss";
+
+			power-domains = <&dispcc 0>;
+
+			clocks = <&gcc GCC_DISP_AHB_CLK>,
+				 <&gcc GCC_DISP_AXI_CLK>,
+				 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+			clock-names = "iface", "bus", "core";
+
+			assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>;
+			assigned-clock-rates = <300000000>;
+
+			interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <1>;
+
+			iommus = <&apps_smmu 0x880 0x8>,
+			         <&apps_smmu 0xc80 0x8>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			mdss_mdp: mdp@ae01000 {
+				compatible = "qcom,sdm845-dpu";
+				reg = <0x0ae01000 0x8f000>,
+				      <0x0aeb0000 0x2008>;
+				reg-names = "mdp", "vbif";
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>,
+					 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+					 <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+				clock-names = "iface", "bus", "core", "vsync";
+
+				assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>,
+						  <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+				assigned-clock-rates = <300000000>,
+						       <19200000>;
+
+				interrupt-parent = <&mdss>;
+				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dpu_intf1_out: endpoint {
+							remote-endpoint = <&dsi0_in>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dpu_intf2_out: endpoint {
+							remote-endpoint = <&dsi1_in>;
+						};
+					};
+				};
+			};
+
+			dsi0: dsi@ae94000 {
+				compatible = "qcom,mdss-dsi-ctrl";
+				reg = <0xae94000 0x400>;
+				reg-names = "dsi_ctrl";
+
+				interrupt-parent = <&mdss>;
+				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+
+				clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+					 <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+					 <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+					 <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+					 <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>;
+				clock-names = "byte_clk",
+					      "byte_intf_clk",
+					      "pixel_clk",
+					      "core_clk",
+					      "iface_clk",
+					      "bus_clk";
+
+				phys = <&dsi0_phy>;
+				phy-names = "dsi-phy";
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dsi0_in: endpoint {
+							remote-endpoint = <&dpu_intf1_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dsi0_out: endpoint {
+						};
+					};
+				};
+			};
+
+			dsi0_phy: dsi-phy@ae94400 {
+				compatible = "qcom,dsi-phy-10nm";
+				reg = <0xae94400 0x200>,
+				      <0xae94a00 0x1e0>,
+				      <0xae94600 0x280>;
+				reg-names = "dsi_phy",
+					    "dsi_pll",
+					    "dsi_phy_lane";
+
+				#clock-cells = <1>;
+				#phy-cells = <0>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+				clock-names = "iface_clk";
+			};
+
+			dsi1: dsi@ae96000 {
+				compatible = "qcom,mdss-dsi-ctrl";
+				reg = <0xae96000 0x400>;
+				reg-names = "dsi_ctrl";
+
+				interrupt-parent = <&mdss>;
+				interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+
+				clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+					 <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,
+					 <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+					 <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+					 <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>;
+				clock-names = "byte_clk",
+					      "byte_intf_clk",
+					      "pixel_clk",
+					      "core_clk",
+					      "iface_clk",
+					      "bus_clk";
+
+				phys = <&dsi1_phy>;
+				phy-names = "dsi-phy";
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dsi1_in: endpoint {
+							remote-endpoint = <&dpu_intf2_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dsi1_out: endpoint {
+						};
+					};
+				};
+			};
+
+			dsi1_phy: dsi-phy@ae96400 {
+				compatible = "qcom,dsi-phy-10nm";
+				reg = <0xae96400 0x200>,
+				      <0xae96a00 0x10e>,
+				      <0xae96600 0x280>;
+				reg-names = "dsi_phy",
+					    "dsi_pll",
+					    "dsi_phy_lane";
+
+				#clock-cells = <1>;
+				#phy-cells = <0>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+				clock-names = "iface_clk";
+			};
+		};
+
 		spmi_bus: spmi@c440000 {
 			compatible = "qcom,spmi-pmic-arb";
 			reg = <0xc440000 0x1100>,
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

#6 lore raw

Re: [PATCH v3] arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

In reply to a message not in the archive
Quoted 26 lines · Jeykumar Sankaran

DPU is short for the Display Processing Unit. It is the display controller on Qualcomm SDM845 chips.

This change adds MDSS and DSI nodes to enable display on the target device.

Changes in v2:
- Beefed up commit message
- Use SoC specific compatibles for mdss and dpu (Rob H)
- Use assigned-clocks to set initial clock frequency(Rob H)
Changes in v3:
- added IOMMU node
- Fix device naming (remove _phys)
- Use correct IRQ_TYPE in interrupt specifiers

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 191 +++++++++++++++++++++++++++++++++++
 1 file changed, 191 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 0c9a2aa..dd612ac 100644

arch/arm64/boot/dts/qcom/sdm845.dtsi line 986

Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +6 -0
@@ -978,6 +978,197 @@
 			#thermal-sensor-cells = <1>;
 		};
 
+		mdss: mdss@ae00000 {
+			compatible = "qcom,sdm845-mdss";
+			reg = <0xae00000 0x1000>;
+			reg-names = "mdss";
+
+			power-domains = <&dispcc 0>;

Would the powers-that-be in the power domain prefer this to have a symbolic value? I see MDSS_GDSC in the bindings header.

Quoted 70 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +70 -0
+
+			clocks = <&gcc GCC_DISP_AHB_CLK>,
+				 <&gcc GCC_DISP_AXI_CLK>,
+				 <&dispcc DISP_CC_MDSS_MDP_CLK>;
+			clock-names = "iface", "bus", "core";
+
+			assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>;
+			assigned-clock-rates = <300000000>;
+
+			interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-controller;
+			#interrupt-cells = <1>;
+
+			iommus = <&apps_smmu 0x880 0x8>,
+			         <&apps_smmu 0xc80 0x8>;
+
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+
+			mdss_mdp: mdp@ae01000 {
+				compatible = "qcom,sdm845-dpu";
+				reg = <0x0ae01000 0x8f000>,
+				      <0x0aeb0000 0x2008>;
+				reg-names = "mdp", "vbif";
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>,
+					 <&dispcc DISP_CC_MDSS_MDP_CLK>,
+					 <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+				clock-names = "iface", "bus", "core", "vsync";
+
+				assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>,
+						  <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+				assigned-clock-rates = <300000000>,
+						       <19200000>;
+
+				interrupt-parent = <&mdss>;
+				interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dpu_intf1_out: endpoint {
+							remote-endpoint = <&dsi0_in>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dpu_intf2_out: endpoint {
+							remote-endpoint = <&dsi1_in>;
+						};
+					};
+				};
+			};
+
+			dsi0: dsi@ae94000 {
+				compatible = "qcom,mdss-dsi-ctrl";
+				reg = <0xae94000 0x400>;
+				reg-names = "dsi_ctrl";
+
+				interrupt-parent = <&mdss>;
+				interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+
+				clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+					 <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1066

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+					 <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+					 <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+					 <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>;
+				clock-names = "byte_clk",
+					      "byte_intf_clk",
+					      "pixel_clk",
+					      "core_clk",
+					      "iface_clk",
+					      "bus_clk";

We will need to remove the _clk extension and fix the code if needed.

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1069

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
+
+				phys = <&dsi0_phy>;
+				phy-names = "dsi-phy";

This too, I reckon.

Quoted 17 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +17 -0
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dsi0_in: endpoint {
+							remote-endpoint = <&dpu_intf1_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dsi0_out: endpoint {

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1097

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+						};
+					};
+				};
+			};
+
+			dsi0_phy: dsi-phy@ae94400 {
+				compatible = "qcom,dsi-phy-10nm";
+				reg = <0xae94400 0x200>,
+				      <0xae94a00 0x1e0>,
+				      <0xae94600 0x280>;

I think it would be better if these were in numerical order.

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1106

Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +9 -0
+				reg-names = "dsi_phy",
+					    "dsi_pll",
+					    "dsi_phy_lane";
+
+				#clock-cells = <1>;
+				#phy-cells = <0>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+				clock-names = "iface_clk";

Remove _clk extension.

Quoted 12 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +12 -0
+			};
+
+			dsi1: dsi@ae96000 {
+				compatible = "qcom,mdss-dsi-ctrl";
+				reg = <0xae96000 0x400>;
+				reg-names = "dsi_ctrl";
+
+				interrupt-parent = <&mdss>;
+				interrupts = <5 IRQ_TYPE_LEVEL_HIGH>;
+
+				clocks = <&dispcc DISP_CC_MDSS_BYTE1_CLK>,
+					 <&dispcc DISP_CC_MDSS_BYTE1_INTF_CLK>,

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1128

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+					 <&dispcc DISP_CC_MDSS_PCLK1_CLK>,
+					 <&dispcc DISP_CC_MDSS_ESC1_CLK>,
+					 <&dispcc DISP_CC_MDSS_AHB_CLK>,
+					 <&dispcc DISP_CC_MDSS_AXI_CLK>;
+				clock-names = "byte_clk",
+					      "byte_intf_clk",
+					      "pixel_clk",
+					      "core_clk",
+					      "iface_clk",
+					      "bus_clk";

And here.

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1131

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
+
+				phys = <&dsi1_phy>;
+				phy-names = "dsi-phy";

And here.

Quoted 18 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +18 -0
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				ports {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					port@0 {
+						reg = <0>;
+						dsi1_in: endpoint {
+							remote-endpoint = <&dpu_intf2_out>;
+						};
+					};
+
+					port@1 {
+						reg = <1>;
+						dsi1_out: endpoint {

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1159

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -0
+						};
+					};
+				};
+			};
+
+			dsi1_phy: dsi-phy@ae96400 {
+				compatible = "qcom,dsi-phy-10nm";
+				reg = <0xae96400 0x200>,
+				      <0xae96a00 0x10e>,
+				      <0xae96600 0x280>;

Numerical order would be preferred.

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1106

Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +9 -0
+				reg-names = "dsi_phy",
+					    "dsi_pll",
+					    "dsi_phy_lane";
+
+				#clock-cells = <1>;
+				#phy-cells = <0>;
+
+				clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>;
+				clock-names = "iface_clk";

And one more extension.

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +3 -0
+			};
+		};
+
 		spmi_bus: spmi@c440000 {
 			compatible = "qcom,spmi-pmic-arb";
 			reg = <0xc440000 0x1100>,
Signature · 6 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

A message that is not in the archive (sent off-list or not yet received): 20181128234418.GC17663-9PYrDHPZ2Orvke4nUoYGnHL1okKdlPRT@public.gmane.org

#8 lore raw

Re: [PATCH v3] arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

Hi,

Quoted 31 lines · Jordan Crouse
Quoted 29 lines · Jeykumar Sankaran

DPU is short for the Display Processing Unit. It is the display controller on Qualcomm SDM845 chips.

This change adds MDSS and DSI nodes to enable display on the target device.

Changes in v2:
- Beefed up commit message
- Use SoC specific compatibles for mdss and dpu (Rob H)
- Use assigned-clocks to set initial clock frequency(Rob H)
Changes in v3:
- added IOMMU node
- Fix device naming (remove _phys)
- Use correct IRQ_TYPE in interrupt specifiers

---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 191 +++++++++++++++++++++++++++++++++++
 1 file changed, 191 insertions(+)
arch/arm64/boot/dts/qcom/sdm845.dtsi +0 -0
index 0c9a2aa..dd612ac 100644
@@ -978,6 +978,197 @@
                      #thermal-sensor-cells = <1>;
              };
 
Quoted 9 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 986

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +6 -0
+             mdss: mdss@ae00000 {
+                     compatible = "qcom,sdm845-mdss";
+                     reg = <0xae00000 0x1000>;
+                     reg-names = "mdss";
+
+                     power-domains = <&dispcc 0>;

Would the powers-that-be in the power domain prefer this to have a symbolic value? I see MDSS_GDSC in the bindings header.

You're one patch version behind. Can you look at:

https://patchwork.kernel.org/patch/10666253/ AKA
https://lkml.kernel.org/r/[email protected]

...that addresses the _clk issues and I commented about the #define too.

Quoted 4 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 988

Quoted 2 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +2 -0
+                             phys = <&dsi0_phy>;
+                             phy-names = "dsi-phy";

This too, I reckon.

I didn't notice this one, so it's still "dsi-phy" in v4.

Quoted 7 lines

arch/arm64/boot/dts/qcom/sdm845.dtsi line 1097

Quoted 5 lines
arch/arm64/boot/dts/qcom/sdm845.dtsi +5 -0
+                     dsi0_phy: dsi-phy@ae94400 {
+                             compatible = "qcom,dsi-phy-10nm";
+                             reg = <0xae94400 0x200>,
+                                   <0xae94a00 0x1e0>,
+                                   <0xae94600 0x280>;

I think it would be better if these were in numerical order.

Still broken in v4.

Also Bjorn's thought about adding a 'status = "disabled"' also makes sense.

So I guess it's time for a v5 Jeykumar.

-Doug
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno