bcm27xx: 6.1: add kernel patches
[openwrt/staging/stintel.git] / target / linux / bcm27xx / patches-6.1 / 950-0448-overlays-i2c-sensor-Add-mcp980x-support.patch
1 From 4fdc12dae89db7fd02bfbef1a15a0b78263a7764 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Tue, 1 Nov 2022 08:47:21 +0000
4 Subject: [PATCH] overlays: i2c-sensor: Add mcp980x support
5
6 See: https://github.com/raspberrypi/linux/issues/5234
7
8 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
9 ---
10 arch/arm/boot/dts/overlays/README | 4 ++++
11 .../boot/dts/overlays/i2c-sensor-common.dtsi | 17 ++++++++++++++++-
12 2 files changed, 20 insertions(+), 1 deletion(-)
13
14 --- a/arch/arm/boot/dts/overlays/README
15 +++ b/arch/arm/boot/dts/overlays/README
16 @@ -1981,6 +1981,10 @@ Params: addr Set the
17 max30102 Select the Maxim Integrated MAX30102 heart-rate
18 and blood-oxygen sensor
19
20 + mcp980x Select the Maxim MCP980x range of temperature
21 + sensors (e.g. MCP9808).
22 + Valid addresses are 0x18-0x1f (default 0x18)
23 +
24 sht3x Select the Sensiron SHT3x temperature and
25 humidity sensor. Valid addresses 0x44-0x45,
26 default 0x44
27 --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
28 +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
29 @@ -323,6 +323,20 @@
30 };
31 };
32
33 + fragment@21 {
34 + target = <&i2cbus>;
35 + __dormant__ {
36 + #address-cells = <1>;
37 + #size-cells = <0>;
38 + status = "okay";
39 +
40 + mcp980x: mcp980x@18 {
41 + compatible = "maxim,mcp980x";
42 + reg = <0x18>;
43 + };
44 + };
45 + };
46 +
47 __overrides__ {
48 bme280 = <0>,"+0";
49 bmp085 = <0>,"+1";
50 @@ -346,11 +360,12 @@
51 bh1750 = <0>, "+18";
52 max30102 = <0>,"+19";
53 aht10 = <0>,"+20";
54 + mcp980x = <0>,"+21";
55
56 addr = <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
57 <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
58 <&ds1621>,"reg:0", <&bme680>,"reg:0", <&ccs811>,"reg:0",
59 - <&bh1750>,"reg:0";
60 + <&bh1750>,"reg:0", <&mcp980x>,"reg:0";
61 int_pin = <&max30102>, "interrupts:0";
62 };
63 };