bcm53xx: backport DT patches for serial, thermal and MDIO
[openwrt/staging/dedeckeh.git] / target / linux / bcm53xx / patches-4.4 / 047-0020-ARM-dts-BCM5301X-Add-CPU-thermal-sensor-and-zone.patch
1 From e55d2c7272ff647efac4aecd895b20ee66e43519 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Fri, 14 Apr 2017 23:42:28 +0200
4 Subject: [PATCH] ARM: dts: BCM5301X: Add CPU thermal sensor and zone
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This uses CPU thermal sensor available on every Northstar chipset to
10 monitor temperature. We don't have any cooling or throttling so only a
11 critical trip was added.
12
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Acked-by: Jon Mason <jon.mason@broadcom.com>
15 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
16 ---
17 arch/arm/boot/dts/bcm5301x.dtsi | 26 ++++++++++++++++++++++++++
18 1 file changed, 26 insertions(+)
19
20 --- a/arch/arm/boot/dts/bcm5301x.dtsi
21 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
22 @@ -363,6 +363,12 @@
23 "sata2";
24 };
25
26 + thermal: thermal@1800c2c0 {
27 + compatible = "brcm,ns-thermal";
28 + reg = <0x1800c2c0 0x10>;
29 + #thermal-sensor-cells = <0>;
30 + };
31 +
32 srab: srab@18007000 {
33 compatible = "brcm,bcm5301x-srab";
34 reg = <0x18007000 0x1000>;
35 @@ -390,4 +396,24 @@
36
37 brcm,nand-has-wp;
38 };
39 +
40 + thermal-zones {
41 + cpu_thermal: cpu-thermal {
42 + polling-delay-passive = <0>;
43 + polling-delay = <1000>;
44 + coefficients = <(-556) 418000>;
45 + thermal-sensors = <&thermal>;
46 +
47 + trips {
48 + cpu-crit {
49 + temperature = <125000>;
50 + hysteresis = <0>;
51 + type = "critical";
52 + };
53 + };
54 +
55 + cooling-maps {
56 + };
57 + };
58 + };
59 };