Re: [PATCH v2 0/2] iio: light: add support for ams OSRAM TCS3430

From: Robert Ijtsma

Date: Thu Nov 26 2026 - 09:14:51 EST


Hi Andy,

On Thu, Nov 26, 2026 at 04:10:28PM +0200, Andy Shevchenko wrote:
> On Thu, Nov 26, 2026 at 09:11:46AM +0100, Robert Ijtsma via B4 Relay wrote:
> > Add Devicetree binding documentation and an IIO driver for the ams OSRAM
> > TCS3430 ambient light and CIE 1931 XYZ tristimulus color sensor.
> >
> > Tested on Microsoft Surface Pro X SQ2 (SC8180X), where the sensor is
> > connected on I2C at 0x39 and used for ambient light sensing.
>
> It's still unclear why a branch new driver. Can you elaborate on this?

Sure. Compared to the existing ams/TAOS color and ALS drivers in
drivers/iio/light/, the TCS3430 differs in both register interface and
sensing architecture:

- tcs3414 and tcs3472 are older TAOS RGBC (Red/Green/Blue/Clear) devices
using the legacy 0x80 COMMAND-bit SMBus protocol (register offsets
0x00..0x1b), different ATIME/gain encodings (e.g. tcs3414 fixed
12/100/400 ms steps; tcs3472 countdown (256 - ATIME) * 2.4 ms, max 64x
gain), and RGBC channels.
- as73211 is an unrelated MAZeT/JENCOLOR XYZ/UV sensor family (I2C
0x74..0x77) with banked config/output register spaces (0x00..0x08), a
1.024 MHz clock divider, temperature channel, and 1x..2048x gain.
- TCS3430 uses ams's direct-addressed 0x80..0xdd register map (no COMMAND
bit in register addresses: ENABLE at 0x80, ATIME at 0x81 as
(ATIME + 1) * 2.78 ms, CFG1 at 0x90, ID at 0x92, 16-bit Z/Y/IR1/X data
registers at 0x94..0x9b, CFG2 HGAIN bit at 0x9f for 128x gain, CFG3 at
0xab, INTENAB at 0xdd) and outputs CIE 1931 tristimulus Z/Y/IR1/X
channels plus photopic Y illuminance.

I will also note this distinction in the commit message / Kconfig help
when preparing v3 (alongside adding MODULE_IMPORT_NS("IIO_GTS_HELPER")
for CONFIG_TCS3430=m builds).

Best regards,
Robert