summaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-6.1/950-0445-overlays-Add-i2c-sensor-support-for-AHT10.patch
blob: 30be68169f1510ca67441436470fe68c7e7ecadf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 028a15d99246ddf1ac126586a5680faab59e6a86 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 25 Oct 2022 20:27:00 +0100
Subject: [PATCH] overlays: Add i2c-sensor support for AHT10

Add support for the Aosong AHT10 temperature and humidity sensor.

See: https://github.com/raspberrypi/linux/issues/5222

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README                 |  3 +++
 arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi | 15 +++++++++++++++
 2 files changed, 18 insertions(+)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1933,6 +1933,9 @@ Params: addr                    Set the
                                 BMP280, CCS811, DS1621, HDC100X, LM75, SHT3x or
                                 TMP102
 
+        aht10                   Select the Aosong AHT10 temperature and humidity
+                                sensor
+
         bh1750                  Select the Rohm BH1750 ambient light sensor
                                 Valid addresses 0x23 or 0x5c, default 0x23
 
--- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
@@ -309,6 +309,20 @@
 		};
 	};
 
+	fragment@20 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			aht10: aht10@38 {
+				compatible = "aosong,aht10";
+				reg = <0x38>;
+			};
+		};
+	};
+
 	__overrides__ {
 		bme280 = <0>,"+0";
 		bmp085 = <0>,"+1";
@@ -331,6 +345,7 @@
 		ccs811 = <0>, "+17";
 		bh1750 = <0>, "+18";
 		max30102 = <0>,"+19";
+		aht10 = <0>,"+20";
 
 		addr =  <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
 			<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",