OSDN Git Service

ARM: dts: meson: add the ADC thermal sensor to meson.dtsi
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Mon, 21 Dec 2020 18:13:03 +0000 (19:13 +0100)
committerKevin Hilman <khilman@baylibre.com>
Mon, 25 Jan 2021 17:46:44 +0000 (09:46 -0800)
The SoC temperature can be retrieved from ADC channel 8 on all 32-bit
SoCs (Meson6, Meson8, Meson8b and Meson8m2). Add a "generic-adc-thermal"
instance to meson.dtsi so the thermal sensor is available for all SoCs.
If the temperature sensor calibration data is missing for a board then
the "generic-adc-thermal" will not probe and not register a thermal
sensor.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20201221181306.904272-3-martin.blumenstingl@googlemail.com
arch/arm/boot/dts/meson.dtsi

index 5f074f7..e0ca5f0 100644 (file)
                };
        };
 
+       thermal_sensor: thermal-sensor {
+               compatible = "generic-adc-thermal";
+               #thermal-sensor-cells = <0>;
+               io-channels = <&saradc 8>;
+               io-channel-names = "sensor-channel";
+       };
+
        xtal: xtal-clk {
                compatible = "fixed-clock";
                clock-frequency = <24000000>;