Skip to content

Add bh1750 light sensor ccs811 air quality sensor to i2c-sensor overlay #4334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -1475,11 +1475,15 @@ Params: abx80x Select one of the ABx80x family:


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
Expand All @@ -1494,6 +1498,9 @@ Params: addr Set the address for the BME280, BME680, BMP280,
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

Expand Down
35 changes: 34 additions & 1 deletion arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,41 @@
};
};

fragment@16 {
target = <&i2c_arm>;
__dormant__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

ccs811: ccs811@5b {
compatible = "ccs811";
reg = <0x5b>;
status = "okay";
};
};
};

fragment@17 {
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";
Expand All @@ -267,5 +298,7 @@
max17040 = <0>,"+13";
bme680 = <0>,"+14";
sps30 = <0>,"+15";
ccs811 = <0>, "+16";
bh1750 = <0>, "+17";
};
};
2 changes: 2 additions & 0 deletions arch/arm/configs/bcm2709_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,9 @@ CONFIG_IIO_BUFFER_CB=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_TI_ADS1015=m
CONFIG_BH1750=m
CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SPS30=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,9 @@ CONFIG_IIO_BUFFER_CB=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_TI_ADS1015=m
CONFIG_BH1750=m
CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SPS30=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/configs/bcmrpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,9 @@ CONFIG_IIO_BUFFER_CB=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_TI_ADS1015=m
CONFIG_BH1750=m
CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SPS30=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/configs/bcm2711_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,9 @@ CONFIG_IIO_BUFFER_CB=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_TI_ADS1015=m
CONFIG_BH1750=m
CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SPS30=m
CONFIG_DHT11=m
CONFIG_HDC100X=m
Expand Down
2 changes: 2 additions & 0 deletions arch/arm64/configs/bcmrpi3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,9 @@ CONFIG_IIO=m
CONFIG_IIO_BUFFER_CB=m
CONFIG_MCP320X=m
CONFIG_MCP3422=m
CONFIG_BH1750=m
CONFIG_BME680=m
CONFIG_CCS811=m
CONFIG_SPS30=m
CONFIG_DHT11=m
CONFIG_HTU21=m
Expand Down