Skip to contentSkip to conversation

arm64: dts: qcom: pixel 3a xl support with tianma panel

PATCH Applied Richard Acayan 4 participants 7 messages May 13 – May 23

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover arm64: dts: qcom: pixel 3a xl support with tianma panel

This expands Pixel 3a support to the Pixel 3a XL, starting with one of the panel variants. The Pixel 3a XL has two variants with panels from Samsung or from Tianma/Novatek.

This series depends on the IMX355 front camera devicetree patches
(https://lore.kernel.org/r/[email protected]).

The most recent test on a Pixel 3a XL is in v3. v4 is still compile-tested (with relevant schema) and tested on a Pixel 3a.

Changes since v3 (https://lore.kernel.org/r/[email protected]):
- disclose AI involvement in review (Konrad's review tags retained) (1-2/2)

Some changes appeared in v3 (under "Changes since v2") which were suggested by the "Claude Code Review Bot", an experimental AI reviewer deployed by a DRM maintainer:

- preserve same touchscreen physical width in sargo (1/2)
- move entry in Makefile to correct place (2/2)
- correct top-of-file comment about which panel is supported (2/2)
- explain license identifier change from GPL-2.0 to GPL-2.0-only (1/2)

The AI involvement already occurred between v2 and v3. The full AI-generated output is accessible at:

https://lore.gitlab.freedesktop.org/drm-ai-reviews/[email protected]/T/#u

- rebase onto new front camera patches
- drop applied patches (previously 1-3/5)
- add review tags (1/2)

Changes since v2 (https://lore.kernel.org/r/[email protected]):
- add support for regulator (Dmitry's review retained) (3/5)
- use common set page function (Dmitry's review retained) (3/5)
- squash new labels into common dtsi patch (review tags dropped) (4/5)
- specify framebuffer in terms of memory region (4/5)
- only specify height in XL/non-XL specific devicetrees (4/5, 5/5)
- remove status in display devices (4/5, 5/5)
- preserve same touchscreen physical width in sargo (4/5)
- move entry in Makefile to correct place (5/5)
- omit copyright year in new file (4/5)
- correct top-of-file comment about which panel is supported (5/5)
- explain license identifier change from GPL-2.0 to GPL-2.0-only (4/5)
- add review tags (1/5, 3/5, 5/5)

Changes since v1 (https://lore.kernel.org/r/[email protected]):
- use multi functions in disable callback (3/6)
- add and reformat comments about XL differences (5/6)
- mention the sdc panel (6/6)
- explain google,bonito compatible (1/6)
- remove TODO item in code (3/6)
- add review and testing tags (2/6, 3/6, 5/6)

Richard Acayan (2):
arm64: dts: qcom: sdm670-google: add common device tree include
arm64: dts: qcom: add support for pixel 3a xl with the tianma panel

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../dts/qcom/sdm670-google-bonito-tianma.dts  |  32 +
 ...le-sargo.dts => sdm670-google-common.dtsi} |  22 +-
 .../boot/dts/qcom/sdm670-google-sargo.dts     | 714 +-----------------
 4 files changed, 53 insertions(+), 716 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts
 copy arch/arm64/boot/dts/qcom/{sdm670-google-sargo.dts => sdm670-google-common.dtsi} (97%)
Signature · 1 line
2.54.0
#1 lore raw

PATCH v4 1/2 arm64: dts: qcom: sdm670-google: add common device tree include

The Pixel 3a XL can be supported by reusing most of the device tree from the Pixel 3a. Move the common elements to a common device tree include like with other devices.

Since the original devicetree should only specify non-XL properties, it needs to be completely rewritten. Also change the SPDX license identifier from GPL-2.0 (which was deprecated as it can be misinterpreted as GPLv2 or later) into GPL-2.0-only.

Assisted-by "Claude Code Review Bot":claude-opus-4-6
---
 ...le-sargo.dts => sdm670-google-common.dtsi} |  22 +-
 .../boot/dts/qcom/sdm670-google-sargo.dts     | 714 +-----------------
 2 files changed, 20 insertions(+), 716 deletions(-)
 copy arch/arm64/boot/dts/qcom/{sdm670-google-sargo.dts => sdm670-google-common.dtsi} (97%)
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi renamed from arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +7 -15
similarity index 97%
copy from arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts
copy to arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi
index eba2f3792dd0..0f57b915186b 100644
@@ -6,8 +6,6 @@
  * Copyright (c) 2022, Richard Acayan. All rights reserved.
  */
 
-/dts-v1/;
-
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
@@ -28,9 +26,6 @@
 /delete-node/ &gpu_mem;
 
 / {
-	model = "Google Pixel 3a";
-	compatible = "google,sargo", "qcom,sdm670";
-
 	aliases { };
 
 	battery: battery {
@@ -38,7 +33,6 @@ battery: battery {
 
 		voltage-min-design-microvolt = <3312000>;
 		voltage-max-design-microvolt = <4400000>;
-		charge-full-design-microamp-hours = <3000000>;
 	};
 
 	chosen {
@@ -48,11 +42,11 @@ chosen {
 		#size-cells = <2>;
 		ranges;
 
-		framebuffer@9c000000 {
+		framebuffer: framebuffer@9c000000 {
 			compatible = "simple-framebuffer";
-			reg = <0 0x9c000000 0 (1080 * 2220 * 4)>;
+			memory-region = <&fb_mem>;
 			width = <1080>;
-			height = <2220>;
+			/* height is in specific device trees */
 			stride = <(1080 * 4)>;
 			format = "a8r8g8b8";
 		};
@@ -121,7 +115,7 @@ gpu_mem: gpu@97a15000 {
 			no-map;
 		};
 
-		framebuffer-region@9c000000 {
+		fb_mem: framebuffer-region@9c000000 {
 			reg = <0 0x9c000000 0 0x2400000>;
 			no-map;
 		};
@@ -521,10 +515,8 @@ rmi4-f01@1 {
 			syna,nosleep-mode = <1>;
 		};
 
-		rmi4-f12@12 {
+		rmi4_f12: rmi4-f12@12 {
 			reg = <0x12>;
-			touchscreen-x-mm = <62>;
-			touchscreen-y-mm = <127>;
 			syna,sensor-type = <1>;
 		};
 	};
@@ -538,8 +530,8 @@ &mdss_dsi0 {
 	vdda-supply = <&vreg_l1a_1p225>;
 	status = "okay";
 
-	panel@0 {
-		compatible = "samsung,s6e3fa7-ams559nk06";
+	panel: panel@0 {
+		/* compatible is provided in specific device trees */
 		reg = <0>;
 
 		reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +13 -701

733 lines not on this page · raw message

Signature · 1 line
2.54.0
Reviewed-by on v4 1/2
#2 lore raw

Re: [PATCH v4 1/2] arm64: dts: qcom: sdm670-google: add common device tree include

Quoted 9 lines · Richard Acayan

The Pixel 3a XL can be supported by reusing most of the device tree from the Pixel 3a. Move the common elements to a common device tree include like with other devices.

Since the original devicetree should only specify non-XL properties, it needs to be completely rewritten. Also change the SPDX license identifier from GPL-2.0 (which was deprecated as it can be misinterpreted as GPLv2 or later) into GPL-2.0-only.

Quoted 9 lines
Assisted-by "Claude Code Review Bot":claude-opus-4-6
---
 ...le-sargo.dts => sdm670-google-common.dtsi} |  22 +-
 .../boot/dts/qcom/sdm670-google-sargo.dts     | 714 +-----------------
 2 files changed, 20 insertions(+), 716 deletions(-)
 copy arch/arm64/boot/dts/qcom/{sdm670-google-sargo.dts => sdm670-google-common.dtsi} (97%)
Signature · 2 lines
With best wishes
Dmitry
#3 lore raw

Re: [PATCH v4 1/2] arm64: dts: qcom: sdm670-google: add common device tree include

In reply to Richard Acayan
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] The newly added common device tree file uses the deprecated GPL-2.0 SPDX identifier…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The newly added common device tree file uses the deprecated GPL-2.0 SPDX identifier, contradicting the commit message.
- [Low] The framebuffer node retains a unit address in its name without a reg property, which triggers a dtc warning. --

commit 1f4f677fcfc2b6d8ad7bf836706a7501c4b2897b
Author: Richard Acayan <[email protected]>

arm64: dts: qcom: sdm670-google: add common device tree include

This commit extracts the common elements from the Pixel 3a device tree into a shared include file to support the Pixel 3a XL. It also rewrites the original device tree to specify only non-XL properties.

arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi line 1

Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi new file +1 -0
new file mode 100644
index 0000000000000..0f57b915186b7
@@ -0,0 +1,712 @@
+// SPDX-License-Identifier: GPL-2.0

The commit message mentions changing the SPDX license identifier from GPL-2.0 to GPL-2.0-only, but this new common include file still uses GPL-2.0. Was this an oversight when creating the new file?

[ ... ]

arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi line 12

Quoted 11 lines
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi new file +11 -0
+	chosen {
+		stdout-path = "serial0:115200n8";
+
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		framebuffer: framebuffer@9c000000 {
+			compatible = "simple-framebuffer";
+			memory-region = <&fb_mem>;
+			width = <1080>;

Since the reg property was replaced with a memory-region reference, should the @9c000000 unit address be removed from the node name to prevent a dtc warning about a node having a unit name but no reg property?

Additionally, are the #address-cells, #size-cells, and ranges properties in the parent chosen node still necessary now that the child node no longer uses a reg property?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#4 lore raw

PATCH v4 2/2 arm64: dts: qcom: add support for pixel 3a xl with the tianma panel

In reply to Richard Acayan

The Pixel 3a XL has variants with either a Samsung Display Controller (SDC) panel or a Tianma panel. Add the device tree for the variant with the Tianma panel.

Assisted-by "Claude Code Review Bot":claude-opus-4-6
---
 arch/arm64/boot/dts/qcom/Makefile             |  1 +
 .../dts/qcom/sdm670-google-bonito-tianma.dts  | 32 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 169cc9b9ccd3..d909c527d848 100644
@@ -303,6 +303,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-fairphone-fp3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-motorola-ocean.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm636-sony-xperia-ganges-mermaid.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm660-xiaomi-lavender.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-bonito-tianma.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-sargo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 
arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts new file +32 -0
new file mode 100644
index 000000000000..42ddaf53d150
@@ -0,0 +1,32 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Device tree for Google Pixel 3a XL with the Tianma panel.
+ *
+ * Copyright (c) Richard Acayan. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include "sdm670-google-common.dtsi"
+
+/ {
+	model = "Google Pixel 3a XL (with Tianma panel)";
+	compatible = "google,bonito-tianma", "google,bonito", "qcom,sdm670";
+};
+
+&battery {
+	charge-full-design-microamp-hours = <3700000>;
+};
+
+&framebuffer {
+	height = <2160>;
+};
+
+&panel {
+	compatible = "novatek,nt37700f";
+};
+
+&rmi4_f12 {
+	touchscreen-x-mm = <69>;
+	touchscreen-y-mm = <137>;
+};
Signature · 1 line
2.54.0
Reviewed-by on v4 2/2
#5 lore raw

Re: [PATCH v4 2/2] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel

Quoted 18 lines · Richard Acayan

The Pixel 3a XL has variants with either a Samsung Display Controller (SDC) panel or a Tianma panel. Add the device tree for the variant with the Tianma panel.

Assisted-by "Claude Code Review Bot":claude-opus-4-6
---
 arch/arm64/boot/dts/qcom/Makefile             |  1 +
 .../dts/qcom/sdm670-google-bonito-tianma.dts  | 32 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts
arch/arm64/boot/dts/qcom/Makefile +0 -0
index 169cc9b9ccd3..d909c527d848 100644

arch/arm64/boot/dts/qcom/Makefile dtb-$(CONFIG_ARCH_QCOM) += sdm632-fairphone-fp3.dtb · line 309

Quoted 7 lines
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -303,6 +303,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-fairphone-fp3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-motorola-ocean.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm636-sony-xperia-ganges-mermaid.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm660-xiaomi-lavender.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-bonito-tianma.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-sargo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 
Signature · 2 lines
With best wishes
Dmitry
maintainer Applied
#6 lore raw
In reply to Richard Acayan
Quoted 8 lines · Richard Acayan

This expands Pixel 3a support to the Pixel 3a XL, starting with one of the panel variants. The Pixel 3a XL has two variants with panels from Samsung or from Tianma/Novatek.

This series depends on the IMX355 front camera devicetree patches
(https://lore.kernel.org/r/[email protected]).

[...]

Applied, thanks!

[1/2] arm64: dts: qcom: sdm670-google: add common device tree include

      commit: fe9f4a46895dc3062cedcdd38772dd578de9e62f
[2/2] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel
      commit: f3919fa784a3e6dd557dfe2c41072f55742e013f

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>