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

2018-12-04 Thread Doug Anderson
Hi,

On Tue, Dec 4, 2018 at 3:54 PM Jeykumar Sankaran  wrote:
>
> 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
> Changes in v4:
>  - move mdss node to preserve the unit address sort order
>  - remove _clk suffix from dsi clocks
>  (both the comments are from Doug Anderson)
> Changes in v5:
> - Keep the device status "disabled" by default (Bjorn Andersson)
> - Use MDSS_GDSC macro (Jordan)
> - Fix phy-names (Jordan)
> - List reg ranges in numerical order (Jordan)
> Changes in v6:
> - Separating this patch out of the series
> - fix phy-names
>
> Signed-off-by: Jeykumar Sankaran 
> Signed-off-by: Sean Paul 
> ---
>  arch/arm64/boot/dts/qcom/sdm845.dtsi | 203 
> +++
>  1 file changed, 203 insertions(+)

With my admittedly limited understanding of the device tree for
graphics, this looks good to me.

Reviewed-by: Douglas Anderson 

...this works for me on sdm845-cheza.  Specifically I tested it on our
4.19 branch which has some display backports and a few picks from the
mailing list.  Anyone specifically interested in the tree I tested
with can see https://crrev.com/c/1327901, which includes this patch.
Thus:

Tested-by: Douglas Anderson 
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno


[Freedreno] [PATCH v6] arm64: dts: qcom: sdm845: Add dpu to sdm845 dts file

2018-12-04 Thread 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
Changes in v4:
 - move mdss node to preserve the unit address sort order
 - remove _clk suffix from dsi clocks
 (both the comments are from Doug Anderson)
Changes in v5:
- Keep the device status "disabled" by default (Bjorn Andersson)
- Use MDSS_GDSC macro (Jordan)
- Fix phy-names (Jordan)
- List reg ranges in numerical order (Jordan)
Changes in v6:
- Separating this patch out of the series
- fix phy-names

Signed-off-by: Jeykumar Sankaran 
Signed-off-by: Sean Paul 
---
 arch/arm64/boot/dts/qcom/sdm845.dtsi | 203 +++
 1 file changed, 203 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi 
b/arch/arm64/boot/dts/qcom/sdm845.dtsi
index 1419b00..fa7023e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi
@@ -1256,6 +1256,209 @@
};
};
 
+   mdss: mdss@ae0 {
+   compatible = "qcom,sdm845-mdss";
+   reg = <0xae0 0x1000>;
+   reg-names = "mdss";
+
+   power-domains = <&dispcc MDSS_GDSC>;
+
+   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 = <3>;
+
+   interrupts = ;
+   interrupt-controller;
+   #interrupt-cells = <1>;
+
+   iommus = <&apps_smmu 0x880 0x8>,
+<&apps_smmu 0xc80 0x8>;
+
+   status = "disabled";
+
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges;
+
+   mdss_mdp: mdp@ae01000 {
+   compatible = "qcom,sdm845-dpu";
+   reg = <0x0ae01000 0x8f000>,
+ <0x0aeb 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 = <3>,
+  <1920>;
+
+   interrupt-parent = <&mdss>;
+   interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
+
+   status = "disabled";
+
+   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>;
+
+