mbox series

[V6,0/9] clk: add imx7ulp clk support

Message ID 1542200198-3017-1-git-send-email-aisheng.dong@nxp.com (mailing list archive)
Headers show
Series clk: add imx7ulp clk support | expand

Message

Dong Aisheng Nov. 14, 2018, 1:01 p.m. UTC
This patch series intends to add imx7ulp clk support.

i.MX7ULP Clock functions are under joint control of the System
Clock Generation (SCG) modules, Peripheral Clock Control (PCC)
modules, and Core Mode Controller (CMC)1 blocks

The clocking scheme provides clear separation between M4 domain
and A7 domain. Except for a few clock sources shared between two
domains, such as the System Oscillator clock, the Slow IRC (SIRC),
and and the Fast IRC clock (FIRCLK), clock sources and clock
management are separated and contained within each domain.

M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules.
A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules.

Note: this series only adds A7 clock domain support as M4 clock
domain will be handled by M4 seperately.

Change Log:
v5->v6:
 * move gatable divider from common divider to imx specfic folder(suggested by Michael)
 * a small update of PATCH 9 for ddr/firc/dpll/sosc clocks to use divider table
v4->v5:
 * rename to clk-composite-7ulp.c as we have another
   clk-composite-8m.c, function name also changed accordingly
 * binding doc updated with adding input clocks for PCC module
v3->v4:
 * update after changing scg and pcc into separete nodes according to
   Rob's suggestion
v2->v3:
 * Patch 1 changed on: 1) split normal and gate ops 2) fix the possible racy
   Others no changes.

v1->v2:
 * add enable/disable for the type of CLK_DIVIDER_ZERO_GATE dividers
 * use clk_hw apis to register clocks
 * use of_clk_add_hw_provider
 * split the clocks register process into two parts: early part for possible
   timers clocks registered by CLK_OF_DECLARE_DRIVER and the later part for
   the left normal peripheral clocks registered by a platform driver.

Dong Aisheng (9):
  clk: imx: add gatable clock divider support
  clk: fractional-divider: add CLK_FRAC_DIVIDER_ZERO_BASED flag support
  clk: imx: add pllv4 support
  clk: imx: add pfdv2 support
  clk: imx: add imx7ulp composite clk support
  dt-bindings: clock: add imx7ulp clock binding doc
  clk: imx: make mux parent strings const
  clk: imx: implement new clk_hw based APIs
  clk: imx: add imx7ulp clk driver

 .../devicetree/bindings/clock/imx7ulp-clock.txt    | 104 ++++++++++
 drivers/clk/clk-fractional-divider.c               |  10 +
 drivers/clk/imx/Makefile                           |   7 +-
 drivers/clk/imx/clk-busy.c                         |   2 +-
 drivers/clk/imx/clk-composite-7ulp.c               |  85 ++++++++
 drivers/clk/imx/clk-divider-gate.c                 | 219 ++++++++++++++++++++
 drivers/clk/imx/clk-fixup-mux.c                    |   2 +-
 drivers/clk/imx/clk-imx7ulp.c                      | 220 +++++++++++++++++++++
 drivers/clk/imx/clk-pfdv2.c                        | 201 +++++++++++++++++++
 drivers/clk/imx/clk-pllv4.c                        | 182 +++++++++++++++++
 drivers/clk/imx/clk.c                              |  22 +++
 drivers/clk/imx/clk.h                              |  96 ++++++++-
 include/dt-bindings/clock/imx7ulp-clock.h          | 109 ++++++++++
 include/linux/clk-provider.h                       |   8 +
 14 files changed, 1257 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/imx7ulp-clock.txt
 create mode 100644 drivers/clk/imx/clk-composite-7ulp.c
 create mode 100644 drivers/clk/imx/clk-divider-gate.c
 create mode 100644 drivers/clk/imx/clk-imx7ulp.c
 create mode 100644 drivers/clk/imx/clk-pfdv2.c
 create mode 100644 drivers/clk/imx/clk-pllv4.c
 create mode 100644 include/dt-bindings/clock/imx7ulp-clock.h

Comments

Stephen Boyd Dec. 3, 2018, 7:31 p.m. UTC | #1
Quoting A.s. Dong (2018-11-14 05:01:31)
> This patch series intends to add imx7ulp clk support.
> 
> i.MX7ULP Clock functions are under joint control of the System
> Clock Generation (SCG) modules, Peripheral Clock Control (PCC)
> modules, and Core Mode Controller (CMC)1 blocks
> 
> The clocking scheme provides clear separation between M4 domain
> and A7 domain. Except for a few clock sources shared between two
> domains, such as the System Oscillator clock, the Slow IRC (SIRC),
> and and the Fast IRC clock (FIRCLK), clock sources and clock
> management are separated and contained within each domain.
> 
> M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules.
> A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules.
> 
> Note: this series only adds A7 clock domain support as M4 clock
> domain will be handled by M4 seperately.
> 

I got:

drivers/clk/imx/clk-pllv4.c:152:15: warning: symbol 'imx_clk_pllv4' was not declared. Should it be static?
drivers/clk/imx/clk-pfdv2.c:166:15: warning: symbol 'imx_clk_pfdv2' was not declared. Should it be static?
drivers/clk/imx/clk-divider-gate.c:174:15: warning: symbol 'imx_clk_divider_gate' was not declared. Should it be static?
drivers/clk/imx/clk-composite-7ulp.c:22:15: warning: symbol 'imx7ulp_clk_composite' was not declared. Should it be static?

