diff mbox series

[v3,2/3] arm64: dts: qcom: sm8250-xiaomi-elish-boe: Add mdss and dsi panel

Message ID 20230323005925.23179-2-lujianhua000@gmail.com
State Accepted
Commit 51c4c2bd6f314de8b1bb7b5c949d2432be19d419
Headers show
Series [v3,1/3] arm64: dts: qcom: Split elish dts into common dtsi and elish-boe dts | expand

Commit Message

Jianhua Lu March 23, 2023, 12:59 a.m. UTC
Add nodes for BOE NT36523 panel found in xiaomi-elish. This panel
is a dual dsi mode panel and the dsi phy type is cphy.

Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
---
Changes in v2:
  - Include missing <dt-bindings/phy/phy.h> for phy-type property.

Changes in v3:
  - Sort include header.
  - Move qcom,sync-dual-dsi to the front of qcom,master-dsi 
  - Add newline before subnode.

 .../boot/dts/qcom/sm8250-xiaomi-elish-boe.dts |  5 ++
 .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 75 +++++++++++++++++++
 2 files changed, 80 insertions(+)

Comments

Krzysztof Kozlowski April 8, 2023, 1:04 p.m. UTC | #1
On 23/03/2023 01:59, Jianhua Lu wrote:
> Add nodes for BOE NT36523 panel found in xiaomi-elish. This panel
> is a dual dsi mode panel and the dsi phy type is cphy.
> 
> Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> ---
> Changes in v2:
>   - Include missing <dt-bindings/phy/phy.h> for phy-type property.
> 
> Changes in v3:
>   - Sort include header.
>   - Move qcom,sync-dual-dsi to the front of qcom,master-dsi 
>   - Add newline before subnode.
> 
>  .../boot/dts/qcom/sm8250-xiaomi-elish-boe.dts |  5 ++
>  .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 75 +++++++++++++++++++
>  2 files changed, 80 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
> index bd9ad109daf9..8b2ae39950ff 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
> @@ -11,3 +11,8 @@ / {
>  	model = "Xiaomi Mi Pad 5 Pro (BOE)";
>  	compatible = "xiaomi,elish", "qcom,sm8250";
>  };
> +
> +&display_panel {
> +	compatible = "xiaomi,elish-boe-nt36523";

If you add new bindings and new nodes using these - in this case this
panel - please test it. This is why we have DT schema, so you can verify
your DTS. Sending DTS which is entirely different than the bindings you
sent, is adding quite an effort for us later to fix it.

Best regards,
Krzysztof
Jianhua Lu April 8, 2023, 1:33 p.m. UTC | #2
On Sat, Apr 08, 2023 at 03:04:52PM +0200, Krzysztof Kozlowski wrote:
> On 23/03/2023 01:59, Jianhua Lu wrote:
> > Add nodes for BOE NT36523 panel found in xiaomi-elish. This panel
> > is a dual dsi mode panel and the dsi phy type is cphy.
> > 
> > Signed-off-by: Jianhua Lu <lujianhua000@gmail.com>
> > ---
> > Changes in v2:
> >   - Include missing <dt-bindings/phy/phy.h> for phy-type property.
> > 
> > Changes in v3:
> >   - Sort include header.
> >   - Move qcom,sync-dual-dsi to the front of qcom,master-dsi 
> >   - Add newline before subnode.
> > 
> >  .../boot/dts/qcom/sm8250-xiaomi-elish-boe.dts |  5 ++
> >  .../dts/qcom/sm8250-xiaomi-elish-common.dtsi  | 75 +++++++++++++++++++
> >  2 files changed, 80 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
> > index bd9ad109daf9..8b2ae39950ff 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
> > +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
> > @@ -11,3 +11,8 @@ / {
> >  	model = "Xiaomi Mi Pad 5 Pro (BOE)";
> >  	compatible = "xiaomi,elish", "qcom,sm8250";
> >  };
> > +
> > +&display_panel {
> > +	compatible = "xiaomi,elish-boe-nt36523";
> 
> If you add new bindings and new nodes using these - in this case this
> panel - please test it. This is why we have DT schema, so you can verify
> your DTS. Sending DTS which is entirely different than the bindings you
> sent, is adding quite an effort for us later to fix it.

I apologize for this. I will test it before sending patches next time.
> 
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
index bd9ad109daf9..8b2ae39950ff 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-boe.dts
@@ -11,3 +11,8 @@  / {
 	model = "Xiaomi Mi Pad 5 Pro (BOE)";
 	compatible = "xiaomi,elish", "qcom,sm8250";
 };
+
+&display_panel {
+	compatible = "xiaomi,elish-boe-nt36523";
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
index a43d4b73ffca..4585f61781f1 100644
--- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi
@@ -4,6 +4,7 @@ 
  */
 
 #include <dt-bindings/arm/qcom,ids.h>
+#include <dt-bindings/phy/phy.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sm8250.dtsi"
 #include "pm8150.dtsi"
@@ -469,6 +470,76 @@  &cdsp {
 	status = "okay";
 };
 
+&dsi0 {
+	vdda-supply = <&vreg_l9a_1p2>;
+	qcom,dual-dsi-mode;
+	qcom,sync-dual-dsi;
+	qcom,master-dsi;
+	status = "okay";
+
+	display_panel: panel@0 {
+		reg = <0>;
+		vddio-supply = <&vreg_l14a_1p88>;
+		reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+		backlight = <&backlight>;
+
+		status = "disabled";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				panel_in_0: endpoint {
+					remote-endpoint = <&dsi0_out>;
+				};
+			};
+
+			port@1{
+				reg = <1>;
+
+				panel_in_1: endpoint {
+					remote-endpoint = <&dsi1_out>;
+				};
+			};
+
+		};
+	};
+};
+
+&dsi0_out {
+	data-lanes = <0 1 2>;
+	remote-endpoint = <&panel_in_0>;
+};
+
+&dsi0_phy {
+	vdds-supply = <&vreg_l5a_0p88>;
+	phy-type = <PHY_TYPE_CPHY>;
+	status = "okay";
+};
+
+&dsi1 {
+	vdda-supply = <&vreg_l9a_1p2>;
+	qcom,dual-dsi-mode;
+	qcom,sync-dual-dsi;
+	/* DSI1 is slave, so use DSI0 clocks */
+	assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>;
+	status = "okay";
+};
+
+&dsi1_out {
+	data-lanes = <0 1 2>;
+	remote-endpoint = <&panel_in_1>;
+};
+
+&dsi1_phy {
+	vdds-supply = <&vreg_l5a_0p88>;
+	phy-type = <PHY_TYPE_CPHY>;
+	status = "okay";
+};
+
 &gmu {
 	status = "okay";
 };
@@ -533,6 +604,10 @@  fuel-gauge@55 {
 	};
 };
 
+&mdss {
+	status = "okay";
+};
+
 &pcie0 {
 	status = "okay";
 };