Skip to contentSkip to conversation

ARM: dts: Aspeed: Tacoma: Remove bmp280 and add iio-hwmon for DPS310

PATCH In review Eddie James 2 participants 3 messages Apr 1, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: Aspeed: Tacoma: Remove bmp280 and add iio-hwmon for DPS310

The BMP280 was replaced by the DPS310 on Witherspoon, which needs an iio-hwmon node to connect to the hwmon subsystem.

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +5 -6
index 044011bb8a04..846a8a2e1a78 100644
@@ -88,6 +88,11 @@
 			linux,code = <7>;
 		};
 	};
+
+	iio-hwmon-dps310 {
+		compatible = "iio-hwmon";
+		io-channels = <&dps 0>;
+	};
 };
 
 &gpio0 {
@@ -442,12 +447,6 @@
 &i2c3 {
 	status = "okay";
 
-	bmp: bmp280@77 {
-		compatible = "bosch,bmp280";
-		reg = <0x77>;
-		#io-channel-cells = <1>;
-	};
-
 	max31785@52 {
 		compatible = "maxim,max31785a";
 		reg = <0x52>;
Signature · 1 line
2.24.0
#1 lore raw
Quoted 25 lines · Eddie James

The BMP280 was replaced by the DPS310 on Witherspoon, which needs an iio-hwmon node to connect to the hwmon subsystem.

---
  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 11 +++++------
  1 file changed, 5 insertions(+), 6 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +5 -0
index 044011bb8a04..846a8a2e1a78 100644
@@ -88,6 +88,11 @@
  			linux,code = <7>;
  		};
  	};
+
+	iio-hwmon-dps310 {
+		compatible = "iio-hwmon";
+		io-channels = <&dps 0>;
+	};
  };
 
  &gpio0 {

arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts line 449

Quoted 8 lines
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +0 -5
@@ -442,12 +447,6 @@
  &i2c3 {
  	status = "okay";
 
-	bmp: bmp280@77 {
-		compatible = "bosch,bmp280";
-		reg = <0x77>;
-		#io-channel-cells = <1>;
-	};

Nope, oops, the device is physically there so we should keep it in the dts.

Quoted 4 lines
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +0 -1
-
  	max31785@52 {
  		compatible = "maxim,max31785a";
  		reg = <0x52>;
maintainer
#2 lore raw
Quoted 31 lines · Eddie James
Quoted 28 lines · Eddie James

The BMP280 was replaced by the DPS310 on Witherspoon, which needs an iio-hwmon node to connect to the hwmon subsystem.

---
  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 11 +++++------
  1 file changed, 5 insertions(+), 6 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +5 -0
index 044011bb8a04..846a8a2e1a78 100644
@@ -88,6 +88,11 @@
                      linux,code = <7>;
              };
      };
+
+     iio-hwmon-dps310 {
+             compatible = "iio-hwmon";
+             io-channels = <&dps 0>;
+     };
  };
 
  &gpio0 {
@@ -442,12 +447,6 @@
  &i2c3 {
      status = "okay";
 
Quoted 8 lines

arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts line 449

Quoted 5 lines
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +0 -5
-     bmp: bmp280@77 {
-             compatible = "bosch,bmp280";
-             reg = <0x77>;
-             #io-channel-cells = <1>;
-     };

Nope, oops, the device is physically there so we should keep it in the dts.

Ok, I've dropped this one and applied the other.