From: Claudiu Beznea <claudiu.beznea@kernel.org>
To: Alexander Dahl <ada@thorsis.com>
Cc: 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,
Philipp Zabel <p.zabel@pengutronix.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
"open list:USB SUBSYSTEM" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v4 02/16] dt-bindings: clock: at91: Split up per SoC partially
Date: Sun, 15 Nov 2026 16:35:23 +0200 [thread overview]
Message-ID: <0f0cc1da-46dc-431e-a10d-dcbbf7419960@kernel.org> (raw)
In-Reply-To: <20261105110715.2486432-3-ada@thorsis.com>
Hi, Alexaner,
On 11/5/26 13:06, Alexander Dahl wrote:
> Before adding even more new indexes creating more holes in the
> clk at91 drivers pmc_data->chws arrays, split this up.
>
> This is a partial split up only for some of the old PMC definitions.
>
> Binding splitup was proposed for several reasons:
>
> 1) keep the driver code simple, readable, and efficient
> 2) avoid accidental array index duplication
> 3) avoid memory waste by creating more and more unused array members.
>
> Old values are kept to not break dts, and to maintain dt ABI.
>
> 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:
> - "re-added" some definitions present in hardware but not used in dt
> - reword header comment (at91 -> Microchip) for newer SoCs
> - PMC_UTMI was renamed where appropriate according to datasheets
>
> v3:
> - full splitup for all at91 family SoCs instead of just a few
>
> v2:
> - new patch, not present in v1
>
> .../reset/atmel,at91sam9260-reset.yaml | 3 ++-
> .../bindings/usb/atmel,at91sam9rl-udc.yaml | 3 ++-
> .../dt-bindings/clock/atmel,at91rm9200-pmc.h | 16 ++++++++++++
> .../dt-bindings/clock/atmel,at91sam9260-pmc.h | 16 ++++++++++++
> .../dt-bindings/clock/atmel,at91sam9g45-pmc.h | 16 ++++++++++++
> .../dt-bindings/clock/atmel,at91sam9n12-pmc.h | 16 ++++++++++++
> .../dt-bindings/clock/atmel,at91sam9rl-pmc.h | 16 ++++++++++++
> .../dt-bindings/clock/atmel,at91sam9x5-pmc.h | 16 ++++++++++++
> include/dt-bindings/clock/atmel,sama5d2-pmc.h | 20 ++++++++++++++
> include/dt-bindings/clock/atmel,sama5d3-pmc.h | 16 ++++++++++++
> include/dt-bindings/clock/atmel,sama5d4-pmc.h | 17 ++++++++++++
> .../dt-bindings/clock/microchip,sam9x60-pmc.h | 15 +++++++++++
> .../dt-bindings/clock/microchip,sam9x7-pmc.h | 19 ++++++++++++++
> .../clock/microchip,sama7d65-pmc.h | 26 +++++++++++++++++++
> .../dt-bindings/clock/microchip,sama7g5-pmc.h | 23 ++++++++++++++++
> 15 files changed, 236 insertions(+), 2 deletions(-)
> create mode 100644 include/dt-bindings/clock/atmel,at91rm9200-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,at91sam9260-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,at91sam9g45-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,at91sam9n12-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,at91sam9rl-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,at91sam9x5-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,sama5d2-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,sama5d3-pmc.h
> create mode 100644 include/dt-bindings/clock/atmel,sama5d4-pmc.h
> create mode 100644 include/dt-bindings/clock/microchip,sam9x60-pmc.h
> create mode 100644 include/dt-bindings/clock/microchip,sam9x7-pmc.h
> create mode 100644 include/dt-bindings/clock/microchip,sama7d65-pmc.h
> create mode 100644 include/dt-bindings/clock/microchip,sama7g5-pmc.h
>
> diff --git a/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml b/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml
> index 84c4801df8d9a..8c89ccc3d6393 100644
> --- a/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml
> +++ b/Documentation/devicetree/bindings/reset/atmel,at91sam9260-reset.yaml
> @@ -67,9 +67,10 @@ additionalProperties: false
> examples:
> - |
> #include <dt-bindings/clock/at91.h>
> + #include <dt-bindings/clock/atmel,at91sam9260-pmc.h>
>
> reset-controller@fffffd00 {
> compatible = "atmel,at91sam9260-rstc";
> reg = <0xfffffd00 0x10>;
> - clocks = <&pmc PMC_TYPE_CORE PMC_SLOW>;
> + clocks = <&pmc PMC_TYPE_CORE AT91SAM9260_PMC_SLOW>;
> };
> diff --git a/Documentation/devicetree/bindings/usb/atmel,at91sam9rl-udc.yaml b/Documentation/devicetree/bindings/usb/atmel,at91sam9rl-udc.yaml
> index cdbbd17f80363..15f5bb51fd8a7 100644
> --- a/Documentation/devicetree/bindings/usb/atmel,at91sam9rl-udc.yaml
> +++ b/Documentation/devicetree/bindings/usb/atmel,at91sam9rl-udc.yaml
> @@ -61,13 +61,14 @@ examples:
> - |
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/clock/at91.h>
> + #include <dt-bindings/clock/atmel,at91sam9rl-pmc.h>
> #include <dt-bindings/gpio/gpio.h>
> gadget@fff78000 {
> compatible = "atmel,at91sam9g45-udc";
> reg = <0x00600000 0x80000
> 0xfff78000 0x400>;
> interrupts = <27 IRQ_TYPE_LEVEL_HIGH 0>;
> - clocks = <&pmc PMC_TYPE_PERIPHERAL 27>, <&pmc PMC_TYPE_CORE PMC_UTMI>;
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 27>, <&pmc PMC_TYPE_CORE AT91SAM9RL_PMC_UTMI>;
> clock-names = "pclk", "hclk";
> atmel,vbus-gpio = <&pioC 15 GPIO_ACTIVE_HIGH>;
> };
> diff --git a/include/dt-bindings/clock/atmel,at91rm9200-pmc.h b/include/dt-bindings/clock/atmel,at91rm9200-pmc.h
> new file mode 100644
> index 0000000000000..35fce34e00b82
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,at91rm9200-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91rm9200 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_AT91RM9200_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_AT91RM9200_PMC_H
> +
> +#define AT91RM9200_PMC_SLOW 0
This is not used anywhere anywhere accross the current code base. Let's drop it.
> +#define AT91RM9200_PMC_MCK 1
> +#define AT91RM9200_PMC_MAIN 3
> +#define AT91RM9200_PMC_PLLACK 7
> +#define AT91RM9200_PMC_PLLBCK 8
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,at91sam9260-pmc.h b/include/dt-bindings/clock/atmel,at91sam9260-pmc.h
> new file mode 100644
> index 0000000000000..6a5453cf70954
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,at91sam9260-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91sam9260 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9260_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9260_PMC_H
> +
> +#define AT91SAM9260_PMC_SLOW 0
> +#define AT91SAM9260_PMC_MCK 1
> +#define AT91SAM9260_PMC_MAIN 3
> +#define AT91SAM9260_PMC_PLLACK 7
> +#define AT91SAM9260_PMC_PLLBCK 8
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,at91sam9g45-pmc.h b/include/dt-bindings/clock/atmel,at91sam9g45-pmc.h
> new file mode 100644
> index 0000000000000..44a804ff96fff
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,at91sam9g45-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91sam9g45 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9G45_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9G45_PMC_H
> +
> +#define AT91SAM9G45_PMC_SLOW 0
This is not used. Lets introduce it when needed
> +#define AT91SAM9G45_PMC_MCK 1
> +#define AT91SAM9G45_PMC_UPLLCK 2
> +#define AT91SAM9G45_PMC_MAIN 3
> +#define AT91SAM9G45_PMC_PLLACK 7
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,at91sam9n12-pmc.h b/include/dt-bindings/clock/atmel,at91sam9n12-pmc.h
> new file mode 100644
> index 0000000000000..6eaef69242ee8
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,at91sam9n12-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91sam9n12 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9N12_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9N12_PMC_H
> +
> +#define AT91SAM9N12_PMC_SLOW 0
Not used.
> +#define AT91SAM9N12_PMC_MCK 1
> +#define AT91SAM9N12_PMC_MAIN 3
> +#define AT91SAM9N12_PMC_PLLACK 7
> +#define AT91SAM9N12_PMC_PLLBCK 8
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,at91sam9rl-pmc.h b/include/dt-bindings/clock/atmel,at91sam9rl-pmc.h
> new file mode 100644
> index 0000000000000..0bb195712f785
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,at91sam9rl-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91sam9rl clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9RL_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9RL_PMC_H
> +
> +#define AT91SAM9RL_PMC_SLOW 0
Not used.
> +#define AT91SAM9RL_PMC_MCK 1
> +#define AT91SAM9RL_PMC_UTMI 2
Manual also refers to this as UPLL (UTMI PLL). E.g.
"26.5 Main Oscillator
The Main Oscillator is designed for a 12 MHz fundamental crystal. The 12 MHz is
also used to
generate the 480 MHz USB High Speed Clock (HSCK) thanks to the UTMI PLL (UPLL)."
[1] https://ww1.microchip.com/downloads/en/DeviceDoc/doc6289.pdf
> +#define AT91SAM9RL_PMC_MAIN 3
> +#define AT91SAM9RL_PMC_PLLACK 7
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,at91sam9x5-pmc.h b/include/dt-bindings/clock/atmel,at91sam9x5-pmc.h
> new file mode 100644
> index 0000000000000..d095dcc9b29ff
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,at91sam9x5-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91sam9x5 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9X5_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_AT91SAM9X5_PMC_H
> +
> +#define AT91SAM9X5_PMC_SLOW 0
Not used.
> +#define AT91SAM9X5_PMC_MCK 1
> +#define AT91SAM9X5_PMC_UPLLCK 2
> +#define AT91SAM9X5_PMC_MAIN 3
> +#define AT91SAM9X5_PMC_PLLACK 7
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,sama5d2-pmc.h b/include/dt-bindings/clock/atmel,sama5d2-pmc.h
> new file mode 100644
> index 0000000000000..51bb410c699e2
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,sama5d2-pmc.h
> @@ -0,0 +1,20 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91 sama5d2 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_SAMA5D2_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_SAMA5D2_PMC_H
> +
> +#define SAMA5D2_PMC_MCK 1
> +#define SAMA5D2_PMC_UPLLCK 2
> +#define SAMA5D2_PMC_MAIN 3
> +#define SAMA5D2_PMC_MCK2 4
> +#define SAMA5D2_PMC_I2S0_MUX 5
> +#define SAMA5D2_PMC_I2S1_MUX 6
> +#define SAMA5D2_PMC_PLLACK 7
> +#define SAMA5D2_PMC_AUDIOPLLCK 9
> +#define SAMA5D2_PMC_AUDIOPINCK 10
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,sama5d3-pmc.h b/include/dt-bindings/clock/atmel,sama5d3-pmc.h
> new file mode 100644
> index 0000000000000..92210969104d6
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,sama5d3-pmc.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91 sama5d3 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_SAMA5D3_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_SAMA5D3_PMC_H
> +
> +#define SAMA5D3_PMC_SLOW 0
Not used.
> +#define SAMA5D3_PMC_MCK 1
> +#define SAMA5D3_PMC_UPLLCK 2
> +#define SAMA5D3_PMC_MAIN 3
Not used.
> +#define SAMA5D3_PMC_PLLACK 7
> +
> +#endif
> diff --git a/include/dt-bindings/clock/atmel,sama5d4-pmc.h b/include/dt-bindings/clock/atmel,sama5d4-pmc.h
> new file mode 100644
> index 0000000000000..53870448d6a1d
> --- /dev/null
> +++ b/include/dt-bindings/clock/atmel,sama5d4-pmc.h
> @@ -0,0 +1,17 @@
> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
> +/*
> + * The constants defined in this header are being used in dts and in
> + * at91 sama5d4 clock driver.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_ATMEL_SAMA5D4_PMC_H
> +#define _DT_BINDINGS_CLOCK_ATMEL_SAMA5D4_PMC_H
> +
> +#define SAMA5D4_PMC_SLOW 0
Not used.
> +#define SAMA5D4_PMC_MCK 1
> +#define SAMA5D4_PMC_UPLLCK 2
> +#define SAMA5D4_PMC_MAIN 3
Not used.
Thank you,
Claudiu
next prev parent reply other threads:[~2026-11-15 14:35 UTC|newest]
Thread overview: 38+ 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-05 14:21 ` sashiko-bot
2026-11-06 10:57 ` Krzysztof Kozlowski
2026-11-06 11:02 ` Alexander Dahl
2026-11-15 14:35 ` Claudiu Beznea [this message]
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-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-05 14:22 ` sashiko-bot
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-05 14:29 ` sashiko-bot
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-05 14:21 ` sashiko-bot
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-05 14:26 ` sashiko-bot
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-05 14:27 ` sashiko-bot
2026-11-15 14:27 ` Claudiu Beznea
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=0f0cc1da-46dc-431e-a10d-dcbbf7419960@kernel.org \
--to=claudiu.beznea@kernel.org \
--cc=ada@thorsis.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bmasney+clk@redhat.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.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=linux-usb@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=p.zabel@pengutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.