Skip to content

Commit cd16bae

Browse files
dopefishhlimeng-linux
authored andcommitted
overlays: add bh1750 and ccs811 to i2c-sensor (#4334)
commit cb2156a234c9caef89322a871cdf9106616372a7 from https://github.com/raspberrypi/linux.git rpi-5.12.y See: raspberrypi/linux#4334 Signed-off-by: Meng Li <[email protected]>
1 parent a766c96 commit cd16bae

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed

arch/arm/boot/dts/overlays/README

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,11 +1482,15 @@ Params: abx80x Select one of the ABx80x family:
14821482

14831483

14841484
Name: i2c-sensor
1485-
Info: Adds support for a number of I2C barometric pressure and temperature
1486-
sensors on i2c_arm
1485+
Info: Adds support for a number of I2C barometric pressure, temperature,
1486+
light level and chemical sensors on i2c_arm
14871487
Load: dtoverlay=i2c-sensor,<param>=<val>
1488-
Params: addr Set the address for the BME280, BME680, BMP280,
1489-
DS1621, HDC100X, LM75, SHT3x or TMP102
1488+
Params: addr Set the address for the BH1750, BME280, BME680,
1489+
BMP280, CCS811, DS1621, HDC100X, LM75, SHT3x or
1490+
TMP102
1491+
1492+
bh1750 Select the Rohm BH1750 ambient light sensor
1493+
Valid addresses 0x23 or 0x5c, default 0x23
14901494

14911495
bme280 Select the Bosch Sensortronic BME280
14921496
Valid addresses 0x76-0x77, default 0x76
@@ -1501,6 +1505,9 @@ Params: addr Set the address for the BME280, BME680, BMP280,
15011505
bmp280 Select the Bosch Sensortronic BMP280
15021506
Valid addresses 0x76-0x77, default 0x76
15031507

1508+
ccs811 Select the AMS CCS811 digital gas sensor
1509+
Valid addresses 0x5a-0x5b, default 0x5b
1510+
15041511
ds1621 Select the Dallas Semiconductors DS1621 temp
15051512
sensor. Valid addresses 0x48-0x4f, default 0x48
15061513

arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,41 @@
261261
};
262262
};
263263

264+
fragment@17 {
265+
target = <&i2c_arm>;
266+
__dormant__ {
267+
#address-cells = <1>;
268+
#size-cells = <0>;
269+
status = "okay";
270+
271+
ccs811: ccs811@5b {
272+
compatible = "ccs811";
273+
reg = <0x5b>;
274+
status = "okay";
275+
};
276+
};
277+
};
278+
279+
fragment@18 {
280+
target = <&i2c_arm>;
281+
__dormant__ {
282+
#address-cells = <1>;
283+
#size-cells = <0>;
284+
status = "okay";
285+
286+
bh1750: bh1750@23 {
287+
compatible = "bh1750";
288+
reg = <0x23>;
289+
status = "okay";
290+
};
291+
};
292+
};
293+
264294
__overrides__ {
265295
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
266296
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
267-
<&ds1621>,"reg:0", <&bme680>,"reg:0";
297+
<&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
298+
<&bh1750>,"reg:0";
268299
bme280 = <0>,"+0";
269300
bmp085 = <0>,"+1";
270301
bmp180 = <0>,"+2";
@@ -283,5 +314,7 @@
283314
bme680 = <0>,"+14";
284315
sps30 = <0>,"+15";
285316
sgp30 = <0>,"+16";
317+
ccs811 = <0>, "+17";
318+
bh1750 = <0>, "+18";
286319
};
287320
};

0 commit comments

Comments
 (0)