Add TCS3472 and VEML6040 sensor support (and a few others)#6448
Add TCS3472 and VEML6040 sensor support (and a few others)#6448pelwell merged 4 commits intoraspberrypi:rpi-6.12.yfrom
Conversation
21d94d7 to
9da3c21
Compare
|
Hi, might it be possible to update this for 6.12.y? There should be no need to backport patches, just add the sensors to the devicetree overlay and defconfigs. I can test for VEML6040. |
|
Are you in a position to test it? The reason the PR was never merged is that the original requester stopped responding. |
|
I only have a VEML6040, but yes I am happy to test. (In fact, I had manually added it to the devicetree locally, only to discover the kernel driver wasn't built.) |
commit b89710b upstream. Currently there are only two modifiers for ultraviolet light: a generic one for any ultraviolet light (IIO_MOD_LIGHT_UV) and one for deep ultraviolet (IIO_MOD_LIGHT_DUV), which is also referred as ultraviolet C (UV-C) band and covers short-wave ultraviolet. There are still no modifiers for the long-wave and medium-wave ultraviolet bands. These two bands are the main components used to obtain the UV index on the Earth's surface. Add modifiers for the ultraviolet A (UV-A) and ultraviolet B (UV-B) bands. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20231110-veml6075-v3-1-6ee46775b422@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
commit 6f6c72a upstream. The new modifiers should have added to the end of the enum, so they do not affect the existing entries. No modifiers were added since then, so they can be moved safely to the end of the list. Move IIO_MOD_LIGHT_UVA and IIO_MOD_LIGHT_UVB to the end of iio_modifier. Fixes: b89710b ("iio: add modifiers for A and B ultraviolet light") Suggested-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://lore.kernel.org/r/20240127200208.185815-1-javier.carrasco.cruz@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
There was a problem hiding this comment.
With sudo rpi-update pulls/6448, the devicetree node of VEML6040 is present but there is no driver loaded.
$ uname -a
Linux dispi 6.12.22-v8-16k+ #1 SMP PREEMPT Thu Apr 24 17:25:53 UTC 2025 aarch64 GNU/Linux
$ cat /boot/firmware/config.txt
<snipped>
dtoverlay=i2c-sensor,bme280,veml6040
$ cat /sys/firmware/devicetree/base/axi/pcie@1000120000/rp1/i2c@74000/veml6040@10/status; echo
okay
$ lsmod | grep veml6040
$ ls /lib/modules/6.12.22-v8-16k+/kernel/drivers/iio/light
apds9960.ko.xz as73211.ko.xz bh1750.ko.xz tcs3472.ko.xz tsl4531.ko.xz veml6070.ko.xz veml6075.ko.xz
| CONFIG_BH1750=m | ||
| CONFIG_TCS3472=m | ||
| CONFIG_TSL4531=m | ||
| CONFIG_VEML6070=m |
There was a problem hiding this comment.
I think CONFIG_VEML6040=m needs to be added to the defconfigs.
There was a problem hiding this comment.
Indeed - it's been missing from the start, but not tested. It's there now, and there will be another test build in about 40 minutes.
Enable support for the TCS3472 and VEML6040 families of light sensors. Link: raspberrypi#6446 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Extend the i2c-sensor overlay with support for the VEML6040 and TCS3472 family of light sensors. Link: raspberrypi#6446 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
Confirmed that veml6040 is loaded and functional: Thanks! |
kernel: lockdep fixes for imx708 and imx477 See: raspberrypi/linux#6813 kernel: drm/vc4: plane: Fix incorrect handling of GEN_6_D in vc4_plane_async_set_fb See: raspberrypi/linux#6811 kernel: configs: Enable UNICODE support (for filesystems) See: raspberrypi/linux#6809 kernel: configs: Enable the EROFS read-only filesystem See: raspberrypi/linux#6806 kernel: overlays: Add aht20 support to i2c-sensor See: raspberrypi/linux#6805 kernel: 6.12/iob/topic/imx335 See: raspberrypi/linux#6804 kernel: hwmon: aht10: Fix AHT20 initialization See: raspberrypi/linux#6803 kernel: drm/vc4: plane: Use nearest neighbour filter with YUV444 workaround See: raspberrypi/linux#6796 kernel: dtoverlays: Create Pi5 variant of tc358743 overlay See: raspberrypi/linux#6795 kernel: usb: xhci: default to Intel scheme for calculating U1/U2 timeouts See: raspberrypi/linux#6794 kernel: Add TCS3472 and VEML6040 sensor support (and a few others) See: raspberrypi/linux#6448 kernel: drm/vc4: plane: Increase UPM allocation size for YUV444 See: raspberrypi/linux#6791 kernel: media: i2c: imx219: Restore the 1920x1080 to using a 1:1 PAR See: raspberrypi/linux#6793
kernel: lockdep fixes for imx708 and imx477 See: raspberrypi/linux#6813 kernel: drm/vc4: plane: Fix incorrect handling of GEN_6_D in vc4_plane_async_set_fb See: raspberrypi/linux#6811 kernel: configs: Enable UNICODE support (for filesystems) See: raspberrypi/linux#6809 kernel: configs: Enable the EROFS read-only filesystem See: raspberrypi/linux#6806 kernel: overlays: Add aht20 support to i2c-sensor See: raspberrypi/linux#6805 kernel: 6.12/iob/topic/imx335 See: raspberrypi/linux#6804 kernel: hwmon: aht10: Fix AHT20 initialization See: raspberrypi/linux#6803 kernel: drm/vc4: plane: Use nearest neighbour filter with YUV444 workaround See: raspberrypi/linux#6796 kernel: dtoverlays: Create Pi5 variant of tc358743 overlay See: raspberrypi/linux#6795 kernel: usb: xhci: default to Intel scheme for calculating U1/U2 timeouts See: raspberrypi/linux#6794 kernel: Add TCS3472 and VEML6040 sensor support (and a few others) See: raspberrypi/linux#6448 kernel: drm/vc4: plane: Increase UPM allocation size for YUV444 See: raspberrypi/linux#6791 kernel: media: i2c: imx219: Restore the 1920x1080 to using a 1:1 PAR See: raspberrypi/linux#6793
Add support for the I2C sensors requested in #6446, and a few other related devices.