mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: ti: k3-am68-phyboard-izar: Add pwm fan
@ 2026-07-16  0:08 Dominik Haller
  2026-08-04  4:59 ` Vignesh Raghavendra
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Haller @ 2026-07-16  0:08 UTC (permalink / raw)
  To: Nishanth Menon, Vignesh Raghavendra, Tero Kristo, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: upstream, Dominik Haller, linux-arm-kernel, devicetree, linux-kernel

Add an overlay to control the pwm fan[0] that comes with the kit.

[0] https://www.sepa-europe.com/en/2023/06/16/axial-fan-lf40p/

Signed-off-by: Dominik Haller <d.haller@phytec.de>
---
 arch/arm64/boot/dts/ti/Makefile               |  6 +-
 .../dts/ti/k3-am68-phyboard-izar-pwm-fan.dtso | 74 +++++++++++++++++++
 2 files changed, 79 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am68-phyboard-izar-pwm-fan.dtso

diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index 371f9a043fe5..bf03d895aed8 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -173,7 +173,10 @@ k3-am68-phyboard-izar-lvds-ph128800t006-dtbs := k3-am68-phyboard-izar.dtb \
 	k3-am68-phyboard-izar-lvds-ph128800t006.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am68-phyboard-izar-peb-av-15.dtb
 k3-am68-phyboard-izar-peb-av-15-dtbs := k3-am68-phyboard-izar.dtb \
-        k3-am68-phyboard-izar-peb-av-15.dtbo
+	k3-am68-phyboard-izar-peb-av-15.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-am68-phyboard-izar-pwm-fan.dtb
+k3-am68-phyboard-izar-pwm-fan-dtbs := k3-am68-phyboard-izar.dtb \
+	k3-am68-phyboard-izar-pwm-fan.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am68-sk-base-board.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am68-sk-base-board-pcie1-ep.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-j721s2-common-proc-board.dtb
@@ -387,6 +390,7 @@ dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \
 	k3-am642-tqma64xxl-mbax4xxl-wlan.dtb \
 	k3-am68-phyboard-izar-lvds-ph128800t006.dtb \
 	k3-am68-phyboard-izar-peb-av-15.dtb \
+	k3-am68-phyboard-izar-pwm-fan.dtb \
 	k3-am68-sk-base-board-csi2-dual-imx219.dtb \
 	k3-am68-sk-base-board-pcie1-ep.dtb \
 	k3-am69-sk-csi2-dual-imx219.dtb \
diff --git a/arch/arm64/boot/dts/ti/k3-am68-phyboard-izar-pwm-fan.dtso b/arch/arm64/boot/dts/ti/k3-am68-phyboard-izar-pwm-fan.dtso
new file mode 100644
index 000000000000..8c1a51216a90
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am68-phyboard-izar-pwm-fan.dtso
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * Copyright (C) 2026 PHYTEC Messtechnik GmbH
+ * Author: Dominik Haller <d.haller@phytec.de>
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/pwm/pwm.h>
+#include "k3-pinctrl.h"
+
+&{/} {
+	pwmfan: pwm-fan {
+		compatible = "pwm-fan";
+		pinctrl-names = "default";
+		pinctrl-0 = <&main_pwmfan_default_pins>;
+		#cooling-cells = <2>;
+		cooling-levels = <0 90 150 255>;
+		/* frequency needs to be the same as lvds backlight */
+		pwms = <&main_ehrpwm0 0 44000 PWM_POLARITY_INVERTED>;
+	};
+};
+
+&main_pmx0 {
+	main_pwmfan_default_pins: main-pwmfan-default-pins {
+		pinctrl-single,pins = <
+			J721S2_IOPAD(0x0cc, PIN_OUTPUT, 5) /* (AE27) SPI0_CS0.EHRPWM0_A */
+		>;
+	};
+};
+
+&main_ehrpwm0 {
+	status = "okay";
+};
+
+&main3_thermal {
+	trips {
+		cpu_low: cpu-low {
+			hysteresis = <3000>;
+			temperature = <55000>;
+			type = "active";
+		};
+
+		cpu_med: cpu-med {
+			hysteresis = <3000>;
+			temperature = <60000>;
+			type = "active";
+		};
+
+		cpu_high: cpu-high {
+			hysteresis = <3000>;
+			temperature = <65000>;
+			type = "active";
+		};
+	};
+
+	cooling-maps {
+		map1 {
+			cooling-device = <&pwmfan 1 1>;
+			trip = <&cpu_low>;
+		};
+
+		map2 {
+			cooling-device = <&pwmfan 2 2>;
+			trip = <&cpu_med>;
+		};
+
+		map3 {
+			cooling-device = <&pwmfan 3 3>;
+			trip = <&cpu_high>;
+		};
+	};
+};
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: dts: ti: k3-am68-phyboard-izar: Add pwm fan
  2026-07-16  0:08 [PATCH] arm64: dts: ti: k3-am68-phyboard-izar: Add pwm fan Dominik Haller
@ 2026-08-04  4:59 ` Vignesh Raghavendra
  0 siblings, 0 replies; 2+ messages in thread
From: Vignesh Raghavendra @ 2026-08-04  4:59 UTC (permalink / raw)
  To: Nishanth Menon, Tero Kristo, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Dominik Haller
  Cc: upstream, linux-arm-kernel, devicetree, linux-kernel

Hi Dominik Haller,

On Wed, 15 Jul 2026 17:08:25 -0700, Dominik Haller wrote:
> arm64: dts: ti: k3-am68-phyboard-izar: Add pwm fan

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/1] arm64: dts: ti: k3-am68-phyboard-izar: Add pwm fan
      commit: 37bdaf74ae9ff339ace4c8b06e88fda9432edb5b

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
--
Vignesh



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-04  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16  0:08 [PATCH] arm64: dts: ti: k3-am68-phyboard-izar: Add pwm fan Dominik Haller
2026-08-04  4:59 ` Vignesh Raghavendra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®