Skip to contentSkip to conversation

Add touchscreen and TMP451 tempsensor nodes to Google Pixel C (tegra210-smaug) Device Tree

PATCH Applied Jasper Korten 3 participants 5 messages Sep 15, 2024 – Oct 24, 2024

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

cover Add touchscreen and TMP451 tempsensor nodes to Google Pixel C (tegra210-smaug) Device Tree

Information to get these working was gained from downstream DTS.

Both were missing upstream and easy to add:
- It uses a RMI4 HID-over-I2C compatible touchscreen.
- TMP451 is located close to eMMC according to iFixit's teardown.

This is the first time I've ever submitted patches upstream myself. If there's anything I've missed or could do better in a new rev, please let me know!

---
Jasper Korten (2):
arm64: dts: nvidia: tegra210-smaug: Add touchscreen node
arm64: dts: nvidia: tegra210-smaug: Add TMP451 temperature sensor node

 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

---
base-commit: da3ea35007d0af457a0afc87e84fddaebc4e0b63
change-id: 20240915-touch-temp-c64b68961aee

Best regards,

Signature · 1 line
Jasper Korten <[email protected]>
#1 lore raw

PATCH 1/2 arm64: dts: nvidia: tegra210-smaug: Add touchscreen node

The Google Pixel C contains a RMI4 HID over I2C touchscreen. Add a DT node for the touchscreen.

Information gathered from downstream tree.

---
 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts +13 -0
index 2e5b6b2c1f56..6f77540fd397 100644
@@ -1362,6 +1362,19 @@ bluetooth {
 		};
 	};
 
+	i2c@7000c000 {
+		status = "okay";
+		clock-frequency = <1000000>;
+
+		touchscreen: i2c-hid-dev@20 {
+				compatible = "hid-over-i2c";
+				reg = <0x20>;
+				hid-descr-addr = <0x0020>;
+				interrupt-parent = <&gpio>;
+				interrupts = <TEGRA_GPIO(X, 1) IRQ_TYPE_EDGE_FALLING>;
+		};
+	};
+
 	i2c@7000c400 {
 		status = "okay";
 		clock-frequency = <1000000>;
Signature · 1 line
2.46.0
#2 lore raw

PATCH 2/2 arm64: dts: nvidia: tegra210-smaug: Add TMP451 temperature sensor node

In reply to Jasper Korten

The Google Pixel C contains a TI TMP451 temperature sensor. Add a DT node for temperature sensor.

Information gathered from downstream tree.

---
 arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts +9 -0
index 6f77540fd397..c724cb4d5ad8 100644
@@ -1732,6 +1732,15 @@ audio-codec@2d {
 			#gpio-cells = <2>;
 			status = "okay";
 		};
+
+		tmp451: temperature-sensor@4c {
+			compatible = "ti,tmp451";
+			reg = <0x4c>;
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(X, 4) IRQ_TYPE_LEVEL_LOW>;
+			vcc-supply = <&pp1800>;
+			#thermal-sensor-cells = <1>;
+		};
 	};
 
 	pmc@7000e400 {
Signature · 1 line
2.46.0
Tested-by on the v1 series
#3 lore raw
In reply to Jasper Korten
Quoted 6 lines · On Mon, Sep 16, 2024 at 12:48:12AM GMT, Jasper Korten via B4 Relay wrote:

Information to get these working was gained from downstream DTS.

Both were missing upstream and easy to add:
- It uses a RMI4 HID-over-I2C compatible touchscreen.
- TMP451 is located close to eMMC according to iFixit's teardown.

Quoted 7 lines

This is the first time I've ever submitted patches upstream myself. If there's anything I've missed or could do better in a new rev, please let me know!

For both patches:

Thanks!

#4 lore raw
In reply to Jasper Korten

From: Thierry Reding <[email protected]>

Quoted 9 lines · Jasper Korten

Information to get these working was gained from downstream DTS.

Both were missing upstream and easy to add:
- It uses a RMI4 HID-over-I2C compatible touchscreen.
- TMP451 is located close to eMMC according to iFixit's teardown.

[...]

Applied, thanks!

[1/2] arm64: dts: nvidia: tegra210-smaug: Add touchscreen node

      commit: c8d63aa0f14adce3d01a3b776b5ea6a33620891d
[2/2] arm64: dts: nvidia: tegra210-smaug: Add TMP451 temperature sensor node
      commit: b219fe91d3140cddb53538c169f7cb2f6f05e75a

Best regards,

Signature · 1 line
Thierry Reding <[email protected]>