Skip to content

Commit d751ed0

Browse files
committed
overlays: Back-port several sensors
Extend the i2c-sensor overlay with support for the HTS221, VEML6075 and AS73211 sensors. Link: #6446 Signed-off-by: Phil Elwell <[email protected]>
1 parent ead8368 commit d751ed0

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

arch/arm/boot/dts/overlays/README

+8
Original file line numberDiff line numberDiff line change
@@ -2386,6 +2386,8 @@ Params: addr Set the address for the ADT7410, BH1750, BME280,
23862386
aht10 Select the Aosong AHT10 temperature and humidity
23872387
sensor
23882388

2389+
as73211 Select the AMS AS73211 XYZ true color sensor
2390+
23892391
bh1750 Select the Rohm BH1750 ambient light sensor
23902392
Valid addresses 0x23 or 0x5c, default 0x23
23912393

@@ -2421,6 +2423,9 @@ Params: addr Set the address for the ADT7410, BH1750, BME280,
24212423
hdc100x Select the Texas Instruments HDC100x temp sensor
24222424
Valid addresses 0x40-0x43, default 0x40
24232425

2426+
hts221 Select the HTS221 temperature and humidity
2427+
sensor
2428+
24242429
htu21 Select the HTU21 temperature and humidity sensor
24252430

24262431
ina238 Select the TI INA238 power monitor. Valid
@@ -2519,6 +2524,9 @@ Params: addr Set the address for the ADT7410, BH1750, BME280,
25192524
veml6070 Select the Vishay VEML6070 ultraviolet light
25202525
sensor
25212526

2527+
veml6075 Select the Vishay VEML6075 UVA and UVB light
2528+
sensor
2529+
25222530

25232531
Name: i2c0
25242532
Info: Change i2c0 pin usage. Not all pin combinations are usable on all

arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi

+57-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Definitions for I2C based sensors using the Industrial IO or HWMON interface.
22
#include <dt-bindings/gpio/gpio.h>
3+
#include <dt-bindings/interrupt-controller/irq.h>
34

45
/ {
56
compatible = "brcm,bcm2835";
@@ -562,6 +563,56 @@
562563
};
563564
};
564565

566+
fragment@37 {
567+
target = <&i2cbus>;
568+
__dormant__ {
569+
#address-cells = <1>;
570+
#size-cells = <0>;
571+
status = "okay";
572+
573+
hts221: hts221@5f {
574+
compatible = "st,hts221-humid", "st,hts221";
575+
reg = <0x5f>;
576+
interrupt-parent = <&gpio>;
577+
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
578+
pinctrl-0 = <&int_pins>;
579+
pinctrl-names = "default";
580+
};
581+
};
582+
};
583+
584+
fragment@38 {
585+
target = <&i2cbus>;
586+
__dormant__ {
587+
#address-cells = <1>;
588+
#size-cells = <0>;
589+
status = "okay";
590+
591+
veml6075: veml6075@10 {
592+
compatible = "vishay,veml6075";
593+
reg = <0x10>;
594+
};
595+
};
596+
};
597+
598+
fragment@39 {
599+
target = <&i2cbus>;
600+
__dormant__ {
601+
#address-cells = <1>;
602+
#size-cells = <0>;
603+
status = "okay";
604+
605+
as73211: as73211@74 {
606+
compatible = "ams,as73211";
607+
reg = <0x74>;
608+
interrupt-parent = <&gpio>;
609+
interrupts = <4 IRQ_TYPE_EDGE_RISING>;
610+
pinctrl-0 = <&int_pins>;
611+
pinctrl-names = "default";
612+
};
613+
};
614+
};
615+
565616
fragment@99 {
566617
target = <&gpio>;
567618
__dormant__ {
@@ -611,6 +662,9 @@
611662
adt7410 = <0>,"+34";
612663
ina238 = <0>,"+35";
613664
shtc3 = <0>,"+36";
665+
hts221 = <0>,"+37+99";
666+
veml6075 = <0>,"+38";
667+
as73211 = <0>,"+39+99";
614668

615669
addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
616670
<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
@@ -625,7 +679,9 @@
625679
<&int_pins>, "reg:0",
626680
<&max30102>, "interrupts:0",
627681
<&mpu6050>, "interrupts:0",
628-
<&mpu9250>, "interrupts:0";
682+
<&mpu9250>, "interrupts:0",
683+
<&hts221>, "interrupts:0",
684+
<&as73211>, "interrupts:0";
629685
no_timeout = <&jc42>, "smbus-timeout-disable?";
630686
reset_pin = <&bno055>,"reset-gpios:4", <0>,"+30";
631687
shunt_resistor = <&ina238>,"shunt-resistor:0";

0 commit comments

Comments
 (0)