Message ID | 20240729205726.7923-2-robdclark@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [v3,1/2] dt-bindings: display: panel: samsung,atna45dc02: Document ATNA45DC02 | expand |
On Mon, Jul 29, 2024 at 01:57:25PM -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> > Reviewed-by: Abel Vesa <abel.vesa@linaro.org> > --- > Note that the power-source differs from the CRD. Figured that out by > diffing $debugfs/gpio. > > .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 17 +++++++++++++++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > 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 70977e9fa266..6f8d52c368a4 100644 > --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > [...] > @@ -669,6 +672,16 @@ &pcie6a_phy { > status = "okay"; > }; > > +&pmc8380_3_gpios { > + edp_bl_en: edp-bl-en-state { > + pins = "gpio4"; > + function = "normal"; > + power-source = <0>; /* 1.8V */ Hm, are you sure the firmware sets it like this? power-source = <0> is typically VPH, i.e. the main battery supply voltage or similar. This will definitely be higher than 1.8V. It seems a bit odd to use a variable voltage source for a GPIO... Thanks, Stephan
On Tue, Jul 30, 2024 at 3:00 AM Stephan Gerhold <stephan.gerhold@linaro.org> wrote: > > On Mon, Jul 29, 2024 at 01:57:25PM -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> > > Reviewed-by: Abel Vesa <abel.vesa@linaro.org> > > --- > > Note that the power-source differs from the CRD. Figured that out by > > diffing $debugfs/gpio. > > > > .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 17 +++++++++++++++-- > > 1 file changed, 15 insertions(+), 2 deletions(-) > > > > 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 70977e9fa266..6f8d52c368a4 100644 > > --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > > +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > > [...] > > @@ -669,6 +672,16 @@ &pcie6a_phy { > > status = "okay"; > > }; > > > > +&pmc8380_3_gpios { > > + edp_bl_en: edp-bl-en-state { > > + pins = "gpio4"; > > + function = "normal"; > > + power-source = <0>; /* 1.8V */ > > Hm, are you sure the firmware sets it like this? > > power-source = <0> is typically VPH, i.e. the main battery supply > voltage or similar. This will definitely be higher than 1.8V. It seems a > bit odd to use a variable voltage source for a GPIO... :shrug: Board level stuff is a bit outside my area of expertise, but it's what made /sys/kernel/debug/gpio match for gpiochip3 gpio4 and it's what made the panel work. Using <1> resulted in a black screen. AFAIU Srini has a yoga 7x as well, and perhaps knows how to read ACPI better than I do, so maybe he can double check. BR, -R > Thanks, > Stephan
On Tue, Jul 30, 2024 at 07:26:27AM -0700, Rob Clark wrote: > On Tue, Jul 30, 2024 at 3:00 AM Stephan Gerhold > <stephan.gerhold@linaro.org> wrote: > > > > On Mon, Jul 29, 2024 at 01:57:25PM -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> > > > Reviewed-by: Abel Vesa <abel.vesa@linaro.org> > > > --- > > > Note that the power-source differs from the CRD. Figured that out by > > > diffing $debugfs/gpio. > > > > > > .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 17 +++++++++++++++-- > > > 1 file changed, 15 insertions(+), 2 deletions(-) > > > > > > 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 70977e9fa266..6f8d52c368a4 100644 > > > --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > > > +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > > > [...] > > > @@ -669,6 +672,16 @@ &pcie6a_phy { > > > status = "okay"; > > > }; > > > > > > +&pmc8380_3_gpios { > > > + edp_bl_en: edp-bl-en-state { > > > + pins = "gpio4"; > > > + function = "normal"; > > > + power-source = <0>; /* 1.8V */ > > > > Hm, are you sure the firmware sets it like this? > > > > power-source = <0> is typically VPH, i.e. the main battery supply > > voltage or similar. This will definitely be higher than 1.8V. It seems a > > bit odd to use a variable voltage source for a GPIO... > > :shrug: > > Board level stuff is a bit outside my area of expertise, but it's what > made /sys/kernel/debug/gpio match for gpiochip3 gpio4 and it's what > made the panel work. Using <1> resulted in a black screen. > > AFAIU Srini has a yoga 7x as well, and perhaps knows how to read ACPI > better than I do, so maybe he can double check. > It looks like you're right, I think ACPI also configures power-source = <0>. Can you just remove the 1.8V comment then? I'm pretty sure it's not 1.8V. Thanks, Stephan
On Tue, Jul 30, 2024 at 12:00:13PM GMT, Stephan Gerhold wrote: > On Mon, Jul 29, 2024 at 01:57:25PM -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> > > Reviewed-by: Abel Vesa <abel.vesa@linaro.org> > > --- > > Note that the power-source differs from the CRD. Figured that out by > > diffing $debugfs/gpio. > > > > .../dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 17 +++++++++++++++-- > > 1 file changed, 15 insertions(+), 2 deletions(-) > > > > 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 70977e9fa266..6f8d52c368a4 100644 > > --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > > +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts > > [...] > > @@ -669,6 +672,16 @@ &pcie6a_phy { > > status = "okay"; > > }; > > > > +&pmc8380_3_gpios { > > + edp_bl_en: edp-bl-en-state { > > + pins = "gpio4"; > > + function = "normal"; > > + power-source = <0>; /* 1.8V */ > > Hm, are you sure the firmware sets it like this? > > power-source = <0> is typically VPH, i.e. the main battery supply > voltage or similar. This will definitely be higher than 1.8V. It seems a > bit odd to use a variable voltage source for a GPIO... As you've mentioned it. Please use defined values rather than just <0> for power-source property.
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 70977e9fa266..6f8d52c368a4 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts @@ -190,7 +190,6 @@ vreg_edp_3p3: regulator-edp-3p3 { pinctrl-0 = <&edp_reg_en>; pinctrl-names = "default"; - regulator-always-on; regulator-boot-on; }; @@ -592,9 +591,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>; @@ -669,6 +672,16 @@ &pcie6a_phy { status = "okay"; }; +&pmc8380_3_gpios { + edp_bl_en: edp-bl-en-state { + pins = "gpio4"; + function = "normal"; + power-source = <0>; /* 1.8V */ + input-disable; + output-enable; + }; +}; + &qupv3_0 { status = "okay"; };