Граф коммитов

691567 Коммитов

Автор SHA1 Сообщение Дата
Bhumika Goyal 7cc566a821 clk: ti: make clk_ops const
Make these const as they are only stored in the const field of a
clk_init_data structure.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-23 15:53:25 -07:00
Stephen Boyd 535b1100d1 clk: renesas: Updates for v4.14
- Add more module clocks for R-Car V2H and M3-W,
   - Add support for the R-Car Gen3 USB 2.0 clock selector PHY,
   - Add support for the new R-Car D3 SoC,
   - Allow compile-testing of all (sub)drivers now all dummy infrastructure
     is available,
   - Small fixes and cleanups.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZlVHhAAoJEEgEtLw/Ve77wqwP/1/RgfVlAoAHDL+aIo5FacVk
 uL5XPembCm7lCB+9OIU7GIrZQbZGWFBRUfL4oqOSfxqsTLv9gAKyZNUBETOKijXo
 NW0m6gkpN2+AZvZlTsZUzYLgdakNdOXi5atYn41zvAy2wbtww2aUqUHvwHz2PKjz
 k4ucRJEjljVGzTMu5/yqaADioEnTnb9FZ+uRGiy0/W+sD4UoEum75Ay6u3t7s0bL
 cmA2rtCFg52GlvC+BsZHntAjTHlSFXn7W8LddP1sb0oVvc9spC3k8q4DR8zVGNU2
 VCk6XKyOnWTpHjyw/IYBAjQ+nNainklLyIusnEnG0VyUZY0pvFcC/SOAHxO4NSBS
 AJqD7ylhkc6gnYL0lqp+n6RJaoY4GOhpSFz+NNtPXFXaDUfuf+WTiYzHnrrCCZ4z
 jTGcmiynl229jAxN5fYudjfnbydBfvdKGINtVRI7ApP+oZa5K0Wzbd4ZDx4Q2mML
 90mCdy+BVFGUcosh91kpL9vKazEm8EBYArMVhRDTFog6c4VyUrzL77fWleoptc4M
 yWlWB/KwfAhr0/NM1cxguax9bG1eOJbwq5FxHGwUqUCjxUxUWItNM9E1RMJ89drm
 zIsRO3CseOVFJcsm/75owYc/vXNbWcZ09wHyt8RExygPUPxRj3iCCvI5Y+tDqDIG
 zb2H5/e0HI7PjHt+hLEW
 =77l6
 -----END PGP SIGNATURE-----

Merge tag 'clk-renesas-for-v4.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-next

Pull Renesas clk driver updates from Geert Uytterhoeven:

  * Add more module clocks for R-Car V2H and M3-W,
  * Add support for the R-Car Gen3 USB 2.0 clock selector PHY,
  * Add support for the new R-Car D3 SoC,
  * Allow compile-testing of all (sub)drivers now all dummy infrastructure
    is available,
  * Small fixes and cleanups.

* tag 'clk-renesas-for-v4.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers:
  clk: renesas: r8a7796: Add USB3.0 clock
  clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY
  clk: renesas: cpg-mssr: Add R8A77995 support
  clk: renesas: rcar-gen3: Add support for SCCG/Clean peripheral clocks
  clk: renesas: rcar-gen3: Add divider support for PLL1 and PLL3
  clk: renesas: Add r8a77995 CPG Core Clock Definitions
  clk: renesas: rcar-gen3-cpg: Refactor checks for accessing the div table
  clk: renesas: rcar-gen3-cpg: Drop superfluous variable
  clk: renesas: Allow compile-testing of all (sub)drivers
  clk: renesas: r8a7792: Add IMR-LX3/LSX3 clocks
  clk: renesas: div6: Document fields used for parent selection
2017-08-23 15:39:58 -07:00
Stephen Boyd 1dfcfa721f clk: rockchip: Mark rockchip_fractional_approximation static
Silence the sparse warning

clk/rockchip/clk.c:172:6: warning: symbol 'rockchip_fractional_approximation' was not declared. Should it be static?

