linux/drivers/clk
Linus Walleij ef6eb322ce clk: nomadik: implement the Nomadik clocks properly
The Nomadik clock implementation was a stub just using
fixed clocks.

This implements the clocks properly instead of relying
on them all being on at boot and leaving them all on.

The PLLs are on the top locking to the main chrystal
oscillator, then the HCLK for the peripherals are
below PLL2.

The gated clocks are implemented with zero cells and
given the clock ID as a property of each node, so every
gate need to have its own node in the device tree.
This is because the gate registers contain both HCLK
gates and PCLK gates, where the latter has HCLK as
parent. As can be seen from the register layout, this
is a complete mixup, which means all these gates need
their own node to properly model parent/child relations
for PCLKs apart from the HCLKs.

This driver also adds a helpful debugfs file to inspect
the hardware state of the clock gates.

This is the end result in <debugfs>/clk/clk_summary
after applying a proper device tree:

ulpiclk                0   0    60000000
mxtal                  3   3    19200000
   pll2                1   1    864000000
      clk48            3   3    48000000
         rngcclk       1   1    48000000
         usbmclk       0   0    48000000
         mshcclk       0   0    48000000
         mspclk3       0   0    48000000
         x3dclk        0   0    48000000
         skeclk        0   0    48000000
         owmclk        0   0    48000000
         mspclk2       0   0    48000000
         mspclk1       0   0    48000000
         uart2clk      0   0    48000000
         ipbmcclk      0   0    48000000
         ipi2cclk      0   0    48000000
         usbclk        0   0    48000000
         mspclk0       0   0    48000000
         uart1clk      1   2    48000000
         i2c1clk       0   0    48000000
         i2c0clk       0   0    48000000
         sdiclk        1   1    48000000
         uart0clk      0   0    48000000
         sspiclk       0   0    48000000
         irdaclk       0   0    48000000
      clk72            0   0    72000000
         difclk        0   0    72000000
         clcdclk       0   0    72000000
      clk216           0   0    216000000
         hsiclkrx      0   0    216000000
         clk108        0   0    108000000
            hsiclktx   0   0    108000000
            clk27      0   0    27000000
   pll1                1   1    264000000
      hclk             3   3    264000000
         hclkrng       1   1    264000000
         hclkusbm      0   0    264000000
         hclkcryp      0   0    264000000
         hclkhash      0   0    264000000
         hclk3d        0   0    264000000
         hclkhpi       0   0    264000000
         hclksva       0   0    264000000
         hclksaa       0   0    264000000
         hclkdif       0   0    264000000
         hclkusb       0   0    264000000
         hclkclcd      0   0    264000000
         hclkdma1      0   0    264000000
         hclksdram     0   0    264000000
         hclksmc       1   1    264000000
         hclkdma0      0   0    264000000
         pclk          7   9    264000000
            pclkmsp3   0   0    264000000
            pclkmshc   0   0    264000000
            pclkhsem   0   0    264000000
            pclkske    0   0    264000000
            pclkowm    0   0    264000000
            pclkmsp2   0   0    264000000
            pclkmsp1   0   0    264000000
            pclkuart2  0   0    264000000
            pclkxti    0   0    264000000
            pclkhsi    0   0    264000000
            pclkmsp0   0   0    264000000
            pclkuart1  1   1    264000000
            pclki2c1   0   0    264000000
            pclki2c0   0   0    264000000
            pclksdi    1   1    264000000
            pclkuart0  1   1    264000000
            pclkssp    0   0    264000000
            pclkirda   0   0    264000000
   timclk              1   1    2400000

Acked-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-06-20 10:15:30 +02:00
..
mmp ARM: pxa: remove cpu_is_xxx in gpio driver 2013-04-11 09:59:23 +08:00
mvebu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
mxs Merge branch 'depends/clk-for-3.10' into next/cleanup 2013-04-11 03:38:03 -07:00
samsung ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
socfpga ARM: socfpga: Upgrade clk driver for socfpga to make use of dts clock entries 2013-04-14 20:18:13 -07:00
spear ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00
sunxi clk: sunxi: Unify oscillator clock 2013-04-12 11:23:41 -07:00
tegra ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
ux500 ARM: arm-soc multiplatform updates for 3.10 2013-05-02 09:38:16 -07:00
versatile clk: vexpress: Add separate SP810 driver 2013-04-18 11:41:10 -07:00
x86 ACPI / scan: Add special handler for Intel Lynxpoint LPSS devices 2013-03-21 22:44:38 +01:00
clk-axi-clkgen.c clk: Add axi-clkgen driver 2013-03-19 17:20:30 -07:00
clk-bcm2835.c clk: bcm2835: probe for fixed-clock in device tree 2013-01-14 21:46:59 -07:00
clk-composite.c clk: composite: allow fixed rates & fixed dividers 2013-04-12 11:23:24 -07:00
clk-devres.c
clk-divider.c clk: divider: Introduce CLK_DIVIDER_ALLOW_ZERO flag 2013-04-03 12:56:30 -07:00
clk-fixed-factor.c clk: add device tree fixed-factor-clock binding support 2013-04-12 10:52:23 -07:00
clk-fixed-rate.c clk: add common of_clk_init() function 2013-01-24 11:09:28 -08:00
clk-gate.c
clk-highbank.c ACPI and power management updates for 3.9-rc1 2013-02-20 11:26:56 -08:00
clk-ls1x.c
clk-max77686.c clk: max77686: Avoid double free at remove time 2013-01-15 16:16:26 -08:00
clk-mux.c clk: add table lookup to mux 2013-03-22 15:18:18 -07:00
clk-nomadik.c clk: nomadik: implement the Nomadik clocks properly 2013-06-20 10:15:30 +02:00
clk-prima2.c clk: prima2: fix return value check in sirfsoc_of_clk_init() 2013-03-22 15:16:31 -07:00
clk-si5351.c clk: add si5351 i2c common clock driver 2013-04-12 11:04:38 -07:00
clk-si5351.h clk: add si5351 i2c common clock driver 2013-04-12 11:04:38 -07:00
clk-twl6040.c
clk-u300.c
clk-vt8500.c The common clock framework changes for 3.10 include many fixes for 2013-04-29 16:43:54 -07:00
clk-wm831x.c
clk-zynq.c clk: zynq: Add missing zynq clk header 2013-03-27 08:44:07 -07:00
clk.c clk: add clk_ignore_unused option to keep boot clocks on 2013-04-27 23:03:43 -07:00
clkdev.c
Kconfig clk: si5351: make clk-si5351 depend on CONFIG_OF 2013-04-15 21:42:56 -07:00
Makefile ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00