openwrt/target/linux/bcm27xx/patches-6.1/950-1167-overlays-i2c-sensor-Add-adt7410-support.patch
Marty Jones 2e715fb4fc bcm27xx: update 6.1 patches to latest version
Add support for BCM2712 (Raspberry Pi 5).
3bb5880ab3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y

Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-25 17:46:45 +01:00

76 lines
2.7 KiB
Diff

From 77a01f7da77446277139d8e9ce63f078cbe1ecfe Mon Sep 17 00:00:00 2001
From: Kenny <aSmig+github@romhat.net>
Date: Wed, 22 Nov 2023 16:22:37 -0800
Subject: [PATCH] overlays: i2c-sensor: Add adt7410 support
See https://github.com/raspberrypi/linux/pull/5738
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
arch/arm/boot/dts/overlays/README | 12 ++++++++----
.../boot/dts/overlays/i2c-sensor-common.dtsi | 18 +++++++++++++++++-
2 files changed, 25 insertions(+), 5 deletions(-)
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2144,10 +2144,14 @@ Name: i2c-sensor
Info: Adds support for a number of I2C barometric pressure, temperature,
light level and chemical sensors on i2c_arm
Load: dtoverlay=i2c-sensor,<param>=<val>
-Params: addr Set the address for the BH1750, BME280, BME680,
- BMP280, BMP380, CCS811, DS1621, HDC100X, JC42,
- LM75, MCP980x, MPU6050, MPU9250, MS5637, MS5803,
- MS5805, MS5837, MS8607, SHT3x or TMP102
+Params: addr Set the address for the ADT7410, BH1750, BME280,
+ BME680, BMP280, BMP380, CCS811, DS1621, HDC100X,
+ JC42, LM75, MCP980x, MPU6050, MPU9250, MS5637,
+ MS5803, MS5805, MS5837, MS8607, SHT3x or TMP102
+
+ adt7410 Select the Analog Devices ADT7410 and ADT7420
+ temperature sensors
+ Valid address 0x48-0x4b, default 0x48
aht10 Select the Aosong AHT10 temperature and humidity
sensor
--- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
@@ -508,6 +508,21 @@
};
};
+ fragment@34 {
+ target = <&i2cbus>;
+ __dormant__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ adt7410: adt7410@48 {
+ compatible = "adi,adt7410", "adi,adt7420";
+ reg = <0x48>;
+ status = "okay";
+ };
+ };
+ };
+
__overrides__ {
bme280 = <0>,"+0";
bmp085 = <0>,"+1";
@@ -543,6 +558,7 @@
mpu9250 = <0>,"+29";
bno055 = <0>,"+31";
sht4x = <0>,"+32";
+ adt7410 = <0>,"+34";
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
@@ -552,7 +568,7 @@
<&ms5837>,"reg:0", <&ms8607>,"reg:0",
<&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
<&bno055>,"reg:0", <&sht4x>,"reg:0",
- <&bmp380>,"reg:0";
+ <&bmp380>,"reg:0", <&adt7410>,"reg:0";
int_pin = <&max30102>, "interrupts:0",
<&mpu6050>, "interrupts:0",
<&mpu9250>, "interrupts:0";