From patchwork Mon Sep 4 15:57:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Botka X-Patchwork-Id: 720078 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30754CA0FE9 for ; Mon, 4 Sep 2023 15:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350332AbjIDP5P (ORCPT ); Mon, 4 Sep 2023 11:57:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236342AbjIDP5O (ORCPT ); Mon, 4 Sep 2023 11:57:14 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84FCFCE0; Mon, 4 Sep 2023 08:57:09 -0700 (PDT) Received: from v0.lan (bband-dyn191.178-41-225.t-com.sk [178.41.225.191]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id AAA411F8A1; Mon, 4 Sep 2023 17:57:04 +0200 (CEST) From: Martin Botka Subject: [PATCH 0/6] cpufreq for H616 Date: Mon, 04 Sep 2023 17:57:00 +0200 Message-Id: <20230904-cpufreq-h616-v1-0-b8842e525c43@somainline.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEz+9WQC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI2MDCyMT3eSC0rSi1ELdDDNDM10DY3ODlDTTxNREYxMloJaCotS0zAqwcdG xtbUAEKOQaV4AAAA= To: Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , "Rafael J. Wysocki" , Viresh Kumar , Yangtao Li , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Andre Przywara , Alan Ma , Luke Harrison , Marijn Suijten , AngeloGioacchino Del Regno , Konrad Dybcio , Rogerio Goncalves , Martin Botka , Martin Botka X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1693843024; l=1631; i=martin.botka@somainline.org; s=20230811; h=from:subject:message-id; bh=U/3GSrY/Da5OP4VIOMN9GgEPvGCUXEMC8rHSLoKA2Rw=; b=MtvEf/mtaOylRcOzTcUjowCffBGTFqT6Srlp77NJ9QYCFml/mSDTBkShMH7IpjvA6TZsxu7K+ RVNodzZtuxfBZ3LhwAyAp68ANZQnuFvystXI1eMcjZPUvCL16DzlGJw X-Developer-Key: i=martin.botka@somainline.org; a=ed25519; pk=aTCd3jmwU8GrJidWg3DSKLpdVMcpFzXzCSLXLR6NtWU= Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hello, This patch series adds support for cpufreq on H616 SoC. H616 is bit interesting. It has SoC versions that have different frequencies and uV but some versions have the same version ID and we have to check the SoC revision to differentiate between them. This is done via SMCCC. Thus the exporting of the symbol. Please note that this series depends on my THS series which depends on my SID series. I also have not enabled the cpufreq on any devices to minimize the series dependencies and I did test it only on CB1 where it works. Cheers, Martin Signed-off-by: Martin Botka --- Martin Botka (6): firmware: smccc: Export revision soc_id function cpufreq: dt-platdev: Blocklist allwinner,h616 SoC dt-bindings: opp: Add compatible for H616 cpufreq: sun50i: Add H616 support arm64: dts: allwinner: h616: Add CPU Operating Performance Points table arm64: dts: allwinner: h616: Add cooling cells .../opp/allwinner,sun50i-h6-operating-points.yaml | 6 +- .../boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi | 129 ++++++++++++++++++ arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 8 ++ drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/sun50i-cpufreq-nvmem.c | 149 +++++++++++++++++---- drivers/firmware/smccc/smccc.c | 1 + 6 files changed, 270 insertions(+), 24 deletions(-) --- base-commit: a384547b9656aa2c98f643037b0e940476c41f51 change-id: 20230824-cpufreq-h616-0370df5aea34 Best regards,