Cc: Elaine Zhang <zhangqing@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-23 15:35:41 -07:00
Stephen Boyd cf657bb940 The biggest change is fixing the jitter on the fractional clock-type
Rockchip socs experience with the default approximation. For that we
 introduce the ability to override it with a clock-specific approximation
 and use that to create the needed rate settings as described in the
 Rockchip soc manuals (same for all Rockchip socs).
 
 Apart from that we have support for the rk3126 clock controller
 which is similar to the rk3128 with some minimal differences
 and a lot of improvements and fixes for the rv1108 clock controller
 (missing clocks, some clock-ids, naming fixes, register fixes).
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAlmcl8sQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgeiBB/wIf5LHDu09HuOb1bjtYASMc//ve2ymhpd7
 QsccJ0nteJTWnYQlrJUPYN8YhRVqPNrz7Fq8PkMMkzm89fQQ6lr5DxOy6olKTPM4
 sGf+242eE3XttHjJxcshNPS98A56zBa9OgNC9sUsTex8r7NaJn+Gvlf0sXEgQRQi
 5FprJf49/4rlHZypVMg1j+aMEWM8ZAmXLP3F77Qch+rfxE74POV9/HI7EEoSQ9MX
 TxwEewmM8IGXY9aVTvtADPmX31CgdOD3qm4giwGkBf2F8SajP8R63wi+BYpNfUTX
 +TrexLXEfeKEVtU+xPXsNYmEnAOW6sRvfyUnq4oA1hVSnFoexFA1
 =Upwy
 -----END PGP SIGNATURE-----

Merge tag 'v4.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next

Pull Rockchip clk driver updates from Heiko Stuebner:

The biggest change is fixing the jitter on the fractional clock-type
Rockchip socs experience with the default approximation. For that we
introduce the ability to override it with a clock-specific approximation
and use that to create the needed rate settings as described in the
Rockchip soc manuals (same for all Rockchip socs).

Apart from that we have support for the rk3126 clock controller
which is similar to the rk3128 with some minimal differences
and a lot of improvements and fixes for the rv1108 clock controller
(missing clocks, some clock-ids, naming fixes, register fixes).

* tag 'v4.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  clk: rockchip: fix the rv1108 clk_mac sel register description
  clk: rockchip: rename rv1108 macphy clock to mac
  clk: rockchip: add rv1108 ACLK_GMAC and PCLK_GMAC clocks
  clk: rockchip: add rk3228 SCLK_SDIO_SRC clk id
  clk: rockchip: add rv1108 ACLK_GAMC and PCLK_GMAC ID
  clk: rockchip: add rk3228 sclk_sdio_src ID
  clk: rockchip: add special approximation to fix up fractional clk's jitter
  clk: fractional-divider: allow overriding of approximation
  clk: rockchip: modify rk3128 clk driver to also support rk3126
  dt-bindings: add documentation for rk3126 clock
  clk: rockchip: add some critical clocks for rv1108 SoC
  clk: rockchip: rename some of clks for rv1108 SoC
  clk: rockchip: fix up some clks describe error for rv1108 SoC
  clk: rockchip: support more clks for rv1108
  clk: rockchip: fix up the pll clks error for rv1108 SoC
  clk: rockchip: support more rates for rv1108 cpuclk
  clk: rockchip: fix up indentation of some RV1108 clock-ids
  clk: rockchip: rename the clk id for HCLK_I2S1_2CH
  clk: rockchip: add more clk ids for rv1108
