mbox series

[v2,0/3] arm64: dts: qcom: x1e78100-t14s: Rework devicetree for LCD and OLED SKUs

Message ID 20250310141504.3008517-1-abel.vesa@linaro.org
Headers show
Series arm64: dts: qcom: x1e78100-t14s: Rework devicetree for LCD and OLED SKUs | expand

Message

Abel Vesa March 10, 2025, 2:15 p.m. UTC
The Lenovo Thinkpad T14s Gen6 comes in different SKUs when it comes to
panels. The only difference that is important is whether it is an OLED
or an LCD. The way that backlight is handled in devicetree between OLED
and LCD forces the need of two separate DTBs.

So create a common T14s dtsi that describes everything except the
backlight handling, by renaming the existent dts to dtsi. Then make the
legacy dts the LCD version, while adding a prepended oled dts. Both
include the generic T14s dtsi.

For the OLED version, I do not have HW to test it on, so OLED specific
bits will come at a later stage. Still, add the OLED dts in order to set
the stage for it.

Had to format it using "git format-patch" since b4 doesn't currently
support -B when formatting the patch, and the renaming of the dts into
dtsi (plus the panel properties being dropped) would've not been visible
enough for reviewers.

Changes in v2:
 - rebased on next-20250307
 - Dropped the RFC, as it seems to be agreed upon already
 - Added dt-bindings patch to document the new oled and lcd compatibles
 - Added panel variant compatible strings to each dts and included the
   the panel type into model string as well
 - Changed backlight PWM period to 4266537 to match exact period the
   PMIC can do.
 - Link to v1 (RFC):
   https://lore.kernel.org/r/20250306090503.724390-1-abel.vesa@linaro.org/

Abel Vesa (3):
  dt-bindings: arm: qcom: Document Lenovo ThinkPad T14s Gen 6 LCD and
    OLED
  arm64: dts: qcom: x1e78100-t14s: Add LCD variant with backlight
    support
  arm64: dts: qcom: x1e78100-t14s: Add OLED variant

 .../devicetree/bindings/arm/qcom.yaml         |    4 +-
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../x1e78100-lenovo-thinkpad-t14s-oled.dts    |   12 +
 .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 1194 +----------------
 ...dts => x1e78100-lenovo-thinkpad-t14s.dtsi} |    6 +-
 5 files changed, 77 insertions(+), 1140 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
 rewrite arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts (98%)
 copy arch/arm64/boot/dts/qcom/{x1e78100-lenovo-thinkpad-t14s.dts => x1e78100-lenovo-thinkpad-t14s.dtsi} (99%)

Comments

Bjorn Andersson March 13, 2025, 11:06 p.m. UTC | #1
On Mon, Mar 10, 2025 at 04:15:01PM +0200, Abel Vesa wrote:
> The Lenovo Thinkpad T14s Gen6 comes in different SKUs when it comes to
> panels. The only difference that is important is whether it is an OLED
> or an LCD. The way that backlight is handled in devicetree between OLED
> and LCD forces the need of two separate DTBs.
> 
> So create a common T14s dtsi that describes everything except the
> backlight handling, by renaming the existent dts to dtsi. Then make the
> legacy dts the LCD version, while adding a prepended oled dts. Both
> include the generic T14s dtsi.
> 
> For the OLED version, I do not have HW to test it on, so OLED specific
> bits will come at a later stage. Still, add the OLED dts in order to set
> the stage for it.
> 
> Had to format it using "git format-patch" since b4 doesn't currently
> support -B when formatting the patch, and the renaming of the dts into
> dtsi (plus the panel properties being dropped) would've not been visible
> enough for reviewers.
> 
> Changes in v2:
>  - rebased on next-20250307

Sorry, but as requested I seem to have picked the DP enablement (at
least) since then. Can you please have another rebase?

Regards,
Bjorn

>  - Dropped the RFC, as it seems to be agreed upon already
>  - Added dt-bindings patch to document the new oled and lcd compatibles
>  - Added panel variant compatible strings to each dts and included the
>    the panel type into model string as well
>  - Changed backlight PWM period to 4266537 to match exact period the
>    PMIC can do.
>  - Link to v1 (RFC):
>    https://lore.kernel.org/r/20250306090503.724390-1-abel.vesa@linaro.org/
> 
> Abel Vesa (3):
>   dt-bindings: arm: qcom: Document Lenovo ThinkPad T14s Gen 6 LCD and
>     OLED
>   arm64: dts: qcom: x1e78100-t14s: Add LCD variant with backlight
>     support
>   arm64: dts: qcom: x1e78100-t14s: Add OLED variant
> 
>  .../devicetree/bindings/arm/qcom.yaml         |    4 +-
>  arch/arm64/boot/dts/qcom/Makefile             |    1 +
>  .../x1e78100-lenovo-thinkpad-t14s-oled.dts    |   12 +
>  .../qcom/x1e78100-lenovo-thinkpad-t14s.dts    | 1194 +----------------
>  ...dts => x1e78100-lenovo-thinkpad-t14s.dtsi} |    6 +-
>  5 files changed, 77 insertions(+), 1140 deletions(-)
>  create mode 100644 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
>  rewrite arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts (98%)
>  copy arch/arm64/boot/dts/qcom/{x1e78100-lenovo-thinkpad-t14s.dts => x1e78100-lenovo-thinkpad-t14s.dtsi} (99%)
> 
> -- 
> 2.34.1
>
Bjorn Andersson March 14, 2025, 8 p.m. UTC | #2
On Mon, 10 Mar 2025 16:15:01 +0200, Abel Vesa wrote:
> The Lenovo Thinkpad T14s Gen6 comes in different SKUs when it comes to
> panels. The only difference that is important is whether it is an OLED
> or an LCD. The way that backlight is handled in devicetree between OLED
> and LCD forces the need of two separate DTBs.
> 
> So create a common T14s dtsi that describes everything except the
> backlight handling, by renaming the existent dts to dtsi. Then make the
> legacy dts the LCD version, while adding a prepended oled dts. Both
> include the generic T14s dtsi.
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: arm: qcom: Document Lenovo ThinkPad T14s Gen 6 LCD and OLED
      commit: 26cc0304d1352a4b1db7d2807cd276ab31e4da05
[2/3] arm64: dts: qcom: x1e78100-t14s: Add LCD variant with backlight support
      commit: 31eff589d00b1b41376800ff1322dc88d81f6ee1
[3/3] arm64: dts: qcom: x1e78100-t14s: Add OLED variant
      commit: ace6b365cf2a49a3600271186455b1b281babe5c

Best regards,