Skip to content

Commit

Permalink
overlays: Back-port several sensors
Browse files Browse the repository at this point in the history
Extend the i2c-sensor overlay with support for the HTS221, VEML6075
and AS73211 sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
pelwell committed Oct 30, 2024
1 parent 481fc2c commit b2f724a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
8 changes: 8 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2386,6 +2386,8 @@ Params: addr Set the address for the ADT7410, BH1750, BME280,
aht10 Select the Aosong AHT10 temperature and humidity
sensor

as73211 Select the AMS AS73211 XYZ true color sensor

bh1750 Select the Rohm BH1750 ambient light sensor
Valid addresses 0x23 or 0x5c, default 0x23

Expand Down Expand Up @@ -2417,6 +2419,9 @@ Params: addr Set the address for the ADT7410, BH1750, BME280,
hdc100x Select the Texas Instruments HDC100x temp sensor
Valid addresses 0x40-0x43, default 0x40

hts221 Select the HTS221 temperature and humidity
sensor

htu21 Select the HTU21 temperature and humidity sensor

int_pin Set the GPIO to use for interrupts (max30102,
Expand Down Expand Up @@ -2503,6 +2508,9 @@ Params: addr Set the address for the ADT7410, BH1750, BME280,
veml6070 Select the Vishay VEML6070 ultraviolet light
sensor

veml6075 Select the Vishay VEML6075 UVA and UVB light
sensor

i2c0 Choose the I2C0 bus on GPIOs 0&1

i2c_csi_dsi Choose the I2C0 bus on GPIOs 44&45
Expand Down
59 changes: 58 additions & 1 deletion arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
compatible = "brcm,bcm2835";
Expand Down Expand Up @@ -529,6 +530,57 @@
};
};

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

hts221: hts221@5f {
compatible = "st,hts221-humid", "st,hts221";
reg = <0x5f>;
interrupt-parent = <&gpio>;
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
pinctrl-0 = <&int_pins>;
pinctrl-names = "default";
};
};
};

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

veml6075: veml6075@10 {
compatible = "vishay,veml6075";
reg = <0x10>;
status = "okay";
};
};
};

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

as73211: as73211@74 {
compatible = "ams,as73211";
reg = <0x74>;
interrupt-parent = <&gpio>;
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
pinctrl-0 = <&int_pins>;
pinctrl-names = "default";
};
};
};

fragment@99 {
target = <&gpio>;
__dormant__ {
Expand Down Expand Up @@ -576,6 +628,9 @@
bno055 = <0>,"+31";
sht4x = <0>,"+32";
adt7410 = <0>,"+34";
hts221 = <0>,"+35+99";
veml6075 = <0>,"+36";
as73211 = <0>,"+38+99";

addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
Expand All @@ -590,7 +645,9 @@
<&int_pins>, "reg:0",
<&max30102>, "interrupts:0",
<&mpu6050>, "interrupts:0",
<&mpu9250>, "interrupts:0";
<&mpu9250>, "interrupts:0",
<&hts221>, "interrupts:0",
<&as73211>, "interrupts:0";
no_timeout = <&jc42>, "smbus-timeout-disable?";
reset_pin = <&bno055>,"reset-gpios:4", <0>,"+30";
};
Expand Down

0 comments on commit b2f724a

Please sign in to comment.