linux/Documentation/devicetree/bindings/clock
Scott Wood 0dfc86b317 clk: qoriq: Move chip-specific knowledge into driver
The device tree should describe the chips (or chip-like subblocks) in
the system, but it generally does not describe individual registers --
it should identify, rather than describe, a programming interface.

This has not been the case with the QorIQ clockgen nodes.  The
knowledge of what each bit setting of CLKCnCSR means is encoded in
three places (binding, pll node, and mux node), and the last also needs
to know which options are valid on a particular chip.  All three of
these locations are considered stable ABI, making it difficult to fix
mistakes (of which I have found several), much less refactor the
abstraction to be able to address problems, limitations, or new chips.

Under the current binding, a pll clock specifier of 2 means that the
PLL is divided by 4 -- and the driver implements this, unless there
happen to be four clock-output-names rather than 3, in which case it
interprets it as PLL divided by 3.  This does not appear in the binding
documentation at all.  That hack is now considered stable ABI.

The current device tree nodes contain errors, such as saying that
T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options.
The current binding also ignores some restrictions on clock selection,
such as p5020's requirement that if a core uses the "wrong" PLL, that
PLL must be clocked lower than the "correct" PLL and be at most 80% of
the rated CPU frequency.

Possibly because of the lack of the ability to express such nuance in
the binding, some valid options are omitted from the device trees, such
as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from
PLL1 (again, only if they are at most 80% of rated CPU frequency).
This omission, combined with excessive caution in the cpufreq driver
(addressed in a subsequent patch), means that currently on a 1500 MHz
p4080 with typical PLL configuration, cpufreq can lower the frequency
to 1200 MHz on half the CPUs and do nothing on the others.  With this
patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a
rev3 p4080 half can be lowered to 750 MHz and the other half to 600
MHz.

The current binding only deals with CPU clocks.  To describe FMan in
the device tree, we need to describe its clock.  Some chips have
additional muxes that work like the CPU muxes, but are not described in
the device tree.  Others require inspecting the Reset Control Word to
determine which PLL is used.  Rather than continue to extend this mess,
replace it.  Have the driver bind to the chip-specific clockgen
compatible, and keep the detailed description of quirky chip variations
in the driver, where it can be easily fixed, refactored, and extended.

