From patchwork Mon Nov 16 08:45:07 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Iyengar via B4 Relay X-Patchwork-Id: 4132 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 8A0C81C58FC for ; Mon, 16 Nov 2026 09:45:11 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-27728-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-27728-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 0AC372F0DB for ; Mon, 16 Nov 2026 08:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794818709; b=UZPcKQsAUcy+HQRMP8c5F1ATkH/FKPwxDXCq3jwNRYRly7v/K03eU4zScMJhD1ELKLTn q0vfD/0JV7RcRRSccs1JWO+Z+GEgg30T7LRpEFXrtugrg0p+0q2m9qc96b/Nv89OtkzRG RRe8Ssg7NRfa1+UB35S/WXoPEjkKqgPRmlHyayo+A2/uJZq/LLO6nlZoyj6gTQKHCp8Fk a3Ckj3nKijNROsQ3zjYg3R4EJ+VAHP4l7YvluhVuFzdOmWItbwITGumKjJsFJIpDfZlZo DHpmPoRvEK92r6WRFz6jSrspmy4uKw8lOn+a2B3gIrZyrDP013DkJx7uIDSHkXY6M0A== ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794818709; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=Z4qmgXwM2I+am+EKwmSmoiLxNulMJ5aJrfNpjBxX2QM=; b=5dTg+qbM+ZX75Cn1uBk2IdWmVOyctnv1J/DLxcuFCWlLvrc66If8K0SyD4qKa5HtBqSw MtF7/TNSvyEJvCaACNOQnlueR24+6xtmRJYeBcvU2fR0+hf+Eln/aDj4JmNo2X5IBbe/H GJ4740jPglX8nd5VqcnBZVogwkdrzyHXo1ZYR5kGZKZERfPgQ7JznfF1dUk3VVhaKe3Bv IPyXP4X8QKJHApiXCjBGw0jegVP9s7W1swZG/esGJKTzFicPjVsLzfyDjrPqlU3kxcSYn We5eDYBjy/6OPdFDQjVmVCqBGYqZctIhnHFlGJsbk/6J5gxllXywA4SvYzVrGIv+AiA== ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TyKTOqIy; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5337A606A33A; Mon, 16 Nov 2026 08:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TyKTOqIy X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794818709; b=nHgNd1HDKxX6kqgC89MFLD9QXgG4b2Nt+uQeY5QbBmhajT3N6UVg44xAWPGCuH8e/xGO 429pYFRFbxh5DazKZKAs6vBl3SE/CFFIqEgTnsar43povp5k9By2fVKGIub7OrOBr6uHw D+9/I8ygsohL8Ewm15oCaVTmPhHO3mbZqWggrNHdrdgNHkGfz6dbQiCtW4kG64F1C3/Kd gmCNuzzyA2ShzKGb57WnB0C4hTdhK4MBeG9CG2ULGb9Ke6TgIo4oa4GsJuUKJH73o71eC drxKC6ak1khDqoezMcG/oo1uHnBZj/bgqg+6mLuOBzSOp+lCFzz8xm8vSCnsUk3TffA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794818709; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=Z4qmgXwM2I+am+EKwmSmoiLxNulMJ5aJrfNpjBxX2QM=; b=oSWDOJA7GL+YPFdHsrACaWrggjXFhgEaqBo/4dvdicBOvXSsLq+GT/v2+k2+2yVenKnG EfkhPIyu2C2EbcG0XDmpE8aWiEska5sRGfsbhyjMfy4AjRji/AjLKxXv6xymJesqZvna3 2iK6xaYOy2vqwqCRJrScSw3gvZlGEYUfk2yJAf+yYnNEgpJmVED4yJjKEWzSPt6lBpqe1 XdB3Ahk4fxElB72tqQC86dL7BBXqZaIj2emy4OUvus0bpXcrDMxfrJjHJCrIDfHUeILmt Y0io2brGrAkREY4lqak2fhEFdVC1wRPSPVtvbx3z1jwECI7pI0CR925rZV4A/fiW8kg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=TyKTOqIy; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E725606A332; Mon, 16 Nov 2026 08:45:09 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1794818709; b=D+D+St9UKRC0rB/ZIg3lEl1+BpFUf8TnhF+Ej3tE15hSm1UqyRuEv3P6DwYZqvRjWIA8 65jEvaz1PKCL5NSjRNn2spwcIjQXe2wKO5ZyNrHQMdJJcO4gUl6BWR3fePLHz1lhEMLZo XYnYom+i78Jbtp6XKa9Nk2xeAdxwY614Yh9gY+Mowczl7TlS26sVjeMDf+bDh+VJhoLPY CcxEsp2S/sBiS8yJXVdoLFU33Zp5HvwWvJ4vBwCnWJveKcHJ5ut+nH98kj+Mv7jjXYj6p 0TwcY62HI95LBWYXmOFCytW9mB2xwkmcV3K/z4WOfkZbz30cI+NO2Gm1DvSC0aTvFqQ== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1794818709; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=Z4qmgXwM2I+am+EKwmSmoiLxNulMJ5aJrfNpjBxX2QM=; b=k1cbD5TCviaeLzLs6vx0rOoBal7Td5p3DT0o9alKBMIGKs74SlYjGt9aOTB8iBlWCU3W iRRBdJ7p2bCakqgD6k+oyMxeGc54d8vQdduUJf3cgYF/W46tP15smSV7UeNyZx4CVbEJ6 fZ2ARpozJbe2w/xE1AuVOGU1H56TNBa6GmY1ir7W4cpxPuPapmPOJC/f/ENT6B81tPAL/ AtFf67sqNMRCCGxu889JaQDzTghQjMu/CALzEx7o0wsLCRGUuvdmKfRuZlK7t3aCDeJvn tmFqEffpE+0+UU/yXIlWCMtZMjEMEwRgJIrfeu6ToFYdJA13jBtHcnxiTfFVla0UhgA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 06C671F000C4; Mon, 16 Nov 2026 08:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794818709; bh=Z4qmgXwM2I+am+EKwmSmoiLxNulMJ5aJrfNpjBxX2QM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=TyKTOqIylekrsjRO3i6r75Muw0/Qohjr/Ij/v33WpTiTdh1/V2PnER/pL9XmTJRuj MGFxowdNGWCg4irxUfjbEd01ag8T3xPBEoHaIshuh6+ivfO1YCcSkZ1E3layFU4H25 YpUKDPjezrfDI9L8/iOCuhEMAoSSwSrQOAc2iVnK8IVQLhCOFOVP2uokGyprsMkPr2 ID+1PfYI/3OJM68Yl+tnSnY9SWtROaZxhQNp2V44SJMpPpIXOI2i41idWZw9Cv/xzM 0IT/iKXyqASr+X6ARSzauZduV0VtxUmSeN2SscDSpA930+PsXhYpcasnhywQU56PEB Yd1d1Uhg9unkQ== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 741D84A3D1; Mon, 16 Nov 2026 08:45:07 +0000 (UTC) From: Arun Iyengar via B4 Relay Date: Mon, 16 Nov 2026 08:45:07 +0000 Subject: [PATCH v2 1/2] clk: sunxi-ng: h616: Gate the PLLs with their output enable bit X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261116-h616-pll-output-gate-v2-1-a418026ffae6@gmail.com> References: <20261116-h616-pll-output-gate-v2-0-a418026ffae6@gmail.com> In-Reply-To: <20261116-h616-pll-output-gate-v2-0-a418026ffae6@gmail.com> To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Stephen Boyd , Brian Masney , Jerome Brunet Cc: Andre Przywara , Maxime Ripard , Philippe Simons , Ilya Titov , linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arun Iyengar X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1794818707; l=4955; i=aiyengar1990@gmail.com; s=20261110; h=from:subject:message-id; bh=8jODp0ifglQsXJHJh7FAOxppXVcA5WOgGJP8Gd4G8UQ=; b=lcVILKaaUIqNwmfPoDq7OsVPyU9PQI7Va8OL8g2mnN5zlfOtrwpotn90YOF1jCKJOVHhuRWM/ oHmTpOlEoxABhhLOnTwnJ3zjebpso2ewYjnN8rF+mPt2w2mOgYgKyCH X-Developer-Key: i=aiyengar1990@gmail.com; a=ed25519; pk=zXpRgUTrhaFe6jLyPqbBy3ccfkj04w0g2690Wv3mg+0= X-Endpoint-Received: by B4 Relay for aiyengar1990@gmail.com/20261110 with auth_id=1480 X-Original-From: Arun Iyengar Reply-To: aiyengar1990@gmail.com X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-2.29 / 15.00]; BAYES_HAM(-5.50)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; R_DKIM_TEMPFAIL(1.00)[kernel.org:s=k20260515]; HFILTER_HELO_IP_A(1.00)[tor.lore.kernel.org]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; FROM_HAS_DN(0.00)[]; RSPAMD_EMAILBL_FAIL(0.00)[aiyengar1990.gmail.com:query timed out]; TAGGED_RCPT(0.00)[clk]; FREEMAIL_REPLYTO(0.00)[gmail.com]; FREEMAIL_CC(0.00)[arm.com,kernel.org,gmail.com,wirenboard.com,vger.kernel.org,lists.linux.dev,lists.infradead.org]; RCPT_COUNT_TWELVE(0.00)[15]; RCVD_COUNT_FIVE(0.00)[6]; FROM_NEQ_ENVFROM(0.00)[devnull@kernel.org,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-27728-noreply=patchwork.local,aiyengar1990.gmail.com]; TO_DN_SOME(0.00)[]; MAILSPIKE_FAIL(0.00)[172.105.105.114:query timed out]; R_SPF_DNSFAIL(0.00)[temporary DNS error]; FORGED_SENDER_MAILLIST(0.00)[]; MSBL_EBL_FAIL(0.00)[aiyengar1990@gmail.com:query timed out]; DKIM_TRACE(0.00)[kernel.org:?]; MIME_TRACE(0.00)[0:+]; FREEMAIL_TO(0.00)[kernel.org,gmail.com,sholland.org,redhat.com,baylibre.com]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; RCVD_TLS_LAST(0.00)[]; HAS_REPLYTO(0.00)[aiyengar1990@gmail.com] X-Rspamd-Queue-Id: 8A0C81C58FC X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX From: Arun Iyengar Gate the H616 PLLs with the output enable bit (27) instead of the enable bit (31), which powers the PLL down, as the manual (3.3.3.6) recommends and the A100, D1 and A523 drivers do. Power them up once at probe. On an Orange Pi Zero2, powering pll-video0 down at 453 MHz crashes the CPU doing the write. Fixes: 88dde5e23da1 ("clk: sunxi-ng: Add support for the Allwinner H616 CCU") Signed-off-by: Arun Iyengar --- drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h616.c b/drivers/clk/sunxi-ng/ccu-sun50i-h616.c index c5e5b3f78846..4037c5f022a8 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h616.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h616.c @@ -36,7 +36,7 @@ */ #define SUN50I_H616_PLL_CPUX_REG 0x000 static struct ccu_mult pll_cpux_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .mult = _SUNXI_CCU_MULT_MIN(8, 8, 12), .common = { @@ -50,7 +50,7 @@ static struct ccu_mult pll_cpux_clk = { /* Some PLLs are input * N / div1 / P. Model them as NKMP with no K */ #define SUN50I_H616_PLL_DDR0_REG 0x010 static struct ccu_nkmp pll_ddr0_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -65,7 +65,7 @@ static struct ccu_nkmp pll_ddr0_clk = { #define SUN50I_H616_PLL_DDR1_REG 0x018 static struct ccu_nkmp pll_ddr1_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -80,7 +80,7 @@ static struct ccu_nkmp pll_ddr1_clk = { #define SUN50I_H616_PLL_PERIPH0_REG 0x020 static struct ccu_nkmp pll_periph0_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -97,7 +97,7 @@ static struct ccu_nkmp pll_periph0_clk = { #define SUN50I_H616_PLL_PERIPH1_REG 0x028 static struct ccu_nkmp pll_periph1_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -114,7 +114,7 @@ static struct ccu_nkmp pll_periph1_clk = { #define SUN50I_H616_PLL_GPU_REG 0x030 static struct ccu_nkmp pll_gpu_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -133,7 +133,7 @@ static struct ccu_nkmp pll_gpu_clk = { */ #define SUN50I_H616_PLL_VIDEO0_REG 0x040 static struct ccu_nm pll_video0_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -151,7 +151,7 @@ static struct ccu_nm pll_video0_clk = { #define SUN50I_H616_PLL_VIDEO1_REG 0x048 static struct ccu_nm pll_video1_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -169,7 +169,7 @@ static struct ccu_nm pll_video1_clk = { #define SUN50I_H616_PLL_VIDEO2_REG 0x050 static struct ccu_nm pll_video2_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -187,7 +187,7 @@ static struct ccu_nm pll_video2_clk = { #define SUN50I_H616_PLL_VE_REG 0x058 static struct ccu_nkmp pll_ve_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -202,7 +202,7 @@ static struct ccu_nkmp pll_ve_clk = { #define SUN50I_H616_PLL_DE_REG 0x060 static struct ccu_nkmp pll_de_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(1, 1), /* input divider */ @@ -229,7 +229,7 @@ static struct ccu_sdm_setting pll_audio_sdm_table[] = { #define SUN50I_H616_PLL_AUDIO_REG 0x078 static struct ccu_nm pll_audio_hs_clk = { - .enable = BIT(31), + .enable = BIT(27), .lock = BIT(28), .n = _SUNXI_CCU_MULT_MIN(8, 8, 12), .m = _SUNXI_CCU_DIV(16, 6), @@ -1183,10 +1183,10 @@ static int sun50i_h616_ccu_probe(struct platform_device *pdev) if (IS_ERR(reg)) return PTR_ERR(reg); - /* Enable the lock bits and the output enable bits on all PLLs */ + /* Power up and lock-enable all PLLs; bit 27 gates them (3.3.3.6) */ for (i = 0; i < ARRAY_SIZE(pll_regs); i++) { val = readl(reg + pll_regs[i]); - val |= BIT(29) | BIT(27); + val |= BIT(31) | BIT(29); writel(val, reg + pll_regs[i]); } From patchwork Mon Nov 16 08:45:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Iyengar via B4 Relay X-Patchwork-Id: 4133 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 905031C597F for ; Mon, 16 Nov 2026 09:45:11 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27726-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-27726-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 71FEB2C742 for ; Mon, 16 Nov 2026 08:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794818709; b=42gbuWaYkp5GFbL043e+pcCSWYyujJN9yy71i570G0m8oG4yPyZrrKG/tqGLdrcmhhvB iJREsyBquR9kxY/WQSckGiwCH/7L2nz8PgcGR8rPwLUbHvfNjGyDd32iECsu7fYbWANqK JumZr/exJSJsSjJE/Ej+mCCBNreyxwIKrOjK3x2TIfmgedJyyuWA5nTUCRsJxR0CqnDt+ AzPl+1Jk+Ha05z/TSTZe84yuykmcCEnju1NYASjQhBh5peOBuD5Vv4GAfl3Lnah4H2pRY AT0bTW79zWIQikBoSYbFA9fMc1MSSNB1f1D9FjjkRna6E4xwYovTfNJG9j5jgo6CBmw== ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794818709; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=78oIkokJZirdbrk9ibRh931gBhzKbqHoRYpE62Jld9U=; b=ZQ7RKUJcRR7V6i/HbsrgeoyxH0XuZICaW0g6t66oTvC8u0sE7vKPyeYgJDZXRrdRFG8N hm4o6mmYJ5t1j7GotHUAvK+1Xqb1lEthiRldKWugZ1MHhoxY28VEqGmn48WB9R9wqCBf5 w5VU/jUdP8aEPZXlWxFeRdB2m0FhTC3aU7Srr9QRiQ9Gt0SJEhxj6M7qaC2efth1ksfzI enVnB+4YOcD/yYRYHOtHEYjYAD3PdC1h4tDXoIvBtyprfLY/TkXrh5Wc1GyxhWZXQv+9D UGvFVRRowKU+mm/09Aecd2QS6IB2msQBG4F9sJ9xJl4QxnY4Y7R6R8GIYATrY51JBjA== ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=B4pcMMA4; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1891D606A32F; Mon, 16 Nov 2026 08:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=B4pcMMA4 X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794818709; b=x1SK1W0N18c1hsSb9zTfinqhIRLrjG+V9lkvXunxkvxboEJGqSK76Vho/OC4QBON1aCo 2dotGk+8RZ1ZcMpk2hFvS7Ov3WT5lx7mpoFEuubW895gyiYDlPvtD84kmYDhq5xg/UI+Q BuLRSTDXwGDy1ftC3pztosP0DZ4hLDS4jpXG76qVa7tROJKmbhqUYD6dV5LR+5zecIjCi 0LQjnc7JBy4Ft/bDwYVGkoCOWpxr+YCTHN9ZKozGX/A4vEHgagmcuSuldNM7g8KHTsV6j ZUWHJ0kPEDhu00pE7mjOu8C1+dwI+PZX5lLb6WWRHq9ZHc8hQueiaXf5D7rO7J3g2LQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794818709; h=Received:DKIM-Signature:Received:From:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=78oIkokJZirdbrk9ibRh931gBhzKbqHoRYpE62Jld9U=; b=uclWl8q/bRh3zPVe5GUTL8jjEdCc44JDSeKS0R9X+D69uGVA9P3iosWlDW5QH/LvD0Pg aLAXEc8diVmw0priXq3nScT9GaxhTZezSAlMFPwR/9I1j2t79dDTtubqvUFYT3/hPt5xI td4p7JL7io/3/mXChQI3Vu/PVYoSyR/WMWmW6DsWxNJhNlaFecTDCEfmrT3wpcdIW56ki Bgs07jSojnJ02IpW07mfBrf6CpudkKtcX+TZXX87ENNhqQWsw9PjhBWrWC/z2eSVNtNtg rAhV5DQ2qAWmn/XozOYaUlL9QgIbp4hDVKCencidl4J293znIiKG76k9fRKk66uCAIg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=B4pcMMA4; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E50C5606A32C; Mon, 16 Nov 2026 08:45:08 +0000 (UTC) Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1794818708; b=yw+ctRDtUPXtaLb0/SPqvwx3UUgEXrslQ7cyP0wmtWdAcFbOv4qTmqtRVSLNwe7k4xBn JXAJPdjOTk6ZNT5GIxw7lr+v1jFlg28JnP/v/r1RaI7G5ilsUa7GeucbQW7f9VE6EBpwY VIuNwtFHKdl4hzA9ZSUU9bC6MbnVI1itnNfpC4iGr3Kg6Wc4nhE5eYBb4LOC54lHBllWw olK9QSSNs3VnZ/3KfCrUxG7LhQVIMoHhG/C+UqpLY4hifsi0R5NEq/hwguq9YI/bEmTjd it2DQ8Nc/cvlDJ3GICm2nOn9SnbdyGPtzr/ZOVn3p035aHtNmcexTkb43lJDPOlOlgA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1794818708; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=78oIkokJZirdbrk9ibRh931gBhzKbqHoRYpE62Jld9U=; b=uo3lO7OS9lnp3fwMgrkSbs3xWLa+7MdnBy4Ac32bwLwv8D7WVh/tioEtUcHeaQttYVou F1F3cm8FPADVEbyxz2x/1M3KgA0zCmTltD8NDLr+wIgQRm6tl64vLWngN8rwC8D06zO7v RLFV3bCmQMwrMGtl+1i6SvWeiqqJTXamgLAFjwUNIbBpej3rpe8rnV0PLSBgiiTahmnCU AHNZdA7Pd7fMJd6d3nR0yvxKwVYKpIAG+iXVH9kDEjt/Wqf/oDzM8RLtjOQLTtqvNE0IM r72hAYZYy/Lg2DhXK7CeDZbAhZUPtfKeFZOr10oc4CGVSAnA/wH7cDvFEr9pCaJUwwg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 0A9D91F000C6; Mon, 16 Nov 2026 08:45:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794818708; bh=78oIkokJZirdbrk9ibRh931gBhzKbqHoRYpE62Jld9U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=B4pcMMA4BJqIPjhjMnjzKs0EdRb6/d2cskScb/0ONtBSX8ZDRpMighL8FX0/JImPB cherqBXTxCrDKoZxksNTCFsxd3wtItrFSwVLEbbvTnldSt3K9T1CNixhZ9C0ErV1Bd RTJMiWqeO3yZCgsQPaiNujziQcbf8S1YULiqYJU9oTzOB2OfBXtmKoFdIVuVBcH8md W1LzuPR9dhAUdw72Rh6Gs/29KhIQxD1IAUhGTnkCqrbO9VO1A0najE7IcO8xbOskQ1 xBun5Zu+c56rZz7PksugmM0rfdhdxVMizNglaxbo4r+HWlrLaAlEHTO9TOalAnqeZB yfenFN24Z04dg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 896204A3E2; Mon, 16 Nov 2026 08:45:07 +0000 (UTC) From: Arun Iyengar via B4 Relay Date: Mon, 16 Nov 2026 08:45:08 +0000 Subject: [PATCH v2 2/2] clk: sunxi-ng: h616: Register GPU PLL notifier before mux notifier X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: <20261116-h616-pll-output-gate-v2-2-a418026ffae6@gmail.com> References: <20261116-h616-pll-output-gate-v2-0-a418026ffae6@gmail.com> In-Reply-To: <20261116-h616-pll-output-gate-v2-0-a418026ffae6@gmail.com> To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Stephen Boyd , Brian Masney , Jerome Brunet Cc: Andre Przywara , Maxime Ripard , Philippe Simons , Ilya Titov , linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arun Iyengar X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1794818707; l=1471; i=aiyengar1990@gmail.com; s=20261110; h=from:subject:message-id; bh=QL/weaZ6VGxEBkGAwe9yYKN6VnO0kkiDcNvaqnoXQSE=; b=77W17WrT9nFCzC+g6lJHQ5hR7OvFqbPOm6VA8sd65vxexQQJGeaCX4IXRt/PSOBZ0yJZ8Jt5Q ZJfHeM/omhGBwPsMy926W+02bT/vUWgreFPRf7oIuJYzzYK6vuEvh8w X-Developer-Key: i=aiyengar1990@gmail.com; a=ed25519; pk=zXpRgUTrhaFe6jLyPqbBy3ccfkj04w0g2690Wv3mg+0= X-Endpoint-Received: by B4 Relay for aiyengar1990@gmail.com/20261110 with auth_id=1480 X-Original-From: Arun Iyengar Reply-To: aiyengar1990@gmail.com X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [1.01 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; R_DKIM_ALLOW(-0.20)[kernel.org:s=k20260515]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; RSPAMD_EMAILBL_FAIL(0.00)[aiyengar1990.gmail.com:query timed out]; FREEMAIL_CC(0.00)[arm.com,kernel.org,gmail.com,wirenboard.com,vger.kernel.org,lists.linux.dev,lists.infradead.org]; RCPT_COUNT_TWELVE(0.00)[15]; TAGGED_RCPT(0.00)[clk]; RCVD_COUNT_FIVE(0.00)[6]; FREEMAIL_REPLYTO(0.00)[gmail.com]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; MSBL_EBL_FAIL(0.00)[aiyengar1990@gmail.com:query timed out]; FROM_NEQ_ENVFROM(0.00)[devnull@kernel.org,linux-sunxi@lists.linux.dev]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TO_DN_SOME(0.00)[]; MAILSPIKE_FAIL(0.00)[172.234.253.10:query timed out]; R_SPF_DNSFAIL(0.00)[~any]; FORGED_SENDER_MAILLIST(0.00)[]; TAGGED_FROM(0.00)[bounces-27726-noreply=patchwork.local,aiyengar1990.gmail.com]; DKIM_TRACE(0.00)[kernel.org:+]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,gmail.com,sholland.org,redhat.com,baylibre.com]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; HAS_REPLYTO(0.00)[aiyengar1990@gmail.com] X-Rspamd-Queue-Id: 905031C597F X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX From: Arun Iyengar Register the GPU PLL notifier first, so the GPU goes back to the PLL only after it has re-locked, as required by commit 02ae2bc6febd ("clk: sunxi-ng: Add clk notifier to gate then ungate PLL clocks"). Commit 0ec5e7572ddc ("clk: sunxi-ng: h616: register CPU PLL notifier before mux notifier") did this for the CPU. Fixes: eb963d7948ce ("clk: sunxi-ng: h616: Reparent GPU clock during frequency changes") Signed-off-by: Arun Iyengar --- drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/clk/sunxi-ng/ccu-sun50i-h616.c b/drivers/clk/sunxi-ng/ccu-sun50i-h616.c index 4037c5f022a8..8f53605eaafa 100644 --- a/drivers/clk/sunxi-ng/ccu-sun50i-h616.c +++ b/drivers/clk/sunxi-ng/ccu-sun50i-h616.c @@ -1254,13 +1254,16 @@ static int sun50i_h616_ccu_probe(struct platform_device *pdev) ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk, &sun50i_h616_cpu_nb); + /* + * Re-lock the GPU PLL after any rate changes. Must be registered + * before the mux notifier, so GPU goes back to a locked PLL. + */ + ccu_pll_notifier_register(&sun50i_h616_pll_gpu_nb); + /* Reparent GPU during GPU PLL rate changes */ ccu_mux_notifier_register(pll_gpu_clk.common.hw.clk, &sun50i_h616_gpu_nb); - /* Re-lock the GPU PLL after any rate changes */ - ccu_pll_notifier_register(&sun50i_h616_pll_gpu_nb); - return 0; }