Debian Codegraph @

scripts/dtc/include-prefixes/arm64/ti/k3-am642-phyboard-electra-gpio-fan.dtso

raw
1 // SPDX-License-Identifier: GPL-2.0-only OR MIT
2 /*
3 * Copyright (C) 2024 PHYTEC America LLC
4 * Author: Nathan Morrisson <[email protected]>
5 */
6
7 /dts-v1/;
8 /plugin/;
9
10 #include <dt-bindings/gpio/gpio.h>
11 #include <dt-bindings/thermal/thermal.h>
12 #include "k3-pinctrl.h"
13
14 &{/} {
15 fan: gpio-fan {
16 compatible = "gpio-fan";
17 gpio-fan,speed-map = <0 0 8600 1>;
18 gpios = <&main_gpio0 28 GPIO_ACTIVE_LOW>;
19 #cooling-cells = <2>;
20 pinctrl-names = "default";
21 pinctrl-0 = <&gpio_fan_pins_default>;
22 };
23 };
24
25 &main_pmx0 {
26 gpio_fan_pins_default: gpio-fan-default-pins {
27 pinctrl-single,pins = <
28 AM64X_IOPAD(0x070, PIN_OUTPUT, 7) /* (V18) GPMC0_AD13.GPIO0_28 */
29 >;
30 };
31 };
32
33 &thermal_zones {
34 main0_thermal: main0-thermal {
35 trips {
36 main0_thermal_trip0: main0-thermal-trip {
37 temperature = <65000>; /* millicelsius */
38 hysteresis = <2000>; /* millicelsius */
39 type = "active";
40 };
41 };
42
43 cooling-maps {
44 map0 {
45 trip = <&main0_thermal_trip0>;
46 cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
47 };
48 };
49 };
50 };