mbox series

[v2,0/4] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6

Message ID 20250325-wip-obbardc-qcom-t14s-oled-panel-v2-0-e9bc7c9d30cc@linaro.org
Headers show
Series Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 | expand

Message

Christopher Obbard March 25, 2025, 7:21 p.m. UTC
The Snapdragon Lenovo T14s Gen6 can be bought with a number of different
panels. This patch series adds support for the OLED model which has a
Samsung ATNA40YK20 panel.

The first patch documents the panel in the existing driver.

The second patch adds the missing HPD gpio to the T14s devicetree. I
think that this patch could be split into two; one patch for the pinctrl
addition and one patch for adding the hpd-gpio property to the T14s
panel. But that can come in V3.

The third patch adds the eDP panel to the T14s OLED devicetree.

The fourth (and final) patch works around a problem when reading the
eDP panel's maximum backlight value. Without this patch, the maximum
brightness is detected as 0, thus meaning the backlight is never enabled.
I expect this patch to need a few rounds of rework/testing on other
devices!

The raw EDID of the panel is:

00 ff ff ff ff ff ff 00 4c 83 9f 41 00 00 00 00
00 21 01 04 b5 1e 13 78 02 0c f1 ae 52 3c b9 23
0c 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 ca fe 40 64 b0 08 18 70 20 08
88 00 2e bd 10 00 00 1b ca fe 40 64 b0 08 38 77
08 20 88 00 2e bd 10 00 00 1b 00 00 00 fe 00 53
44 43 20 20 20 20 20 20 20 20 20 20 00 00 00 fe
00 41 54 4e 41 34 30 59 4b 32 30 2d 30 20 01 cf
02 03 0f 00 e3 05 80 00 e6 06 05 01 74 60 07 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b7

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
---
Changes in v2:
- Use the existing atna33xc20 driver rather than panel-edp.
- Add eDP panel into OLED devicetree.
- Add patch to read the correct maximum brightness from the eDP panel.
- Link to v1: https://lore.kernel.org/r/20250320-wip-obbardc-qcom-t14s-oled-panel-v1-1-05bc4bdcd82a@linaro.org

---
Christopher Obbard (4):
      dt-bindings: display: panel: samsung,atna40yk20: document ATNA40YK20
      arm64: dts: qcom: x1e78100-t14s: add hpd gpio to LCD panel
      arm64: dts: qcom: x1e78100-t14s-oled: add eDP panel
      drm/dp: fallback to maximum when PWM bit count is zero

 .../bindings/display/panel/samsung,atna33xc20.yaml |  2 +
 .../qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts    | 10 +++++
 .../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi    | 11 +++++
 drivers/gpu/drm/display/drm_dp_helper.c            | 51 ++++++++++++++--------
 4 files changed, 57 insertions(+), 17 deletions(-)
---
base-commit: b6ae34803e82511009e2b78dc4fd154330ecdc2d
change-id: 20250320-wip-obbardc-qcom-t14s-oled-panel-b74fed21d600

Best regards,

Comments

Dmitry Baryshkov March 25, 2025, 10:58 p.m. UTC | #1
On 25/03/2025 21:21, Christopher Obbard wrote:
> Add the Samsung ATNA40YK20 eDP panel to the device tree for the
> Snapdragon T14s OLED model.
> 
> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> ---
>   .../arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
> index be65fafafa736a0401a5872c40f69cb20cfbbd90..753add73df41050565e71b9faafee62bb2031b75 100644
> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
> @@ -10,3 +10,13 @@ / {
>   	compatible = "lenovo,thinkpad-t14s-oled", "lenovo,thinkpad-t14s",
>   		     "qcom,x1e78100", "qcom,x1e80100";
>   };
> +
> +&panel {
> +	compatible = "samsung,atna40yk20", "samsung,atna33xc20";
> +	enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
> +	hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
> +	power-supply = <&vreg_edp_3p3>;

Why do you need to repeat hpd-gpios and power-supply properties?

> +
> +	pinctrl-0 = <&edp_bl_en>, <&edp_hpd_n_default>;
> +	pinctrl-names = "default";
> +};
>