arm64: dts: meson-khadas-vim3: add Khadas MCU nodes
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 13 Jul 2020 06:59:31 +0000 (08:59 +0200)
committerKevin Hilman <khilman@baylibre.com>
Mon, 13 Jul 2020 18:50:32 +0000 (11:50 -0700)
Add the Khadas MCU node with active FAN thermal nodes for all the
Khadas VIM3 variants.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Link: https://lore.kernel.org/r/20200713065931.19845-1-narmstrong@baylibre.com
arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi

index 1ef1e3672b9670aa2a93bebbcf1c15347d4e3325..27408c10a8117558b6196e80f32165d86d936f66 100644 (file)
        hdmi-phandle = <&hdmi_tx>;
 };
 
+&cpu_thermal {
+       trips {
+               cpu_active: cpu-active {
+                       temperature = <80000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "active";
+               };
+       };
+
+       cooling-maps {
+               map {
+                       trip = <&cpu_active>;
+                       cooling-device = <&khadas_mcu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
 &ext_mdio {
        external_phy: ethernet-phy@0 {
                /* Realtek RTL8211F (0x001cc916) */
        pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
        pinctrl-names = "default";
 
+       khadas_mcu: system-controller@18 {
+               compatible = "khadas,mcu";
+               reg = <0x18>;
+               #cooling-cells = <2>;
+       };
+
        gpio_expander: gpio-controller@20 {
                compatible = "ti,tca6408";
                reg = <0x20>;