4c541a76690df40989dcdf36aef484bb86e8f41f
[openwrt/openwrt.git] /
1 From 43bac4133f405b67857e4c985aecc44a57233bfe Mon Sep 17 00:00:00 2001
2 From: Martin Sperl <kernel@martin.sperl.org>
3 Date: Wed, 2 Nov 2016 10:18:23 +0000
4 Subject: [PATCH] ARM: bcm2835: dts: add thermal node to device-tree of bcm283x
5
6 Add the node for the thermal sensor of the bcm2835-soc
7 to the device tree.
8
9 Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
10 Reviewed-by: Eric Anholt <eric@anholt.net>
11 Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
12
13 Changelog:
14 V1 -> V5: generic settings is shared in bcm283x.dtsi, but disabled
15 moved the compatible string to the SOC specific dtsi
16 for arm and arm64
17 V5 -> V6: fix remove 0x prefix from thermal@0x7e212000
18
19 Note: there is no arm/boot/dts/bcm2837.dtsi as of now,
20 so the 32-bit rpi3 dt is not modified.
21 Signed-off-by: Eric Anholt <eric@anholt.net>
22 ---
23 arch/arm/boot/dts/bcm2835.dtsi | 6 ++++++
24 arch/arm/boot/dts/bcm2836.dtsi | 6 ++++++
25 arch/arm/boot/dts/bcm283x.dtsi | 7 +++++++
26 3 files changed, 19 insertions(+)
27
28 --- a/arch/arm/boot/dts/bcm2835.dtsi
29 +++ b/arch/arm/boot/dts/bcm2835.dtsi
30 @@ -23,3 +23,9 @@
31 };
32 };
33 };
34 +
35 +/* enable thermal sensor with the correct compatible property set */
36 +&thermal {
37 + compatible = "brcm,bcm2835-thermal";
38 + status = "okay";
39 +};
40 --- a/arch/arm/boot/dts/bcm2836.dtsi
41 +++ b/arch/arm/boot/dts/bcm2836.dtsi
42 @@ -76,3 +76,9 @@
43 interrupt-parent = <&local_intc>;
44 interrupts = <8>;
45 };
46 +
47 +/* enable thermal sensor with the correct compatible property set */
48 +&thermal {
49 + compatible = "brcm,bcm2836-thermal";
50 + status = "okay";
51 +};
52 --- a/arch/arm/boot/dts/bcm283x.dtsi
53 +++ b/arch/arm/boot/dts/bcm283x.dtsi
54 @@ -390,6 +390,13 @@
55 interrupts = <2 14>; /* pwa1 */
56 };
57
58 + thermal: thermal@7e212000 {
59 + compatible = "brcm,bcm2835-thermal";
60 + reg = <0x7e212000 0x8>;
61 + clocks = <&clocks BCM2835_CLOCK_TSENS>;
62 + status = "disabled";
63 + };
64 +
65 aux: aux@0x7e215000 {
66 compatible = "brcm,bcm2835-aux";
67 #clock-cells = <1>;