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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 741E2C001B0 for ; Thu, 13 Jul 2023 13:57:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C2FE886C70; Thu, 13 Jul 2023 15:57:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1689256651; bh=sVtdS6nCmcfSsTKTCgiTw0tHxYMgey2dtqaBITby6/U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j9W9fH4u6OKMyS57TvcWCANNU902BJ9FrbTMYXMhOLhI62SIkIiSfJGG12X41p7l6 2Hd3rMZOAp5+YvbHyM50r0CCoehtd/knrsJJ63zGg6H+CFANYCAAhtkHWjL5nmNMxJ IcGnR1CTboPgUBWVlVr919JbXEg5joMxTtFO5Y364wjhlQ/6geRycqx6RN/h/jBG3h pZnVkOuRdQIunV+NfOs6l8VCSWtUCySddfy65AmfnA+hPig/XpbAUhIatubh1frwtY r4scCqEa4sfKbw1nxEnGjYzjqjWemGFNs8qN7qxDIn5rTVcBJ2oVc/RuszMy3ODOGc sy+i2obe2K1IQ== Received: by phobos.denx.de (Postfix, from userid 109) id EC5DF86C71; Thu, 13 Jul 2023 15:57:30 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [80.241.59.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 69A2986C44 for ; Thu, 13 Jul 2023 15:57:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4R1x4k13cfz9sNb; Thu, 13 Jul 2023 15:57:26 +0200 (CEST) Message-ID: Date: Thu, 13 Jul 2023 15:57:25 +0200 MIME-Version: 1.0 Subject: Re: [PATCH] arm: mvebu: Enable gpio-fan for Thecus N2350 board Content-Language: en-US To: Tony Dinh , U-Boot Mailing List Cc: Tom Rini , =?UTF-8?B?UGFsaSBSb2jvv71y?= References: <20230620232023.27816-1-mibodhi@gmail.com> From: Stefan Roese In-Reply-To: <20230620232023.27816-1-mibodhi@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4R1x4k13cfz9sNb X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 6/21/23 01:20, Tony Dinh wrote: > Add gpio-fan in the DTS and enable the GPIO in board file to start the fan > during boot. > > Note that this patch depends on > https://patchwork.ozlabs.org/project/uboot/patch/20230606214539.4229-1-mibodhi@gmail.com/ > > Signed-off-by: Tony Dinh Applied to u-boot-marvell/master Thanks, Stefan > --- > > arch/arm/dts/armada-385-thecus-n2350.dts | 15 +++++++++++++++ > board/thecus/n2350/n2350.c | 2 +- > 2 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/dts/armada-385-thecus-n2350.dts b/arch/arm/dts/armada-385-thecus-n2350.dts > index 2ad5158c0c..253cf01130 100644 > --- a/arch/arm/dts/armada-385-thecus-n2350.dts > +++ b/arch/arm/dts/armada-385-thecus-n2350.dts > @@ -140,6 +140,16 @@ > }; > }; > > + fan { > + compatible = "gpio-fan"; > + gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; > + gpio-fan,speed-map = < 0 0 > + 600 1 > + 3000 2 >; > + pinctrl-0 = <&pmx_fan>; > + pinctrl-names = "default"; > + }; > + > usb3_0_power: v5-vbus0 { > compatible = "regulator-fixed"; > regulator-name = "USB3_0_Power"; > @@ -378,6 +388,11 @@ > marvell,pins = "mpp17"; > marvell,function = "gpio"; > }; > + > + pmx_fan: pmx-fan { > + marvell,pins = "mpp48"; > + marvell,function = "gpio"; > + }; > }; > > &sdhci { > diff --git a/board/thecus/n2350/n2350.c b/board/thecus/n2350/n2350.c > index fd8f95f944..05b125fd7f 100644 > --- a/board/thecus/n2350/n2350.c > +++ b/board/thecus/n2350/n2350.c > @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; > #define N2350_GPP_OUT_ENA_LOW (~(BIT(20) | BIT(21) | BIT(24))) > #define N2350_GPP_OUT_ENA_MID (~(BIT(12) | BIT(13) | BIT(16) | BIT(19) | BIT(22))) > #define N2350_GPP_OUT_VAL_LOW (BIT(21) | BIT(24)) > -#define N2350_GPP_OUT_VAL_MID (BIT(0) | BIT(12) | BIT(13)) > +#define N2350_GPP_OUT_VAL_MID (BIT(0) | BIT(12) | BIT(13) | BIT(16)) > #define N2350_GPP_POL_LOW 0x0 > #define N2350_GPP_POL_MID 0x0 > Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de