From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0BBDC52D6F for ; Wed, 21 Aug 2024 16:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vE+5+csaeJcVhTrTLz3Uf7/D7LkyYEgvHcPlrV+QRyQ=; b=Xp2R9VrTZDBjtJ2iu7G6/GGskc wwBiBzQXaKFGeJ/eT8IgFnkzu0x/u8oevpBs3lvLad4xaamRJeaUut0zv0JM8pYMNagVR3JxkRISC 3+IhClYgxu/bzhO2ZG4YW8W/QHn2RqF9uzfjB5Ol/DW3uKvAt7Xnux4c4MPIUCp6aCyLYejCVD+Qa ej0aSNdGDfvLctPfxgVzX4OGxwyLQppXWn07PYTP+Wtj9nWQ5ebC9TcmPF0lYa6JP9tQ0M1vWRw9f zuqsrOT1OvJvj2NaFTHHBEXIhxfmXc/Rqq4Umj30NqNb9GTBrtHU7voeDOBYhK9yNHbBNpYM5iDQR dyE6QoXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgnwj-00000009hDN-3dj6; Wed, 21 Aug 2024 16:12:29 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgngM-00000009cUv-49ys for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 15:55:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 8BECEA41D9A; Wed, 21 Aug 2024 15:55:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D346C32781; Wed, 21 Aug 2024 15:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724255733; bh=oO+0Tv2uU9zbU6edOpbgsXoLNpUE9+d8dxygISVgGuA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IWEuEzW2eAOAzTIBdvnMKwDqxONi5bvAss+1DyQAZgggcO9o17lUl0wRyfbgeBAm7 qjeqktvAqgbnvq2/RbeWaHqPs92nlJHf8Y7dZH9FJOognOMFEmsDWGl5Bjqx0tw4LH Sr2tvh1enoQxBtEg9pob6hyWyoX7538CrU33rEVev+x5ebtevlffQY0nlHiydMCx37 mYiyE6Q9QUC80lO/It8vpxu5ShyRyZ50X6+D1hew4wUDDt5/HLAi2en3uV4UIfQS+B /d/EoAKCYH5sfHBk28GaMBvhhYA6oPslp6IVhx/1fJxSzV9OYCsqZltmNmVET92dQz pvXC3Cq49g01Q== Date: Wed, 21 Aug 2024 16:55:29 +0100 From: Conor Dooley To: Alexander Dahl Subject: Re: [PATCH v1 09/12] clk: at91: sam9x60: Allow enabling main_rc_osc through DT Message-ID: <20240821-gnat-pushcart-882aa3a3f252@spud> References: <20240821105943.230281-1-ada@thorsis.com> <20240821105943.230281-10-ada@thorsis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CijNXcpqoUP9GEdm" Content-Disposition: inline In-Reply-To: <20240821105943.230281-10-ada@thorsis.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_085535_187568_3E575ABB X-CRM114-Status: GOOD ( 25.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Conor Dooley , Rob Herring , Alexandre Belloni , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Stephen Boyd , open list , Michael Turquette , "open list:COMMON CLK FRAMEWORK" , Claudiu Beznea , Krzysztof Kozlowski , Christian Melki , "moderated list:ARM/Microchip \(AT91\) SoC support" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --CijNXcpqoUP9GEdm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 21, 2024 at 12:59:40PM +0200, Alexander Dahl wrote: > SAM9X60 Datasheet (DS60001579G) Section "23.4 Product Dependencies" > says: >=20 > "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." >=20 > 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. >=20 > Signed-off-by: Alexander Dahl > --- > 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(-) >=20 > 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_no= de *np) > if (IS_ERR(regmap)) > return; > =20 > - sam9x60_pmc =3D pmc_data_allocate(PMC_PLLACK + 1, > + sam9x60_pmc =3D 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_no= de *np) > 50000000); > if (IS_ERR(hw)) > goto err_free; > + sam9x60_pmc->chws[PMC_MAIN_RC] =3D hw; > =20 > hw =3D at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NU= LL, 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 > =20 > /* SAMA7G5 */ > #define PMC_CPUPLL (PMC_MAIN + 1) > --=20 > 2.39.2 >=20 --CijNXcpqoUP9GEdm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZsYN8AAKCRB4tDGHoIJi 0oRoAQDqtnDTQk6fJ7GbAum6paH3b3FjF1bhS3Aw7qSeJrWA5AD/W3STyVNEqGq6 acYI6UGYoGZTPnCaJg5CdZ2hifHbjQI= =esFu -----END PGP SIGNATURE----- --CijNXcpqoUP9GEdm--