Commit 1d1239a1 authored by Christian Hewitt's avatar Christian Hewitt Committed by Neil Armstrong
Browse files

arm64: dts: meson: radxa-zero2: add pwm-fan support



The A311D on Zero2 needs active cooling and the board includes a header to
connect a simple fan. Add pwm-fan support with basic thermal properties so
the fan runs when connected.

Suggested-by: default avatarYuntian Zhang <yt@radxa.com>
Signed-off-by: default avatarChristian Hewitt <christianshewitt@gmail.com>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240606090615.3946433-1-christianshewitt@gmail.com


Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
parent f6386b5a
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -33,6 +33,13 @@ memory@0 {
		reg = <0x0 0x0 0x0 0x80000000>;
	};

	fan0: pwm-fan {
		compatible = "pwm-fan";
		#cooling-cells = <2>;
		cooling-levels = <0 64 128 192 255>;
		pwms = <&pwm_AO_ab 0 40000 0>;
	};

	gpio-keys-polled {
		compatible = "gpio-keys-polled";
		poll-interval = <100>;
@@ -286,6 +293,23 @@ &cpu103 {
	clock-latency = <50000>;
};

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

	cooling-maps {
		map2 {
			trip = <&cpu_active>;
			cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
		};
	};
};

&frddr_a {
	status = "okay";
};