Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp444366lqo; Wed, 8 May 2024 04:58:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJ1N4iz++C+mhnzX099BkqI5Mb+gO+RJ8qStTXXi9aqawmSODY16drbJQA+NVJKkdaWSBtuGo4VNXoN+NSrUqB9Oe2HexoSFMl7OZWSQ== X-Google-Smtp-Source: AGHT+IHjMexD9SxMvb651zfAzL9bNc7eWCBtYW8kv1uod2obDiPlMA21MGeila40fEi4a/9ZfLou X-Received: by 2002:a05:6871:8e9d:b0:240:f3ee:6fee with SMTP id 586e51a60fabf-240f3ee7665mr236754fac.2.1715169490275; Wed, 08 May 2024 04:58:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715169490; cv=pass; d=google.com; s=arc-20160816; b=xvlPEyZUshxig/PQr7KZjFSvWcBy91L8Hm+4TDSSC0N60tQPfuTGVdOhu9hU0Jbq1x kZzLIzGFuZX8NDPxlIzfFknnBvM9kRJ0e/fHv/V80OER1bsfrgjBjH9756QgpuGTpK8D gX+OgKkF0lUSM1JNlZ+A1njr6r4UyQMQyIKY9WcjmXIfUNIL0UMmdtWkpHrRWTuiYcSW ZmySD06b7X45FBvm+K/YuaLn0P4JtXuf8jUMDyMeZAo4T7dkiB3IKhsvl0bozJxiaLJf LgNMGwzme993BCjwcdbbYhueGJ8nma9xEK2exrWCTFKszTGYkp3JkaISocx+PtzlPfh1 2ERw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:message-id:references:in-reply-to:subject :cc:to:from:date:dkim-signature:mime-version:list-unsubscribe :list-subscribe:list-id:precedence; bh=/7KXEahwdtvUHXhII1BOAbQafO3CV4psWNz/FLhIG2g=; fh=ZsH+KH/QWn9c5/jqdRA/W0YbcHOiklu2BexvdY/UTI4=; b=COQtn0ZXn77mO768U206i59pLwx01nS4sQFaZ0vA6Kn5TJA6S+bxWgLb5Fntw45zbt o6K6SdWcJJRliRgvYpNwZbG0pKP9eVlmxwFLlYyyotWuqT6OkzWoeP5qbA1/7ln3lar7 YuxbJse19Zp0VWnCKno9dxMRDhngVKwPSfj/9ZcGNXGxZZupcLLEt50vx1c0CULIC099 HJK2UqoPiUbLpG8vyFFK2k902eeYs/E6UQgyT8QCO/wsINaWojUOV/d2Vr5NotcHS2ek S4VGCsy7FW/Yui5ZYzslbL2Lk5uh9KAv2Ka4wUPxKyc4mTGLg1MmpXmjVlSkfVLtJ0zj TaJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b=QDBh2tlZ; arc=pass (i=1 spf=pass spfdomain=manjaro.org dkim=pass dkdomain=manjaro.org dmarc=pass fromdomain=manjaro.org); spf=pass (google.com: domain of linux-kernel+bounces-173176-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id j62-20020a638041000000b0061dc9000e84si10294326pgd.683.2024.05.08.04.58.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 04:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173176-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b=QDBh2tlZ; arc=pass (i=1 spf=pass spfdomain=manjaro.org dkim=pass dkdomain=manjaro.org dmarc=pass fromdomain=manjaro.org); spf=pass (google.com: domain of linux-kernel+bounces-173176-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7CF07B210F3 for ; Wed, 8 May 2024 11:46:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CC7C8248E; Wed, 8 May 2024 11:46:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b="QDBh2tlZ" Received: from mail.manjaro.org (mail.manjaro.org [116.203.91.91]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01E26823C3; Wed, 8 May 2024 11:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.91.91 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715168771; cv=none; b=i5+fC51NbtxGJh9kw4qlChGQJVmKtYzJejDZotD7+7VALWyP9TK9Z1g8zN+Ua4rmdBqTx1zNKksaZj+S8WFSbtPkUPRDH8Ff6nMmxouoxkcwV+Kblv06J1O0qdxX42Ar51aDpk+Rrm+phrI4PtaoeRVtWlXdHJUJtALYAi3b8Wk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715168771; c=relaxed/simple; bh=4MAkzDnIXfPA6ZFoEIGx5FodE3S9b44f4RuxYQaB8IU=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=UEJmztPiRE1r7XIFT3ksC0LD2NgorzxAwA6aQyGGQj013JOwiPkxQoz4H8A5y1YX922LusgNFpRAfxBMW2P0+TDBXZUh9Qaajr5I41Fh6x4QI2gVi/wLMDA0je9+LbZOjw6ML6swoRMl/dtGVZjIAsmVsvp3aB4YVrN0aDiBPGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org; spf=pass smtp.mailfrom=manjaro.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b=QDBh2tlZ; arc=none smtp.client-ip=116.203.91.91 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=manjaro.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1715168767; 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=/7KXEahwdtvUHXhII1BOAbQafO3CV4psWNz/FLhIG2g=; b=QDBh2tlZN0XdVR745PuNwmWJC81aogbhng6PQhi+qBJqxqGUGmC/52WntbUpuDCRS7Q1rJ qpyGLnZv9v/rePHAR/gDp30SXIk8+DSC5TOPtgFYCxoasYkLMniuupOWuE3WcfrEUYdnvb iJK34MVophrNrh0fei13bBCDKN48ECL5q/DjXqTakJ1wF/zJ17M3LQyjQZkqW6KOlMLK4d ieaFbxtAx75tFD/QWjRLux7J6Zf9sRUW3ZWzp6MbwpJHPWjDM3/emsJ5vyZBizH8VCHtvf 3vDyP87b1LjoTrQf3evKXqaO4jYE5EY9RPYtfjGblH3ctfOp2MrxxMl8FhBiKA== Date: Wed, 08 May 2024 13:46:06 +0200 From: Dragan Simic To: Anand Moon Cc: Alexey Charkov , Diederik de Haas , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Daniel Lezcano , Viresh Kumar , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/6] arm64: dts: rockchip: enable thermal management on all RK3588 boards In-Reply-To: References: <20240506-rk-dts-additions-v4-0-271023ddfd40@gmail.com> <20240506-rk-dts-additions-v4-2-271023ddfd40@gmail.com> <2543817.5xW6y1K4kI@bagend> 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 Hello Anand, On 2024-05-08 13:40, Anand Moon wrote: > On Mon, 6 May 2024 at 18:24, Alexey Charkov wrote: >> On Mon, May 6, 2024 at 4:29 PM Diederik de Haas >> wrote: >> > On Monday, 6 May 2024 11:36:33 CEST Alexey Charkov wrote: >> > > This enables the on-chip thermal monitoring sensor (TSADC) on all >> > > RK3588(s) boards that don't have it enabled yet. It provides temperature >> > > monitoring for the SoC and emergency thermal shutdowns, and is thus >> > > important to have in place before CPU DVFS is enabled, as high CPU >> > > operating performance points can overheat the chip quickly in the >> > > absence of thermal management. >> > > >> > > Signed-off-by: Alexey Charkov >> > > --- >> > > arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 4 ++++ >> > > 8 files changed, 32 insertions(+) >> > > >> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts >> > > b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts index >> > > b8e15b76a8a6..21e96c212dd8 100644 >> > > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts >> > > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts >> > > @@ -742,6 +742,10 @@ regulator-state-mem { >> > > }; >> > > }; >> > > >> > > +&tsadc { >> > > + status = "okay"; >> > > +}; >> > > + >> > > &uart2 { >> > > pinctrl-0 = <&uart2m0_xfer>; >> > > status = "okay"; >> > >> > I built a kernel with v3 of your patch set and someone tested it on a ROCK 5B >> > 'for me' and it had the following line in dmesg: >> > >> > rockchip-thermal fec00000.tsadc: Missing rockchip,grf property >> > >> > I'm guessing that turned up due to enabling tsadc, but (also) in v4 I didn't >> > see a change wrt "rockchip,grf". >> > Should that be done? (asking; I don't know) >> >> I'm getting the same. Neither the mainline TSADC driver [1], nor the >> downstream one [2] seems to use the grf pointer on RK3588 at all. It >> still works in spite of that warning, although I can't see how (or if) >> it configures the reset mechanism without those GRF registers. >> >> Best regards, >> Alexey >> >> [1] >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/thermal/rockchip_thermal.c#n818 >> [2] >> https://github.com/radxa/kernel/blob/stable-5.10-rock5/drivers/thermal/rockchip_thermal.c#L961 >> > > If the following changes fix the warning. > > Checking the Rockchip RK3588 TRM V1.0-Part1-20220309.pdf > PMU1GRF_SOC_CON3 which has tsadc_shut_reset_trigger_en bit > to control the Enable TSADC shut reset trigger for DDR fail safe. > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > index 85c25d5efdad..5490a44e093e 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > @@ -2662,6 +2662,7 @@ tsadc: tsadc@fec00000 { > rockchip,hw-tshut-temp = <120000>; > rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU > 1:GPIO */ > rockchip,hw-tshut-polarity = <0>; /* tshut polarity > 0:LOW 1:HIGH */ > + rockchip,pmu = <&pmu1grf>; > pinctrl-0 = <&tsadc_gpio_func>; > pinctrl-1 = <&tsadc_shut>; > pinctrl-names = "gpio", "otpout"; Basically, the rockchip_thermal driver doesn't use GRF at all on the RK3588(s), so virtually any value specified as "rockchip,pmu" can eliminate the warning. I'm already working on a rather large device-tree cleanup series, and this is already fixed in it. Are you fine with dropping your patch as a separate one, and I'll tag you with Co-developed-by in the relevant patch from my series?