bcm27xx: update 6.1 patches to latest version
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-6.1 / 950-1167-overlays-i2c-sensor-Add-adt7410-support.patch
1 From 77a01f7da77446277139d8e9ce63f078cbe1ecfe Mon Sep 17 00:00:00 2001
2 From: Kenny <aSmig+github@romhat.net>
3 Date: Wed, 22 Nov 2023 16:22:37 -0800
4 Subject: [PATCH] overlays: i2c-sensor: Add adt7410 support
5
6 See https://github.com/raspberrypi/linux/pull/5738
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
9 ---
10 arch/arm/boot/dts/overlays/README | 12 ++++++++----
11 .../boot/dts/overlays/i2c-sensor-common.dtsi | 18 +++++++++++++++++-
12 2 files changed, 25 insertions(+), 5 deletions(-)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -2144,10 +2144,14 @@ Name: i2c-sensor
17 Info: Adds support for a number of I2C barometric pressure, temperature,
18 light level and chemical sensors on i2c_arm
19 Load: dtoverlay=i2c-sensor,<param>=<val>
20 -Params: addr Set the address for the BH1750, BME280, BME680,
21 - BMP280, BMP380, CCS811, DS1621, HDC100X, JC42,
22 - LM75, MCP980x, MPU6050, MPU9250, MS5637, MS5803,
23 - MS5805, MS5837, MS8607, SHT3x or TMP102
24 +Params: addr Set the address for the ADT7410, BH1750, BME280,
25 + BME680, BMP280, BMP380, CCS811, DS1621, HDC100X,
26 + JC42, LM75, MCP980x, MPU6050, MPU9250, MS5637,
27 + MS5803, MS5805, MS5837, MS8607, SHT3x or TMP102
28 +
29 + adt7410 Select the Analog Devices ADT7410 and ADT7420
30 + temperature sensors
31 + Valid address 0x48-0x4b, default 0x48
32
33 aht10 Select the Aosong AHT10 temperature and humidity
34 sensor
35 --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
36 +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
37 @@ -508,6 +508,21 @@
38 };
39 };
40
41 + fragment@34 {
42 + target = <&i2cbus>;
43 + __dormant__ {
44 + #address-cells = <1>;
45 + #size-cells = <0>;
46 + status = "okay";
47 +
48 + adt7410: adt7410@48 {
49 + compatible = "adi,adt7410", "adi,adt7420";
50 + reg = <0x48>;
51 + status = "okay";
52 + };
53 + };
54 + };
55 +
56 __overrides__ {
57 bme280 = <0>,"+0";
58 bmp085 = <0>,"+1";
59 @@ -543,6 +558,7 @@
60 mpu9250 = <0>,"+29";
61 bno055 = <0>,"+31";
62 sht4x = <0>,"+32";
63 + adt7410 = <0>,"+34";
64
65 addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
66 <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
67 @@ -552,7 +568,7 @@
68 <&ms5837>,"reg:0", <&ms8607>,"reg:0",
69 <&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
70 <&bno055>,"reg:0", <&sht4x>,"reg:0",
71 - <&bmp380>,"reg:0";
72 + <&bmp380>,"reg:0", <&adt7410>,"reg:0";
73 int_pin = <&max30102>, "interrupts:0",
74 <&mpu6050>, "interrupts:0",
75 <&mpu9250>, "interrupts:0";