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: 13374105 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 42C48C83F2C for ; Mon, 4 Sep 2023 15:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Bl+hFsvBV81JocnWgJ7H918E+JfSW+xxQMimWYaN9D8=; b=V0+RTAJ+dUblH/ STh1ShqU1qUIdsi3iC6Tu8zNae8IUede5xOJdGDY0SuX5GZkBjcWg3Op2/JFMwCgLZpGkqSnn8w9d FIvYJvIumk6RGeh0ywA+U5Gxf+hYGFUjDNZwN/jGrxtwiFkY/Ap8ssSEXMwSiuFqlNYK/86Uq8+xP vnVTz9FbBFE5EiJUKxWyNa/0hGDNqwIhbMsWqdDQH6kHHg2g4+kF+dgjuSCIU37FDgR4YCmDBNjDm y9dnUMs+52+Lws7vs+au2/8VDVYY6elmo8CpSROLOm7aUr4pJlCdyyFih6hmji7LgETpLGeABIAZr pujgELFUZsOuaHAYHpsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdBx4-004Ptp-1v; Mon, 04 Sep 2023 15:57:22 +0000 Received: from m-r1.th.seeweb.it ([2001:4b7a:2000:18::170]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdBwy-004PqK-0j for linux-arm-kernel@lists.infradead.org; Mon, 04 Sep 2023 15:57:20 +0000 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230904_085716_476463_DC53B26D X-CRM114-Status: GOOD ( 12.73 ) 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, 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,