arm64: dts: amlogic: a1: introduce cpu temperature sensor
authorDmitry Rokosov <ddrokosov@salutedevices.com>
Thu, 28 Mar 2024 19:26:36 +0000 (22:26 +0300)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 27 May 2024 13:42:14 +0000 (15:42 +0200)
The A1 SoC family has only one thermal sensor for CPU temperature
measurement. It is required to set the TS clock rate to 500kHz to make
it workable.

Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Link: https://lore.kernel.org/r/20240328192645.20914-3-ddrokosov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm64/boot/dts/amlogic/meson-a1.dtsi

index edd751243277f7268bbf53bf036ca1a2bf1150e5..a3ff266fb17d59ce5542a2e97f18d803a976dc70 100644 (file)
                                power-domains = <&pwrc PWRC_USB_ID>;
                        };
 
+                       cpu_temp: temperature-sensor@4c00 {
+                               compatible = "amlogic,a1-cpu-thermal";
+                               reg = <0x0 0x4c00 0x0 0x50>;
+                               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+                               clocks = <&clkc_periphs CLKID_TS>;
+                               assigned-clocks = <&clkc_periphs CLKID_TS>;
+                               assigned-clock-rates = <500000>;
+                               #thermal-sensor-cells = <0>;
+                               amlogic,ao-secure = <&sec_AO>;
+                       };
+
                        hwrng: rng@5118 {
                                compatible = "amlogic,meson-rng";
                                reg = <0x0 0x5118 0x0 0x4>;