2017-08-23 15:33:45 -07:00
Stephen Boyd 1fea70bc18 Allwinner clock changes for 4.14, round 2
Usual improvements:
 
   - Added support for fixed post-divider on divider and NKM-style clocks
 
   - Added driver for R40 CCU
 
 Non critical fixes (from round 1):
 
   - Fix sunxi-ng/ccu-sunxi-r.h header file guard macro typo
 
   - Make fractional clock modes really used and correctly configured
 
   - Make H3 cpu clock rate change correctly to be used with cpufreq
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCgAsFiEE2nN1m/hhnkhOWjtHOJpUIZwPJDAFAlmaR6AOHHdlbnNAY3Np
 ZS5vcmcACgkQOJpUIZwPJDC8YA//aLULoosISnyHs+wKowVHuDb7/mQ82O1gOAxC
 oE/vscd/WCRm7A5tfy+xHfajX/YRf32Qc09wB7fxUF4R0lgkO9QjUO0yX74a6bPh
 HCh/+bcmeNl9TZAYpTs72Q4nfc1x63OZwxMqTRnBmh3cevyIBJiFvqPjoMeD+Ari
 n32QEBgGE+A8bWshVFpNFyId6iyfMfozSYninIkVkwMGr7QgBgJRK1/5sftyZMR+
 NQ2IGkaUfICnXofF//pNKsH7TN770gyDtFVWjrKZMrEKoP+gp3mawzMpfePKH/O6
 4ihcm5LOo1Kdg5UzRTpQ2B/9fNUn2EvFYT6RuIBfddQcaflT1AzWtNK52j2L/crD
 tFyamcCSsNY5LzeySbVW+pQMRfrq6UCYtssiL7HYEcwMzvv61PfyDtKq5dxtJd0Q
 W8S6wPE/foj0i0JQWs0K70AacGU6XdEanUAtc5r3AsniCwwOtlwnaQqOlE5CiwAo
 HOSItOxX4Y/9QglnntsDyhNUaKpaSiG21XdE3ho3xq1/CS9ED3p5Ljbshem5fnPi
 mPisF6Ca6NVvCZ+sjH2RVvmGyh3d+BPfQLWC/sTamC4rnpDalrMq6IsCOivzbxqQ
 ltkYwUO1nmz5NMloeWYCUWWmLUOECCQu7Mppf2UQxpidrEEY0mbBYFdOlehrlHZT
 bWt2NdQ=
 =DKSp
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-clk-for-4.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-next

Pull Allwinner clock changes from Chen-Yu Tsai:

 * Added support for fixed post-divider on divider and NKM-style clocks
 * Added driver for R40 CCU
 * Fix sunxi-ng/ccu-sunxi-r.h header file guard macro typo
 * Make fractional clock modes really used and correctly configured
 * Make H3 cpu clock rate change correctly to be used with cpufreq

* tag 'sunxi-clk-for-4.14-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
  clk: sunxi-ng: support R40 SoC
  dt-bindings: add compatible string for Allwinner R40 CCU
  clk: sunxi-ng: nkm: add support for fixed post-divider
  clk: sunxi-ng: div: Add support for fixed post-divider
  dt-bindings: clock: sunxi-ccu: Add compatibles for sun5i CCU driver
  clk: sunxi-ng: allow set parent clock (PLL_CPUX) for CPUX clock on H3
  clk: sunxi-ng: h3: gate then ungate PLL CPU clk after rate change
  clk: sunxi-ng: Wait for lock when using fractional mode
  clk: sunxi-ng: Make fractional helper less chatty
  clk: sunxi-ng: multiplier: Fix fractional mode
  clk: sunxi-ng: Fix fractional mode for N-M clocks
  clk: sunxi-ng: Fix header guard of ccu-sun8i-r.h
