Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp602559rdh; Wed, 7 Feb 2024 14:21:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvipwCLp7JIDJTFJOZQVcITFqKDJEZ9u2EccNYFcBFIpt69OoKnFCz4+GovlC7q54sLHTG X-Received: by 2002:a05:620a:4612:b0:785:a648:6ff with SMTP id br18-20020a05620a461200b00785a64806ffmr167603qkb.36.1707344485233; Wed, 07 Feb 2024 14:21:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707344485; cv=pass; d=google.com; s=arc-20160816; b=pokNad3ZORvwmfx2ZNF2f1dXtb9WkDqD4OMLiiYoKT+9likHxoZyZbRJqZnS+ogoMV 1HXQJD5YRYuiQ213PCYHXBeYxd3FSOyo32HewoQ1cAOlpY8oyYB71jiTRX8KIYgIAJ99 jo7of1fzGS5ZBEX2GjpT1g7Sq/VVz9vBs2UY6RuwcmnebZthXGYiPsmVNe/qQkSh+NwE 8adHUB9vZ+JtuN1cr+nktP4EeQmkI1+2NZsMuFbueS2kYUCm0cpfc92or13wY8HjLftj Ud1wpLbJxHBlzRLlJEOuh2d2VZVRFUwEjeqhWbpGfsUVfDKec/MGoy+MNEeDmlIA6vHf OQpQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=eJhrs04xgEpmz99w4LZjg0w+qu2XVcprjfFaFuIENRs=; fh=8ot14U39ZGDdiS263tAKZK0DqxeeXtiSErQqNUSUzfw=; b=vkNFQaBSd+R+0j5CMv+oS29MLPzLvV3lZ9RXMOhM6hJ8WPCIknaatkbrhA8gfhFFm6 BeX0G6IeNrKFSzt3ILgzhBOpa/Ouco6z7Ak5bDpVUnxwgDlP9/IJyYJMKtM4eosLaeXf BJq66U0tZADxpjujc/YloGmWX3IvwaSaWPza07YvosPSLwUjoGJpMq19UKovjRdJZkAL sQRsbL4U5R84/rmaqodmfnp4zF1EuG9zhb8WAXllukx+3qwikDRWZTRxMzzKHQTxRW5N ntZ6CIBaQCtPDvV4TuEplwpK4QSo3NrmscwJdhxnl90u41UbZc740aol2xfN3PMmKugn 4vDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PUVxTqRN; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-57253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com X-Forwarded-Encrypted: i=2; AJvYcCUtlSkmXnWFKGmTVNCy9T9e6HbkVLXqOTVJSrbNqnwabx/MTbluA8ZKxhF9lipi9oM8+gXo3UJQ7YebQCkVvgT1XYzqFL/1Cmj5WG0czg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i29-20020a05620a0a1d00b007859e914bb3si1664346qka.190.2024.02.07.14.21.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 14:21:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PUVxTqRN; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-57253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EF89E1C23468 for ; Wed, 7 Feb 2024 22:21:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 277C1149E01; Wed, 7 Feb 2024 22:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="PUVxTqRN" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4851A149DE1; Wed, 7 Feb 2024 22:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707344476; cv=none; b=G8lV43u3Wp+m/YNSfXd1AGUBBXKVTg/rZjR8dD38fxj/aospaVCXxUZjrw8JEA4q0uCmLV1X6NWjtM6wf6TNKgqOGiXe4t6uHxby7e5TJvazynZPVVW+UKyISVKTHpubbnLiTJiDOQ8Og6YvOfvTfmiWn9lk1vTMaiENLKTXtBE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707344476; c=relaxed/simple; bh=MwKKEGQFdFPG17wTp+h4gYVVhNXo2sy1ZgK90C/wlfc=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=tBWV0/PC1/DaEzb7RI5r9JPRhlhApvOkyYfbOJz02Z1lNcyn7l4PufgP6r+bPHSmX1DwrbbJYg1ApU+i8B9n/iWg49AEOaEeioEY6+c9DEYYQnfqfru/QtP3OfhHVPlEUg4KG0F7R+wCV0Jn+KxrL7P6j85CzF3+/v7CjMUsX8g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=PUVxTqRN; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 417MKeTo092705; Wed, 7 Feb 2024 16:20:40 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1707344440; bh=eJhrs04xgEpmz99w4LZjg0w+qu2XVcprjfFaFuIENRs=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=PUVxTqRNaX/jUnmKv47wB7SCWj2JxwopdOptbRF1OTFKZJYiqq0vMmAIaxFgVCh94 39oahiqbKdv8cFNCMeTwR95k5Lfb+nqMo7YAEcmT7kG38Lv1ParELxzjDHP+jctdTh ahBXLUPGnrBOrjZC6eOvJOQgBbBvvyilY9tpWj+w= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 417MKerg046097 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 7 Feb 2024 16:20:40 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 7 Feb 2024 16:20:40 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 7 Feb 2024 16:20:40 -0600 Received: from [10.249.42.149] ([10.249.42.149]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 417MKdtZ043771; Wed, 7 Feb 2024 16:20:39 -0600 Message-ID: Date: Wed, 7 Feb 2024 16:20:39 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] arm64: dts: ti: am62-phyboard-lyra: Add overlay to enable a GPIO fan Content-Language: en-US To: Nathan Morrisson , , , , , , CC: , , , , References: <20240207172820.478332-1-nmorrisson@phytec.com> From: Andrew Davis In-Reply-To: <20240207172820.478332-1-nmorrisson@phytec.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 2/7/24 11:28 AM, Nathan Morrisson wrote: > The phyBOARD-Lyra 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 > --- > arch/arm64/boot/dts/ti/Makefile | 1 + > .../ti/k3-am62-phyboard-lyra-gpio-fan.dtso | 51 +++++++++++++++++++ > 2 files changed, 52 insertions(+) > create mode 100644 arch/arm64/boot/dts/ti/k3-am62-phyboard-lyra-gpio-fan.dtso > > diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile > index 52c1dc910308..379fb4f31a1f 100644 > --- a/arch/arm64/boot/dts/ti/Makefile > +++ b/arch/arm64/boot/dts/ti/Makefile > @@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-dev.dtb > dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-mallow.dtb > dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-wifi-yavia.dtb > dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk.dtb > +dtb-$(CONFIG_ARCH_K3) += k3-am62-phyboard-lyra-gpio-fan.dtbo Why not call this k3-am625-phyboard-lyra-gpio-fan.dtbo to match the name of the base board it applies to better? Andrew > > # Boards with AM62Ax SoC > dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb > diff --git a/arch/arm64/boot/dts/ti/k3-am62-phyboard-lyra-gpio-fan.dtso b/arch/arm64/boot/dts/ti/k3-am62-phyboard-lyra-gpio-fan.dtso > new file mode 100644 > index 000000000000..9c05748bdd9d > --- /dev/null > +++ b/arch/arm64/boot/dts/ti/k3-am62-phyboard-lyra-gpio-fan.dtso > @@ -0,0 +1,51 @@ > +// SPDX-License-Identifier: GPL-2.0-only OR MIT > +/* > + * Copyright (C) 2024 PHYTEC America LLC > + * Author: Garrett Giordano > + */ > + > +/dts-v1/; > +/plugin/; > + > +#include > +#include > +#include "k3-pinctrl.h" > + > +&{/} { > + fan: gpio-fan { > + compatible = "gpio-fan"; > + gpio-fan,speed-map = <0 0 8600 1>; > + gpios = <&main_gpio0 40 GPIO_ACTIVE_LOW>; > + #cooling-cells = <2>; > + pinctrl-names = "default"; > + pinctrl-0 = <&gpio_fan_pins_default>; > + status = "okay"; > + }; > +}; > + > +&main_pmx0 { > + gpio_fan_pins_default: gpio-fan-default-pins { > + pinctrl-single,pins = < > + AM62X_IOPAD(0x0a4, PIN_OUTPUT, 7) /* (M22) GPMC0_DIR.GPIO0_40 */ > + >; > + }; > +}; > + > +&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>; > + }; > + }; > + }; > +};