summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
blob: d1adf04d56d9b8644cd4a43bd2b2eca6d5bd150b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Copyright (C) 2025 PHYTEC Messtechnik GmbH
 * Author: Primoz Fiser <primoz.fiser@norik.com>
 */

#include <dt-bindings/pwm/pwm.h>
#include "imx93-pinfunc.h"

/dts-v1/;
/plugin/;

&{/} {
	fan0: pwm-fan {
		compatible = "pwm-fan";
		#cooling-cells = <2>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_fan>;
		cooling-levels = <1 90 150 200 255>;
		pwms = <&tpm6 1 40000 PWM_POLARITY_INVERTED>;
	};

	thermal-zones {
		cpu-thermal {
			trips {
				cpu_low: cpu-low {
					hysteresis = <3000>;
					temperature = <50000>;
					type = "active";
				};

				cpu_med: cpu-med {
					hysteresis = <3000>;
					temperature = <58000>;
					type = "active";
				};

				cpu_high: cpu-high {
					hysteresis = <3000>;
					temperature = <65000>;
					type = "active";
				};
			};

			cooling-maps {
				map1 {
					cooling-device = <&fan0 1 1>;
					trip = <&cpu_low>;
				};

				map2 {
					cooling-device = <&fan0 2 2>;
					trip = <&cpu_med>;
				};

				map3 {
					cooling-device = <&fan0 4 4>;
					trip = <&cpu_high>;
				};
			};
		};
	};
};

&tpm6 {
	status = "okay";
};

&iomuxc {
	pinctrl_fan: fangrp {
		fsl,pins = <
			MX93_PAD_GPIO_IO23__TPM6_CH1	0x31e
		>;
	};
};