2017-08-23 15:31:48 -07:00
Stephen Boyd 4d64556b36 clk/samsung updates for 4.14
Changes in definitions of audio related clocks for Exynos5420/5422/5800
 SoCs: a fix of mau_epll clock definition and changes enabling clock rate
 setting propagation on a path from the I2S IP block up the EPLL.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJZjGUFAAoJEE1bIKeAnHqLpPMQAJc2E7Gp6BX7LdUmN6r8GuCS
 AdfyqnUUH0oW6OTTrhZvW/Jg7i8P0dcTtWF9qhBbsg78l/4QPprKHOz+uRGeJ7TJ
 usdDnRiiThlfSGGx5Wu3zxv7EhXLpXamRK3uWKIEEyjrmxXiZXWZDYN9O40gZ0pI
 DSBBNoHD4ikotLNHTjlOEMtxKH7y7/Yda7QSWZsddsNhmvdsuG8iOAagbujJtkie
 1rH20eL4z8BA0kjyW3/U6B35cx83KrmpjG9TUoTEwG580X6uTOmpXZ644Rzf3LLs
 +In/UpEqvXXr4lbBtvoOWzMcsaF5PcSx1otmb+oqAdfN85M3z/lquX0Kv/ZT2Y/x
 7hWzAJMLBABA5UgEgB75Sf8TJC1YH7oWHZcRux+nN/AdFXIvIgbuCcVSgn8s0+Tx
 cnWebKQyzRTNWirf3GzExHIhsUEfaB/qdgg4CE8a+tDzundCu3k2dr9Ss+sFYaaU
 qEg3EazbU5vOFbaNE9ImZulLMTprQ09jlvvaKV6MA9mB90mIfUgyjOUXhqLov4S9
 Uuen+0tFeGMNxVtm6mUYT9zqiFlktP3BluoWQwyd2wyrqX1PgHwYj2KhrwoGzm7+
 mSKKwSBulJN5yIbSQdX+O31sddlcOHz+ey+7ttaY5j8s8AoP+eGQlSVMY6YKllWm
 on85KiSm0Hpxvmx2LMMX
 =pAH5
 -----END PGP SIGNATURE-----

Merge tag 'clk-v4.14-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-next

Pull Samsung clk driver updates from Sylwester Nawrocki:

Changes in definitions of audio related clocks for Exynos5420/5422/5800
SoCs: a fix of mau_epll clock definition and changes enabling clock rate
setting propagation on a path from the I2S IP block up the EPLL.

* tag 'clk-v4.14-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk:
  clk: samsung: exynos542x: Enable clock rate propagation up to the EPLL
  clk: samsung: Add CLK_SET_RATE_PARENT to some AUDSS CLK CON clocks
  clk: samsung: Fix mau_epll clock definition for exynos5422
2017-08-23 15:30:29 -07:00
Stephen Boyd 3477a72b41 Amlogic clock driver updates for 4.14
* meson8b: add the reset controller to the clkc
 * meson: expose all clk ids
 * gxbb-aoclk: Add CEC 32k clock
 * gxbb: add mmc input 0 clocks
 * meson: fix protection against undefined clks
 * gxbb: fix audio divider flags
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZhJ1CAAoJEHfc29rIyEnRRfkP/3ZFN6URCoh2FGaS39SYHVg8
 PuaeCaoDd6/DMuLAWGMlsPtbwqsmqIsA03ZhB8XBzcezfsvc8yGMveTsw8omvJr5
 ejXKqeyMxBoRmqrho6+OeMNdkyrHPIkJ9CyTT5PUVlh6jLEnRP2cnsbQYzWRaICN
 4BvmkNKZm8yqTkAaneHIzUmcWDDXSq3C43Y3q8622Et2V4h6J74O1KtQLw7o1AAo
 0T5mRgAIzo5tJQ4olFfhqOzgcLUbKZmA7jCR7uTaV2Nvde8IHLHpLIStnHCe532s
 XEjWWgGGS+E2Df3gB3AiHbCgstXZDcdEimt/r//y2+pw2TauuDTcvxIfdfMxMBLI
 mEDdwFqNG3zXXaIMgYIa7FY7lJl+TQj5d8CgzmpmQGwWkMrL3I6KWywhCPLHlKGu
 OiwBqRDMq3pJRfhKVDmImanlg+FNsoP0UE+QfGQxW5XGJclWdKo5JTSwh876UsVi
 ZZGhDwTetPHU1LpEXg0Fvaynecdp1wgLK0ofHFLAUfmhd2FImWGZG1qBwuwhj1iS
 1uYB7d+pez91lpU08wNm9dfkSKaXc59ph44j3eEFfJOiRrswkz1rPH7tHCQz7sM4
 yUcq2AEmAet6rpqPNikfOZkvItFjk5HcZCMdaOKp30kIdSD22Xzh55ni0Ji1x7Yv
 ZmvPT65ZU+kWqJjF6Xzo
 =Ihpj
 -----END PGP SIGNATURE-----

