From mboxrd@z Thu Jan 1 00:00:00 1970 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 4A385D18129 for ; Mon, 14 Oct 2024 15:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=07GU8WAJO17q5kdEYI1T6Pkw2Te0wqsYowGyYUe3E2Y=; b=no464TUZrorgCbZXqvm+KtTyiz kcoVKiIV86ThbFYR6cBnqQUXo9Son4gVbQuxF6sM7pB0p8rhgfMgj3nBa0XJgHCl8PC4kvT4JK3IX hMR/VZBUhF5vjg3zzrEk0lzyZAyiTEd0D3knGYzdcxL0yRdPr4IEMzBFfXGpgqqMtGOI87cjCXnnb zdL1SawMAwHkGELHMDF4CIksXpiMDtojM1+Po0kJoOF6/dwwLGK8JyK8fLMKmOnOcG2y8ZfiUW9Af 6uEO7NrpGmhYLNdi7VtZBoRjP31qykl687tGaXR7cOI5wDqNB+B1k8ikU5bpE4+MO+hoWPpeItUg7 u86S3G+A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0NMs-00000005ltS-2sLw; Mon, 14 Oct 2024 15:52:22 +0000 Received: from mail.manjaro.org ([116.203.91.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0NJu-00000005lMa-0YFC; Mon, 14 Oct 2024 15:50:54 +0000 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1728920955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=07GU8WAJO17q5kdEYI1T6Pkw2Te0wqsYowGyYUe3E2Y=; b=nCxpvM7/REPjEP7L+Eu+UD5LaESncMaO408biL9S099TjPN4oAaHd6bachmrfsWtbjEibr t0fMGljO5BKSv5Wy1Cg1NrFAgMkPEigUlQigSNlGoJZYi1QPo4KRayvO/jXsKZ70bRR65O taO/t1fcjayKsZ1V5IicY9Q/Gjh2aOUk9gYn8ZtKSSvxproXOZWMSspfT53xmNnDLi2CaH O9gIifPgOa+4bofj1RjK2bhIxW+S3mGJEkd/8vJiLmD2peJwevILTvOaIgAEJQUy357FlB BnWPN+F70tJtDnVdIa9sCp7YDDQj2vyuXg9tK7kBASbFBtbYkmfh+kmz5hTICg== Date: Mon, 14 Oct 2024 17:49:14 +0200 From: Dragan Simic To: Quentin Schulz Cc: Heiko Stuebner , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Quentin Schulz , Klaus Goger Subject: Re: [PATCH v2 06/14] arm64: dts: rockchip: Remove #cooling-cells from fan on Theobroma boards In-Reply-To: <4f8a87da-76b1-4fa6-8755-5dbf10bfd74e@cherry.de> References: <20241008203940.2573684-1-heiko@sntech.de> <20241008203940.2573684-7-heiko@sntech.de> <3fe3561f1839ed17dfa74ba0a408482d@manjaro.org> <4f8a87da-76b1-4fa6-8755-5dbf10bfd74e@cherry.de> Message-ID: X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241014_084918_788850_0E42AA8F X-CRM114-Status: GOOD ( 18.86 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Quentin, On 2024-10-14 17:39, Quentin Schulz wrote: > On 10/9/24 9:16 AM, Dragan Simic wrote: >> On 2024-10-08 22:39, Heiko Stuebner wrote: >>> All Theobroma boards use a ti,amc6821 as fan controller. >>> It normally runs in an automatically controlled way and while it may >>> be >>> possible to use it as part of a dt-based thermal management, this is >>> not yet specified in the binding, nor implemented in any kernel. >>> >>> Newer boards already don't contain that #cooling-cells property, but >>> older ones do. So remove them for now, they can be re-added if >>> thermal >>> integration gets implemented in the future. >>> >>> Fixes: c484cf93f61b ("arm64: dts: rockchip: add PX30-µQ7 (Ringneck) >>> SoM with Haikou baseboard") >>> Fixes: d99a02bcfa81 ("arm64: dts: rockchip: add RK3368-uQ7 (Lion) >>> SoM") >>> Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) >>> SoM") >>> Cc: Quentin Schulz >>> Cc: Klaus Goger >>> Signed-off-by: Heiko Stuebner >>> Reviewed-by: Quentin Schulz >> >> Looking good to me, thanks for the patch.  In addition to the amc6821 >> driver currently not supporting full integration into the thermal >> framework, the "fan" DT node also isn't referenced in any cooling map, >> so having it define the "cooling-cells" property is of no use. >> >> By the way, it would be nice to see the amc6821 driver supporting fan >> speed regulation, and test it to check who does a better job when it >> comes to cooling and fan speed regulation, the thermal framework or >> the chip's built-in logic. :) > > Wasn't this feature added this summer by Guenter? > > c.f. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/hwmon/amc6821.c?id=becbd16ed2f8f427239ffda66b5d894008bc56af > > Mode 4 is > https://elixir.bootlin.com/linux/v6.11.3/source/drivers/hwmon/amc6821.c#L367 > ([FDRC1:FDRC0] = [01] -> Software-RPM Control Mode (Fan Speed > Regulator) according to the datasheet). Ah, SENSOR_DEVICE_ATTR_RW(fan1_target, fan, IDX_FAN1_TARGET)... How did I miss that? Hmm... Maybe I was looking at some older local branch, which happened not to include that commit. Anywyay, good to know, thanks. > In any case, we cannot compare those for our products as we do not > have a genuine AMC6821 but a handmade simulation of the IP we run in > an MCU. I seem to remember your MCU that performs a few tasks, back from some related discussions. I wonder what was the reason to implement it in software, instead of using actual fan controller chip? > But that'd be an interesting data point indeed :) I'm glad that you agree. :)