Older device trees will continue to work (including a workaround for
old ls1021a device trees that are missing compatible and reg in the
clockgen node, which even the old binding required).  The pll/mux
details in old device trees will be ignored, but "clocks" properties
pointing at the old nodes will still work, and be directed at the
corresponding new clock.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
2015-10-21 18:05:52 -05:00
..
st ARM: STi: DT: Rename st_pll3200c32_407_c0_x into st_pll3200c32_cx_x 2015-07-22 11:41:33 +02:00
ti clk: ti: Add support for FAPLL on dm816x 2015-01-20 10:09:07 -08:00
alphascale,acc.txt ARM: add alphascale,acc.txt bindings documentation 2015-01-19 16:29:48 -08:00
altr_socfpga.txt ARM: socfpga: dts: Add div-reg to the main_pll clocks 2014-05-05 22:33:18 -05:00
amlogic,meson8b-clkc.txt clk: meson: Document bindings for Meson8b clock controller 2015-06-05 17:22:09 -07:00
arm-integrator.txt Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-10-07 21:16:26 -04:00
at91-clock.txt clk: at91: trivial: typo in peripheral clock description 2015-06-19 15:47:33 +02:00
axi-clkgen.txt clk: axi-clkgen: Add support for v2 2014-02-26 17:02:29 -08:00
brcm,iproc-clocks.txt clk: iproc: define Broadcom iProc clock binding 2015-06-18 12:36:37 -07:00
brcm,kona-ccu.txt dt-bindings: brcm: rationalize Broadcom documentation naming 2015-03-26 12:14:11 -05:00
calxeda.txt
clk-exynos-audss.txt clk: exynos-audss: add support for Exynos 5420 2014-01-08 18:02:43 +01:00
clk-palmas-clk32kg-clocks.txt dt/bindings: Binding documentation for Palmas clk32kg and clk32kgaudio clocks 2014-07-01 21:37:57 -07:00
clk-s5pv210-audss.txt clk: samsung: Add S5PV210 Audio Subsystem clock driver 2014-07-19 04:25:08 +09:00
clock-bindings.txt clk: bindings: Fix assigned-clock-rates description 2015-05-13 12:32:51 -07:00
clps711x-clock.txt clk: clps711x: Add DT bindings documentation 2014-07-28 23:30:46 -07:00
csr,atlas7-car.txt clk: sirf: add CSR atlas7 clk and reset support 2015-05-20 15:43:28 -07:00
efm32-clock.txt clk: new driver for efm32 SoC 2013-11-04 12:23:18 -08:00
emev2-clock.txt clk: emev2: Use generic names for device nodes 2015-05-07 11:32:41 -07:00
exynos4-clock.txt ARM: dts: use macros in clock bindings for exynos4 2014-02-26 09:53:30 +09:00
exynos7-clock.txt clk: samsung: exynos7: add clocks for audio block 2015-01-15 15:18:51 +01:00
exynos3250-clock.txt clk: samsung: exynos3250: Add driver for CMU_ISP clock domain 2015-03-30 15:18:53 -07:00
exynos4415-clock.txt clk: samsung: Document binding for Exynos4415 clock controller 2014-10-30 19:53:03 +01:00
exynos5250-clock.txt ARM: dts: use macros in clock bindings for exynos5250 2014-02-26 09:53:30 +09:00
exynos5260-clock.txt clk/exynos5260: add macros and documentation for exynos5260 2014-05-14 19:16:55 +02:00
exynos5410-clock.txt clk: exynos5410: register clocks using common clock framework 2014-05-31 02:13:16 +09:00
exynos5420-clock.txt clk: exynos5420: Add 5800 specific clocks 2014-05-19 22:15:08 +09:00
exynos5433-clock.txt clk: samsung: exynos5433: Add clocks for CMU_CAM1 domain 2015-02-05 19:31:08 +01:00
exynos5440-clock.txt ARM: dts: use macros in clock bindings for exynos5440 2014-02-26 09:53:31 +09:00
fixed-clock.txt Documentation: clock: fixed-clock: Remove unsupported 'gpios' property 2014-05-14 23:43:54 -07:00
fixed-factor-clock.txt clk: fixed-factor: Fix device-tree binding typo 2013-11-27 12:48:41 -08:00
fujitsu,mb86s70-crg11.txt clk: Add clock driver for mb86s7x 2015-04-10 13:51:55 -07:00
gpio-gate-clock.txt clk: add gpio gated clock 2014-09-26 16:51:42 -07:00
gpio-mux-clock.txt clk: add gpio controlled clock multiplexer 2015-07-06 17:20:52 -07:00
hi3620-clock.txt clk: hisilicon: add hi3620_mmc_clks 2014-02-26 16:03:56 -08:00
hi6220-clock.txt dt-bindings: clk: Hi6220: Document stub clock driver 2015-08-24 16:49:10 -07:00
hix5hd2-clock.txt clk: hisi: add clk-hix5hd2.c 2014-05-12 11:30:32 +08:00
imx1-clock.txt ARM: i.MX1 clk: Add devicetree support 2014-07-18 16:10:03 +08:00
imx5-clock.txt ARM: imx5: introduce DT includes for clock provider 2013-12-31 09:36:11 +08:00
imx6q-clock.txt ARM: imx6qdl: switch to use macro for clock ID 2014-07-18 16:11:23 +08:00
imx6sl-clock.txt ARM: imx: add clock support for imx6sl 2013-06-17 15:45:11 +08:00
imx6sx-clock.txt ARM: imx: add clock driver for imx6sx 2014-05-16 15:35:19 +08:00
imx6ul-clock.txt Document: dt: binding: imx: update document for imx6ul support 2015-08-11 23:15:16 +08:00
imx7d-clock.txt Document: dt: binding: imx: update document for imx7d support 2015-06-03 15:03:59 +08:00
imx21-clock.txt ARM: i.MX21 clk: Add devicetree support 2014-07-18 16:11:32 +08:00
imx23-clock.txt
imx25-clock.txt ARM: mx25: Add CLKO support 2014-05-16 22:51:34 +08:00
imx27-clock.txt ARM: i.MX27 clk: Introduce DT include for clock provider 2014-07-18 16:11:38 +08:00
imx28-clock.txt
imx31-clock.txt
imx35-clock.txt ARM i.MX35: Add devicetree support. 2013-12-31 09:36:40 +08:00
ingenic,cgu.txt DEVICETREE: Add Ingenic CGU binding documentation 2015-06-21 21:53:13 +02:00
keystone-gate.txt clk: keystone: Add gate control clock driver 2013-10-07 18:16:30 -07:00
keystone-pll.txt clk: keystone: add support for post divider register for main pll 2015-06-18 15:36:33 -07:00
lpc1850-ccu.txt doc: dt: add documentation for lpc1850-ccu clk driver 2015-06-18 15:44:48 -07:00
lpc1850-cgu.txt doc: dt: add documentation for lpc1850-cgu clk driver 2015-06-18 15:44:47 -07:00
lsi,axm5516-clks.txt clk: Add clock driver for AXM55xx SoC 2014-05-22 22:06:14 -07:00
marvell,berlin.txt Documentation: bindings: move the Berlin clock documentation 2015-05-16 00:07:47 +02:00
marvell,mmp2.txt clk: mmp: add mmp2 DT support for clock driver 2014-11-12 16:34:22 -08:00
marvell,pxa168.txt clk: mmp: add pxa168 DT support for clock driver 2014-11-12 16:34:14 -08:00
marvell,pxa910.txt clk: mmp: add pxa910 DT support for clock driver 2014-11-12 16:34:18 -08:00
marvell,pxa1928.txt dt-bindings: Add pxa1928 clock binding 2015-05-15 12:31:38 -07:00
maxim,max77686.txt clk: max77686: Improve Maxim 77686 PMIC clocks binding 2014-09-09 13:55:53 -07:00
maxim,max77802.txt clk: max77802: Add DT binding documentation 2014-09-09 13:56:04 -07:00
moxa,moxart-clock.txt clk: add MOXA ART SoCs clock driver 2014-03-18 17:13:14 -07:00
mt8173-cpu-dvfs.txt dt-bindings: mediatek: Add MT8173 CPU DVFS clock bindings 2015-09-01 15:50:11 +02:00
mvebu-core-clock.txt devicetree: bindings: update DT bindings for Marvell EBU clock support 2015-03-04 15:18:43 +01:00
mvebu-corediv-clock.txt clk: mvebu: Update binding documentation for the core divider clock 2014-03-13 23:24:23 +00:00
mvebu-cpu-clock.txt clk: mvebu: extend clk-cpu for dynamic frequency scaling 2014-07-16 12:58:38 +00:00
mvebu-gated-clock.txt clk: mvebu: add missing CESA gate clk 2015-06-03 15:17:07 -07:00
nspire-clock.txt clk: Add TI-Nspire clock drivers 2013-05-31 12:07:45 -07:00
nvidia,tegra20-car.txt ARM: tegra: document reset properties in DT bindings 2013-12-11 16:42:13 -07:00
nvidia,tegra30-car.txt ARM: tegra: document reset properties in DT bindings 2013-12-11 16:42:13 -07:00
nvidia,tegra114-car.txt ARM: tegra: document reset properties in DT bindings 2013-12-11 16:42:13 -07:00
nvidia,tegra124-car.txt of: document external-memory-controller property in tegra124-car 2015-05-13 15:17:10 +02:00
nvidia,tegra124-dfll.txt clk: tegra: Add binding for the Tegra124 DFLL clocksource 2015-07-16 09:32:43 +02:00
pistachio-clock.txt CLK: Add binding document for Pistachio clock controllers 2015-03-27 18:51:31 +01:00
prima2-clock.txt
pwm-clock.txt clk: Add PWM clock driver 2015-04-10 14:44:43 -07:00
pxa-clock.txt clk: dts: document pxa clock binding 2014-09-30 12:31:31 -07:00
qca,ath79-pll.txt DEVICETREE: Add bindings for the ATH79 PLL controllers 2015-06-21 21:54:05 +02:00
qcom,gcc.txt dt-bindings: Add #defines for MSM8916 clocks and resets 2015-03-23 16:09:20 -07:00
qcom,lcc.txt devicetree: bindings: Document qcom,lcc 2015-01-27 11:49:50 -08:00
qcom,mmcc.txt clk: qcom: Add support for APQ8064 multimedia clocks 2014-07-15 16:39:03 -07:00
qoriq-clock.txt clk: qoriq: Move chip-specific knowledge into driver 2015-10-21 18:05:52 -05:00
renesas,cpg-div6-clocks.txt clk: shmobile: div6: Document mandatory compatible fallback 2015-06-01 12:21:15 +02:00
renesas,cpg-mstp-clocks.txt clk: shmobile: mstp: Document mandatory compatible fallback 2015-06-01 12:25:01 +02:00
renesas,h8s2678-pll-clock.txt h8300: clock driver 2015-06-23 13:35:55 +09:00
renesas,h8300-div-clock.txt h8300: clock driver 2015-06-23 13:35:55 +09:00
renesas,r8a73a4-cpg-clocks.txt clk: shmobile: r8a73a4 common clock framework implementation 2015-01-08 16:14:30 +01:00
renesas,r8a7740-cpg-clocks.txt clk: shmobile: Add R8A7740-specific clock support 2014-05-23 13:38:25 -07:00
renesas,r8a7778-cpg-clocks.txt clk: shmobile: r8a7778: Add CPG/MSTP Clock Domain support 2015-08-12 10:31:27 +09:00
renesas,r8a7779-cpg-clocks.txt clk: shmobile: r8a7779: Add CPG/MSTP Clock Domain support 2015-08-12 10:31:27 +09:00
renesas,rcar-gen2-cpg-clocks.txt clk: shmobile: rcar-gen2: Add CPG/MSTP Clock Domain support 2015-08-12 10:31:28 +09:00
renesas,rz-cpg-clocks.txt clk: shmobile: rz: Add CPG/MSTP Clock Domain support 2015-08-12 10:31:28 +09:00
renesas,sh73a0-cpg-clocks.txt clk: shmobile: sh73a0 common clock framework implementation 2014-12-21 17:09:20 +09:00
rockchip,rk3188-cru.txt dt-bindings: add documentation for rk3188 clock and reset unit 2014-07-13 12:17:08 -07:00
rockchip,rk3288-cru.txt dt-bindings: add documentation for rk3288 cru 2014-07-13 12:17:09 -07:00
rockchip,rk3368-cru.txt dt-bindings: add documentation of rk3668 clock controller 2015-07-06 15:08:24 -07:00
rockchip.txt dt-bindings: add documentation for rk3188 clock and reset unit 2014-07-13 12:17:08 -07:00
samsung,s3c64xx-clock.txt clk: samsung: Add clock driver for S3C64xx SoCs 2013-08-05 11:58:37 -07:00
samsung,s3c2410-clock.txt ARM: S3C24XX: Remove omitted Kconfig selects and conditionals 2014-05-14 19:41:14 +02:00
samsung,s3c2412-clock.txt dt-bindings: add documentation for s3c2412 clock controller 2014-04-15 02:11:36 +09:00
samsung,s3c2443-clock.txt dt-bindings: add binding for clock-controller of s3c2443 and following 2014-04-15 02:11:07 +09:00
samsung,s5pv210-clock.txt clk: samsung: Add clock driver for S5PV210 and compatible SoCs 2014-07-19 04:24:42 +09:00
silabs,si570.txt clk: si570: Add a driver for SI570 oscillators 2013-12-14 21:01:35 -08:00
silabs,si5351.txt clk: si5351: Mention clock-names in the binding documentation 2015-05-08 11:22:29 -07:00
st,nomadik.txt Documentation/devicetree/bindings/clock/ fix a typo 2013-08-20 12:41:10 +02:00
st,stm32-rcc.txt dt-bindings: Document the STM32F4 clock bindings 2015-06-22 15:46:10 -07:00
ste-u300-syscon-clock.txt ARM: u300: convert MMC/SD clock to device tree 2013-06-17 13:54:37 +02:00
sunxi.txt clk: sunxi: Add support for the usb-clk on sun8i a23 and a33 SoCs 2015-06-02 10:24:39 +02:00
ti-keystone-pllctrl.txt Documentation: dt: add bindings for keystone pll control controller 2014-05-27 09:46:39 -04:00
ti,cdce706.txt clk: TI CDCE706 clock synthesizer driver 2015-01-17 13:52:40 -08:00
ti,cdce925.txt Add TI CDCE925 I2C controlled clock synthesizer driver 2015-06-03 15:21:07 -07:00
ux500.txt clk: add bindings for the Ux500 clocks 2015-08-24 16:49:15 -07:00
vf610-clock.txt ARM: dts: vf610: assign oscillator to clock module 2014-11-23 15:08:09 +08:00
vt8500.txt clk: vt8500: Add support for clocks on the WM8850 SoCs 2013-05-29 14:47:05 -07:00
xgene.txt Documentation: Add documentation for APM X-Gene clock binding 2013-10-07 11:22:16 -07:00
zx296702-clk.txt ARM: dts: zx: add an initial zx296702 dts and doc 2015-06-11 16:18:30 -07:00
zynq-7000.txt ARM: zynq: Map I/O memory on clkc init 2014-02-10 11:21:13 +01:00