Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan

The phyBOARD-Electra has a GPIO fan header. This overlay enables the fan
header and sets the fan to turn on at 65C.

Signed-off-by: Nathan Morrisson <nmorrisson@phytec.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Link: https://lore.kernel.org/r/20240419193114.3090084-1-nmorrisson@phytec.com
Signed-off-by: Nishanth Menon <nm@ti.com>

authored by

Nathan Morrisson and committed by
Nishanth Menon
954b585e 04c6dd34

+54
+4
arch/arm64/boot/dts/ti/Makefile
··· 48 48 dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-pcie.dtb 49 49 dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-usb3.dtb 50 50 dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb 51 + dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-gpio-fan.dtbo 51 52 dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb 52 53 dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb 53 54 dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo ··· 132 131 k3-am62x-sk-csi2-tevi-ov5640.dtbo 133 132 k3-am642-evm-icssg1-dualemac-dtbs := \ 134 133 k3-am642-evm.dtb k3-am642-evm-icssg1-dualemac.dtbo 134 + k3-am642-phyboard-electra-gpio-fan-dtbs := \ 135 + k3-am642-phyboard-electra-rdk.dtb k3-am642-phyboard-electra-gpio-fan.dtbo 135 136 k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \ 136 137 k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo 137 138 k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \ ··· 177 174 DTC_FLAGS_k3-am62a7-sk += -@ 178 175 DTC_FLAGS_k3-am62p5-sk += -@ 179 176 DTC_FLAGS_k3-am642-evm += -@ 177 + DTC_FLAGS_k3-am642-phyboard-electra-rdk += -@ 180 178 DTC_FLAGS_k3-am642-tqma64xxl-mbax4xxl += -@ 181 179 DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@ 182 180 DTC_FLAGS_k3-am68-sk-base-board += -@
+50
arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
··· 1 + // SPDX-License-Identifier: GPL-2.0-only OR MIT 2 + /* 3 + * Copyright (C) 2024 PHYTEC America LLC 4 + * Author: Nathan Morrisson <nmorrisson@phytec.com> 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 + };