From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9215837C0ED for ; Mon, 10 Aug 2026 08:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.254.200.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786351345; cv=none; b=STxWtGVVOUaNImv8+e+ojftle6/ix/2QMnIKgD/GJBKRH8jvFi0NwKBKU/tZklNTHD25lan9gpa7D3JNiEwc+aR18IpKusgQO6tzgVPBVFa/8QlCAtPjeLpvBcTBqXdd9KkFyYOq8FUhJlfkOSIPvsWnn+7QQzFjAyBcRzhXTBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786351345; c=relaxed/simple; bh=zfC7lhtC0ZhBcGSHDYbkMlXmarTuC594GkrsxACApUQ=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=ugPubJhHISiL4PWIdZ/x6PvrwWzL1QlL0hxhoO49q0dvi59c9M/DY+tw1ICOXj1yQ2ZfMa9YMtRSw6EcIK6q+Fnvbl8ql6Na5LxAPTigwkJxcqazRyiFtwB+pbTvjqRihkejFWkOq7959DXtWqByDtEVuaxMCX/t0JEO3DXeiSw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.spacemit.com; spf=none smtp.mailfrom=linux.spacemit.com; dkim=pass (1024-bit key) header.d=linux.spacemit.com header.i=@linux.spacemit.com header.b=HRLtggHk; arc=none smtp.client-ip=54.254.200.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.spacemit.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.spacemit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.spacemit.com header.i=@linux.spacemit.com header.b="HRLtggHk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.spacemit.com; s=mxsw2412; t=1786351331; bh=9b6ShfMeZe2xAUD9+B2Stmwf48m8aw2mvouvW/AlHHI=; h=Mime-Version:Date:Message-Id:Subject:From:To; b=HRLtggHkBolSBrIPx9nj8ksUQmTeljrGMWt9857vQ1He4T9s+/CwUb017b/x5EsqB mBMKKaiPId1d8DljHuCSpuVh4ZTg+3r1nFfN9nGCS4YRECfCH4vFqv+Ngo1VgGOEgy KV29832C4TkRn7voV4gDjaMPpeaOFsPnNmtKSeog= X-QQ-mid: esmtpgz15t1786351327tc93958f4 X-QQ-Originating-IP: kbLOV7gjYlNvnl0rraFfGXYnouNtT815jhLZiJswT5s= Received: from = ( [120.237.158.181]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 10 Aug 2026 16:42:05 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 1439357261299029505 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: multipart/signed; boundary=5c2444142807e9cfb537af5f4976382a35e3a9d6e77c043f51e0fe45cff4; micalg=pgp-sha512; protocol="application/pgp-signature" Date: Mon, 10 Aug 2026 16:42:02 +0800 Message-Id: Cc: , , , Subject: Re: [PATCH 1/2] clk: spacemit: re-enable PLLs after init From: "Troy Mitchell" To: "Yao Zi" , "Michael Turquette" , "Stephen Boyd" , "Brian Masney" , "Yixun Lan" , "Inochi Amaoto" , "Alex Elder" , "Haylen Chu" References: <20260804-k3-pll5-pll8-1800mhz-v1-0-a3a75866ce32@linux.spacemit.com> <20260804-k3-pll5-pll8-1800mhz-v1-1-a3a75866ce32@linux.spacemit.com> In-Reply-To: Content-Transfer-Encoding: 8bit X-QQ-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B/e85Qd4fSZgf2l2XWXZBeoheRnNS+GxhwQLbJ7UXEZFwhCQrW/9OKWSOXy2QVo VcLQFyFL6I+es1WUIj0XejG7QQSO4df0VT/NvdfqDglITlLmM+ISF057DjyzDIH0eu2ygPD 5XUm5KGENLU9XqCfhp75Wk= X-QQ-XMRINFO: Nq+8W0+stu50tPAe92KXseR0ZZmBTk3gLg== X-QQ-RECHKSPAM: 0 --5c2444142807e9cfb537af5f4976382a35e3a9d6e77c043f51e0fe45cff4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 > I don't think this patch makes sense. > > If this PLL is essential for some components of the systems to work, > there's no chance to re-program it safely after the kernel gets started, > since all the PLLs in K1 and K3 are specified as CLK_SET_RATE_GATE. > > If the essential clocks could be re-parented glitchlessly, registering > a notifier and re-parenting it before the PLL disables might be a > solution. In this case, we need to delay the operation in > ccu_pll*_init() until clock registration fully completes. > > Otherwise, re-enabling the PLL seems totally extra here, they could be > enabled on the fly when it's going to be used. You are right. In both hunks, ccu_pll*_disable() has already gated the PLL before the newly added ccu_pll*_enable() can run: > @@ -148,7 +148,7 @@ static int ccu_pll_init(struct clk_hw *hw) > ccu_pll_disable(hw); > ccu_pll_update_param(pll, &pll->config.rate_tbl[0]); > > - return 0; > + return ccu_pll_enable(hw); > } > [...] > > @@ -252,7 +252,7 @@ static int ccu_plla_init(struct clk_hw *hw) > ccu_plla_disable(hw); > ccu_plla_update_param(pll, &pll->config.rate_tbl[0]); > > - return 0; > + return ccu_plla_enable(hw); > } Re-enabling the PLL afterwards therefore does not make reprogramming safe for a live consumer. I will drop this patch, "[PATCH 1/2] clk: spacemit: re-enable PLLs after init", from v2. To avoid delaying the 1.8 GHz rate-table update while this broader issue is investigated, I will resend the current "[PATCH 2/2] clk: spacemit: k3: add 1.8 GHz PLL5 and PLL8 rates" as a standalone patch. It only adds the firmware-selected 1.8 GHz settings to the rate tables. The existing problem of reprogramming an unmatched PLL from ccu_pll*_init() needs a broader solution and is independent of the rate table update. I will address this issue in a separate patch series. - Troy --5c2444142807e9cfb537af5f4976382a35e3a9d6e77c043f51e0fe45cff4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEABYKACsWIQSL4Ay2cExaPXAQcU2YCe+A+TM0LwUCanmO2g0caUB0cm95LXku b3JnAAoJEJgJ74D5MzQvCy8A/3AS+h5VxUd4a+hzLwgWTitmdjKz5AQxKY9ffa9g 0PEaAP46TDFaDGtlJxZlgxExHbHVjyTZ7P44F33VqpOtqO4bBw== =9C3d -----END PGP SIGNATURE----- --5c2444142807e9cfb537af5f4976382a35e3a9d6e77c043f51e0fe45cff4--