From: Alexander Dahl <ada@thorsis.com>
To: Claudiu Beznea <claudiu.beznea@kernel.org>
Cc: Alexander Dahl <ada@thorsis.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Ryan Wanner <ryan.wanner@microchip.com>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v4 03/16] dt-bindings: clock: at91: Allow referencing main rc oscillator in DT
Date: Thu, 19 Nov 2026 15:53:12 +0100 [thread overview]
Message-ID: <20261119-sixfold-tradition-ab9492ca6c2e@thorsis.com> (raw)
In-Reply-To: <5273baa7-aae5-4364-bb09-dccee581200b@kernel.org>
Hello Claudiu,
Am Sun, Nov 15, 2026 at 04:34:30PM +0200 schrieb Claudiu Beznea:
> Hi, Alexander,
>
> On 11/5/26 13:06, Alexander Dahl wrote:
> > The main rc oscillator will be needed for the OTPC to work properly.
> >
> > The new index introduced here was not used on the four affected SoC
> > clock drivers before.
> >
> > Link: https://lore.kernel.org/linux-devicetree/20250207-jailbird-circus-bcc04ee90e05@thorsis.com/T/#u
> > Signed-off-by: Alexander Dahl <ada@thorsis.com>
> > ---
> >
> > Notes:
> > v4:
> > - change index for sama7g5 and sama7d65 after re-adding unused PLLs in patch 2
> > v3:
> > - adapt to different base changes, added lines are the same
> > v2:
> > - new patch, not present in v1
> >
> > include/dt-bindings/clock/microchip,sam9x60-pmc.h | 1 +
> > include/dt-bindings/clock/microchip,sam9x7-pmc.h | 1 +
> > include/dt-bindings/clock/microchip,sama7d65-pmc.h | 1 +
> > include/dt-bindings/clock/microchip,sama7g5-pmc.h | 1 +
> > 4 files changed, 4 insertions(+)
> >
> > diff --git a/include/dt-bindings/clock/microchip,sam9x60-pmc.h b/include/dt-bindings/clock/microchip,sam9x60-pmc.h
> > index 050e5e774b274..830e247ba2532 100644
> > --- a/include/dt-bindings/clock/microchip,sam9x60-pmc.h
> > +++ b/include/dt-bindings/clock/microchip,sam9x60-pmc.h
> > @@ -10,6 +10,7 @@
> > #define SAM9X60_PMC_MCK 1
> > #define SAM9X60_PMC_UPLLCK 2
> > #define SAM9X60_PMC_MAIN 3
> > +#define SAM9X60_PMC_MAIN_RC 6
> > #define SAM9X60_PMC_PLLACK 7
> > #endif
> > diff --git a/include/dt-bindings/clock/microchip,sam9x7-pmc.h b/include/dt-bindings/clock/microchip,sam9x7-pmc.h
> > index 292c5873e101e..58d2a08116795 100644
> > --- a/include/dt-bindings/clock/microchip,sam9x7-pmc.h
> > +++ b/include/dt-bindings/clock/microchip,sam9x7-pmc.h
> > @@ -10,6 +10,7 @@
> > #define SAM9X7_PMC_MCK 1
> > #define SAM9X7_PMC_UPLLCK 2
> > #define SAM9X7_PMC_MAIN 3
> > +#define SAM9X7_PMC_MAIN_RC 6
> > #define SAM9X7_PMC_PLLACK 7
> > #define SAM9X7_PMC_AUDIOPMCPLL 9
> > #define SAM9X7_PMC_AUDIOIOPLL 10
> > diff --git a/include/dt-bindings/clock/microchip,sama7d65-pmc.h b/include/dt-bindings/clock/microchip,sama7d65-pmc.h
> > index 08581418b9115..17105a6bedb54 100644
> > --- a/include/dt-bindings/clock/microchip,sama7d65-pmc.h
> > +++ b/include/dt-bindings/clock/microchip,sama7d65-pmc.h
> > @@ -19,6 +19,7 @@
> > #define SAMA7D65_PMC_AUDIOIOPLL 10
> > #define SAMA7D65_PMC_ETHPLL 11
> > #define SAMA7D65_PMC_MCK1 13
> > +#define SAMA7D65_PMC_MAIN_RC 14
> > #define SAMA7D65_PMC_LVDSPLL 15
> > #define SAMA7D65_PMC_MCK3 16
> > #define SAMA7D65_PMC_MCK5 17
> > diff --git a/include/dt-bindings/clock/microchip,sama7g5-pmc.h b/include/dt-bindings/clock/microchip,sama7g5-pmc.h
> > index 27668634b0a2b..4a1c4af8ecc9a 100644
> > --- a/include/dt-bindings/clock/microchip,sama7g5-pmc.h
> > +++ b/include/dt-bindings/clock/microchip,sama7g5-pmc.h
> > @@ -19,5 +19,6 @@
> > #define SAMA7G5_PMC_AUDIOIOPLL 10
> > #define SAMA7G5_PMC_ETHPLL 11
> > #define SAMA7G5_PMC_MCK1 13
> > +#define SAMA7G5_PMC_MAIN_RC 14
>
> I think we can use 12 instead. Correct me if I'm wrong. Otherwise, you
> should change also driver code to allocate space for this clock. See
> pmc_data_allocate() in drivers/clk/at91/sama7g5.c
The old definition had this (with PMC_MAIN = 3):
#define PMC_CPU (PMC_MAIN + 9)
That's the 12 which is missing in the new list. PMC_CPU was not used
in the current code base. Personally I'm fine with using 12 here, but
I was not sure if this is again some value Microchip wants to keep for
some reason?
The allocation problem was found by sashiko on patch 5. I already
fixed that in my working copy for v5 of the series, but will adapt, if
the value here is changed again.
Greets
Alex
next prev parent reply other threads:[~2026-11-19 14:53 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 11:06 [PATCH v4 00/16] Microchip OTPC driver on SAM9X60 exposing UIDxR as additional nvmem device Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 01/16] MAINTAINERS: Add sam9/sama to (AT91) SoC support Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 02/16] dt-bindings: clock: at91: Split up per SoC partially Alexander Dahl
2026-11-06 10:57 ` Krzysztof Kozlowski
2026-11-06 11:02 ` Alexander Dahl
2026-11-15 14:35 ` Claudiu Beznea
2026-11-19 14:46 ` Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 03/16] dt-bindings: clock: at91: Allow referencing main rc oscillator in DT Alexander Dahl
2026-11-06 11:03 ` Krzysztof Kozlowski
2026-11-15 14:34 ` Claudiu Beznea
2026-11-19 14:53 ` Alexander Dahl [this message]
2026-11-05 11:06 ` [PATCH v4 04/16] clk: at91: Use new per SoC PMC clock index definitions Alexander Dahl
2026-11-15 14:29 ` Claudiu Beznea
2026-11-05 11:06 ` [PATCH v4 05/16] clk: at91: Allow enabling main_rc_osc through DT Alexander Dahl
2026-11-06 2:39 ` kernel test robot
2026-11-05 11:06 ` [PATCH v4 06/16] clk: at91: Add peripheral clock id for OTPC Alexander Dahl
2026-11-15 14:28 ` Claudiu Beznea
2026-11-05 11:06 ` [PATCH v4 07/16] dt-bindings: nvmem: microchip-otpc: Add required clocks Alexander Dahl
2026-11-06 11:05 ` Krzysztof Kozlowski
2026-11-05 11:06 ` [PATCH v4 08/16] nvmem: microchip-otpc: Avoid reading a write-only register Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 09/16] nvmem: microchip-otpc: Fix swapped 'sleep' and 'timeout' parameters Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 10/16] nvmem: microchip-otpc: Enable necessary clocks Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 11/16] nvmem: microchip-otpc: Expose UID registers as 2nd nvmem device Alexander Dahl
2026-11-15 14:28 ` Claudiu Beznea
2026-11-05 11:06 ` [PATCH v4 12/16] ARM: dts: microchip: Use new per SoC PMC bindings Alexander Dahl
2026-11-15 14:28 ` Claudiu Beznea
2026-11-05 11:06 ` [PATCH v4 13/16] ARM: dts: microchip: sama7g5: Add OTPC clocks Alexander Dahl
2026-11-15 14:27 ` Claudiu Beznea
2026-11-05 11:06 ` [PATCH v4 14/16] ARM: dts: microchip: sam9x60: Add OTPC node Alexander Dahl
2026-11-15 14:35 ` claudiu beznea
2026-11-05 11:06 ` [PATCH v4 15/16] ARM: dts: microchip: sam9x60_curiosity: Enable OTP Controller Alexander Dahl
2026-11-15 14:27 ` Claudiu Beznea
2026-11-19 15:17 ` Alexander Dahl
2026-11-05 11:06 ` [PATCH v4 16/16] dt-bindings: clock: at91: Remove old PMC definitions Alexander Dahl
2026-11-15 14:22 ` Claudiu Beznea
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=20261119-sixfold-tradition-ab9492ca6c2e@thorsis.com \
--to=ada@thorsis.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bmasney+clk@redhat.com \
--cc=claudiu.beznea@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet+clk@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=robh@kernel.org \
--cc=ryan.wanner@microchip.com \
--cc=sboyd@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