bcm27xx: update 6.1 patches from RPi foundation
[openwrt/staging/xback.git] / target / linux / bcm27xx / patches-6.1 / 950-0548-overlays-i2c-sensor-Add-SHT4X-support.patch
1 From 7f4d21e48d07ada294c9c383b350860aa20efeea Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 24 Jan 2023 11:34:38 +0000
4 Subject: [PATCH] overlays: i2c-sensor: Add SHT4X support
5
6 Add support for the Sensirion SHT4X temperature and humidity
7 sensor.
8
9 See: https://github.com/raspberrypi/linux/issues/5334
10
11 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
12 ---
13 arch/arm/boot/dts/overlays/README | 8 ++++++--
14 .../boot/dts/overlays/i2c-sensor-common.dtsi | 18 +++++++++++++++++-
15 2 files changed, 23 insertions(+), 3 deletions(-)
16
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -2077,8 +2077,12 @@ Params: addr Set the
20 reset_pin GPIO to be used to reset the device (bno055
21 only, disabled by default)
22
23 - sht3x Select the Sensiron SHT3x temperature and
24 - humidity sensor. Valid addresses 0x44-0x45,
25 + sht3x Select the Sensirion SHT3x temperature and
26 + humidity sensors. Valid addresses 0x44-0x45,
27 + default 0x44
28 +
29 + sht4x Select the Sensirion SHT4x temperature and
30 + humidity sensors. Valid addresses 0x44-0x45,
31 default 0x44
32
33 si7020 Select the Silicon Labs Si7013/20/21 humidity/
34 --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
35 +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
36 @@ -478,6 +478,21 @@
37 };
38 };
39
40 + fragment@32 {
41 + target = <&i2cbus>;
42 + __dormant__ {
43 + #address-cells = <1>;
44 + #size-cells = <0>;
45 + status = "okay";
46 +
47 + sht4x: sht4x@44 {
48 + compatible = "sht4x";
49 + reg = <0x44>;
50 + status = "okay";
51 + };
52 + };
53 + };
54 +
55 __overrides__ {
56 bme280 = <0>,"+0";
57 bmp085 = <0>,"+1";
58 @@ -511,6 +526,7 @@
59 mpu6050 = <0>,"+28";
60 mpu9250 = <0>,"+29";
61 bno055 = <0>,"+31";
62 + sht4x = <0>,"+32";
63
64 addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
65 <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
66 @@ -519,7 +535,7 @@
67 <&ms5637>,"reg:0", <&ms5803>,"reg:0", <&ms5805>,"reg:0",
68 <&ms5837>,"reg:0", <&ms8607>,"reg:0",
69 <&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
70 - <&bno055>,"reg:0";
71 + <&bno055>,"reg:0", <&sht4x>,"reg:0";
72 int_pin = <&max30102>, "interrupts:0",
73 <&mpu6050>, "interrupts:0",
74 <&mpu9250>, "interrupts:0";