devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Mason <jonmason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
To: Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Michael Turquette
	<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	Florian Fainelli
	<f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Hauke Mehrtens <hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org>,
	Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Scott Branden <sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH 04/10] ARM: dts: enable clock support for BCM5301X
Date: Fri, 9 Oct 2015 14:27:28 -0400	[thread overview]
Message-ID: <20151009182728.GD17527@broadcom.com> (raw)
In-Reply-To: <20151009073540.GO26883-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

On Fri, Oct 09, 2015 at 12:35:40AM -0700, Stephen Boyd wrote:
> On 10/02, Jon Mason wrote:
> > Replace current device tree dummy clocks with real clock support for
> > Broadcom Northstar SoCs.
> > 
> > Signed-off-by: Jon Mason <jonmason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> > ---
> 
> I'd rather not take any dts changes through clk tree.

Ok, I'll split off the device tree portion of this patch series, and
submit that after the clk driver portion has been accepted and pushed
upstream.

> 
> >  arch/arm/boot/dts/bcm5301x.dtsi | 67 ++++++++++++++++++++++++++++++++++++-----
> >  1 file changed, 60 insertions(+), 7 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
> > index 6f50f67..f717859 100644
> > --- a/arch/arm/boot/dts/bcm5301x.dtsi
> > +++ b/arch/arm/boot/dts/bcm5301x.dtsi
> > @@ -55,14 +56,14 @@
> >  			compatible = "arm,cortex-a9-global-timer";
> >  			reg = <0x0200 0x100>;
> >  			interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
> > -			clocks = <&clk_periph>;
> > +			clocks = <&periph_clk>;
> >  		};
> >  
> >  		local-timer@0600 {
> >  			compatible = "arm,cortex-a9-twd-timer";
> >  			reg = <0x0600 0x100>;
> >  			interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
> > -			clocks = <&clk_periph>;
> > +			clocks = <&periph_clk>;
> >  		};
> >  
> >  		gic: interrupt-controller@1000 {
> > @@ -94,14 +95,66 @@
> >  
> >  	clocks {
> 
> I'd expect this to only contain nodes that don't have a reg
> property. Clock providers that have a reg property would go into
> some soc node or bus. Perhaps that's the chipcommonA node, or
> axi?

This might get a little ugly, as some of the clocks are in the
0x18000000 and others are in 0x19000000.  I would think it better to
have them all in one place (as that is more readable).  Do you preferr
I split the pieces up into their respective DT nodes?

> 
> >  		#address-cells = <1>;
> > -		#size-cells = <0>;
> > +		#size-cells = <1>;
> > +		ranges;
> >  
> > -		/* As long as we do not have a real clock driver us this
> > -		 * fixed clock */
> > -		clk_periph: periph {
> > +		osc: oscillator {
> > +			#clock-cells = <0>;
> >  			compatible = "fixed-clock";
> > +			clock-frequency = <25000000>;
> > +		};
> > +
> > +		lcpll0: lcpll0@1800c100 {
> > +			#clock-cells = <1>;
> > +			compatible = "brcm,nsp-lcpll0";
> > +			reg = <0x1800c100 0x14>;
> > +			clocks = <&osc>;
> > +			clock-output-names = "lcpll0", "pcie_phy", "sdio",
> > +					     "ddr_phy";
> > +		};
> > +
> > +		genpll: genpll@1800c140 {
> > +			#clock-cells = <1>;
> > +			compatible = "brcm,nsp-genpll";
> > +			reg = <0x1800c140 0x24>;
> > +			clocks = <&osc>;
> > +			clock-output-names = "genpll", "phy", "ethernetclk",
> > +					     "usbclk", "iprocfast", "sata1",
> > +					     "sata2";
> > +		};
> > +
> > +		iprocmed: iprocmed {
> > +			#clock-cells = <0>;
> > +			compatible = "fixed-factor-clock";
> > +			clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
> > +			clock-div = <2>;
> > +			clock-mult = <1>;
> > +			clock-output-names = "iprocmed";
> > +		};
> > +
> > +		iprocslow: iprocslow {
> > +			#clock-cells = <0>;
> > +			compatible = "fixed-factor-clock";
> > +			clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
> > +			clock-div = <4>;
> > +			clock-mult = <1>;
> > +			clock-output-names = "iprocslow";
> > +		};
> > +
> > +
> > +		a9pll: arm_clk@19000000 {
> > +			#clock-cells = <0>;
> > +			compatible = "brcm,nsp-armpll";
> > +			clocks = <&osc>;
> > +			reg = <0x19000000 0x1000>;
> > +		};
> > +
> > +		periph_clk: periph_clk {
> >  			#clock-cells = <0>;
> > -			clock-frequency = <400000000>;
> > +			compatible = "fixed-factor-clock";
> > +			clocks = <&a9pll>;
> > +			clock-div = <2>;
> > +			clock-mult = <1>;
> >  		};
> >  	};
> >  
> 
> We're trying to move away from putting individual clocks into DT
> like this. Is there some sort of clock controller that's at
> 0x1800c000, but we're just not exposing all the clocks in there?
> See this thread for more information on why we'd like to avoid
> this sort of design:
> 
> http://lkml.kernel.org/r/<20150416192014.19585.9663@quantum>

Okay, I'll clean-up the clock-output-names, per the referenced email.

Thanks,
Jon

> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-10-09 18:27 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 22:57 [PATCH 0/10] clk: iproc: add support for BCM NS, NSP, and NS2 Jon Mason
2015-10-02 22:57 ` [PATCH 01/10] clk: iproc: Add PWRCTRL support Jon Mason
2015-10-02 22:57 ` [PATCH 02/10] clk: nsp: add clock support for Broadcom Northstar Plus SoC Jon Mason
2015-10-09  7:37   ` Stephen Boyd
2015-10-09 17:59     ` Jon Mason
2015-10-02 22:57 ` [PATCH 03/10] clk: iproc: define Broadcom NSP iProc clock binding Jon Mason
2015-10-02 22:57 ` [PATCH 04/10] ARM: dts: enable clock support for BCM5301X Jon Mason
2015-10-09  7:35   ` Stephen Boyd
     [not found]     ` <20151009073540.GO26883-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-10-09 18:27       ` Jon Mason [this message]
2015-10-10  0:14         ` Stephen Boyd
2015-10-12 17:57           ` Jon Mason
2015-10-02 22:57 ` [PATCH 05/10] clk: iproc: Add PLL base write function Jon Mason
2015-10-09  7:03   ` Stephen Boyd
2015-10-09 18:01     ` Jon Mason
2015-10-10  0:21   ` Stephen Boyd
     [not found]     ` <20151010002106.GZ26883-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-10-12 17:48       ` Jon Mason
2015-10-02 22:57 ` [PATCH 06/10] clk: iproc: Split off dig_filter Jon Mason
2015-10-02 22:57 ` [PATCH 07/10] clk: iproc: Separate status and control variables Jon Mason
2015-10-02 22:57 ` [PATCH 08/10] clk: iproc: define Broadcom NS2 iProc clock binding Jon Mason
2015-10-02 22:57 ` [PATCH 09/10] clk: ns2: add clock support for Broadcom Northstar 2 SoC Jon Mason
2015-10-10  0:19   ` Stephen Boyd
2015-10-12 17:52     ` Jon Mason
     [not found]   ` <1443826665-17570-10-git-send-email-jonmason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2015-10-10  0:33     ` Stephen Boyd
2015-10-12 18:19       ` Jon Mason
2015-10-13 16:51         ` Scott Branden
2015-10-13 18:39           ` Stephen Boyd
2015-10-02 22:57 ` [PATCH 10/10] ARM: dts: enable clock support for Broadcom NS2 Jon Mason

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=20151009182728.GD17527@broadcom.com \
    --to=jonmason-dy08kvg/lbpwk0htik3j/w@public.gmane.org \
    --cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hauke-5/S+JYg5SzeELgA04lAiVw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.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).