From 33c53550f552f9a178f68f805a629133092fae31 Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Tue, 29 Oct 2024 11:53:45 +0000 Subject: [PATCH] overlays: Add TCS3472 and VEML6040 support Extend the i2c-sensor overlay with support for the VEML6040 and TCS3472 family of light sensors. Link: https://github.com/raspberrypi/linux/issues/6446 Signed-off-by: Phil Elwell --- arch/arm/boot/dts/overlays/README | 6 +++ .../boot/dts/overlays/i2c-sensor-common.dtsi | 38 ++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 1c140f73b591b..803473a8a94b5 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -2499,12 +2499,18 @@ Params: addr Set the address for the ADT7410, BH1750, BME280, sgp30 Select the Sensirion SGP30 VOC sensor. Fixed address 0x58. + tcs3472 Select the AMS TAOS TCS3472 family of RGBW light + sensors. + Valid addresses 0x48-0x4b, default 0x48 XXX + tmp102 Select the Texas Instruments TMP102 temp sensor Valid addresses 0x48-0x4b, default 0x48 tsl4531 Select the AMS TSL4531 digital ambient light sensor + veml6040 Select the Vishay VEML6040 RGBW light sensor + veml6070 Select the Vishay VEML6070 ultraviolet light sensor diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi index 6077fa6e42daa..2aae2f83d5430 100755 --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi @@ -580,6 +580,39 @@ }; }; + fragment@40 { + target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + tcs3472: tcs3472@29 { + compatible = "amstaos,tcs3472"; + reg = <0x29>; + interrupt-parent = <&gpio>; + interrupts = <4 IRQ_TYPE_EDGE_RISING>; + pinctrl-0 = <&int_pins>; + pinctrl-names = "default"; + }; + }; + }; + + fragment@41 { + target = <&i2cbus>; + __dormant__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + veml6040: veml6040@10 { + compatible = "vishay,veml6040"; + reg = <0x10>; + status = "okay"; + }; + }; + }; + fragment@99 { target = <&gpio>; __dormant__ { @@ -630,6 +663,8 @@ hts221 = <0>,"+35+99"; veml6075 = <0>,"+36"; as73211 = <0>,"+38+99"; + tcs3472 = <0>,"+40+99"; + veml6040 = <0>,"+41"; addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0", <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0", @@ -646,7 +681,8 @@ <&mpu6050>, "interrupts:0", <&mpu9250>, "interrupts:0", <&hts221>, "interrupts:0", - <&as73211>, "interrupts:0"; + <&as73211>, "interrupts:0", + <&tcs3472>, "interrupts:0"; no_timeout = <&jc42>, "smbus-timeout-disable?"; reset_pin = <&bno055>,"reset-gpios:4", <0>,"+30"; };