Merge tag 'meson-clk-for-4.14' of git://github.com/baylibre/clk-meson into clk-next

Pull Amlogic clock driver updates from Neil Armstrong:

 * meson8b: add the reset controller to the clkc
 * meson: expose all clk ids
 * gxbb-aoclk: Add CEC 32k clock
 * gxbb: add mmc input 0 clocks
 * meson: fix protection against undefined clks
 * gxbb: fix audio divider flags

* tag 'meson-clk-for-4.14' of git://github.com/baylibre/clk-meson:
  clk: meson: gxbb-aoclk: Add CEC 32k clock
  clk: meson: gxbb-aoclk: Switch to regmap for register access
  dt-bindings: clock: amlogic, gxbb-aoclkc: Update bindings
  clk: meson: gxbb: Add sd_emmc clk0 clocks
  clk: meson: gxbb: fix clk_mclk_i958 divider flags
  clk: meson: gxbb: fix meson cts_amclk divider flags
  clk: meson: meson8b: register the built-in reset controller
  dt-bindings: clock: gxbb-aoclk: Add CEC 32k clock
  clk: meson: gxbb: Add sd_emmc clk0 clkids
  clk: meson-gxbb: expose almost every clock in the bindings
  clk: meson8b: expose every clock in the bindings
  clk: meson: gxbb: fix protection against undefined clks
  clk: meson: meson8b: fix protection against undefined clks
  dt-bindings: clock: meson8b: describe the embedded reset controller
2017-08-23 15:28:52 -07:00
Elaine Zhang 64a1644bc3 clk: rockchip: fix the rv1108 clk_mac sel register description
The source clock ordering is wrong, as shown in the TRM:
cru_sel24_con[8]
rmii_extclk_sel
clock source select control register
1'b0: from internal PLL
1'b1: from external IO

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-22 02:55:03 +02:00
Elaine Zhang c7d0045b08 clk: rockchip: rename rv1108 macphy clock to mac
This MAC has no internal phy for rv1108 and the whole clock
infrastructure hasn't been used yet, so is safe to fix.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-22 02:53:55 +02:00
Elaine Zhang 100542725f clk: rockchip: add rv1108 ACLK_GMAC and PCLK_GMAC clocks
Add gmac aclk and pclk clock gates.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-22 02:50:45 +02:00
Elaine Zhang fe53230cf2 clk: rockchip: add rk3228 SCLK_SDIO_SRC clk id
In some special circumstances, may be need to reparent clk for sclk_sdio_src.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-22 02:40:18 +02:00
Heiko Stuebner 358efd52ce Merge branch 'v4.14-shared/clkids' into v4.14-clk/next 2017-08-22 00:39:00 +02:00
Elaine Zhang 1858698e0a clk: rockchip: add rv1108 ACLK_GAMC and PCLK_GMAC ID
This patch exports gmac aclk and pclk for dts reference.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-22 00:38:03 +02:00
Elaine Zhang 9762e7ff16 clk: rockchip: add rk3228 sclk_sdio_src ID
This patch exports sdio src clock for dts reference.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-22 00:36:50 +02:00
Icenowy Zheng cd030a78f7 clk: sunxi-ng: support R40 SoC
Allwinner R40 SoC have a clock controller module in the style of the
SoCs beyond sun6i, however, it's more rich and complex.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-19 17:04:37 +08:00
Icenowy Zheng 0a6341555e dt-bindings: add compatible string for Allwinner R40 CCU
Allwinner R40 has a clock controlling unit like the ones on other
Allwinner SoCs after sun6i, and can also use a CCU-based driver.

