aboutsummaryrefslogtreecommitdiff
path: root/dts/upstream/src/arm64/ti/k3-am62x-phyboard-lyra-gpio-fan.dtso
blob: f0b2fd4165a753a065a82ca662dec37a9508bb2c (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
// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
 * Copyright (C) 2024 PHYTEC America LLC
 * Author: Garrett Giordano <ggiordano@phytec.com>
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/thermal/thermal.h>
#include "k3-pinctrl.h"

&{/} {
	fan: gpio-fan {
		compatible = "gpio-fan";
		gpio-fan,speed-map = <0 0 8600 1>;
		gpios = <&main_gpio0 40 GPIO_ACTIVE_LOW>;
		#cooling-cells = <2>;
		pinctrl-names = "default";
		pinctrl-0 = <&gpio_fan_pins_default>;
	};
};

&main_pmx0 {
	gpio_fan_pins_default: gpio-fan-default-pins {
		pinctrl-single,pins = <
			AM62X_IOPAD(0x0a4, PIN_OUTPUT, 7) /* (M22) GPMC0_DIR.GPIO0_40 */
		>;
	};
};

&thermal_zones {
	main0_thermal: main0-thermal {
		trips {
			main0_thermal_trip0: main0-thermal-trip {
				temperature = <65000>;  /* millicelsius */
				hysteresis = <2000>;    /* millicelsius */
				type = "active";
			};
		};

		cooling-maps {
			map0 {
				trip = <&main0_thermal_trip0>;
				cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
			};
		};
	};
};