All of lore.kernel.org
 help / color / mirror / Atom feed
From: Furkan Kardame <f.kardame@manjaro.org>
To: narmstrong@baylibre.com
Cc: khilman@baylibre.com, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	Furkan Kardame <f.kardame@manjaro.org>
Subject: [PATCH v3] arm64: dts: meson: add gpio-fan control to GS-King-X
Date: Fri, 10 Jun 2022 14:06:09 +0300	[thread overview]
Message-ID: <20220610110609.13533-1-f.kardame@manjaro.org> (raw)

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>
---
Fixed speed-map indentation, aligned bracket, changed cooling-device and increased temperature to 70°C
 .../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

WARNING: multiple messages have this Message-ID (diff)
From: Furkan Kardame <f.kardame@manjaro.org>
To: narmstrong@baylibre.com
Cc: khilman@baylibre.com, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	Furkan Kardame <f.kardame@manjaro.org>
Subject: [PATCH v3] arm64: dts: meson: add gpio-fan control to GS-King-X
Date: Fri, 10 Jun 2022 14:06:09 +0300	[thread overview]
Message-ID: <20220610110609.13533-1-f.kardame@manjaro.org> (raw)

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>
---
Fixed speed-map indentation, aligned bracket, changed cooling-device and increased temperature to 70°C
 .../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-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-06-10 11:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 11:06 Furkan Kardame [this message]
2022-06-10 11:06 ` [PATCH v3] arm64: dts: meson: add gpio-fan control to GS-King-X Furkan Kardame

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220610110609.13533-1-f.kardame@manjaro.org \
    --to=f.kardame@manjaro.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=narmstrong@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.