diff mbox series

ARM: dts: kirkwood: Add drivetemp thermal zone in Ctera C200V1

Message ID 20220929080210.3189925-1-paweldembicki@gmail.com (mailing list archive)
State New, archived
Headers show
Series ARM: dts: kirkwood: Add drivetemp thermal zone in Ctera C200V1 | expand

Commit Message

Pawel Dembicki Sept. 29, 2022, 8:02 a.m. UTC
Ctera C200 V1 have two SATA bays, but thermal zone is handled for only one.
For some reason thermal zone works only with first disk.
It was reported one year ago [1].

[1] https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg56599.html

Suggested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
 arch/arm/boot/dts/kirkwood-c200-v1.dts | 37 ++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Andrew Lunn Sept. 29, 2022, 12:54 p.m. UTC | #1
On Thu, Sep 29, 2022 at 10:02:10AM +0200, Pawel Dembicki wrote:
> Ctera C200 V1 have two SATA bays, but thermal zone is handled for only one.
> For some reason thermal zone works only with first disk.
> It was reported one year ago [1].
> 
> [1] https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg56599.html
> 
> Suggested-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Linus Walleij Oct. 4, 2022, 8:02 a.m. UTC | #2
On Thu, Sep 29, 2022 at 10:02 AM Pawel Dembicki <paweldembicki@gmail.com> wrote:

> Ctera C200 V1 have two SATA bays, but thermal zone is handled for only one.
> For some reason thermal zone works only with first disk.
> It was reported one year ago [1].
>
> [1] https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg56599.html
>
> Suggested-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>

Excellent patch!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Pawel Dembicki Nov. 29, 2022, 10:23 p.m. UTC | #3
czw., 29 wrz 2022 o 10:02 Pawel Dembicki <paweldembicki@gmail.com> napisał(a):
>
> Ctera C200 V1 have two SATA bays, but thermal zone is handled for only one.
> For some reason thermal zone works only with first disk.
> It was reported one year ago [1].
>
> [1] https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg56599.html
>
> Suggested-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>

Hi all,

Gentle reminder for this patch. Is something blocking it?

Best Regards,
Paweł Dembicki
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/kirkwood-c200-v1.dts b/arch/arm/boot/dts/kirkwood-c200-v1.dts
index f59ff7578dfc..ffe60150a67a 100644
--- a/arch/arm/boot/dts/kirkwood-c200-v1.dts
+++ b/arch/arm/boot/dts/kirkwood-c200-v1.dts
@@ -156,6 +156,31 @@  led-12 {
 			trigger-sources = <&hub_port1>;
 		};
 	};
+
+	thermal-zones {
+		/* Thermal zone works only with first disk */
+
+		disk0-thermal {
+			polling-delay = <20000>;
+			polling-delay-passive = <2000>;
+
+			thermal-sensors = <&hdd0_temp>;
+
+			/* Tripping points from the fan.script in the rootfs */
+			trips {
+				disk0_alert: disk0-alert {
+					temperature = <40000>;
+					hysteresis = <5000>;
+					type = "active";
+				};
+				disk0_crit: disk0-crit {
+					temperature = <60000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+	};
 };
 
 &eth0 {
@@ -280,6 +305,18 @@  &rtc {
 &sata {
 	status = "okay";
 	nr-ports = <2>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	hdd0_temp: sata-port@0 {
+		reg = <0>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	hdd1_temp: sata-port@1 {
+		reg = <1>;
+		#thermal-sensor-cells = <0>;
+	};
 };
 
 &uart0 {