devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: Anup Patel <anup.patel@broadcom.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Jon Mason <jonmason@broadcom.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Oza Pawandeep <oza@broadcom.com>,
	Srinath Mannam <srinath.mannam@broadcom.com>,
	Pramod Kumar <pramod.kumar@broadcom.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 03/11] clk: bcm: Add clocks for Stingray SOC
Date: Mon, 22 May 2017 17:23:58 +0530	[thread overview]
Message-ID: <CALf0Xcxv3QfgDLC9DaRc6c28FZzjARX+38KjSHfVftwhkh3Dcw@mail.gmail.com> (raw)
In-Reply-To: <20170519013709.GD20170@codeaurora.org>

On Fri, May 19, 2017 at 7:07 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
>
> On 05/06, Anup Patel wrote:
> > From: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
> >
> > This patch adds support for Stingray clocks in iproc
> > ccf. The Stingray SOC has various plls based on iproc
> > pll architecture.
> >
>
> Does it have anything besides PLLs?
It describes various plls and soc specific details for the particular
SOC based on
bcm iproc architecture. the core functionality is implemented for all
Broadcom SOC
using iproc pll architecture in generic iproc drivers  eg: clk-iproc-pll.c
>
> > +CLK_OF_DECLARE(sr_genpll0_clk, "brcm,sr-genpll0",
> > +                             sr_genpll0_clk_init);
> > +
> > +static const struct iproc_pll_ctrl genpll3 = {
> > +     .flags = IPROC_CLK_AON | IPROC_CLK_PLL_HAS_NDIV_FRAC |
> > +             IPROC_CLK_PLL_NEEDS_SW_CFG,
> > +     .aon = AON_VAL(0x0, 1, 19, 18),
> > +     .reset = RESET_VAL(0x0, 12, 11),
> > +     .dig_filter = DF_VAL(0x0, 4, 3, 0, 4, 7, 3),
> > +     .sw_ctrl = SW_CTRL_VAL(0x10, 31),
> > +     .ndiv_int = REG_VAL(0x10, 20, 10),
> > +     .ndiv_frac = REG_VAL(0x10, 0, 20),
> > +     .pdiv = REG_VAL(0x14, 0, 4),
> > +     .status = REG_VAL(0x30, 12, 1),
> > +};
> > +
> > +static const struct iproc_clk_ctrl genpll3_clk[] = {
> > +     [BCM_SR_GENPLL3_HSLS_CLK] = {
> > +             .channel = BCM_SR_GENPLL3_HSLS_CLK,
> > +             .flags = IPROC_CLK_AON,
> > +             .enable = ENABLE_VAL(0x4, 6, 0, 12),
> > +             .mdiv = REG_VAL(0x18, 0, 9),
> > +     },
> > +     [BCM_SR_GENPLL3_SDIO_CLK] = {
> > +             .channel = BCM_SR_GENPLL3_SDIO_CLK,
> > +             .flags = IPROC_CLK_AON,
> > +             .enable = ENABLE_VAL(0x4, 7, 1, 13),
> > +             .mdiv = REG_VAL(0x18, 10, 9),
> > +     },
> > +};
> > +
> > +static void __init sr_genpll3_clk_init(struct device_node *node)
> > +{
> > +     iproc_pll_clk_setup(node, &genpll3, NULL, 0, genpll3_clk,
> > +                             ARRAY_SIZE(genpll3_clk));
> > +}
> > +CLK_OF_DECLARE(sr_genpll3_clk, "brcm,sr-genpll3",
> > +                     sr_genpll3_clk_init);
>
> Can you make this a platform driver instead? Are all these clks
> really used for getting the interrupt and timers running?
Not all clocks needed early except the genpll3. sp804 timer clks are derived
from genpll. we will send revised patch to have most of the clocks registered
via platform driver probe.
>
> > +
> > +static const struct iproc_pll_ctrl genpll4 = {
> > +     .flags = IPROC_CLK_AON | IPROC_CLK_PLL_HAS_NDIV_FRAC |
> > +             IPROC_CLK_PLL_NEEDS_SW_CFG,
> > +     .aon = AON_VAL(0x0, 1, 25, 24),
> > +     .reset = RESET_VAL(0x0, 12, 11),
> > +     .dig_filter = DF_VAL(0x0, 4, 3, 0, 4, 7, 3),
> > +     .sw_ctrl = SW_CTRL_VAL(0x10, 31),
> > +     .ndiv_int = REG_VAL(0x10, 20, 10),
> > +     .ndiv_frac = REG_VAL(0x10, 0, 20),
> > +     .pdiv = REG_VAL(0x14, 0, 4),
> > +     .status = REG_VAL(0x30, 12, 1),
> > +};
> > +
> > +static const struct iproc_clk_ctrl genpll4_clk[] = {
> > +     [BCM_SR_GENPLL4_CCN_CLK] = {
> > +             .channel = BCM_SR_GENPLL4_CCN_CLK,
> > +             .flags = IPROC_CLK_AON,
> > +             .enable = ENABLE_VAL(0x4, 6, 0, 12),
> > +             .mdiv = REG_VAL(0x18, 0, 9),
> > +     },
> > +};
> > +
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
regards
Sandeep

  reply	other threads:[~2017-05-22 11:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-06 11:54 [PATCH 00/11] Broadcom Stingray SOC Initial Support Anup Patel
2017-05-06 11:54 ` [PATCH 01/11] dt-bindings: bcm: Add Broadcom Stingray bindings document Anup Patel
2017-05-12 15:18   ` Rob Herring
     [not found] ` <1494071686-19098-1-git-send-email-anup.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-05-06 11:54   ` [PATCH 02/11] dt-bindings: clk: Extend binding doc for Stingray SOC Anup Patel
     [not found]     ` <1494071686-19098-3-git-send-email-anup.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-05-12 15:21       ` Rob Herring
2017-05-15  5:07         ` Anup Patel
2017-05-06 11:54   ` [PATCH 03/11] clk: bcm: Add clocks " Anup Patel
2017-05-19  1:37     ` Stephen Boyd
2017-05-22 11:53       ` Sandeep Tripathy [this message]
2017-05-06 11:54   ` [PATCH 04/11] arm64: dts: Initial DTS files for Broadcom " Anup Patel
     [not found]     ` <1494071686-19098-5-git-send-email-anup.patel-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-05-07 23:30       ` Florian Fainelli
2017-05-15  5:09         ` Anup Patel
2017-05-08 20:32     ` Scott Branden
     [not found]       ` <64f4e7c4-d619-2ac2-438b-91d48ea4260b-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-05-15  5:11         ` Anup Patel
2017-05-06 11:54   ` [PATCH 05/11] arm64: dts: Add clock DT nodes for " Anup Patel
2017-05-06 11:54   ` [PATCH 06/11] arm64: dts: Add NAND " Anup Patel
2017-05-06 11:54   ` [PATCH 10/11] arm64: dts: Add PL022, PL330 and SP805 DT nodes for Stingray Anup Patel
2017-05-06 11:54   ` [PATCH 11/11] arm64: dts: Add PWM and SDHCI DT nodes for Stingray SOC Anup Patel
2017-05-06 11:54 ` [PATCH 07/11] arm64: dts: Add pinctrl " Anup Patel
2017-05-06 11:54 ` [PATCH 08/11] arm64: dts: Add GPIO " Anup Patel
2017-05-06 11:54 ` [PATCH 09/11] arm64: dts: Add I2C DT nodes for Stingray SoC Anup Patel

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=CALf0Xcxv3QfgDLC9DaRc6c28FZzjARX+38KjSHfVftwhkh3Dcw@mail.gmail.com \
    --to=sandeep.tripathy@broadcom.com \
    --cc=anup.patel@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=jonmason@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=oza@broadcom.com \
    --cc=pramod.kumar@broadcom.com \
    --cc=rjui@broadcom.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sbranden@broadcom.com \
    --cc=srinath.mannam@broadcom.com \
    --cc=will.deacon@arm.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).