aboutsummaryrefslogtreecommitdiff
path: root/target/linux/bcm27xx/patches-6.1/950-0820-overlays-Add-bmp380-to-i2c-sensor-overlay.patch
blob: 535511eb9333e909469f8a3ae5fc6bb9f936e351 (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
From e1016d61e3dcb058932e8ec5072f2c4bbb05fcb7 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Sun, 30 Jul 2023 18:27:03 +0100
Subject: [PATCH] overlays: Add bmp380 to i2c-sensor overlay

Add support for the BMP380 pressor sensor to the i2c-sensor overlay.

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

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/README             |  7 +++++--
 .../boot/dts/overlays/i2c-sensor-common.dtsi  | 19 ++++++++++++++++++-
 2 files changed, 23 insertions(+), 3 deletions(-)

--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2052,8 +2052,8 @@ Info:   Adds support for a number of I2C
         light level and chemical sensors on i2c_arm
 Load:   dtoverlay=i2c-sensor,<param>=<val>
 Params: addr                    Set the address for the BH1750, BME280, BME680,
-                                BMP280, CCS811, DS1621, HDC100X, JC42, LM75,
-                                MCP980x, MPU6050, MPU9250, MS5637, MS5803,
+                                BMP280, BMP380, CCS811, DS1621, HDC100X, JC42,
+                                LM75, MCP980x, MPU6050, MPU9250, MS5637, MS5803,
                                 MS5805, MS5837, MS8607, SHT3x or TMP102
 
         aht10                   Select the Aosong AHT10 temperature and humidity
@@ -2075,6 +2075,9 @@ Params: addr                    Set the
         bmp280                  Select the Bosch Sensortronic BMP280
                                 Valid addresses 0x76-0x77, default 0x76
 
+        bmp380                  Select the Bosch Sensortronic BMP380
+                                Valid addresses 0x76-0x77, default 0x76
+
         bno055                  Select the Bosch Sensortronic BNO055 IMU
                                 Valid address 0x28-0x29, default 0x29
 
--- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
@@ -493,11 +493,27 @@
 		};
 	};
 
+	fragment@33 {
+		target = <&i2cbus>;
+		__dormant__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			status = "okay";
+
+			bmp380: bmp380@76 {
+				compatible = "bosch,bmp380";
+				reg = <0x76>;
+				status = "okay";
+			};
+		};
+	};
+
 	__overrides__ {
 		bme280 = <0>,"+0";
 		bmp085 = <0>,"+1";
 		bmp180 = <0>,"+2";
 		bmp280 = <0>,"+3";
+		bmp380 = <0>,"+33";
 		htu21 = <0>,"+4";
 		lm75 = <0>,"+5";
 		lm75addr = <&lm75>,"reg:0";
@@ -535,7 +551,8 @@
 			<&ms5637>,"reg:0", <&ms5803>,"reg:0", <&ms5805>,"reg:0",
 			<&ms5837>,"reg:0", <&ms8607>,"reg:0",
 			<&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
-			<&bno055>,"reg:0", <&sht4x>,"reg:0";
+			<&bno055>,"reg:0", <&sht4x>,"reg:0",
+			<&bmp380>,"reg:0";
 		int_pin = <&max30102>, "interrupts:0",
 			<&mpu6050>, "interrupts:0",
 			<&mpu9250>, "interrupts:0";