aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0448-overlays-i2c-sensor-Add-mcp980x-support.patch
blob: a43886ea9e3b13d3823bfd5a0bdfea6d04943f35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From 4fdc12dae89db7fd02bfbef1a15a0b78263a7764 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Tue, 1 Nov 2022 08:47:21 +0000
Subject: [PATCH] overlays: i2c-sensor: Add mcp980x support

See: https://github.com/raspberrypi/linux/issues/5234

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README               |  4 ++++
 .../boot/dts/overlays/i2c-sensor-common.dtsi    | 17 ++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1981,6 +1981,10 @@ Params: addr                    Set the
         max30102                Select the Maxim Integrated MAX30102 heart-rate
                                 and blood-oxygen sensor
 
+        mcp980x                 Select the Maxim MCP980x range of temperature
+                                sensors (e.g. MCP9808).
+                                Valid addresses are 0x18-0x1f (default 0x18)
+
         sht3x                   Select the Sensiron SHT3x temperature and
                                 humidity sensor. Valid addresses 0x44-0x45,
                                 default 0x44
--- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
@@ -323,6 +323,20 @@
 		};
 	};
 
+	fragment@21 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			mcp980x: mcp980x@18 {
+				compatible = "maxim,mcp980x";
+				reg = <0x18>;
+			};
+		};
+	};
+
 	__overrides__ {
 		bme280 = <0>,"+0";
 		bmp085 = <0>,"+1";
@@ -346,11 +360,12 @@
 		bh1750 = <0>, "+18";
 		max30102 = <0>,"+19";
 		aht10 = <0>,"+20";
+		mcp980x = <0>,"+21";
 
 		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", <&ccs811>,"reg:0",
-			<&bh1750>,"reg:0";
+			<&bh1750>,"reg:0", <&mcp980x>,"reg:0";
 		int_pin = <&max30102>, "interrupts:0";
 	};
 };