diff mbox

[V2,2/2] ARM: dts: imx6sx-sabreauto: add external 24MHz clock source

Message ID 1521426645-19246-2-git-send-email-Anson.Huang@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anson Huang March 19, 2018, 2:30 a.m. UTC
On i.MX6SX SabreAuto board, there is external 24MHz clock
source for analog clock2, add this clock source to clock tree.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
changes since V1:
	remove unnecessary clocks container.
 arch/arm/boot/dts/imx6sx-sabreauto.dts | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Shawn Guo April 17, 2018, 2:22 p.m. UTC | #1
On Mon, Mar 19, 2018 at 10:30:45AM +0800, Anson Huang wrote:
> On i.MX6SX SabreAuto board, there is external 24MHz clock
> source for analog clock2, add this clock source to clock tree.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> changes since V1:
> 	remove unnecessary clocks container.

I understand this is suggested by Fabio, but I'm afraid that it's not
going to work with imx_obtain_fixed_clock() call, which is coded to
look for clocks under /clocks node.

Shawn

>  arch/arm/boot/dts/imx6sx-sabreauto.dts | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6sx-sabreauto.dts b/arch/arm/boot/dts/imx6sx-sabreauto.dts
> index 72da5ac..a3b022b 100644
> --- a/arch/arm/boot/dts/imx6sx-sabreauto.dts
> +++ b/arch/arm/boot/dts/imx6sx-sabreauto.dts
> @@ -18,6 +18,12 @@
>  		reg = <0x80000000 0x80000000>;
>  	};
>  
> +	codec_osc: anaclk2 {
> +		#clock-cells = <0>;
> +		compatible = "fixed-clock";
> +		clock-frequency = <24576000>;
> +	};
> +
>  	regulators {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-clk" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Boyd April 19, 2018, 3:17 a.m. UTC | #2
Quoting Shawn Guo (2018-04-17 07:22:05)
> On Mon, Mar 19, 2018 at 10:30:45AM +0800, Anson Huang wrote:
> > On i.MX6SX SabreAuto board, there is external 24MHz clock
> > source for analog clock2, add this clock source to clock tree.
> > 
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > ---
> > changes since V1:
> >       remove unnecessary clocks container.
> 
> I understand this is suggested by Fabio, but I'm afraid that it's not
> going to work with imx_obtain_fixed_clock() call, which is coded to
> look for clocks under /clocks node.
> 

Should patch #1 be dropped from clk tree?
Anson Huang April 19, 2018, 3:23 a.m. UTC | #3
Anson Huang
Best Regards!


> -----Original Message-----
> From: Stephen Boyd [mailto:sboyd@kernel.org]
> Sent: Thursday, April 19, 2018 11:18 AM
> To: Anson Huang <anson.huang@nxp.com>; Shawn Guo
> <shawnguo@kernel.org>
> Cc: mark.rutland@arm.com; devicetree@vger.kernel.org;
> mturquette@baylibre.com; linux-clk@vger.kernel.org; linux@armlinux.org.uk;
> linux-kernel@vger.kernel.org; robh+dt@kernel.org; dl-linux-imx
> <linux-imx@nxp.com>; kernel@pengutronix.de; Fabio Estevam
> <fabio.estevam@nxp.com>; S.j. Wang <shengjiu.wang@nxp.com>;
> linux-arm-kernel@lists.infradead.org
> Subject: Re: [PATCH V2 2/2] ARM: dts: imx6sx-sabreauto: add external 24MHz
> clock source
> 
> Quoting Shawn Guo (2018-04-17 07:22:05)
> > On Mon, Mar 19, 2018 at 10:30:45AM +0800, Anson Huang wrote:
> > > On i.MX6SX SabreAuto board, there is external 24MHz clock source for
> > > analog clock2, add this clock source to clock tree.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > ---
> > > changes since V1:
> > >       remove unnecessary clocks container.
> >
> > I understand this is suggested by Fabio, but I'm afraid that it's not
> > going to work with imx_obtain_fixed_clock() call, which is coded to
> > look for clocks under /clocks node.
> >
> 
> Should patch #1 be dropped from clk tree?

If so, I think we should use V1 patch to keep clocks container?
 
Anson.
Shawn Guo April 19, 2018, 2:02 p.m. UTC | #4
On Wed, Apr 18, 2018 at 08:17:35PM -0700, Stephen Boyd wrote:
> Quoting Shawn Guo (2018-04-17 07:22:05)
> > On Mon, Mar 19, 2018 at 10:30:45AM +0800, Anson Huang wrote:
> > > On i.MX6SX SabreAuto board, there is external 24MHz clock
> > > source for analog clock2, add this clock source to clock tree.
> > > 
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > ---
> > > changes since V1:
> > >       remove unnecessary clocks container.
> > 
> > I understand this is suggested by Fabio, but I'm afraid that it's not
> > going to work with imx_obtain_fixed_clock() call, which is coded to
> > look for clocks under /clocks node.
> > 
> 
> Should patch #1 be dropped from clk tree?

No.  Patch #1 is good.

Shawn
Shawn Guo April 19, 2018, 2:03 p.m. UTC | #5
On Thu, Apr 19, 2018 at 03:23:39AM +0000, Anson Huang wrote:
> If so, I think we should use V1 patch to keep clocks container?

Ah, right.  I will just pick up v1 of patch #2.

Shawn
Shawn Guo April 19, 2018, 2:24 p.m. UTC | #6
On Thu, Apr 19, 2018 at 10:02:37PM +0800, Shawn Guo wrote:
> On Wed, Apr 18, 2018 at 08:17:35PM -0700, Stephen Boyd wrote:
> > Quoting Shawn Guo (2018-04-17 07:22:05)
> > > On Mon, Mar 19, 2018 at 10:30:45AM +0800, Anson Huang wrote:
> > > > On i.MX6SX SabreAuto board, there is external 24MHz clock
> > > > source for analog clock2, add this clock source to clock tree.
> > > > 
> > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > > ---
> > > > changes since V1:
> > > >       remove unnecessary clocks container.
> > > 
> > > I understand this is suggested by Fabio, but I'm afraid that it's not
> > > going to work with imx_obtain_fixed_clock() call, which is coded to
> > > look for clocks under /clocks node.
> > > 
> > 
> > Should patch #1 be dropped from clk tree?
> 
> No.  Patch #1 is good.

Sorry, Stephen.  I just had a closer look at the driver code, and I
think it can be done in a better way.  So please drop patch #1 for now.

Shawn
Stephen Boyd April 19, 2018, 7:32 p.m. UTC | #7
Quoting Shawn Guo (2018-04-19 07:24:42)
> On Thu, Apr 19, 2018 at 10:02:37PM +0800, Shawn Guo wrote:
> > On Wed, Apr 18, 2018 at 08:17:35PM -0700, Stephen Boyd wrote:
> > > Quoting Shawn Guo (2018-04-17 07:22:05)
> > > > On Mon, Mar 19, 2018 at 10:30:45AM +0800, Anson Huang wrote:
> > > > > On i.MX6SX SabreAuto board, there is external 24MHz clock
> > > > > source for analog clock2, add this clock source to clock tree.
> > > > > 
> > > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > > > ---
> > > > > changes since V1:
> > > > >       remove unnecessary clocks container.
> > > > 
> > > > I understand this is suggested by Fabio, but I'm afraid that it's not
> > > > going to work with imx_obtain_fixed_clock() call, which is coded to
> > > > look for clocks under /clocks node.
> > > > 
> > > 
> > > Should patch #1 be dropped from clk tree?
> > 
> > No.  Patch #1 is good.
> 
> Sorry, Stephen.  I just had a closer look at the driver code, and I
> think it can be done in a better way.  So please drop patch #1 for now.
> 

Ok.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/imx6sx-sabreauto.dts b/arch/arm/boot/dts/imx6sx-sabreauto.dts
index 72da5ac..a3b022b 100644
--- a/arch/arm/boot/dts/imx6sx-sabreauto.dts
+++ b/arch/arm/boot/dts/imx6sx-sabreauto.dts
@@ -18,6 +18,12 @@ 
 		reg = <0x80000000 0x80000000>;
 	};
 
+	codec_osc: anaclk2 {
+		#clock-cells = <0>;
+		compatible = "fixed-clock";
+		clock-frequency = <24576000>;
+	};
+
 	regulators {
 		compatible = "simple-bus";
 		#address-cells = <1>;