* [PATCH] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan
@ 2024-04-19 19:31 Nathan Morrisson
2024-04-23 12:46 ` Wadim Egorov
2024-04-26 22:40 ` Nishanth Menon
0 siblings, 2 replies; 3+ messages in thread
From: Nathan Morrisson @ 2024-04-19 19:31 UTC (permalink / raw)
To: nm, vigneshr, kristo, robh, krzk+dt, conor+dt
Cc: linux-arm-kernel, devicetree, linux-kernel, upstream, w.egorov
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>
---
arch/arm64/boot/dts/ti/Makefile | 4 ++
.../k3-am642-phyboard-electra-gpio-fan.dtso | 50 +++++++++++++++++++
2 files changed, 54 insertions(+)
create mode 100644 arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index 9a722c2473fb..fd91cf40af6d 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -48,6 +48,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-pcie.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-usb3.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-gpio-fan.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
@@ -131,6 +132,8 @@ k3-am62p5-sk-csi2-tevi-ov5640-dtbs := k3-am62p5-sk.dtb \
k3-am62x-sk-csi2-tevi-ov5640.dtbo
k3-am642-evm-icssg1-dualemac-dtbs := \
k3-am642-evm.dtb k3-am642-evm-icssg1-dualemac.dtbo
+k3-am642-phyboard-electra-gpio-fan-dtbs := \
+ k3-am642-phyboard-electra-rdk.dtb k3-am642-phyboard-electra-gpio-fan.dtbo
k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
@@ -174,6 +177,7 @@ DTC_FLAGS_k3-am62-lp-sk += -@
DTC_FLAGS_k3-am62a7-sk += -@
DTC_FLAGS_k3-am62p5-sk += -@
DTC_FLAGS_k3-am642-evm += -@
+DTC_FLAGS_k3-am642-phyboard-electra-rdk += -@
DTC_FLAGS_k3-am642-tqma64xxl-mbax4xxl += -@
DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@
DTC_FLAGS_k3-am68-sk-base-board += -@
diff --git a/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
new file mode 100644
index 000000000000..5057658061b4
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * Copyright (C) 2024 PHYTEC America LLC
+ * Author: Nathan Morrisson <nmorrisson@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 28 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 = <
+ AM64X_IOPAD(0x070, PIN_OUTPUT, 7) /* (V18) GPMC0_AD13.GPIO0_28 */
+ >;
+ };
+};
+
+&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>;
+ };
+ };
+ };
+};
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan
2024-04-19 19:31 [PATCH] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan Nathan Morrisson
@ 2024-04-23 12:46 ` Wadim Egorov
2024-04-26 22:40 ` Nishanth Menon
1 sibling, 0 replies; 3+ messages in thread
From: Wadim Egorov @ 2024-04-23 12:46 UTC (permalink / raw)
To: Nathan Morrisson, nm, vigneshr, kristo, robh, krzk+dt, conor+dt
Cc: linux-arm-kernel, devicetree, linux-kernel, upstream
Am 19.04.24 um 21:31 schrieb Nathan Morrisson:
> 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>
> ---
> arch/arm64/boot/dts/ti/Makefile | 4 ++
> .../k3-am642-phyboard-electra-gpio-fan.dtso | 50 +++++++++++++++++++
> 2 files changed, 54 insertions(+)
> create mode 100644 arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
>
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index 9a722c2473fb..fd91cf40af6d 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -48,6 +48,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-pcie.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-usb3.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
> +dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-gpio-fan.dtbo
> dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
> @@ -131,6 +132,8 @@ k3-am62p5-sk-csi2-tevi-ov5640-dtbs := k3-am62p5-sk.dtb \
> k3-am62x-sk-csi2-tevi-ov5640.dtbo
> k3-am642-evm-icssg1-dualemac-dtbs := \
> k3-am642-evm.dtb k3-am642-evm-icssg1-dualemac.dtbo
> +k3-am642-phyboard-electra-gpio-fan-dtbs := \
> + k3-am642-phyboard-electra-rdk.dtb k3-am642-phyboard-electra-gpio-fan.dtbo
> k3-am642-tqma64xxl-mbax4xxl-sdcard-dtbs := \
> k3-am642-tqma64xxl-mbax4xxl.dtb k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo
> k3-am642-tqma64xxl-mbax4xxl-wlan-dtbs := \
> @@ -174,6 +177,7 @@ DTC_FLAGS_k3-am62-lp-sk += -@
> DTC_FLAGS_k3-am62a7-sk += -@
> DTC_FLAGS_k3-am62p5-sk += -@
> DTC_FLAGS_k3-am642-evm += -@
> +DTC_FLAGS_k3-am642-phyboard-electra-rdk += -@
> DTC_FLAGS_k3-am642-tqma64xxl-mbax4xxl += -@
> DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@
> DTC_FLAGS_k3-am68-sk-base-board += -@
> diff --git a/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
> new file mode 100644
> index 000000000000..5057658061b4
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-gpio-fan.dtso
> @@ -0,0 +1,50 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +/*
> + * Copyright (C) 2024 PHYTEC America LLC
> + * Author: Nathan Morrisson <nmorrisson@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 28 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 = <
> + AM64X_IOPAD(0x070, PIN_OUTPUT, 7) /* (V18) GPMC0_AD13.GPIO0_28 */
> + >;
> + };
> +};
> +
> +&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>;
> + };
> + };
> + };
> +};
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan
2024-04-19 19:31 [PATCH] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan Nathan Morrisson
2024-04-23 12:46 ` Wadim Egorov
@ 2024-04-26 22:40 ` Nishanth Menon
1 sibling, 0 replies; 3+ messages in thread
From: Nishanth Menon @ 2024-04-26 22:40 UTC (permalink / raw)
To: vigneshr, kristo, robh, krzk+dt, conor+dt, Nathan Morrisson
Cc: Nishanth Menon, linux-arm-kernel, devicetree, linux-kernel,
upstream, w.egorov
Hi Nathan Morrisson,
On Fri, 19 Apr 2024 12:31:14 -0700, Nathan Morrisson wrote:
> The phyBOARD-Electra has a GPIO fan header. This overlay enables the fan
> header and sets the fan to turn on at 65C.
>
>
I have applied the following to branch ti-k3-dts-next on [1].
Thank you!
[1/1] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan
commit: 9198fbfc14797a3a39c758ac6fb96a2169cbb70d
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
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-26 22:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-19 19:31 [PATCH] arm64: dts: ti: am64-phyboard-electra: Add overlay to enable a GPIO fan Nathan Morrisson
2024-04-23 12:46 ` Wadim Egorov
2024-04-26 22:40 ` Nishanth Menon
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®