1. 27 2月, 2019 2 次提交
  2. 22 2月, 2019 14 次提交
  3. 25 1月, 2019 1 次提交
  4. 10 1月, 2019 1 次提交
  5. 29 12月, 2018 1 次提交
  6. 15 12月, 2018 5 次提交
    • A
      clk: imx: imx7ulp: add arm hsrun mode clocks support · 7128d7f7
      Anson Huang 提交于
      i.MX7ULP has a Cortex-A7 CPU which can run in RUN mode
      or HSRUN mode, it is controlled in SMC1 module. The RUN
      mode and HSRUN mode will use different clock source for
      ARM, "divcore" for RUN mode and "hsrun_divcore" for HSRUN
      mode, so the control bits in SMC1 module can be abstracted
      as a HW clock mux, this patch adds HSRUN mode related
      clocks in SCG1 module and adds "arm" clock in SMC1 module
      to support RUN mode and HSRUN mode switch.
      
      Latest clock tree in RUN mode as below:
      
       firc                                 0        0        0    48000000          0     0  50000
          firc_bus_clk                      0        0        0    48000000          0     0  50000
          hsrun_scs_sel                     0        0        0    48000000          0     0  50000
             hsrun_divcore                  0        0        0    48000000          0     0  50000
      
       sosc                                 3        3        3    24000000          0     0  50000
          spll_pre_sel                      1        1        1    24000000          0     0  50000
             spll_pre_div                   1        1        2    24000000          0     0  50000
                spll                        1        1        2   528000000          0     0  50000
                   spll_pfd0                1        1        1   500210526          0     0  50000
                      spll_pfd_sel          1        1        0   500210526          0     0  50000
                         spll_sel           1        1        0   500210526          0     0  50000
                            scs_sel         1        1        0   500210526          0     0  50000
                               divcore      1        1        0   500210526          0     0  50000
                                  arm       1        1        0   500210526          0     0  50000
      Signed-off-by: NAnson Huang <Anson.Huang@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      7128d7f7
    • A
      clk: imx: add imx8qxp lpcg driver · 1e3121bf
      Aisheng Dong 提交于
      Add imx8qxp lpcg driver support
      
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      1e3121bf
    • A
      clk: imx: add lpcg clock support · 2f77296d
      Aisheng Dong 提交于
      The Low-Power Clock Gate (LPCG) modules contain a local programming
      model to control the clock gates for the peripherals. An LPCG module
      is used to locally gate the clocks for the associated peripheral.
      And they're bedind the SCU clock.
      
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      2f77296d
    • A
      clk: imx: add imx8qxp clk driver · c2cccb6d
      Aisheng Dong 提交于
      Add imx8qxp clk driver which is based on SCU firmware clock service.
      
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      [sboyd@kernel.org: Move the makefile rule higher in the file]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      c2cccb6d
    • A
      clk: imx: Make the i.MX8MQ CCM clock driver CLK_IMX8MQ dependant · d360b130
      Abel Vesa 提交于
      Remove the dependency between the i.MX8MQ CCM clock driver
      and the CONFIG_SOC_IMX8MQ and use CONFIG_CLK_IMX8MQ instead.
      CONFIG_CLK_IMX8MQ depends on ARCH_MXC && ARM64.
      Signed-off-by: NAbel Vesa <abel.vesa@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      d360b130
  7. 14 12月, 2018 2 次提交
    • A
      clk: imx: add scu clock common part · fe37b482
      Aisheng Dong 提交于
      Add SCU clock common part which will be used by client clock drivers.
      SCU clocks are totally different from the legacy clocks (No much
      legacy things can be reused), it's using a firmware interface now based
      on SCU protocol. So a new configuration option CONFIG_MXC_CLK_SCU is added.
      
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      [sboyd@kernel.org: Mark ccm_ipc_handle static]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      fe37b482
    • A
      clk: imx: add configuration option for mmio clks · 3a48d918
      Aisheng Dong 提交于
      The patch introduces CONFIG_MXC_CLK option for legacy MMIO clocks,
      this is required to compile legacy MMIO clock conditionally when adding
      SCU based clocks for MX8 platforms later.
      
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Fabio Estevam <fabio.estevam@nxp.com>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      3a48d918
  8. 11 12月, 2018 6 次提交
  9. 04 12月, 2018 8 次提交
    • A
      clk: imx: add imx7ulp clk driver · b1260067
      A.s. Dong 提交于
      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.
      
      This driver only adds clock support in A7 domain.
      
      Note that most clocks required to be operated when gated, e.g. pll,
      pfd, pcc. And more special cases that scs/ddr/nic mux selecting
      different clock source requires that clock to be enabled first,
      then we need set CLK_OPS_PARENT_ENABLE flag for them properly.
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Anson Huang <Anson.Huang@nxp.com>
      Cc: Bai Ping <ping.bai@nxp.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      b1260067
    • A
      clk: imx: implement new clk_hw based APIs · 3b315214
      A.s. Dong 提交于
      Clock providers are recommended to use the new struct clk_hw based API,
      so implement IMX clk_hw based provider helpers functions to the new
      approach.
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      3b315214
    • A
      clk: imx: make mux parent strings const · 9e5ef7a5
      A.s. Dong 提交于
      As the commit 2893c379 ("clk: make strings in parent name arrays
      const"), let's make the parent strings const, otherwise we may meet
      the following warning when compiling:
      
      drivers/clk/imx/clk-imx7ulp.c: In function 'imx7ulp_clocks_init':
      drivers/clk/imx/clk-imx7ulp.c:73:35: warning: passing argument 5 of
      	'imx_clk_mux_flags' discards 'const' qualifier from pointer target type
      
        clks[IMX7ULP_CLK_APLL_PRE_SEL] = imx_clk_mux_flags("apll_pre_sel", base + 0x508, 0,
      	1, pll_pre_sels, ARRAY_SIZE(pll_pre_sels), CLK_SET_PARENT_GATE);
                                         ^
      In file included from drivers/clk/imx/clk-imx7ulp.c:23:0:
      drivers/clk/imx/clk.h:200:27: note: expected 'const char **' but argument is
       of type 'const char * const*'
      ...
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      9e5ef7a5
    • A
      clk: imx: add imx7ulp composite clk support · 76a323c1
      A.s. Dong 提交于
      The imx composite clk is designed for Peripheral Clock Control (PCC)
      module observed in IMX ULP SoC series.
      
      NOTE pcc can only be operated when clk is gated.
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Anson Huang <Anson.Huang@nxp.com>
      Cc: Bai Ping <ping.bai@nxp.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      [sboyd@kernel.org: Include clk.h for sparse warnings]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      76a323c1
    • A
      clk: imx: add pfdv2 support · 9fcb6be3
      A.s. Dong 提交于
      The pfdv2 is designed for PLL Fractional Divide (PFD) observed in System
      Clock Generation (SCG) module in IMX ULP SoC series. e.g. i.MX7ULP.
      
      NOTE pfdv2 can only be operated when clk is gated.
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Anson Huang <Anson.Huang@nxp.com>
      Cc: Bai Ping <ping.bai@nxp.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      [sboyd@kernel.org: Include clk.h for sparse warnings]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      9fcb6be3
    • A
      clk: imx: add pllv4 support · d9a8f950
      A.s. Dong 提交于
      pllv4 is designed for System Clock Generation (SCG) module observed
      in IMX ULP SoC series. e.g. i.MX7ULP.
      
      The SCG modules generates clock used to derive processor, system,
      peripheral bus and external memory interface clocks while this patch
      intends to support the PLL part.
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Anson Huang <Anson.Huang@nxp.com>
      Cc: Bai Ping <ping.bai@nxp.com>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      [sboyd@kernel.org: Include clk.h for sparse warnings]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      d9a8f950
    • A
      clk: imx: add gatable clock divider support · 40468079
      A.s. Dong 提交于
      For dividers with zero indicating clock is disabled, instead of giving a
      warning each time like "clkx: Zero divisor and CLK_DIVIDER_ALLOW_ZERO not
      set" in exist code, we'd like to introduce enable/disable function for it.
      e.g.
      000b - Clock disabled
      001b - Divide by 1
      010b - Divide by 2
      ...
      
      Set rate when the clk is disabled will cache the rate request and only
      when the clk is enabled will the driver actually program the hardware to
      have the requested divider value. Similarly, when the clk is disabled we'll
      write a 0 there, but when the clk is enabled we'll restore whatever rate
      (divider) was chosen last.
      
      It does mean that recalc rate will be sort of odd, because when the clk is
      off it will return 0, and when the clk is on it will return the right rate.
      So to make things work, we'll need to return the cached rate in recalc rate
      when the clk is off and read the hardware when the clk is on.
      
      NOTE for the default off divider, the recalc rate will still return 0 as
      there's still no proper preset rate. Enable such divider will give user
      a reminder error message.
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Signed-off-by: NDong Aisheng <aisheng.dong@nxp.com>
      [sboyd@kernel.org: Include clk.h for sparse warnings]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      40468079
    • L
      clk: imx: Add SCCG PLL type · ff70fbd0
      Lucas Stach 提交于
      The SCCG is a new PLL type introduced on i.MX8.
      
      The description of this SCCG clock can be found here:
      
      https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf#page=834Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: NAbel Vesa <abel.vesa@nxp.com>
      Reviewed-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      ff70fbd0