powerpc: dts: turris1x.dts: Add channel labels for temperature sensor
Subsystems (3)
PATCH 1/1 powerpc: dts: turris1x.dts: Add channel labels for temperature sensor
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
---
With this change userspace 'sensors' applications prints labels:
$ sensors
sa56004-i2c-0-4c
Adapter: MPC adapter (i2c@3000)
board: +34.2°C (low = +0.0°C, high = +70.0°C)
(crit = +85.0°C, hyst = +75.0°C)
cpu: +58.9°C (low = +0.0°C, high = +70.0°C)
(crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors
sa56004-i2c-0-4c
Adapter: MPC adapter (i2c@3000)
temp1: +43.0°C (low = +0.0°C, high = +70.0°C)
(crit = +85.0°C, hyst = +75.0°C)
temp2: +63.4°C (low = +0.0°C, high = +70.0°C)
(crit = +85.0°C, hyst = +75.0°C)
---
arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +14 -0
@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 { + reg = <1>; + label = "cpu"; + }; }; /* DDR3 SPD/EEPROM */
Signature · 1 line
2.20.1
Quoted 6 lines · On Fri, 30 Sep 2022 14:39:01 +0200 Pali Rohár <[email protected]> wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>
+ CC hwmon ML
Quoted 42 lines · On Friday 30 September 2022 14:39:01 Pali Rohár wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>---
With this change userspace 'sensors' applications prints labels:$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) cpu: +58.9°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +63.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +4
-0@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */
arch/powerpc/boot/dts/turris1x.dts line 85
Quoted 10 lines
arch/powerpc/boot/dts/turris1x.dts +10
-0+ channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 { + reg = <1>; + label = "cpu"; + };
I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case or snake_case format of labels. Or if you want also "temp" or "temperature" keyword in the label. So please adjust label to the preferred one, if proposed format is not the correct.
Quoted 6 lines
arch/powerpc/boot/dts/turris1x.dts +0
-0}; /* DDR3 SPD/EEPROM */Signature · 1 line
2.20.1
Quoted 52 lines · On Friday 30 September 2022 14:46:18 Pali Rohár wrote:
+ CC hwmon ML
Quoted 49 lines · On Friday 30 September 2022 14:39:01 Pali Rohár wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>---
With this change userspace 'sensors' applications prints labels:$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) cpu: +58.9°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +63.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +11
-0@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 {
Quoted 8 lines
arch/powerpc/boot/dts/turris1x.dts line 85
Quoted 3 lines
arch/powerpc/boot/dts/turris1x.dts +3
-0+ reg = <1>; + label = "cpu"; + };I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case or
snake_caseformat of labels. Or if you want also "temp" or "temperature" keyword in the label. So please adjust label to the preferred one, if proposed format is not the correct.
Ok, if nobody complains then please take this patch as is.
Quoted 6 lines
Quoted 6 lines
arch/powerpc/boot/dts/turris1x.dts +0
-0}; /* DDR3 SPD/EEPROM */Signature · 1 line
2.20.1
Michael, could you take this patch?
Quoted 70 lines · On Sunday 09 October 2022 14:05:06 Pali Rohár wrote:
Quoted 52 lines · On Friday 30 September 2022 14:46:18 Pali Rohár wrote:
+ CC hwmon ML
Quoted 49 lines · On Friday 30 September 2022 14:39:01 Pali Rohár wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>---
With this change userspace 'sensors' applications prints labels:$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) cpu: +58.9°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +63.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +11
-0@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 {Quoted 8 lines
arch/powerpc/boot/dts/turris1x.dts line 85
Quoted 3 lines
arch/powerpc/boot/dts/turris1x.dts +3
-0+ reg = <1>; + label = "cpu"; + };I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case or
snake_caseformat of labels. Or if you want also "temp" or "temperature" keyword in the label. So please adjust label to the preferred one, if proposed format is not the correct.Ok, if nobody complains then please take this patch as is.
Quoted 6 lines
Quoted 6 lines
arch/powerpc/boot/dts/turris1x.dts +0
-0}; /* DDR3 SPD/EEPROM */Signature · 1 line
2.20.1
PING?
Quoted 73 lines · On Tuesday 01 November 2022 23:43:48 Pali Rohár wrote:
Michael, could you take this patch?
Quoted 70 lines · On Sunday 09 October 2022 14:05:06 Pali Rohár wrote:
Quoted 52 lines · On Friday 30 September 2022 14:46:18 Pali Rohár wrote:
+ CC hwmon ML
Quoted 49 lines · On Friday 30 September 2022 14:39:01 Pali Rohár wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>---
With this change userspace 'sensors' applications prints labels:$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) cpu: +58.9°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +63.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +11
-0@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 {Quoted 8 lines
arch/powerpc/boot/dts/turris1x.dts line 85
Quoted 3 lines
arch/powerpc/boot/dts/turris1x.dts +3
-0+ reg = <1>; + label = "cpu"; + };I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case or
snake_caseformat of labels. Or if you want also "temp" or "temperature" keyword in the label. So please adjust label to the preferred one, if proposed format is not the correct.Ok, if nobody complains then please take this patch as is.
Quoted 6 lines
Quoted 6 lines
arch/powerpc/boot/dts/turris1x.dts +0
-0}; /* DDR3 SPD/EEPROM */Signature · 1 line
2.20.1
Michael Ellerman
reviewerQuoted 1 line · Pali Rohár
Michael, could you take this patch?
Yep.
With these dts patches it always helps if you tell me that it passes the DT schema checks, so that I don't get yelled at by the DT people :)
cheers
Quoted 71 lines · On Sunday 09 October 2022 14:05:06 Pali Rohár wrote:
Quoted 70 lines · On Friday 30 September 2022 14:46:18 Pali Rohár wrote:
Quoted 52 lines
+ CC hwmon ML
Quoted 49 lines · On Friday 30 September 2022 14:39:01 Pali Rohár wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>---
With this change userspace 'sensors' applications prints labels:$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) cpu: +58.9°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +63.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +11
-0@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 {Quoted 8 lines
arch/powerpc/boot/dts/turris1x.dts line 85
Quoted 3 lines
arch/powerpc/boot/dts/turris1x.dts +3
-0+ reg = <1>; + label = "cpu"; + };I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case or
snake_caseformat of labels. Or if you want also "temp" or "temperature" keyword in the label. So please adjust label to the preferred one, if proposed format is not the correct.Ok, if nobody complains then please take this patch as is.
Quoted 6 lines
Quoted 6 lines
arch/powerpc/boot/dts/turris1x.dts +0
-0}; /* DDR3 SPD/EEPROM */Signature · 1 line
2.20.1
Quoted 7 lines · On Tuesday 29 November 2022 12:18:28 Michael Ellerman wrote:
Quoted 1 line · Pali Rohár
Michael, could you take this patch?
Yep.
With these dts patches it always helps if you tell me that it passes the DT schema checks, so that I don't get yelled at by the DT people :)
Mostly dt schemas for p1/p2 are incomplete, I sent more patches but they are waiting and I was not able to setup & run dt schema checker. Hence I tested everything on the hardware to ensure that it works correctly. And this patch works on Turris 1.1 board, I also tested sensors tool. So the important is what is in DTS file, the stuff which is used on HW.
Quoted 73 lines
cheers
Quoted 71 lines · On Sunday 09 October 2022 14:05:06 Pali Rohár wrote:
Quoted 70 lines · On Friday 30 September 2022 14:46:18 Pali Rohár wrote:
Quoted 52 lines
+ CC hwmon ML
Quoted 49 lines · On Friday 30 September 2022 14:39:01 Pali Rohár wrote:
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Fixes 54c15ec3b738 ("powerpc: dts: Add DTS file for CZ.NIC Turris 1.x routers")Signed-off-by Pali Rohár <[email protected]>---
With this change userspace 'sensors' applications prints labels:$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) board: +34.2°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) cpu: +58.9°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)And without this change it prints just generic tempX names:
$ sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +43.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +63.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) --- arch/powerpc/boot/dts/turris1x.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/powerpc/boot/dts/turris1x.dts +11
-0@@ -69,6 +69,20 @@ interrupt-parent = <&gpio>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ + #address-cells = <1>; + #size-cells = <0>; + + /* Local temperature sensor (SA56004ED internal) */ + channel@0 { + reg = <0>; + label = "board"; + }; + + /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ + channel@1 {Quoted 8 lines
arch/powerpc/boot/dts/turris1x.dts line 85
Quoted 3 lines
arch/powerpc/boot/dts/turris1x.dts +3
-0+ reg = <1>; + label = "cpu"; + };I'm not sure if you want UPPERCASE, lowercase, PascalCase, kebab-case or
snake_caseformat of labels. Or if you want also "temp" or "temperature" keyword in the label. So please adjust label to the preferred one, if proposed format is not the correct.Ok, if nobody complains then please take this patch as is.
Quoted 6 lines
Quoted 6 lines
arch/powerpc/boot/dts/turris1x.dts +0
-0}; /* DDR3 SPD/EEPROM */Signature · 1 line
2.20.1
Michael Ellerman
AppliedQuoted 5 lines · Pali Rohár
Channel 0 of SA56004ED chip refers to internal SA56004ED chip sensor (chip itself is located on the board) and channel 1 of SA56004ED chip refers to external sensor which is connected to temperature diode of the P2020 CPU.
Applied to powerpc/next.
[1/1] powerpc: dts: turris1x.dts: Add channel labels for temperature sensor
https://git.kernel.org/powerpc/c/67bbb62f61e810734da0a1577a9802ddaed24140
cheers