mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
8299d1f057
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
97 lines
3.1 KiB
Diff
97 lines
3.1 KiB
Diff
From fa6a21d6e2e8d5416ec9d2ca7841777aa0822796 Mon Sep 17 00:00:00 2001
|
|
From: Mart Lubbers <mart@martlubbers.net>
|
|
Date: Tue, 11 May 2021 11:51:35 +0200
|
|
Subject: [PATCH] overlays: add bh1750 and ccs811 to i2c-sensor (#4334)
|
|
|
|
See: https://github.com/raspberrypi/linux/pull/4334
|
|
---
|
|
arch/arm/boot/dts/overlays/README | 15 +++++---
|
|
.../boot/dts/overlays/i2c-sensor-overlay.dts | 35 ++++++++++++++++++-
|
|
2 files changed, 45 insertions(+), 5 deletions(-)
|
|
|
|
--- a/arch/arm/boot/dts/overlays/README
|
|
+++ b/arch/arm/boot/dts/overlays/README
|
|
@@ -1482,11 +1482,15 @@ Params: abx80x Select o
|
|
|
|
|
|
Name: i2c-sensor
|
|
-Info: Adds support for a number of I2C barometric pressure and temperature
|
|
- sensors on i2c_arm
|
|
+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 BME280, BME680, BMP280,
|
|
- DS1621, HDC100X, LM75, SHT3x or TMP102
|
|
+Params: addr Set the address for the BH1750, BME280, BME680,
|
|
+ BMP280, CCS811, DS1621, HDC100X, LM75, SHT3x or
|
|
+ TMP102
|
|
+
|
|
+ bh1750 Select the Rohm BH1750 ambient light sensor
|
|
+ Valid addresses 0x23 or 0x5c, default 0x23
|
|
|
|
bme280 Select the Bosch Sensortronic BME280
|
|
Valid addresses 0x76-0x77, default 0x76
|
|
@@ -1501,6 +1505,9 @@ Params: addr Set the
|
|
bmp280 Select the Bosch Sensortronic BMP280
|
|
Valid addresses 0x76-0x77, default 0x76
|
|
|
|
+ ccs811 Select the AMS CCS811 digital gas sensor
|
|
+ Valid addresses 0x5a-0x5b, default 0x5b
|
|
+
|
|
ds1621 Select the Dallas Semiconductors DS1621 temp
|
|
sensor. Valid addresses 0x48-0x4f, default 0x48
|
|
|
|
--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
|
|
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
|
|
@@ -261,10 +261,41 @@
|
|
};
|
|
};
|
|
|
|
+ fragment@17 {
|
|
+ target = <&i2c_arm>;
|
|
+ __dormant__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ status = "okay";
|
|
+
|
|
+ ccs811: ccs811@5b {
|
|
+ compatible = "ccs811";
|
|
+ reg = <0x5b>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ fragment@18 {
|
|
+ target = <&i2c_arm>;
|
|
+ __dormant__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ status = "okay";
|
|
+
|
|
+ bh1750: bh1750@23 {
|
|
+ compatible = "bh1750";
|
|
+ reg = <0x23>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
__overrides__ {
|
|
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
|
|
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
|
|
- <&ds1621>,"reg:0", <&bme680>,"reg:0";
|
|
+ <&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
|
|
+ <&bh1750>,"reg:0";
|
|
bme280 = <0>,"+0";
|
|
bmp085 = <0>,"+1";
|
|
bmp180 = <0>,"+2";
|
|
@@ -283,5 +314,7 @@
|
|
bme680 = <0>,"+14";
|
|
sps30 = <0>,"+15";
|
|
sgp30 = <0>,"+16";
|
|
+ ccs811 = <0>, "+17";
|
|
+ bh1750 = <0>, "+18";
|
|
};
|
|
};
|