From: Ralph Siemsen <ralph.siemsen@linaro.org>
To: Marek Vasut <marek.vasut@mailbox.org>
Cc: u-boot@lists.u-boot-project.org, Peng Fan <peng.fan@nxp.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Tom Rini <trini@konsulko.com>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Michal Simek <michal.simek@amd.com>,
Bastien Curutchet <bastien.curutchet@bootlin.com>,
Anshul Dalal <anshuld@ti.com>, Johan Jonker <jbx6244@gmail.com>
Subject: Re: [PATCH v2] mmc: zynq_sdhci: support Renesas RZ/N1
Date: Thu, 27 Aug 2026 10:12:29 -0400 [thread overview]
Message-ID: <apBFzRluireFK8tl@maple.netwinder.org> (raw)
In-Reply-To: <ao3xXc7dNbFmKEha@maple.netwinder.org>
On Tue, Aug 25, 2026 at 03:47:41PM -0400, Ralph Siemsen wrote:
>On Sat, Aug 15, 2026 at 12:21:11AM +0200, Marek Vasut wrote:
>>On 8/14/26 8:30 PM, Ralph Siemsen wrote:
>>> return ret;
>>> }
>>>- clock = clk_get_rate(&clk);
>>>+ clock = clk_get_rate(&clks.clks[0]);
>>
>>Can the clock ever be non-first clock , i.e. do you need to handle
>>clock-names DT property somehow ?
>
>It's not clear to me if the DT binding specifies the order. It says
>there must be either 2 or 3 clocks, as well as clock-names properties.
I had another look at the clock ordering. According to [1]
"Order in lists is significant, order in dicts is not."
The binding [2] uses a list for the clock names:
clock-names:
minItems: 2
items:
- const: clk_xin
- const: clk_ahb
- const: gate
And as we can see, the reference clock ("clk_xin") is listed first.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/example-schema.yaml#n47
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml#n116
As a further check, I reversed the order of the clocks, and then ran
"make dtbs_check" to verify against DT schema. It complains:
arch/arm/dts/r9a06g032-rzn1-snarc.dtb: mmc@40100000 (renesas,r9a06g032-sdhci): clock-names:0: 'clk_xin' was expected
from schema $id: http://devicetree.org/schemas/mmc/arasan,sdhci.yaml
arch/arm/dts/r9a06g032-rzn1-snarc.dtb: mmc@40100000 (renesas,r9a06g032-sdhci): clock-names:1: 'clk_ahb' was expected
from schema $id: http://devicetree.org/schemas/mmc/arasan,sdhci.yaml
No complaint when the clocks are in the correct order.
>We could try using the name ("clk_xin") and if that fails, fall back on
>using the first clock.
So I think we don't need this extra complexity after all. It should be
fine to rely on the first clock being the correct one.
Ralph
next prev parent reply other threads:[~2026-08-27 14:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 18:30 [PATCH v2] mmc: zynq_sdhci: support Renesas RZ/N1 Ralph Siemsen
2026-08-14 22:21 ` Marek Vasut via U-Boot
2026-08-25 19:47 ` Ralph Siemsen
2026-08-25 20:44 ` Marek Vasut
2026-08-27 14:12 ` Ralph Siemsen [this message]
2026-08-27 16:53 ` Marek Vasut
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=apBFzRluireFK8tl@maple.netwinder.org \
--to=ralph.siemsen@linaro.org \
--cc=anshuld@ti.com \
--cc=bastien.curutchet@bootlin.com \
--cc=jbx6244@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=marek.vasut@mailbox.org \
--cc=michal.simek@amd.com \
--cc=peng.fan@nxp.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.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