aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.14/950-0274-overlays-Add-ds1621-to-the-i2c-sensor-overlay.patch
blob: fb0298c52c021cbfe5187754be80b002d86c4c32 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
From 3c258618cbc0cddb7076b61a08755aa4f73d27db Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Sun, 15 Apr 2018 10:36:15 +0100
Subject: [PATCH 274/454] overlays: Add ds1621 to the i2c-sensor overlay

The ds1621 enables the Dallas Semiconductors DS1621 temperature
sensor.

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

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
 arch/arm/boot/dts/overlays/README             | 15 +++++++++------
 .../boot/dts/overlays/i2c-sensor-overlay.dts  | 19 ++++++++++++++++++-
 2 files changed, 27 insertions(+), 7 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -821,8 +821,8 @@ Name:   i2c-sensor
 Info:   Adds support for a number of I2C barometric pressure and temperature
         sensors on i2c_arm
 Load:   dtoverlay=i2c-sensor,<param>=<val>
-Params: addr                    Set the address for the BME280, BMP280, TMP102,
-                                HDC100X, LM75 or SHT3x
+Params: addr                    Set the address for the BME280, BMP280, DS1621,
+                                HDC100X, LM75, SHT3x or TMP102
 
         bme280                  Select the Bosch Sensortronic BME280
                                 Valid addresses 0x76-0x77, default 0x76
@@ -834,6 +834,9 @@ Params: addr                    Set the
         bmp280                  Select the Bosch Sensortronic BMP280
                                 Valid addresses 0x76-0x77, default 0x76
 
+        ds1621                  Select the Dallas Semiconductors DS1621 temp
+                                sensor. Valid addresses 0x48-9x4f, default 0x48
+
         hdc100x                 Select the Texas Instruments HDC100x temp sensor
                                 Valid addresses 0x40-0x43, default 0x40
 
@@ -844,6 +847,10 @@ Params: addr                    Set the
 
         lm75addr                Deprecated - use addr parameter instead
 
+        sht3x                   Select the Sensiron SHT3x temperature and
+                                humidity sensor. Valid addresses 0x44-0x45,
+                                default 0x44
+
         si7020                  Select the Silicon Labs Si7013/20/21 humidity/
                                 temperature sensor
 
@@ -856,10 +863,6 @@ Params: addr                    Set the
         veml6070                Select the Vishay VEML6070 ultraviolet light
                                 sensor
 
-        sht3x                   Select the Sensiron SHT3x temperature and
-                                humidity sensor. Valid addresses 0x44-0x45,
-                                default 0x44
-
 
 Name:   i2c0-bcm2708
 Info:   Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations
--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
@@ -186,9 +186,25 @@
 		};
 	};
 
+	fragment@12 {
+		target = <&i2c_arm>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			ds1621: ds1621@48 {
+				compatible = "ds1621";
+				reg = <0x48>;
+				status = "okay";
+			};
+		};
+	};
+
 	__overrides__ {
 		addr =  <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
-			<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0";
+			<&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
+			<&ds1621>,"reg:0";
 		bme280 = <0>,"+0";
 		bmp085 = <0>,"+1";
 		bmp180 = <0>,"+2";
@@ -202,5 +218,6 @@
 		tsl4531 = <0>,"+9";
 		veml6070 = <0>,"+10";
 		sht3x = <0>,"+11";
+		ds1621 = <0>,"+12";
 	};
 };