Add a compatible string for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-19 16:16:14 +08:00
Hiromitsu Yamasaki c29f82951b clk: renesas: r8a7796: Add USB3.0 clock
This patch adds USB3.0-IF0 clock for R8A7796 SoC.

Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-08-17 09:22:26 +02:00
Yoshihiro Shimoda 311accb645 clk: renesas: rcar-usb2-clock-sel: Add R-Car USB 2.0 clock selector PHY
R-Car USB 2.0 controller can change the clock source from an oscillator
to an external clock via a register. So, this patch adds support
the clock source selector as a clock driver.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2017-08-17 09:22:23 +02:00
Geert Uytterhoeven d71e851d82 clk: renesas: cpg-mssr: Add R8A77995 support
Add R-Car D3 (R8A77995) Clock Pulse Generator / Module Standby and
Software Reset support, using the CPG/MSSR driver core and the common
R-Car Gen3 CPG code.

Based on the R-Car Series, 3rd Generation Hardware User's Manual, Rev.
0.55, Jun. 30, 2017.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Rob Herring <robh@kernel.org>
2017-08-16 09:51:48 +02:00
Geert Uytterhoeven 696997e004 clk: renesas: rcar-gen3: Add support for SCCG/Clean peripheral clocks
On R-Car Gen3 SoCs with a Spread Spectrum Clock Generator (e.g. R-Car
D3), a peripheral clock divider has been added, to select between clean
and spread spectrum parents.

Add a new clock type to the R-Car Gen3 driver core to handle this.
To avoid increasing the size of struct cpg_core_clk, both parents and
dividers are stored in the existing parent resp. div fields.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-16 09:51:47 +02:00
Geert Uytterhoeven 09a7dea9d5 clk: renesas: rcar-gen3: Add divider support for PLL1 and PLL3
On some R-Car Gen3 SoCs (e.g. R-Car D3), PLL1 and PLL3 use a divider
value different from one.  Extend struct rcar_gen3_cpg_pll_config to handle
this.  As all multipliers and dividers are small, table size increase
can be kept limited by storing them in u8s instead of unsigned ints,
which saves ca. 0.5 KiB for a generic kernel.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-16 09:51:47 +02:00
Geert Uytterhoeven 714c53aa2e clk: renesas: Add r8a77995 CPG Core Clock Definitions
Add all R-Car D3 Clock Pulse Generator Core Clock Outputs, as listed
in Table 8.2f ("List of Clocks [R-Car D3]") of the R-Car Series, 3rd
Generation Hardware User's Manual (Rev. 0.55, Jun. 30, 2017).

Note that internal CPG clocks (S0, S1, S2, S3, S1C, S3C, SDSRC, and
SSPSRC) are not included, as they are used as internal clock sources
only, and never referenced from DT.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
2017-08-16 09:51:46 +02:00
Icenowy Zheng a6653773d6 clk: sunxi-ng: nkm: add support for fixed post-divider
SATA PLL on Allwinner R40 is of type (parent) * N * K / M / 6 where 6 is
the fixed post-divider.

Add post-divider support for NKM type clock.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
[wens@csie.org: Fixed application of post-divider in set_rate callback]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-14 22:45:06 +08:00
Priit Laes 721353c030 clk: sunxi-ng: div: Add support for fixed post-divider
SATA clock on sun4i/sun7i is of type (parent) / M / 6 where
6 is fixed post-divider.

Signed-off-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-14 22:31:46 +08:00
Jonathan Liu 7e784240bd dt-bindings: clock: sunxi-ccu: Add compatibles for sun5i CCU driver
The bindings were not updated when the sun5i CCU driver was added in
commit 5e73761786 ("clk: sunxi-ng: Add sun5i CCU driver").

