Re: [PATCH] clk: rockchip: rk3588: don't disable unused I2S MCLK output gates
Brian Masney <[email protected]> Wed, 5 Aug 2026 19:09:23 -0400
| Newsgroups | org.kernel.vger.linux-clk,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Chen-Yu, On Thu, Aug 06, 2026 at 01:00:02AM +0800, Chen-Yu Tsai wrote: > On Mon, Jun 29, 2026 at 3:13 AM Heiko Stuebner <[email protected]> wrote: > > > > > > On Wed, 24 Jun 2026 14:39:14 +0200, Daniele Briguglio wrote: > > > No in-tree board references these gates yet. Boards drive the codec > > > MCLK through the parent I2S*_8CH_MCLKOUT, and now that the gates are > > > managed clocks, clk_disable_unused() turns them off at boot. On a board > > > that relied on firmware leaving the output enabled, that cuts the MCLK > > > and analog audio stops working. > > > > > > Mark the four gates CLK_IGNORE_UNUSED so an unreferenced gate keeps the > > > state firmware left. A board that wants the kernel to own the gate can > > > reference I2S*_8CH_MCLKOUT_TO_IO from DT instead. > > > > > > [...] > > > > Applied, thanks! > > > > [1/1] clk: rockchip: rk3588: don't disable unused I2S MCLK output gates > > commit: 946352b2f88fd2378f0341312e47dff1e8dc2fac > > In hindsight maybe it would have been a better idea to map the existing > clock ID I2S*_8CH_MCLKOUT to the new gates, and add (or not add) new > clocks for the internal MCLK gates. > > Then you wouldn't need to update the DTs, wouldn't need this workaround, > and wouldn't depend on the bootloader to set the registers correctly when > booting an old DT. Help me understand for the future: If the approach you describe would have been used, then the clocks in the kernel would have been mislabeled in the kernel driver compared to what's actually on the SoC, correct? That would have been more desirable in order to keep compatibility with the older DTs? But the older DTs can still reference the mux, correct? From the kernel's perspective in this scenario, the important thing is for the mux to select the appropriate parent. The end gate will always be left on. From a power management perspective, the power will be cut further up the clock tree as needed. Brian