Skip to contentSkip to conversation

ARM: dts: aspeed: tyan-s7106: Update nct7802 config

PATCH Superseded Oskar Senft 2 participants 3 messages Nov 4, 2021 – Nov 5, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: aspeed: tyan-s7106: Update nct7802 config

This change updates the configuration for the nct7802 hardware monitor to correctly configure its temperature sensors.

---
 arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts | 23 +++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts +23 -0
index 68f332ee1886..fc1585f34a57 100644
@@ -213,6 +213,29 @@ &i2c0 {
 	nct7802 at 28 {
 		compatible = "nuvoton,nct7802";
 		reg = <0x28>;
+		channel at 0 { /* LTD */
+			reg = <0>;
+			status = "okay";
+		};
+		channel at 1 { /* RTD1 */
+			reg = <1>;
+			status = "okay";
+			sensor-type = "temperature";
+			temperature-mode = "thermistor";
+		};
+
+		channel at 2 { /* RTD2 */
+			reg = <2>;
+			status = "okay";
+			sensor-type = "temperature";
+			temperature-mode = "thermistor";
+		};
+
+		channel at 3 { /* RTD3 */
+			reg = <3>;
+			status = "okay";
+			sensor-type = "temperature";
+		};
 	};
 
 	/* Also connected to:
Signature · 1 line
2.34.0.rc0.344.g81b53c2807-goog
maintainer
#1 lore raw
Quoted 14 lines · Oskar Senft

This change updates the configuration for the nct7802 hardware monitor to correctly configure its temperature sensors.

---
 arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts | 23 +++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts +0 -0
index 68f332ee1886..fc1585f34a57 100644

arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts &i2c0 { · line 218

Quoted 6 lines
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts +3 -0
@@ -213,6 +213,29 @@ &i2c0 {
        nct7802 at 28 {
                compatible = "nuvoton,nct7802";
                reg = <0x28>;
+               channel at 0 { /* LTD */
+                       reg = <0>;
+                       status = "okay";

The status = "okay" should be redundant; as long as you don't specify a status, a node is assumed to be enabled.

Quoted 26 lines
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts +20 -1
+               };
+               channel at 1 { /* RTD1 */
+                       reg = <1>;
+                       status = "okay";
+                       sensor-type = "temperature";
+                       temperature-mode = "thermistor";
+               };
+
+               channel at 2 { /* RTD2 */
+                       reg = <2>;
+                       status = "okay";
+                       sensor-type = "temperature";
+                       temperature-mode = "thermistor";
+               };
+
+               channel at 3 { /* RTD3 */
+                       reg = <3>;
+                       status = "okay";
+                       sensor-type = "temperature";
+               };
        };
 
        /* Also connected to:
--

2.34.0.rc0.344.g81b53c2807-goog

#2 lore raw

Hi Joel

Quoted 6 lines

arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts &i2c0 { · line 218

Quoted 3 lines
arch/arm/boot/dts/aspeed-bmc-tyan-s7106.dts +3 -0
+               channel at 0 { /* LTD */
+                       reg = <0>;
+                       status = "okay";

The status = "okay" should be redundant; as long as you don't specify a status, a node is assumed to be enabled.

My apologies! I know you mentioned something similar for the DTS binding patch. I didn't realize that this was a generic statement, rather than limited to the example in the binding. Fixed in PATCH v2.

Oskar.