Devicetree
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: sashiko-bot@kernel.org,  sashiko-reviews@lists.linux.dev,
	conor+dt@kernel.org,  linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org,  robh@kernel.org
Subject: Re: [PATCH v8 3/7] clk: nuvoton: ma35d1: Retrieve HXT/LXT from DT when possible
Date: Tue, 13 Oct 2026 19:12:11 +0200	[thread overview]
Message-ID: <87fqy9v82c.fsf@bootlin.com> (raw)
In-Reply-To: <1jmrss7byt.fsf@starbuckisacylon.baylibre.com> (Jerome Brunet's message of "Mon, 05 Oct 2026 11:06:50 +0200")

Hi Jerome,

>>>> -	hws[HXT] = ma35d1_clk_fixed("hxt", 24000000);
>>>
>>> [Severity: Critical]
>>> Does this unconditional removal break ABI compatibility with older device
>>> trees?
>>>
>>> Because HXT (index 0) is exported as a public ABI in the DT bindings,
>>> removing its explicit registration leaves hws[HXT] as NULL in the provider's
>>> clock array. If an existing downstream or older device tree consumer explicitly
>>> references this clock via clocks = <&clk HXT>, won't the provider's
>>> of_clk_hw_onecell_get() fail to resolve the clock and return an error?
>>
>> Jerome, your wisdom matters here :-) For me this is a false positive,
>> because nobody outside this driver should access hws[HXT] and the clock
>> is still referenced through the DT, just not provided by this
>> driver. For me this is not an issue we should consider, let me know
>> otherwise.
>
> Strictly speaking there is (used to be) a clock at this index so it is
> not a false positive. Someone crazy enough could have gone through here
> to get the OSC even if does not make a lot of sense.
>
> This clock should never have existed to start with but it got in the
> bindings ... and that is the pain of dealing with bad bindings :/
>
> You've got 2 options:
> * Removing the ID from the bindings explaining clearly that it conflicts
>   with the fact this clock is actually an input according to the same
>   bindings. I suspect the DT maintainers won't like this much ...
>
> * Keep the bad support binding in the driver: You'll need a pass-through
>   clock element where the parent data is the fw_name and a fallback to
>   an `hxt-fake-internal' fixed clock. Feel free to add a comment
>   explaining how bad it is to use that clock and what user should be
>   doing instead.

Too bad. I am pretty sure nobody ever used that yet (since it is both
very recent and fundamentally broken) but okay, I'll keep registering a
dummy fixed clock there in case anybody ever cares about that lookup.

> You'll probably need to play that last trick with the lxt anyway ?

Yes, it is already handled indeed.

Thanks!
Miquèl

  reply	other threads:[~2026-10-13 17:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-04 20:45 [PATCH v8 0/7] clk: nuvoton: ma35d1: Fix mux parenting and peripheral clock rates Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 1/7] clk: nuvoton: ma35d1: Use clk_hw pointers as mux parents Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 2/7] clk: nuvoton: ma35d1: Avoid possible error pointer dereferencing Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 3/7] clk: nuvoton: ma35d1: Retrieve HXT/LXT from DT when possible Miquel Raynal
2026-10-04 20:59   ` sashiko-bot
2026-10-04 21:16     ` Miquel Raynal
2026-10-05  9:06       ` Jerome Brunet
2026-10-13 17:12         ` Miquel Raynal [this message]
2026-10-13 17:35           ` Jerome Brunet
2026-10-04 20:45 ` [PATCH v8 4/7] clk: nuvoton: ma35d1: Reparent the gates correctly Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 5/7] clk: nuvoton: ma35d1: Reparent SYSPLL correctly Miquel Raynal
2026-10-04 20:55   ` sashiko-bot
2026-10-04 21:19     ` Miquel Raynal
2026-10-05  9:12       ` Jerome Brunet
2026-10-06  7:57         ` Miquel Raynal
2026-10-12 15:30           ` Jerome Brunet
2026-10-13 16:53             ` Miquel Raynal
2026-10-13 17:37               ` Jerome Brunet
2026-10-04 20:45 ` [PATCH v8 6/7] arm64: dts: nuvoton: ma35d1: Drop HXT clock output name Miquel Raynal
2026-10-04 20:45 ` [PATCH v8 7/7] arm64: dts: nuvoton: ma35d1: Add LXT crystal and clock-names Miquel Raynal

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=87fqy9v82c.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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