[Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-08-18 Thread Krishna Manikandan
Add mdss and mdp DT nodes for sc7280.

Signed-off-by: Krishna Manikandan 
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 85 
 1 file changed, 85 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 53a21d0..fd7ff1c 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -5,6 +5,7 @@
  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -1424,6 +1425,90 @@
#power-domain-cells = <1>;
};
 
+   mdss: mdss@ae0 {
+   compatible = "qcom,sc7280-mdss";
+   reg = <0 0x0ae0 0 0x1000>;
+   reg-names = "mdss";
+
+   power-domains = <&dispcc DISP_CC_MDSS_CORE_GDSC>;
+
+   clocks = <&gcc GCC_DISP_AHB_CLK>,
+<&dispcc DISP_CC_MDSS_AHB_CLK>,
+   <&dispcc DISP_CC_MDSS_MDP_CLK>;
+   clock-names = "iface", "ahb", "core";
+
+   assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>;
+   assigned-clock-rates = <3>;
+
+   interrupts = ;
+   interrupt-controller;
+   #interrupt-cells = <1>;
+
+   interconnects = <&mmss_noc MASTER_MDP0 0 &mc_virt 
SLAVE_EBI1 0>;
+   interconnect-names = "mdp0-mem";
+
+   iommus = <&apps_smmu 0x900 0x402>;
+
+   #address-cells = <2>;
+   #size-cells = <2>;
+   ranges;
+
+   status = "disabled";
+
+   mdp: mdp@ae01000 {
+   compatible = "qcom,sc7280-dpu";
+   reg = <0 0x0ae01000 0 0x8f030>,
+   <0 0x0aeb 0 0x2008>;
+   reg-names = "mdp", "vbif";
+
+   clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+   <&gcc GCC_DISP_SF_AXI_CLK>,
+   <&dispcc DISP_CC_MDSS_AHB_CLK>,
+   <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+   <&dispcc DISP_CC_MDSS_MDP_CLK>,
+   <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+   clock-names = "bus", "nrt_bus", "iface", "lut", 
"core",
+ "vsync";
+   assigned-clocks = <&dispcc 
DISP_CC_MDSS_MDP_CLK>,
+   <&dispcc 
DISP_CC_MDSS_VSYNC_CLK>,
+   <&dispcc DISP_CC_MDSS_AHB_CLK>;
+   assigned-clock-rates = <3>,
+   <1920>,
+   <1920>;
+   operating-points-v2 = <&mdp_opp_table>;
+   power-domains = <&rpmhpd SC7280_CX>;
+
+   interrupt-parent = <&mdss>;
+   interrupts = <0>;
+
+   status = "disabled";
+
+   mdp_opp_table: mdp-opp-table {
+   compatible = "operating-points-v2";
+
+   opp-2 {
+   opp-hz = /bits/ 64 <2>;
+   required-opps = 
<&rpmhpd_opp_low_svs>;
+   };
+
+   opp-3 {
+   opp-hz = /bits/ 64 <3>;
+   required-opps = 
<&rpmhpd_opp_svs>;
+   };
+
+   opp-38000 {
+   opp-hz = /bits/ 64 <38000>;
+   required-opps = 
<&rpmhpd_opp_svs_l1>;
+   };
+
+   opp-50667 {
+   opp-hz = /bits/ 64 <50667>;
+   required-opps = 
<&rpmhpd_opp_nom>;
+   };
+   };
+   };
+   };
+
pdc: interrupt-controller@b22 {
compatible = "qcom,sc7280-pdc", "qcom,pdc";
reg = <0 0x0b22 0 0x3>;
-- 
2.7.4



Re: [Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-08-18 Thread Stephen Boyd
Quoting Krishna Manikandan (2021-08-18 03:27:02)
> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
> b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> index 53a21d0..fd7ff1c 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> @@ -5,6 +5,7 @@
>   * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
>   */
>
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -1424,6 +1425,90 @@
> #power-domain-cells = <1>;
> };
>
> +   mdss: mdss@ae0 {

subsystem@ae0

> +   compatible = "qcom,sc7280-mdss";
> +   reg = <0 0x0ae0 0 0x1000>;
> +   reg-names = "mdss";
> +
> +   power-domains = <&dispcc DISP_CC_MDSS_CORE_GDSC>;
> +
> +   clocks = <&gcc GCC_DISP_AHB_CLK>,
> +<&dispcc DISP_CC_MDSS_AHB_CLK>,
> +   <&dispcc DISP_CC_MDSS_MDP_CLK>;
> +   clock-names = "iface", "ahb", "core";
> +
> +   assigned-clocks = <&dispcc DISP_CC_MDSS_MDP_CLK>;
> +   assigned-clock-rates = <3>;
> +
> +   interrupts = ;
> +   interrupt-controller;
> +   #interrupt-cells = <1>;
> +
> +   interconnects = <&mmss_noc MASTER_MDP0 0 &mc_virt 
> SLAVE_EBI1 0>;
> +   interconnect-names = "mdp0-mem";
> +
> +   iommus = <&apps_smmu 0x900 0x402>;
> +
> +   #address-cells = <2>;
> +   #size-cells = <2>;
> +   ranges;
> +
> +   status = "disabled";
> +
> +   mdp: mdp@ae01000 {

display-controller@ae01000

> +   compatible = "qcom,sc7280-dpu";
> +   reg = <0 0x0ae01000 0 0x8f030>,
> +   <0 0x0aeb 0 0x2008>;
> +   reg-names = "mdp", "vbif";
> +
> +   clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
> +   <&gcc GCC_DISP_SF_AXI_CLK>,
> +   <&dispcc DISP_CC_MDSS_AHB_CLK>,
> +   <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
> +   <&dispcc DISP_CC_MDSS_MDP_CLK>,
> +   <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
> +   clock-names = "bus", "nrt_bus", "iface", 
> "lut", "core",
> + "vsync";

One line per string please.

> +   assigned-clocks = <&dispcc 
> DISP_CC_MDSS_MDP_CLK>,
> +   <&dispcc 
> DISP_CC_MDSS_VSYNC_CLK>,
> +   <&dispcc 
> DISP_CC_MDSS_AHB_CLK>;
> +   assigned-clock-rates = <3>,
> +   <1920>,
> +   <1920>;
> +   operating-points-v2 = <&mdp_opp_table>;
> +   power-domains = <&rpmhpd SC7280_CX>;
> +
> +   interrupt-parent = <&mdss>;
> +   interrupts = <0>;
> +
> +   status = "disabled";
> +
> +   mdp_opp_table: mdp-opp-table {

mdp_opp_table: opp-table {

> +   compatible = "operating-points-v2";
> +
> +   opp-2 {
> +   opp-hz = /bits/ 64 
> <2>;
> +   required-opps = 
> <&rpmhpd_opp_low_svs>;
> +   };
> +
> +   opp-3 {
> +   opp-hz = /bits/ 64 
> <3>;
> +   required-opps = 
> <&rpmhpd_opp_svs>;
> +   };
> +
> +   opp-38000 {
> +   opp-hz = /bits/ 64 
> <38000>;
> +   required-opps = 
> <&rpmhpd_opp_svs_l1>;
> +   };
> +
> +   opp-50667 {
> +   opp-hz = /bits/ 64 
> <50667>;
> +   required-opps = 
> <&rpmhpd_opp_nom>;
> +   };
> +   };
> +   };
> +   };
> +


Re: [Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-09-30 Thread mkrishn

On 2021-08-19 01:27, Stephen Boyd wrote:

Quoting Krishna Manikandan (2021-08-18 03:27:02)
diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi 
b/arch/arm64/boot/dts/qcom/sc7280.dtsi

index 53a21d0..fd7ff1c 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -5,6 +5,7 @@
  * Copyright (c) 2020-2021, The Linux Foundation. All rights 
reserved.

  */

+#include 
 #include 
 #include 
 #include 
@@ -1424,6 +1425,90 @@
#power-domain-cells = <1>;
};

+   mdss: mdss@ae0 {


subsystem@ae0


+   compatible = "qcom,sc7280-mdss";
+   reg = <0 0x0ae0 0 0x1000>;
+   reg-names = "mdss";
+
+   power-domains = <&dispcc 
DISP_CC_MDSS_CORE_GDSC>;

+
+   clocks = <&gcc GCC_DISP_AHB_CLK>,
+<&dispcc DISP_CC_MDSS_AHB_CLK>,
+   <&dispcc DISP_CC_MDSS_MDP_CLK>;
+   clock-names = "iface", "ahb", "core";
+
+   assigned-clocks = <&dispcc 
DISP_CC_MDSS_MDP_CLK>;

+   assigned-clock-rates = <3>;
+
+   interrupts = ;
+   interrupt-controller;
+   #interrupt-cells = <1>;
+
+   interconnects = <&mmss_noc MASTER_MDP0 0 
&mc_virt SLAVE_EBI1 0>;

+   interconnect-names = "mdp0-mem";
+
+   iommus = <&apps_smmu 0x900 0x402>;
+
+   #address-cells = <2>;
+   #size-cells = <2>;
+   ranges;
+
+   status = "disabled";
+
+   mdp: mdp@ae01000 {


display-controller@ae01000


Stephen,
   In the current driver code, there is a substring comparison for "mdp" 
in device node name as part of probe sequence. If "mdp" is not present 
in the node name, it will
   return an error resulting in probe failure. Can we continue using mdp 
as nodename instead of display controller?


Thanks,
Krishna





+   compatible = "qcom,sc7280-dpu";
+   reg = <0 0x0ae01000 0 0x8f030>,
+   <0 0x0aeb 0 0x2008>;
+   reg-names = "mdp", "vbif";
+
+   clocks = <&gcc GCC_DISP_HF_AXI_CLK>,
+   <&gcc GCC_DISP_SF_AXI_CLK>,
+   <&dispcc 
DISP_CC_MDSS_AHB_CLK>,
+   <&dispcc 
DISP_CC_MDSS_MDP_LUT_CLK>,
+   <&dispcc 
DISP_CC_MDSS_MDP_CLK>,
+   <&dispcc 
DISP_CC_MDSS_VSYNC_CLK>;
+   clock-names = "bus", "nrt_bus", 
"iface", "lut", "core",

+ "vsync";


One line per string please.

+   assigned-clocks = <&dispcc 
DISP_CC_MDSS_MDP_CLK>,
+   <&dispcc 
DISP_CC_MDSS_VSYNC_CLK>,
+   <&dispcc 
DISP_CC_MDSS_AHB_CLK>;

+   assigned-clock-rates = <3>,
+   <1920>,
+   <1920>;
+   operating-points-v2 = 
<&mdp_opp_table>;

+   power-domains = <&rpmhpd SC7280_CX>;
+
+   interrupt-parent = <&mdss>;
+   interrupts = <0>;
+
+   status = "disabled";
+
+   mdp_opp_table: mdp-opp-table {


mdp_opp_table: opp-table {

+   compatible = 
"operating-points-v2";

+
+   opp-2 {
+   opp-hz = /bits/ 64 
<2>;
+   required-opps = 
<&rpmhpd_opp_low_svs>;

+   };
+
+   opp-3 {
+   opp-hz = /bits/ 64 
<3>;
+   required-opps = 
<&rpmhpd_opp_svs>;

+   };
+
+   opp-38000 {
+   opp-hz = /bits/ 64 
<38000>;
+   required-opps = 
<&rpmhpd_opp_svs_l1>;

+   };
+
+   opp-50667 {
+   opp-hz = /bits/ 64 
<50667>;
+   required-opps = 
<&rpmhpd_opp_nom>;

+  

Re: [Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-09-30 Thread Stephen Boyd
Quoting mkri...@codeaurora.org (2021-09-30 04:56:59)
> On 2021-08-19 01:27, Stephen Boyd wrote:
> > Quoting Krishna Manikandan (2021-08-18 03:27:02)
> >> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> index 53a21d0..fd7ff1c 100644
> >> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> +
> >> +   status = "disabled";
> >> +
> >> +   mdp: mdp@ae01000 {
> >
> > display-controller@ae01000
>
> Stephen,
> In the current driver code, there is a substring comparison for "mdp"
> in device node name as part of probe sequence. If "mdp" is not present
> in the node name, it will
> return an error resulting in probe failure. Can we continue using mdp
> as nodename instead of display controller?
>

Can we fix the driver to not look for node names and look for compatible
strings instead? It took me a minute to find compare_name_mdp() in
drivers/gpu/drm/msm/msm_drv.c to understand what you're talking about.
Perhaps looking for qcom,mdp5 in there will be sufficient instead of
looking at the node name.


Re: [Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-09-30 Thread mkrishn

On 2021-09-30 23:28, Stephen Boyd wrote:

Quoting mkri...@codeaurora.org (2021-09-30 04:56:59)

On 2021-08-19 01:27, Stephen Boyd wrote:
> Quoting Krishna Manikandan (2021-08-18 03:27:02)
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> index 53a21d0..fd7ff1c 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> +
>> +   status = "disabled";
>> +
>> +   mdp: mdp@ae01000 {
>
> display-controller@ae01000

Stephen,
In the current driver code, there is a substring comparison for 
"mdp"

in device node name as part of probe sequence. If "mdp" is not present
in the node name, it will
return an error resulting in probe failure. Can we continue using 
mdp

as nodename instead of display controller?



Can we fix the driver to not look for node names and look for 
compatible

strings instead? It took me a minute to find compare_name_mdp() in
drivers/gpu/drm/msm/msm_drv.c to understand what you're talking about.
Perhaps looking for qcom,mdp5 in there will be sufficient instead of
looking at the node name.


Sure Stephen. I will make the necessary changes in msm_drv.c to look for 
compatible string instead of node name.
Can I include these two changes (changing mdp--> display controller and 
msm_drv.c changes) in a separate series ?


Thanks,
Krishna


Re: [Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-10-04 Thread Stephen Boyd
Quoting mkri...@codeaurora.org (2021-09-30 23:39:07)
> On 2021-09-30 23:28, Stephen Boyd wrote:
> > Quoting mkri...@codeaurora.org (2021-09-30 04:56:59)
> >> On 2021-08-19 01:27, Stephen Boyd wrote:
> >> > Quoting Krishna Manikandan (2021-08-18 03:27:02)
> >> >> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> >> b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> >> index 53a21d0..fd7ff1c 100644
> >> >> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> >> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> >> >> +
> >> >> +   status = "disabled";
> >> >> +
> >> >> +   mdp: mdp@ae01000 {
> >> >
> >> > display-controller@ae01000
> >>
> >> Stephen,
> >> In the current driver code, there is a substring comparison for
> >> "mdp"
> >> in device node name as part of probe sequence. If "mdp" is not present
> >> in the node name, it will
> >> return an error resulting in probe failure. Can we continue using
> >> mdp
> >> as nodename instead of display controller?
> >>
> >
> > Can we fix the driver to not look for node names and look for
> > compatible
> > strings instead? It took me a minute to find compare_name_mdp() in
> > drivers/gpu/drm/msm/msm_drv.c to understand what you're talking about.
> > Perhaps looking for qcom,mdp5 in there will be sufficient instead of
> > looking at the node name.
>
> Sure Stephen. I will make the necessary changes in msm_drv.c to look for
> compatible string instead of node name.
> Can I include these two changes (changing mdp--> display controller and
> msm_drv.c changes) in a separate series ?
>

Sure. So you'll send the drm driver change now and we'll get the DT
change after that with the more generic node name?


Re: [Freedreno] [PATCH v1 2/4] arm64: dts: qcom: sc7280: add display dt nodes

2021-10-05 Thread mkrishn

On 2021-10-05 07:21, Stephen Boyd wrote:

Quoting mkri...@codeaurora.org (2021-09-30 23:39:07)

On 2021-09-30 23:28, Stephen Boyd wrote:
> Quoting mkri...@codeaurora.org (2021-09-30 04:56:59)
>> On 2021-08-19 01:27, Stephen Boyd wrote:
>> > Quoting Krishna Manikandan (2021-08-18 03:27:02)
>> >> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> >> b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> >> index 53a21d0..fd7ff1c 100644
>> >> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> >> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> >> +
>> >> +   status = "disabled";
>> >> +
>> >> +   mdp: mdp@ae01000 {
>> >
>> > display-controller@ae01000
>>
>> Stephen,
>> In the current driver code, there is a substring comparison for
>> "mdp"
>> in device node name as part of probe sequence. If "mdp" is not present
>> in the node name, it will
>> return an error resulting in probe failure. Can we continue using
>> mdp
>> as nodename instead of display controller?
>>
>
> Can we fix the driver to not look for node names and look for
> compatible
> strings instead? It took me a minute to find compare_name_mdp() in
> drivers/gpu/drm/msm/msm_drv.c to understand what you're talking about.
> Perhaps looking for qcom,mdp5 in there will be sufficient instead of
> looking at the node name.

Sure Stephen. I will make the necessary changes in msm_drv.c to look 
for

compatible string instead of node name.
Can I include these two changes (changing mdp--> display controller 
and

msm_drv.c changes) in a separate series ?



Sure. So you'll send the drm driver change now and we'll get the DT
change after that with the more generic node name?


Yes Stephen.I have raised the change to fix the driver issue.
https://patchwork.kernel.org/project/linux-arm-msm/patch/1633427071-19523-1-git-send-email-mkri...@codeaurora.org/

Regards,
Krishna