From patchwork Fri Jun 10 11:06:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Furkan Kardame X-Patchwork-Id: 12877481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45C52C43334 for ; Fri, 10 Jun 2022 11:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UT5uT2hv/Q7Ojh48NNNpQq8eyiGTVLdwMYr9XLwEZrM=; b=dPEXXthPvp7ahn lNSY883DxvSE3W84oNKQphTjfexRJq64n8szN2glkJsR8cqLmDaOOH3obOjgNd93sKVKKDm3aD4Jl w17NQ/PumwBNnNflRoI3LtCjQbGN+lh19Bw/pmuoiCBCsbs2bJBb4wUv7+bKv6IVflPjPF160D2s4 dn4keZ+vTXZrF2AipcY+Jp92IKZnuU2Y1jje/FtaQtgm7BI13LiQZ9+M3dDB9gLr0v+Br/XKdC8Z+ 1G42IcBPpvRogZ6haPeINP0XNOFSIFNXsw4NT8DcWtrv0QUrkKkz4ZXr+FknQjXHo4WK9IsKbAwjS QEPuistOEZH5DO2MHBnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcWq-007mzb-DJ; Fri, 10 Jun 2022 11:10:12 +0000 Received: from mail.manjaro.org ([116.203.91.91]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzcTC-007kfB-O0; Fri, 10 Jun 2022 11:06:29 +0000 From: Furkan Kardame To: narmstrong@baylibre.com Cc: khilman@baylibre.com, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, Furkan Kardame Subject: [PATCH v3] arm64: dts: meson: add gpio-fan control to GS-King-X Date: Fri, 10 Jun 2022 14:06:09 +0300 Message-Id: <20220610110609.13533-1-f.kardame@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220610_040626_975369_1F5CE00F X-CRM114-Status: UNSURE ( 8.22 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org 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 --- 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"; };