* [PATCH v4] arm64: dts: meson: add gpio-fan control to GS-King-X
@ 2022-06-11 17:08 Furkan Kardame
2022-06-13 8:18 ` Neil Armstrong
2022-06-13 8:19 ` Neil Armstrong
0 siblings, 2 replies; 3+ messages in thread
From: Furkan Kardame @ 2022-06-11 17:08 UTC (permalink / raw)
To: narmstrong; +Cc: khilman, linux-arm-kernel, linux-amlogic, Furkan Kardame
GS-King-X has a single speed GPIO fan which is always-on by default.
If we add controls for the fan and a trip point,
the fan stays off most of the time, reducing background
noise from the unit.
Signed-off-by: Furkan Kardame <f.kardame@manjaro.org>
---
Changelog:
V1:
* Using tabs instead of space.
V2:
* Remove unused map.
V3:
* Fixed speed-map indentation
* Aligned brackets
* Changed cooling-device
* Increased temperature to 70°C
V4:
* Fixed syntax error.
.../boot/dts/amlogic/meson-g12b-gsking-x.dts | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
index 6c7bfacba..23592ae21 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
@@ -20,6 +20,14 @@ aliases {
rtc1 = &vrtc;
};
+ gpio_fan: gpio-fan {
+ compatible = "gpio-fan";
+ gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
+ /* Using Dummy Speed */
+ gpio-fan,speed-map = <0 0>, <1 1>;
+ #cooling-cells = <2>;
+ };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
#address-cells = <1>;
@@ -96,6 +104,23 @@ &clkc_audio {
status = "okay";
};
+&cpu_thermal {
+ trips {
+ cpu_active: cpu-active {
+ temperature = <70000>; /* millicelsius */
+ hysteresis = <2000>; /* millicelsius */
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map {
+ trip = <&cpu_active>;
+ cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&frddr_a {
status = "okay";
};
--
2.36.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v4] arm64: dts: meson: add gpio-fan control to GS-King-X
2022-06-11 17:08 [PATCH v4] arm64: dts: meson: add gpio-fan control to GS-King-X Furkan Kardame
@ 2022-06-13 8:18 ` Neil Armstrong
2022-06-13 8:19 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2022-06-13 8:18 UTC (permalink / raw)
To: Furkan Kardame; +Cc: khilman, linux-arm-kernel, linux-amlogic
On 11/06/2022 19:08, Furkan Kardame wrote:
> GS-King-X has a single speed GPIO fan which is always-on by default.
> If we add controls for the fan and a trip point,
> the fan stays off most of the time, reducing background
> noise from the unit.
>
> Signed-off-by: Furkan Kardame <f.kardame@manjaro.org>
> ---
> Changelog:
> V1:
> * Using tabs instead of space.
>
> V2:
> * Remove unused map.
>
> V3:
> * Fixed speed-map indentation
> * Aligned brackets
> * Changed cooling-device
> * Increased temperature to 70°C
>
> V4:
> * Fixed syntax error.
> .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 25 +++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
> index 6c7bfacba..23592ae21 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts
> @@ -20,6 +20,14 @@ aliases {
> rtc1 = &vrtc;
> };
>
> + gpio_fan: gpio-fan {
> + compatible = "gpio-fan";
> + gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
> + /* Using Dummy Speed */
> + gpio-fan,speed-map = <0 0>, <1 1>;
> + #cooling-cells = <2>;
> + };
> +
> gpio-keys-polled {
> compatible = "gpio-keys-polled";
> #address-cells = <1>;
> @@ -96,6 +104,23 @@ &clkc_audio {
> status = "okay";
> };
>
> +&cpu_thermal {
> + trips {
> + cpu_active: cpu-active {
> + temperature = <70000>; /* millicelsius */
> + hysteresis = <2000>; /* millicelsius */
> + type = "active";
> + };
> + };
> +
> + cooling-maps {
> + map {
> + trip = <&cpu_active>;
> + cooling-device = <&gpio_fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> + };
> + };
> +};
> +
> &frddr_a {
> status = "okay";
> };
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v4] arm64: dts: meson: add gpio-fan control to GS-King-X
2022-06-11 17:08 [PATCH v4] arm64: dts: meson: add gpio-fan control to GS-King-X Furkan Kardame
2022-06-13 8:18 ` Neil Armstrong
@ 2022-06-13 8:19 ` Neil Armstrong
1 sibling, 0 replies; 3+ messages in thread
From: Neil Armstrong @ 2022-06-13 8:19 UTC (permalink / raw)
To: Furkan Kardame; +Cc: Neil Armstrong, linux-arm-kernel, linux-amlogic, khilman
Hi,
On Sat, 11 Jun 2022 20:08:52 +0300, Furkan Kardame wrote:
> GS-King-X has a single speed GPIO fan which is always-on by default.
> If we add controls for the fan and a trip point,
> the fan stays off most of the time, reducing background
> noise from the unit.
>
>
Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v5.20/arm64-dt)
[1/1] arm64: dts: meson: add gpio-fan control to GS-King-X
https://git.kernel.org/amlogic/c/b7bfbbbf72fcf95c9a58d6ad0e905de539fba025
These changes has been applied on the intermediate git tree [1].
The v5.20/arm64-dt branch will then be sent via a formal Pull Request to the Linux SoC maintainers
for inclusion in their intermediate git branches in order to be sent to Linus during
the next merge window, or sooner if it's a set of fixes.
In the cases of fixes, those will be merged in the current release candidate
kernel and as soon they appear on the Linux master branch they will be
backported to the previous Stable and Long-Stable kernels [2].
The intermediate git branches are merged daily in the linux-next tree [3],
people are encouraged testing these pre-release kernels and report issues on the
relevant mailing-lists.
If problems are discovered on those changes, please submit a signed-off-by revert
patch followed by a corrective changeset.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
[3] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
--
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-13 8:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-11 17:08 [PATCH v4] arm64: dts: meson: add gpio-fan control to GS-King-X Furkan Kardame
2022-06-13 8:18 ` Neil Armstrong
2022-06-13 8:19 ` Neil Armstrong
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®