Signed-off-by: Jonathan Liu <net147@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-11 22:11:31 +08:00
Sylwester Nawrocki 599cebea93 clk: samsung: exynos542x: Enable clock rate propagation up to the EPLL
The CLK_SET_RATE_PARENT flag is added to clocks between the EPLL
and the audio subsystem clock controller so that the EPLL's output
frequency can be set indirectly with clk_set_rate() on a leaf clock.
That should be safe as EPLL is normally only used to generate clock
for the audio subsystem.
With this change we can avoid passing the EPLL clock to the ASoC
machine driver.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2017-08-10 10:56:23 +02:00
Sylwester Nawrocki 7df45a532c clk: samsung: Add CLK_SET_RATE_PARENT to some AUDSS CLK CON clocks
This allows clk rate propagation up to the clock tree so EPLL
can be reprogrammed indirectly when setting rate of the Audio
Subsystem clocks.
The advantage is that sound machine driver can operate only
on the leaf clocks rather than explicitly re-configuring
the root clock (EPLL).

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2017-08-09 17:17:04 +02:00
Sylwester Nawrocki 41097f25e9 clk: samsung: Fix mau_epll clock definition for exynos5422
Parent clock of the MAU_EPLL gate clock on exynos5422 is
"mout_user_mau_epll", not "mout_mau_epll_clk". This change
only affects exynos5422/5800.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2017-08-09 17:16:55 +02:00
Elaine Zhang 5d890c2df9 clk: rockchip: add special approximation to fix up fractional clk's jitter
>From Rockchips fractional divider description:
  3.1.9  Fractional divider usage
  To get specific frequency, clocks of I2S, SPDIF, UARTcan be generated by
  fractional divider. Generally you must set that denominator is 20 times
  larger than numerator to generate precise clock frequency. So the
  fractional divider applies only to generate low frequency clock like
  I2S, UART.

Therefore add a special approximation function that handles this
special requirement.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:45:42 +02:00
Elaine Zhang ec52e46256 clk: fractional-divider: allow overriding of approximation
Fractional dividers may have special requirements concerning numerator
and denominator selection that differ from just getting the best
approximation.

For example on Rockchip socs the denominator must be at least 20 times
larger than the numerator to generate precise clock frequencies.

Therefore add the ability to provide custom approximation functions.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:39:48 +02:00
Elaine Zhang 3346140588 clk: rockchip: modify rk3128 clk driver to also support rk3126
rk3128 and rk3126 have some gate registers describe differences.
So need to make some distinctions.
The RK3126 and RK3128 Same clock description we move it to
the common clock branches.
And the different clks description use the own clock branches.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:30:29 +02:00
Elaine Zhang 6d4ce2b7d9 dt-bindings: add documentation for rk3126 clock
This add bindings documentation for rk3126 SoCs.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:30:14 +02:00
Elaine Zhang b75f38451a clk: rockchip: add some critical clocks for rv1108 SoC
the bus/periph/nclk_ddrupctl/pclk_ddrmon/pclk_acodecphy/pclk_pmu
no driver to handle them,
Chip design requirements for these clock to always on.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:28:57 +02:00
Elaine Zhang a52394e9a0 clk: rockchip: rename some of clks for rv1108 SoC
Rename some of clks to keep the consistency with the TRM.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:28:28 +02:00
Elaine Zhang ac5a00a371 clk: rockchip: fix up some clks describe error for rv1108 SoC
1. fix up the parent name
2. remove the CLK_IGNORE_UNUSED flag for some clk not need to always on.
3. fix up some clks regs describe error.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:27:29 +02:00
Elaine Zhang 2566337bfc clk: rockchip: support more clks for rv1108
Add the description of the missing clock,
make the clock more complete.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 17:25:41 +02:00
Heiko Stuebner aad9e0d10a Merge branch 'v4.14-shared/clkids' into v4.14-clk/next 2017-08-08 17:21:45 +02:00
Elaine Zhang eca05f0011 clk: rockchip: fix up the pll clks error for rv1108 SoC
fix up the lock_shift describe error.
remove the ROCKCHIP_PLL_SYNC_RATE flag for gpll.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-08 00:48:53 +02:00
Elaine Zhang d00b4d943d clk: rockchip: support more rates for rv1108 cpuclk
fix up the cpuclk rates table for support more freqs.
fix up the mux_core_mask describe error.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-06 19:46:44 +02:00
Elaine Zhang a376a4b045 clk: rockchip: fix up indentation of some RV1108 clock-ids
Make the code look better.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-06 19:45:19 +02:00
Elaine Zhang 1b6428a286 clk: rockchip: rename the clk id for HCLK_I2S1_2CH
i2s1 has 2 channels but not 8 channels.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>

