Skip to content

hwmon: aht10: Fix AHT20 initialization#6803

Merged
pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom
joshermar:aht20-fix
Apr 22, 2025
Merged

hwmon: aht10: Fix AHT20 initialization#6803
pelwell merged 1 commit intoraspberrypi:rpi-6.12.yfrom
joshermar:aht20-fix

Conversation

@joshermar
Copy link
Copy Markdown
Contributor

The existing driver claims AHT20 support in i2c_device_id, but fails to:

  1. Use the correct init command (0xBE for AHT20 vs 0xE1 for AHT10)
  2. Omit AHT10_MODE_CYC which AHT20 doesn't support/require

This patch adds the proper initialization sequence and includes "aosong,aht20" in the device tree match table to fully support the AHT20.

AHT20 data sheet: http://www.aosong.com/uploadfiles/2025/04/20250417112732054.pdf

Tested on Raspberry Pi 3B+ and Zero 2 W.

The existing driver claims AHT20 support in i2c_device_id, but fails to:
1. Use the correct init command (0xBE for AHT20 vs 0xE1 for AHT10)
2. Omit AHT10_MODE_CYC which AHT20 doesn't support/require

Add proper initialization sequence and include "aosong,aht20" in the
device tree match table to fully support the AHT20.

Signed-off-by: Josh Martinez <8892161+joshermar@users.noreply.github.com>
@6by9
Copy link
Copy Markdown
Contributor

6by9 commented Apr 22, 2025

I was going to say that this should go upstream and needed a dtbinding update, but it looks like we added the DT support in 812b4aa and it hasn't been upstreamed or had a binding written.

(The updated init commands could go upstream).

The changes look good to me.

@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Apr 22, 2025

I'm OK with accepting such a small downstream patch, since it is only extending an existing one.

@pelwell pelwell merged commit 1d238cb into raspberrypi:rpi-6.12.y Apr 22, 2025
13 checks passed
pelwell added a commit to pelwell/linux that referenced this pull request Apr 22, 2025
See: raspberrypi#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell
Copy link
Copy Markdown
Contributor

pelwell commented Apr 22, 2025

There's a corresponding addition to the i2c-sensor overlay here: #6805

pelwell added a commit that referenced this pull request Apr 22, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell added a commit that referenced this pull request Apr 24, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
pelwell added a commit that referenced this pull request Apr 24, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Apr 24, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Apr 24, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 26, 2025
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
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Apr 26, 2025
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
popcornmix pushed a commit that referenced this pull request Apr 28, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Apr 28, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 6, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 6, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 14, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 14, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 20, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 20, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 23, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request May 27, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jun 3, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jun 5, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jun 5, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 9, 2025
See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jun 10, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jun 10, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 12, 2025
See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 16, 2025
commit a65a245a969cb643d652d3ac13131acc39d11797 from
https://github.com/raspberrypi/linux.git rpi-6.12.y

See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 17, 2025
commit a65a245a969cb643d652d3ac13131acc39d11797 from
https://github.com/raspberrypi/linux.git rpi-6.12.y

See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 17, 2025
commit a65a245a969cb643d652d3ac13131acc39d11797 from
https://github.com/raspberrypi/linux.git rpi-6.12.y

See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 18, 2025
commit a65a245a969cb643d652d3ac13131acc39d11797 from
https://github.com/raspberrypi/linux.git rpi-6.12.y

See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 19, 2025
commit a65a245a969cb643d652d3ac13131acc39d11797 from
https://github.com/raspberrypi/linux.git rpi-6.12.y

See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
rajeshkumarwr pushed a commit to rajeshkumarwr/linux-yocto that referenced this pull request Jun 19, 2025
commit a65a245a969cb643d652d3ac13131acc39d11797 from
https://github.com/raspberrypi/linux.git rpi-6.12.y

See: raspberrypi/linux#6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Signed-off-by: Rajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
popcornmix pushed a commit that referenced this pull request Jun 23, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jun 30, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jul 7, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jul 11, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Jul 24, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Aug 1, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Aug 19, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix pushed a commit that referenced this pull request Aug 22, 2025
See: #6803

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants