devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Alexander Dahl <ada@thorsis.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Christian Melki <christian.melki@t2data.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"open list:COMMON CLK FRAMEWORK" <linux-clk@vger.kernel.org>,
	"moderated list:ARM/Microchip (AT91) SoC support"
	<linux-arm-kernel@lists.infradead.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v1 09/12] clk: at91: sam9x60: Allow enabling main_rc_osc through DT
Date: Wed, 21 Aug 2024 16:55:29 +0100	[thread overview]
Message-ID: <20240821-gnat-pushcart-882aa3a3f252@spud> (raw)
In-Reply-To: <20240821105943.230281-10-ada@thorsis.com>

[-- Attachment #1: Type: text/plain, Size: 2307 bytes --]

On Wed, Aug 21, 2024 at 12:59:40PM +0200, Alexander Dahl wrote:
> SAM9X60 Datasheet (DS60001579G) Section "23.4 Product Dependencies"
> says:
> 
>     "The OTPC is clocked through the Power Management Controller (PMC).
>     The user must power on the main RC oscillator and enable the
>     peripheral clock of the OTPC prior to reading or writing the OTP
>     memory."
> 
> The code for enabling/disabling that clock is already present, it was
> just not possible to hook into DT anymore, after at91 clk devicetree
> binding rework back in 2018 for kernel v4.19.
> 
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
>  drivers/clk/at91/sam9x60.c       | 3 ++-
>  include/dt-bindings/clock/at91.h | 1 +

Generally we don't want binding changes in the same patch as a driver
change. If your fix was determined to be faulty down the line and
reverted, the binding change would remain valid, for example. Can you
split it into two patches please, for the next version please?

>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c
> index e309cbf3cb9a..4d5ee20b8fc4 100644
> --- a/drivers/clk/at91/sam9x60.c
> +++ b/drivers/clk/at91/sam9x60.c
> @@ -207,7 +207,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
>  	if (IS_ERR(regmap))
>  		return;
>  
> -	sam9x60_pmc = pmc_data_allocate(PMC_PLLACK + 1,
> +	sam9x60_pmc = pmc_data_allocate(PMC_MAIN_RC + 1,
>  					nck(sam9x60_systemck),
>  					nck(sam9x60_periphck),
>  					nck(sam9x60_gck), 8);
> @@ -218,6 +218,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np)
>  					   50000000);
>  	if (IS_ERR(hw))
>  		goto err_free;
> +	sam9x60_pmc->chws[PMC_MAIN_RC] = hw;
>  
>  	hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL, 0);
>  	if (IS_ERR(hw))
> diff --git a/include/dt-bindings/clock/at91.h b/include/dt-bindings/clock/at91.h
> index 3e3972a814c1..f957625cb3ac 100644
> --- a/include/dt-bindings/clock/at91.h
> +++ b/include/dt-bindings/clock/at91.h
> @@ -25,6 +25,7 @@
>  #define PMC_PLLBCK		8
>  #define PMC_AUDIOPLLCK		9
>  #define PMC_AUDIOPINCK		10
> +#define PMC_MAIN_RC		11
>  
>  /* SAMA7G5 */
>  #define PMC_CPUPLL		(PMC_MAIN + 1)
> -- 
> 2.39.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2024-08-21 15:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 10:59 [PATCH v1 00/12] Microchip OTPC driver on SAM9X60 exposing UIDxR as additional nvmem device Alexander Dahl
2024-08-21 10:59 ` [PATCH v1 03/12] dt-bindings: nvmem: microchip-otpc: Add compatible for SAM9X60 Alexander Dahl
2024-08-21 12:49   ` Rob Herring (Arm)
2024-08-21 14:55   ` Conor Dooley
2024-08-21 10:59 ` [PATCH v1 05/12] ARM: dts: microchip: sam9x60: Add OTPC node Alexander Dahl
2024-08-24 15:56   ` claudiu beznea
2024-08-21 10:59 ` [PATCH v1 06/12] ARM: dts: microchip: sam9x60_curiosity: Enable OTP Controller Alexander Dahl
2024-08-21 10:59 ` [PATCH v1 09/12] clk: at91: sam9x60: Allow enabling main_rc_osc through DT Alexander Dahl
2024-08-21 15:55   ` Conor Dooley [this message]
2024-09-19 12:39   ` Alexander Dahl
2024-09-24 15:52     ` Ryan Wanner
2024-09-25 15:24       ` Nicolas Ferre
2024-09-26  7:42       ` claudiu beznea
2024-10-01 15:04         ` Ryan Wanner
2025-02-07 12:41           ` Alexander Dahl
2024-08-21 10:59 ` [PATCH v1 10/12] ARM: dts: microchip: sam9x60: Add clock properties to OTPC Alexander Dahl
2024-08-24 15:57   ` claudiu beznea
2024-08-28  8:22     ` Alexander Dahl
2024-08-24 16:17 ` [PATCH v1 00/12] Microchip OTPC driver on SAM9X60 exposing UIDxR as additional nvmem device claudiu beznea
2024-08-28  7:31   ` Alexander Dahl
2024-08-31 15:38     ` 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=20240821-gnat-pushcart-882aa3a3f252@spud \
    --to=conor@kernel.org \
    --cc=ada@thorsis.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=christian.melki@t2data.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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=mturquette@baylibre.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh@kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).