[and the clock id hasn't been used in either clock-driver nor dts,
 so is safe to rename]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-06 19:43:35 +02:00
Elaine Zhang cbbd6c2f55 clk: rockchip: add more clk ids for rv1108
Add new clk ids for the peripherals on rv1108 soc.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
2017-08-06 19:42:43 +02:00
Neil Armstrong 62ec0b9754 clk: meson: gxbb-aoclk: Add CEC 32k clock
The CEC 32K AO Clock is a dual divider with dual counter to provide a more
precise 32768Hz clock for the CEC subsystem from the external xtal.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:02:02 +02:00
Neil Armstrong ffb13e3b84 clk: meson: gxbb-aoclk: Switch to regmap for register access
Switch the aoclk driver to use the new bindings and switch all the
registers access to regmap only.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:02:01 +02:00
Neil Armstrong 3b3025625f dt-bindings: clock: amlogic, gxbb-aoclkc: Update bindings
On the first revision of the bindings, only the gates + resets were known
in the AO Clock HW, but more registers used to configures AO clock are known
to be spread among the AO register space.
This patch adds a parent node for the entire system control zone for the AO
domain then moves the clock controller as a subnode of the system control
node.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:02:00 +02:00
Jerome Brunet 914e6e80b3 clk: meson: gxbb: Add sd_emmc clk0 clocks
Input source 0 of the mmc controllers is not directly xtal, as currently
described in DT. Each controller is fed by a composite clock (the usual
mux, divider and gate). The muxes inputs are the xtal (default) and the
fclk_div clocks. These parents, along with the divider, should be able to
provide the necessary rates for mmc and nand operation.

The input muxes should also be able to take mpll2, mpll3 and gp0_pll but
these are precious clocks, needed for other usage. It is better if the
mmc does not use these them. For this reason, mpll2, mpll3 and gp0_pll is
not listed among the possible parents.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:02:00 +02:00
Jerome Brunet 7605aa5b41 clk: meson: gxbb: fix clk_mclk_i958 divider flags
CLK_DIVIDER_ROUND_CLOSEST was incorrectly put in the hw.init flags
while it should have been in the divider flags

Fixes: 3c277c247e ("clk: meson: gxbb: add cts_mclk_i958")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:01:59 +02:00
Jerome Brunet 004f6f462d clk: meson: gxbb: fix meson cts_amclk divider flags
CLK_DIVIDER_ROUND_CLOSEST was incorrectly put in the hw.init flags
while it should have been in the divider flags

Fixes: 4087bd4b21 ("clk: meson: gxbb: add cts_amclk")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:01:59 +02:00
Martin Blumenstingl 189621726b clk: meson: meson8b: register the built-in reset controller
The clock controller also includes some reset lines. This patch
implements a reset controller to assert and de-assert these resets.
The reset controller itself is registered early (through
CLK_OF_DECLARE_DRIVER) because it is needed very early in the boot
process (to start the secondary CPU cores).

According to the public S805 datasheet there are two more reset bits
in the HHI_SYS_CPU_CLK_CNTL0 register, which are not implemented by
this patch (as these seem to be unused in Amlogic's vendor Linux kernel
sources and their u-boot tree):
- bit 15: GEN_DIV_SOFT_RESET
- bit 14: SOFT_RESET

All information was taken from the public S805 Datasheet and Amlogic's
vendor GPL kernel sources. This patch is based on an earlier version
submitted by Carlo Caione.

Suggested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 18:01:58 +02:00
Neil Armstrong 596f2b78da dt-bindings: clock: gxbb-aoclk: Add CEC 32k clock
This patchadds the clock binding entry for the CEC 32K AO Clock.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2017-08-04 17:49:35 +02:00