diff mbox series

[v2,2/2] arm64: dts: qcom: x1e80100-yoga: Update panel bindings

Message ID 20240719185250.4877-2-robdclark@gmail.com
State New
Headers show
Series [v2,1/2] dt-bindings: display: panel: samsung,atna45dc02: Document ATNA45DC02 | expand

Commit Message

Rob Clark July 19, 2024, 6:52 p.m. UTC
From: Rob Clark <robdclark@chromium.org>

Use the correct panel compatible, and wire up enable-gpio.  It is wired
up in the same way as the x1e80100-crd.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts   | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Abel Vesa July 21, 2024, 4:27 p.m. UTC | #1
On 24-07-19 11:52:50, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
> 
> Use the correct panel compatible, and wire up enable-gpio.  It is wired
> up in the same way as the x1e80100-crd.
> 
> Signed-off-by: Rob Clark <robdclark@chromium.org>

Reviewed-by: Abel Vesa <abel.vesa@linaro.org>

> ---
>  .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts   | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> index f569f0fbd1fc..28a6ea5a24fd 100644
> --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> @@ -592,9 +592,13 @@ &mdss_dp3 {
>  
>  	aux-bus {
>  		panel {
> -			compatible = "edp-panel";
> +			compatible = "samsung,atna45dc02", "samsung,atna33xc20";
> +			enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
>  			power-supply = <&vreg_edp_3p3>;
>  
> +			pinctrl-0 = <&edp_bl_en>;
> +			pinctrl-names = "default";
> +
>  			port {
>  				edp_panel_in: endpoint {
>  					remote-endpoint = <&mdss_dp3_out>;
> @@ -663,6 +667,13 @@ &pcie6a_phy {
>  	status = "okay";
>  };
>  
> +&pmc8380_3_gpios {
> +	edp_bl_en: edp-bl-en-state {
> +		pins = "gpio4";
> +		function = "normal";
> +	};
> +};
> +
>  &qupv3_0 {
>  	status = "okay";
>  };
> -- 
> 2.45.2
>
Stephan Gerhold July 22, 2024, 7:15 a.m. UTC | #2
On Fri, Jul 19, 2024 at 11:52:50AM -0700, Rob Clark wrote:
> From: Rob Clark <robdclark@chromium.org>
> 
> Use the correct panel compatible, and wire up enable-gpio.  It is wired
> up in the same way as the x1e80100-crd.
> 
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
>  .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts   | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> index f569f0fbd1fc..28a6ea5a24fd 100644
> --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> @@ -592,9 +592,13 @@ &mdss_dp3 {
>  
>  	aux-bus {
>  		panel {
> -			compatible = "edp-panel";
> +			compatible = "samsung,atna45dc02", "samsung,atna33xc20";
> +			enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
>  			power-supply = <&vreg_edp_3p3>;
>  
> +			pinctrl-0 = <&edp_bl_en>;
> +			pinctrl-names = "default";
> +
>  			port {
>  				edp_panel_in: endpoint {
>  					remote-endpoint = <&mdss_dp3_out>;
> @@ -663,6 +667,13 @@ &pcie6a_phy {
>  	status = "okay";
>  };
>  
> +&pmc8380_3_gpios {
> +	edp_bl_en: edp-bl-en-state {
> +		pins = "gpio4";
> +		function = "normal";
> +	};

Did you omit the "power-source" here on purpose? It works without
because the firmware already configures this pin, but ideally we should
provide the full configuration.

In /sys/kernel/debug/gpio you can check how the firmware has configured
the pin. It is probably exactly the same as for the CRD.

Thanks,
Stephan
Rob Clark July 22, 2024, 2:37 p.m. UTC | #3
On Mon, Jul 22, 2024 at 12:15 AM Stephan Gerhold
<stephan.gerhold@linaro.org> wrote:
>
> On Fri, Jul 19, 2024 at 11:52:50AM -0700, Rob Clark wrote:
> > From: Rob Clark <robdclark@chromium.org>
> >
> > Use the correct panel compatible, and wire up enable-gpio.  It is wired
> > up in the same way as the x1e80100-crd.
> >
> > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > ---
> >  .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts   | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> > index f569f0fbd1fc..28a6ea5a24fd 100644
> > --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> > +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> > @@ -592,9 +592,13 @@ &mdss_dp3 {
> >
> >       aux-bus {
> >               panel {
> > -                     compatible = "edp-panel";
> > +                     compatible = "samsung,atna45dc02", "samsung,atna33xc20";
> > +                     enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
> >                       power-supply = <&vreg_edp_3p3>;
> >
> > +                     pinctrl-0 = <&edp_bl_en>;
> > +                     pinctrl-names = "default";
> > +
> >                       port {
> >                               edp_panel_in: endpoint {
> >                                       remote-endpoint = <&mdss_dp3_out>;
> > @@ -663,6 +667,13 @@ &pcie6a_phy {
> >       status = "okay";
> >  };
> >
> > +&pmc8380_3_gpios {
> > +     edp_bl_en: edp-bl-en-state {
> > +             pins = "gpio4";
> > +             function = "normal";
> > +     };
>
> Did you omit the "power-source" here on purpose? It works without
> because the firmware already configures this pin, but ideally we should
> provide the full configuration.

I just copied the CRD.. other than the panel, things appear to be
wired up in the same way.

BR,
-R

> In /sys/kernel/debug/gpio you can check how the firmware has configured
> the pin. It is probably exactly the same as for the CRD.
>
> Thanks,
> Stephan
Stephan Gerhold July 22, 2024, 2:40 p.m. UTC | #4
On Mon, Jul 22, 2024 at 07:37:05AM -0700, Rob Clark wrote:
> On Mon, Jul 22, 2024 at 12:15 AM Stephan Gerhold
> <stephan.gerhold@linaro.org> wrote:
> >
> > On Fri, Jul 19, 2024 at 11:52:50AM -0700, Rob Clark wrote:
> > > From: Rob Clark <robdclark@chromium.org>
> > >
> > > Use the correct panel compatible, and wire up enable-gpio.  It is wired
> > > up in the same way as the x1e80100-crd.
> > >
> > > Signed-off-by: Rob Clark <robdclark@chromium.org>
> > > ---
> > >  .../boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts   | 13 ++++++++++++-
> > >  1 file changed, 12 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> > > index f569f0fbd1fc..28a6ea5a24fd 100644
> > > --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> > > +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
> > > @@ -592,9 +592,13 @@ &mdss_dp3 {
> > >
> > >       aux-bus {
> > >               panel {
> > > -                     compatible = "edp-panel";
> > > +                     compatible = "samsung,atna45dc02", "samsung,atna33xc20";
> > > +                     enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
> > >                       power-supply = <&vreg_edp_3p3>;
> > >
> > > +                     pinctrl-0 = <&edp_bl_en>;
> > > +                     pinctrl-names = "default";
> > > +
> > >                       port {
> > >                               edp_panel_in: endpoint {
> > >                                       remote-endpoint = <&mdss_dp3_out>;
> > > @@ -663,6 +667,13 @@ &pcie6a_phy {
> > >       status = "okay";
> > >  };
> > >
> > > +&pmc8380_3_gpios {
> > > +     edp_bl_en: edp-bl-en-state {
> > > +             pins = "gpio4";
> > > +             function = "normal";
> > > +     };
> >
> > Did you omit the "power-source" here on purpose? It works without
> > because the firmware already configures this pin, but ideally we should
> > provide the full configuration.
> 
> I just copied the CRD.. other than the panel, things appear to be
> wired up in the same way.
> 

It looks like Abel has an older version of my patch in his tree. The
patch that I sent upstream has the "power-source":

https://lore.kernel.org/linux-arm-msm/20240715-x1e80100-crd-backlight-v2-3-31b7f2f658a3@linaro.org/

Can you copy it from there?

Thanks,
Stephan
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index f569f0fbd1fc..28a6ea5a24fd 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -592,9 +592,13 @@  &mdss_dp3 {
 
 	aux-bus {
 		panel {
-			compatible = "edp-panel";
+			compatible = "samsung,atna45dc02", "samsung,atna33xc20";
+			enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
 			power-supply = <&vreg_edp_3p3>;
 
+			pinctrl-0 = <&edp_bl_en>;
+			pinctrl-names = "default";
+
 			port {
 				edp_panel_in: endpoint {
 					remote-endpoint = <&mdss_dp3_out>;
@@ -663,6 +667,13 @@  &pcie6a_phy {
 	status = "okay";
 };
 
+&pmc8380_3_gpios {
+	edp_bl_en: edp-bl-en-state {
+		pins = "gpio4";
+		function = "normal";
+	};
+};
+
 &qupv3_0 {
 	status = "okay";
 };