which I can fix easily by throwing in clk.h into each file.
Dong Aisheng Dec. 4, 2018, 1:29 a.m. UTC | #2
> -----Original Message-----
> From: Stephen Boyd [mailto:sboyd@kernel.org]
> Sent: Tuesday, December 4, 2018 3:32 AM
> To: Aisheng DONG <aisheng.dong@nxp.com>; linux-clk@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> mturquette@baylibre.com; shawnguo@kernel.org; Anson Huang
> <anson.huang@nxp.com>; Jacky Bai <ping.bai@nxp.com>; dl-linux-imx
> <linux-imx@nxp.com>; Aisheng DONG <aisheng.dong@nxp.com>
> Subject: Re: [PATCH V6 0/9] clk: add imx7ulp clk support
> 
> Quoting A.s. Dong (2018-11-14 05:01:31)
> > This patch series intends to add imx7ulp clk support.
> >
> > i.MX7ULP Clock functions are under joint control of the System Clock
> > Generation (SCG) modules, Peripheral Clock Control (PCC) modules, and
> > Core Mode Controller (CMC)1 blocks
> >
> > The clocking scheme provides clear separation between M4 domain and A7
> > domain. Except for a few clock sources shared between two domains,
> > such as the System Oscillator clock, the Slow IRC (SIRC), and and the
> > Fast IRC clock (FIRCLK), clock sources and clock management are
> > separated and contained within each domain.
> >
> > M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules.
> > A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules.
> >
> > Note: this series only adds A7 clock domain support as M4 clock domain
> > will be handled by M4 seperately.
> >
> 
> I got:
> 
> drivers/clk/imx/clk-pllv4.c:152:15: warning: symbol 'imx_clk_pllv4' was not
> declared. Should it be static?
> drivers/clk/imx/clk-pfdv2.c:166:15: warning: symbol 'imx_clk_pfdv2' was not
> declared. Should it be static?
> drivers/clk/imx/clk-divider-gate.c:174:15: warning: symbol
> 'imx_clk_divider_gate' was not declared. Should it be static?
> drivers/clk/imx/clk-composite-7ulp.c:22:15: warning: symbol
> 'imx7ulp_clk_composite' was not declared. Should it be static?
> 
> which I can fix easily by throwing in clk.h into each file.

Thanks, I will double check it when I back to office.

Regards
Dong Aisheng
Stephen Boyd Dec. 5, 2018, 7:41 p.m. UTC | #3
Quoting Aisheng DONG (2018-12-03 17:29:29)
> > -----Original Message-----
> > From: Stephen Boyd [mailto:sboyd@kernel.org]
> > Sent: Tuesday, December 4, 2018 3:32 AM
> > To: Aisheng DONG <aisheng.dong@nxp.com>; linux-clk@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > mturquette@baylibre.com; shawnguo@kernel.org; Anson Huang
> > <anson.huang@nxp.com>; Jacky Bai <ping.bai@nxp.com>; dl-linux-imx
> > <linux-imx@nxp.com>; Aisheng DONG <aisheng.dong@nxp.com>
> > Subject: Re: [PATCH V6 0/9] clk: add imx7ulp clk support
> > 
> > Quoting A.s. Dong (2018-11-14 05:01:31)
> > > This patch series intends to add imx7ulp clk support.
> > >
> > > i.MX7ULP Clock functions are under joint control of the System Clock
> > > Generation (SCG) modules, Peripheral Clock Control (PCC) modules, and
> > > Core Mode Controller (CMC)1 blocks
> > >
> > > The clocking scheme provides clear separation between M4 domain and A7
> > > domain. Except for a few clock sources shared between two domains,
> > > such as the System Oscillator clock, the Slow IRC (SIRC), and and the
> > > Fast IRC clock (FIRCLK), clock sources and clock management are
> > > separated and contained within each domain.
> > >
> > > M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules.
> > > A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules.
> > >
> > > Note: this series only adds A7 clock domain support as M4 clock domain
> > > will be handled by M4 seperately.
> > >
> > 
> > I got:
> > 
> > drivers/clk/imx/clk-pllv4.c:152:15: warning: symbol 'imx_clk_pllv4' was not
> > declared. Should it be static?
> > drivers/clk/imx/clk-pfdv2.c:166:15: warning: symbol 'imx_clk_pfdv2' was not
> > declared. Should it be static?
> > drivers/clk/imx/clk-divider-gate.c:174:15: warning: symbol
> > 'imx_clk_divider_gate' was not declared. Should it be static?
> > drivers/clk/imx/clk-composite-7ulp.c:22:15: warning: symbol
> > 'imx7ulp_clk_composite' was not declared. Should it be static?
> > 
> > which I can fix easily by throwing in clk.h into each file.
> 
> Thanks, I will double check it when I back to office.
> 

No worries, I fixed it up and merged to clk-next.
Shawn Guo Dec. 10, 2018, 8:14 a.m. UTC | #4
On Wed, Dec 05, 2018 at 11:41:01AM -0800, Stephen Boyd wrote:
> No worries, I fixed it up and merged to clk-next.

Hi Stephen,

In order to send imx7ulp device tree for 4.21, I pulled branch
clk-imx7ulp into IMX tree to resolve the dependency on clock ID
definitions.  So please keep the branch stable, thanks.

Shawn
Stephen Boyd Dec. 10, 2018, 7:20 p.m. UTC | #5
Quoting Shawn Guo (2018-12-10 00:14:56)
> On Wed, Dec 05, 2018 at 11:41:01AM -0800, Stephen Boyd wrote:
> > No worries, I fixed it up and merged to clk-next.
> 
> Hi Stephen,
> 
> In order to send imx7ulp device tree for 4.21, I pulled branch
> clk-imx7ulp into IMX tree to resolve the dependency on clock ID
> definitions.  So please keep the branch stable, thanks.
> 

Ok. No problem. Thanks for letting me know.