Re: [PATCH 3/3] sdm845: tama: Add AMS TCS3400 ambient light sensor

From: David Heidelberg

Date: Mon Jan 19 2026 - 12:33:25 EST


On 19/01/2026 18:19, Petr Hodina via B4 Relay wrote:
From: Petr Hodina <petr.hodina@xxxxxxxxxxxxxx>

Add device tree node for TCS3400 ambient light sensor with
power supplies, interrupt on GPIO11, and pinctrl states.

Signed-off-by: Petr Hodina <petr.hodina@xxxxxxxxxxxxxx>
---
.../boot/dts/qcom/sdm845-sony-xperia-tama.dtsi | 36 +++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
index 7dc9349eedfd..15d56d6831c5 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama.dtsi
@@ -485,7 +485,23 @@ &i2c14 {
clock-frequency = <400000>;
/* SONY ToF sensor @ 52 */
- /* AMS TCS3490 RGB+IR color sensor @ 72 */
+

Nice! Few comments:

You replacing sensor comment at 0x72 with one 0x39, could be there different sensor model with different address? e.g. tcs3400 vs tcs3490?

Also the node should go above ToF sensor as @39 < @52.

+ tcs3400_sensor: tcs3400_sensor@39 {
+ compatible = "ams,tcs3400";
+ reg = <0x39>;
+
+ interrupts-extended = <&tlmm 11 IRQ_TYPE_EDGE_FALLING>;
+
+ vdd-supply = <&vreg_l22a_2p8>;
+ vio-supply = <&cam_vio_vreg>;
+
+ pinctrl-0 = <&ams_sensor_default>;
+ pinctrl-1 = <&ams_sensor_sleep>;

pinctrl-names missing

+
+ ams,rgbcir-vdd-supply = <1>;
+ ams,rgbcir-gpio-vdd = <0>;
+ ams,rgbcir-vio-supply = <1>;
+ };
};
&ibb {
@@ -751,6 +767,24 @@ int-pins {
bias-pull-down;
};
};
+
+ ams_sensor_default: ams-sensor-default-state {
+ int-pins {
+ pins = "gpio11";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ ams_sensor_sleep: ams_sensor-sleep-state {
+ int-pins {
+ pins = "gpio11";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+ };
};
&uart6 {


--
David Heidelberg