Commit b7bfbbbf authored by Furkan Kardame's avatar Furkan Kardame Committed by Neil Armstrong
Browse files

arm64: dts: meson: add gpio-fan control to GS-King-X



GS-King-X has a single speed GPIO fan which is always-on by default.
If we add controls for the fan and a trip point,
the fan stays off most of the time, reducing background
noise from the unit.

Signed-off-by: default avatarFurkan Kardame <f.kardame@manjaro.org>
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220611170852.19487-1-f.kardame@manjaro.org
parent 4fd9afd8
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -20,6 +20,14 @@ aliases {
		rtc1 = &vrtc;
	};

	gpio_fan: gpio-fan {
		compatible = "gpio-fan";
		gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
		/* Using Dummy Speed */
		gpio-fan,speed-map = <0 0>, <1 1>;
		#cooling-cells = <2>;
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		poll-interval = <100>;
@@ -94,6 +102,23 @@ &clkc_audio {
	status = "okay";
};

&cpu_thermal {
	trips {
		cpu_active: cpu-active {
			temperature = <70000>; /* millicelsius */
			hysteresis = <2000>; /* millicelsius */
			type = "active";
		};
	};

	cooling-maps {
		map {
			trip = <&cpu_active>;
			cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};

&frddr_a {
	status = "okay";
};