devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Jon Mason <jonmason@broadcom.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Hauke Mehrtens <hauke@hauke-m.de>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 04/10] ARM: dts: enable clock support for BCM5301X
Date: Fri, 9 Oct 2015 00:35:40 -0700	[thread overview]
Message-ID: <20151009073540.GO26883@codeaurora.org> (raw)
In-Reply-To: <1443826665-17570-5-git-send-email-jonmason@broadcom.com>

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@broadcom.com>
> ---

I'd rather not take any dts changes through clk tree.

>  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?

>  		#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>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-10-09  7:35 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 [this message]
     [not found]     ` <20151009073540.GO26883-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-10-09 18:27       ` Jon Mason
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=20151009073540.GO26883@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=jonmason@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    /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).