From patchwork Mon Aug 3 18:07:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Juan_Manuel_L=C3=B3pez_Carrillo?= X-Patchwork-Id: 2935 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 49A511C209E for ; Mon, 3 Aug 2026 20:42:54 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=gmail.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-25005-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-25005-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id B9178308E868 for ; Mon, 3 Aug 2026 18:10:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F53B438FED; Mon, 3 Aug 2026 18:08:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GtJwR/Oe" X-Original-To: linux-sunxi@lists.linux.dev 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 B625A438033 for ; Mon, 3 Aug 2026 18:08:07 +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=1785780489; cv=none; b=GY0trAyymvgnKj5mIryEKGBW2mvshUE61PM/oJ6FaoO0pmbSR+TuStzk28joAMN1VDJv2pP40XqwjyN59lju4KPjOcpiBv4qCC9Ev63NKjb45bbIP7QyrHDbu2ET8bMWhmQzITzJ0PXC45ibTUOxDkA0OUV0sKffzsHm9tr5dE8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785780489; c=relaxed/simple; bh=PVzzc9du/j/IIUtVI0EpD2qkwZbInKS9/yBMHMA5D4g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=U14aHZoArNkEoKLAM3qrTyl8d8FqbqPmo2gONqm0MOcSEfay4E51szO/vyzaMwqbNmpRdR0/kpv1rFcc9iojZtvtiYhyayxZ+LAkbndOhS2BH3rwNJiHnyzCFj0E06lrEhzFj++Px7IYgUc30bsEtUL5Suw0NlHFE95+im4ZiYs= 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=GtJwR/Oe; 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-47f703a9e5dso1871718f8f.0 for ; Mon, 03 Aug 2026 11:08:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785780486; x=1786385286; darn=lists.linux.dev; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=6BWR8dmRaEKQHkFK66ev0gVEIwNsNYFwR9W/SfWvzP8=; b=GtJwR/OeIQ9Y4K+/Gol+UU7qKHlQwjNb3zyWi/I4GF5ctQbmwdCKfdAoJ4Gxr20oYG bYo4yTmpE919XxKGkKoDKAY3d29nIUbgk8y0IzxnWA6J7/oS9r1uyctVGc5Gx/cFzhpu lGww94T637QkGzO/KTCGbST3gtj0r6f4WstsQ9R6SjBG4lsrTV9L50e/lVuVNOrcq8GH OhXDbRpROm4BDAo9ME7PYFaYf4DgvcN9seUYYdphlKddBozEP0VWMp0212o/UHz51JUD AOk4IHYHb0UywPcIZzr/chQaC0ym1ChrbL5G2njBeTabl5Nl4GtBVNT5P9LtAejdbxjt C4HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785780486; x=1786385286; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=6BWR8dmRaEKQHkFK66ev0gVEIwNsNYFwR9W/SfWvzP8=; b=gr39ZlulvsPNEPN3tMtIOw7Utq0GJGTRroJeWhUmweb/wOmiRCAaZMH1KCMvF/AKhY jdrYe7Yabj2NMRnVe+VYFxP4nplzE8n7Z/3hKiHxgxpX9WjxN9CmZxsPdYphss9rDwRf DGIIujlqKAVwb8S0MS5vkwt1O+6u6lfU/soh2FN9u0uL83R0ypFRoCA4oEo8ZYutRGrq BEzfehTJ6ryGFLTy+uUigo5dWchkOjGqDb6jCg/76m44LmNmwTqS1l1tH1d9cmREurJB 3xLaN9hkfGIZfrjvGZTXAeiq+gvYAjxBijY1S2tg6ttLNpEXH/98cpfCYnHP3vVC+Hvx F51g== X-Forwarded-Encrypted: i=1; AHgh+Rr/oX3DO322I3t8AlnXuSRg/V7VQ5keGLkULfTgrG8rSkdMApnsaqnGhbFpp1vDngD5WcEvpMtCowBERQ==@lists.linux.dev X-Gm-Message-State: AOJu0Yw66IQFSvKtAKSeZj72M3H4nHPD71rHwG+J62D9UVyMoYtZaCRb PkNwgHXTRnr94QaQ9tjeVT2HTRrLlm9SqlEHwmJYF/1qITqCbNEN5cW1 X-Gm-Gg: AR+sD12ZEuMMKXX8ScimroV4BoxMGVBdHDo7gOaqOqdgsJTaT1zJ3C9/dPSlE0WcYmj QDM/QJhN0PyDuF+nMTVc9ECMQQorsU1VjFne843Gs7NYBiqQCm5ePl2noasXdno+Y0Qnr6b82qY zTRDAlboBkE8eoVo3jcPe5IQZNVHhlQSKtJF/RAcVEsAXufmlv3xmkdfnyj3GUwBzSMje917jlq Q1E/4vQkk/hbSaov7wlOdjaw7LLB/XXOPWeaDtyvi1mAmlSsIdKzzdZB9wRvF4bWxwrZuZqJycV JCmgEPjqkw4NltQpj3epnlM+8yZ1D5fKiq1Aq63zum5CaU8K/vjlqMhy7xBsGqDntmAB8rSYZI2 wqZCOf+zE9HtVAhY3thlrto47ZyjyiG+BTd+hPGuF8fpWvLS4mFgXm2jSue1OtYF4Eb26VusAXB 8pqN8HrvdgKkWPse6Bt2lIAKlhJn3CAKqxaKOASGM03UBx2pG9IqvfTL82Thh0kVxmWRBQFbXQh GYWeYNz3cifUboZaLhm7kNu X-Received: by 2002:a5d:59c8:0:b0:47f:9404:5185 with SMTP id ffacd0b85a97d-47fd72c78ebmr26973780f8f.24.1785780485932; Mon, 03 Aug 2026 11:08:05 -0700 (PDT) Received: from localhost.localdomain ([2a0d:3344:2841:7708:a101:2b8a:f76:a00f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fd42d91b3sm37950955f8f.14.2026.08.03.11.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 11:08:05 -0700 (PDT) From: =?utf-8?q?Juan_Manuel_L=C3=B3pez_Carrillo?= To: mturquette@baylibre.com, sboyd@kernel.org, wens@kernel.org, jernej.skrabec@gmail.com, samuel@sholland.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: andre.przywara@arm.com, bmasney@redhat.com, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Juan_Ma?= =?utf-8?q?nuel_L=C3=B3pez_Carrillo?= Subject: [PATCH v2 3/3] arm64: dts: allwinner: a523: add GPU OPP table Date: Mon, 3 Aug 2026 20:07:55 +0200 Message-ID: <20260803180755.288793-4-juanmanuellopezcarrillo@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260803180755.288793-1-juanmanuellopezcarrillo@gmail.com> References: <20260803180755.288793-1-juanmanuellopezcarrillo@gmail.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.16 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_SOFTFAIL(1.00)[gmail.com : SPF not aligned (relaxed), No valid DKIM,none]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_TWELVE(0.00)[16]; TAGGED_RCPT(0.00)[dt]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[0.27.119.64:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; FORGED_SENDER_MAILLIST(0.00)[]; FREEMAIL_CC(0.00)[arm.com,redhat.com,vger.kernel.org,lists.linux.dev,lists.infradead.org,gmail.com]; FREEMAIL_TO(0.00)[baylibre.com,kernel.org,gmail.com,sholland.org]; PRECEDENCE_BULK(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; TAGGED_FROM(0.00)[bounces-25005-noreply=patchwork.local]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[juanmanuellopezcarrillo@gmail.com,linux-sunxi@lists.linux.dev]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 49A511C209E X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Add the Mali-G57 operating points from the vendor BSP universal table (150/200/300/400/600 MHz) so panfrost devfreq can scale the GPU instead of running at the boot clock. The table describes the SoC rather than any particular board, so it lives in the .dtsi and is referenced from the GPU node there; every A523/T527 board in tree already provides mali-supply. The BSP universal table specifies 900 mV for all of these operating points, so that is the target and minimum voltage. The maximum is set to 920 mV to also cover boards whose GPU rail is a fixed 920 mV supply (the Orange Pi 4A drives it from AXP717 DCDC2, fixed at 920 mV), where the voltage transitions are then no-ops. The higher speed-bin points of the BSP (648-792 MHz) are not included: they are gated by a SID efuse bin and need pll-gpu as a live parent. Depends on the sun55i-a523 GPU clock divider fix: the OPP rates are only produced correctly with the cycle-masking divider model. Validated on hardware with the Mali cycle counter: 149/199/300/399/597 MHz measured under load, thermal-emulation throttling included. Signed-off-by: Juan Manuel López Carrillo --- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi index 85ef492ffeae..a3164b5dd609 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -85,6 +85,35 @@ osc24M: osc24M-clk { clock-output-names = "osc24M"; }; + gpu_opp_table: opp-table-gpu { + compatible = "operating-points-v2"; + + opp-150000000 { + opp-hz = /bits/ 64 <150000000>; + opp-microvolt = <900000 900000 920000>; + }; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <900000 900000 920000>; + }; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <900000 900000 920000>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <900000 900000 920000>; + }; + + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <900000 900000 920000>; + }; + }; + pmu { compatible = "arm,cortex-a55-pmu"; interrupts = ; @@ -121,6 +150,7 @@ gpu: gpu@1800000 { interrupt-names = "job", "mmu", "gpu"; clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; clock-names = "core", "bus"; + operating-points-v2 = <&gpu_opp_table>; power-domains = <&pck600 PD_GPU>; resets = <&ccu RST_BUS_GPU>; status = "disabled";