Linux clock framework development
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Chen-Yu Tsai <wens@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Daniele Briguglio <hello@superkali.me>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Diederik de Haas <diederik@cknow-tech.com>,
	Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
	Ricardo Pardini <ricardo@pardini.net>
Subject: Re: [PATCH] clk: rockchip: rk3588: don't disable unused I2S MCLK output gates
Date: Wed, 5 Aug 2026 19:09:23 -0400	[thread overview]
Message-ID: <anPCo9nkOjpBUOlq@redhat.com> (raw)
In-Reply-To: <CAGb2v64kcadr1nAisu_3kyE-=-4oypDXTvAy--jQHa0VhmYoXg@mail.gmail.com>

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 <heiko@sntech.de> 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


  reply	other threads:[~2026-08-05 23:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24 12:39 [PATCH] clk: rockchip: rk3588: don't disable unused I2S MCLK output gates Daniele Briguglio
2026-06-24 13:42 ` Sebastian Reichel
2026-06-27  7:30 ` Ricardo Pardini
2026-06-28 19:13 ` Heiko Stuebner
2026-07-23  5:34   ` Ricardo Pardini
2026-08-05 16:53     ` Igor Paunovic
2026-08-05 17:00   ` Chen-Yu Tsai
2026-08-05 23:09     ` Brian Masney [this message]
2026-08-06  3:37       ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anPCo9nkOjpBUOlq@redhat.com \
    --to=bmasney@redhat.com \
    --cc=diederik@cknow-tech.com \
    --cc=heiko@sntech.de \
    --cc=hello@superkali.me \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mturquette@baylibre.com \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=ricardo@pardini.net \
    --cc=sboyd@kernel.org \
    --cc=wens@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox