Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1195638rdb; Tue, 30 Jan 2024 10:33:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsWjF92y4PRfzb2dUifOsd+tNZRJEs3zEZkFX3BvSGyIsBaafNNnpd1Hn95KYxnM2cp/cC X-Received: by 2002:a2e:b748:0:b0:2cd:a311:6ae9 with SMTP id k8-20020a2eb748000000b002cda3116ae9mr5581879ljo.5.1706639601171; Tue, 30 Jan 2024 10:33:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706639601; cv=pass; d=google.com; s=arc-20160816; b=JHr2p5ZnnG7YVzDqIrVgYxkVFJivBgSaRzq4iS94wSQm0x0sBZMumj4ZVETwUwqq/l tY3k26LjeDxVqeZSPvb+gzEeoi/DmBCmKJ7qeGoMlW45c10LUeEuFV2hXZcAL5HoJ9RH Uyk4J+row0sePpgDGfhTNTZgsA4z86KqtcppwNsT0DcA2YLgyHjLQSTE7itg3rqISjAk Ol5M/B8v+yPDaOdXXjspcXv0zI1XfuRnAqNCJsi1hUISZC1yqHc1EDgvASQ8UK5AJvDF covFWUziBXysbnMsgDakWa/xOoF/U/2REw4xnMh+FguhsGO+aPv5o3+KITDwjBXiJSHz lImg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=e9VubAmaaSRTnW+owpxkezzka6tE/KYNpuT5KbngMRE=; fh=XK0AUezlgss4FoypvEHwH/4LHEJFphnJupQdN7vLqrA=; b=vAH5tHeF0rqRtrjb5W5oaAG5oYjVyDjt95eEzV4ejSl75EjBdaCj7tol8JoRxIIVjF 91XmQR/r1Nzjlw1Mgf3XEqeW78W/OCCt73Aq71HtA6Pb7JN3c69caOej95EN+BurnEQk tTX60HYt6ifEySQ+F7kEFF5y4mVKVqBQ4hrCbgvXJ1M+heANBR6jKGWQWH3vpNxDPn6W IPSyqjBnGtFHESLm4aoQh9pYfw/7sa9nIRa4j6atUcybfxbmVcvyWvQDYLpDmyYlnCkU 5WMlmgX/1iDJ8hgf32adunBK/SymqhdeEKYmQfYkbmljTscIy3GxvCHIi3+HrOUcRP6O 4m+g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R+VycGtl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-45093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45093-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id el12-20020a056402360c00b0055c2dd4a844si4817745edb.208.2024.01.30.10.33.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:33:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-45093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R+VycGtl; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-45093-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-45093-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 392421F299F6 for ; Tue, 30 Jan 2024 18:22:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77D5D157E8A; Tue, 30 Jan 2024 18:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R+VycGtl" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0E07156985; Tue, 30 Jan 2024 18:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706638895; cv=none; b=AmqPAmMwSpGr2fF8ZwBnTiJdFgK+6M9XqMcVn62W9MN95h83LwAxeGxAGeZQFdIq07GK0oOo4E83loeiuKvwXUwQ0xYuvbi43PE2Kc6WuBi1HP1DPOmse1Uz0/qSNtQ0I1r/2PxHcBCS4heABmz5I4wucgLg6WSFefgSkJ6UJJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706638895; c=relaxed/simple; bh=adjuFoy6nt1GW5d4QC6awoBjEu5YFjCdHB0I/DbiuqY=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=kIauvlu5dlsjwGtK5GgS1HPFeOkWr4Bs06Rgm/KtI5g01+ajMfn+Uvr7+0a5uSXZC3UvIH66djIa3tG0UOBgqmfsqAtGAWqRLNdDUVYJgslQvWSeVTzZvivjjUQWD9E0/1IVmaZU5fpYPXQ/0DBcsFIx8dHlDdTj07fObiWAC38= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R+VycGtl; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33ae6f4fd78so2033944f8f.1; Tue, 30 Jan 2024 10:21:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706638892; x=1707243692; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=e9VubAmaaSRTnW+owpxkezzka6tE/KYNpuT5KbngMRE=; b=R+VycGtlDPtEzAMcLYkfkDuB0yDz9wGAhPDX0QmThcyR0pWWpRjnq4bNzEiBX6ZBK+ /654duvcSlrlZojDmjrk9ebQfYstZ1oQKRJm6EuLLX4Q/BlXOUcsqZjnai7+OJ4iWp/j p4nUkl3ujdb/Sjo+XNKCfukzxuvPjXaPtTJCUzgri647dvkIXjaa3/9qQjkzddIdRRmK ZZSicxjCAXWRqZWp/LHHDAHyMjtJjpSzOSmfrKSA+t+PtKso4t6OWv0zM8qIGnSmZsgn OPhMhEGjSKMdHkGvlqohJTGoKhQ4rixxH23S1SjsvEBp/7zcSHk6u5AqIP1dXj2DkA0z iSsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706638892; x=1707243692; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=e9VubAmaaSRTnW+owpxkezzka6tE/KYNpuT5KbngMRE=; b=Knwbbak02A9hm20vfISWo0vQHHfrwRi4M+pmnIGRN2yaCvZWN1R6q6kfVFa7Rb7rkV KxkpbgxTpXbkYUuDqLV+M1llghwospXiCjRnDfu85ke+5g8zVKtGwEnRKBqJjyxaE6zd bmC2MMg0sHokqx8GxDj3zndKDLZWdZsaqv/7kEnBuOx8SIJnb58JDfp1qODXAvcmC7Xp 9iDyoSDhHpppaWZ1Q7nFR+rFyaiL/22A30vfLX/BAIjJGer5A9cQTNQsenkA4zc+eRHx hwVggH1XZ0BAFHukIyVfOxzC/7mIBgqXTCzTqLvDKi8faAyEYYhReZFY1V1yGc8y6O9s Cd9A== X-Gm-Message-State: AOJu0YxoJlciaPS1tYGqVqJN9jBy5qVF9QEh028SEsonp6R2g6ZJucFF fkhzYFlXycJLGGrAADwLoyqQGf0O4wE74sKe3sqLznsmBcei34u9 X-Received: by 2002:adf:ee0d:0:b0:33a:fe63:77fe with SMTP id y13-20020adfee0d000000b0033afe6377femr872761wrn.15.1706638891801; Tue, 30 Jan 2024 10:21:31 -0800 (PST) Received: from [172.30.32.188] ([2001:8f8:183b:50fb::d35]) by smtp.gmail.com with ESMTPSA id u18-20020a5d4352000000b003392b1ebf5csm11374254wrr.59.2024.01.30.10.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:21:31 -0800 (PST) From: Alexey Charkov Subject: [PATCH v2 0/4] RK3588 and Rock 5B dts additions: thermal, OPP and fan Date: Tue, 30 Jan 2024 22:21:12 +0400 Message-Id: <20240130-rk-dts-additions-v2-0-c6222c4c78df@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIABg+uWUC/2WNQQ6DIBBFr2JmXRqgIuqq92hcgKBOWqUBQtoY7 l5q0lV3837+f7NDsB5tgL7awduEAd1WgJ8qGBe1zZagKQyc8poyXhN/JyYGoozBWLrlaozUgst W6g7K7OnthK9DeRsKLxii8+/jQ2Lf9CcT/7LECCWilR2XwuhLM13nVeHjPLoVhpzzBzTNuUmwA AAA To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Daniel Lezcano , Dragan Simic , Viresh Kumar , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alexey Charkov X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706638888; l=3010; i=alchark@gmail.com; s=20240125; h=from:subject:message-id; bh=adjuFoy6nt1GW5d4QC6awoBjEu5YFjCdHB0I/DbiuqY=; b=vxae3YmuZ0paCU+BN095MkbNCIEuFp5KMEL/tC4laXGc48XyJGHJrugcVTOMqkfmloKgDTgHM 8W2wls6X7ozBn/vtICz/O2r2axOzmDTAtlpqlg1kYn+osOMDrDCEUBM X-Developer-Key: i=alchark@gmail.com; a=ed25519; pk=xRO8VeD3J5jhwe0za0aHt2LDumQr8cm0Ls7Jz3YGimk= This is an assortment of device tree additions for RK3588(s) and their enablement on Radxa Rock 5B. Thermal zone information and cooling maps is the follow-up to feedback received on v3 patch version [1] - thanks a lot to Daniel for continued review of these! Changes in v4: - Set higher 'polling-delay-passive' (100 instead of 20) - Name all cooling maps starting from map0 in each respective zone - Drop 'contribution' properties from passive cooling maps Fan control on Rock 5B has been split into two intervals: let it spin at the minimum cooling state between 55C and 65C, and then accelerate if the system crosses the 65C mark - thanks to Dragan for suggesting. This lets some cooling setups with beefier heatsinks and/or larger fan fins to stay in the quietest non-zero fan state while still gaining potential benefits from the airflow it generates, and possibly avoiding noisy speeds altogether for some workloads. OPPs help actually scale CPU frequencies up and down for both cooling and performance - tested on Rock 5B under varied loads. I've split the patch into two parts: the first containing those OPPs that seem to be no-regret with general consensus during v1 review [2], while the second contains OPPs that cause frequency reductions without accompanying decrease in CPU voltage. There seems to be a slight performance gain in some workload scenarios when using these, but previous discussion was inconclusive as to whether they should be included or not. Having them as separate patches enables easier comparison and partial reversion if people want to test it under their workloads, and also enables the first 'no-regret' part to be merged to -next while the jury is still out on the second one. [1] https://lore.kernel.org/linux-rockchip/1824717.EqSB1tO5pr@bagend/T/#ma2ab949da2235a8e759eab22155fb2bc397d8aea [2] https://lore.kernel.org/linux-rockchip/CABjd4YxqarUCbZ-a2XLe3TWJ-qjphGkyq=wDnctnEhdoSdPPpw@mail.gmail.com/T/#m49d2b94e773f5b532a0bb5d3d7664799ff28cc2c Signed-off-by: Alexey Charkov --- Changes in v2: - Dropped the rfkill patch which Heiko has already applied - Incorporate feedback received on the thermal and OPP code (see above) - Link to v1: https://lore.kernel.org/r/20240125-rk-dts-additions-v1-0-5879275db36f@gmail.com --- Alexey Charkov (4): arm64: dts: rockchip: enable built-in thermal monitoring on rk3588 arm64: dts: rockchip: enable temperature driven fan control on Rock 5B arm64: dts: rockchip: Add OPP data for CPU cores on RK3588 arm64: dts: rockchip: Add further granularity in RK3588 CPU OPPs arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 34 ++- arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 371 ++++++++++++++++++++++++ 2 files changed, 404 insertions(+), 1 deletion(-) --- base-commit: 8a696a29c6905594e4abf78eaafcb62165ac61f1 change-id: 20240124-rk-dts-additions-a6d7b52787b9 Best regards, -- Alexey Charkov