mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 12:21:37 +00:00
ef6eb322ce
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>
105 lines
2.3 KiB
Plaintext
105 lines
2.3 KiB
Plaintext
ST Microelectronics Nomadik SRC System Reset and Control
|
|
|
|
This binding uses the common clock binding:
|
|
Documentation/devicetree/bindings/clock/clock-bindings.txt
|
|
|
|
The Nomadik SRC controller is responsible of controlling chrystals,
|
|
PLLs and clock gates.
|
|
|
|
Required properties for the SRC node:
|
|
- compatible: must be "stericsson,nomadik-src"
|
|
- reg: must contain the SRC register base and size
|
|
|
|
Optional properties for the SRC node:
|
|
- disable-sxtalo: if present this will disable the SXTALO
|
|
i.e. the driver output for the slow 32kHz chrystal, if the
|
|
board has its own circuitry for providing this oscillator
|
|
- disable-mxtal: if present this will disable the MXTALO,
|
|
i.e. the driver output for the main (~19.2 MHz) chrystal,
|
|
if the board has its own circuitry for providing this
|
|
osciallator
|
|
|
|
|
|
PLL nodes: these nodes represent the two PLLs on the system,
|
|
which should both have the main chrystal, represented as a
|
|
fixed frequency clock, as parent.
|
|
|
|
Required properties for the two PLL nodes:
|
|
- compatible: must be "st,nomadik-pll-clock"
|
|
- clock-cells: must be 0
|
|
- clock-id: must be 1 or 2 for PLL1 and PLL2 respectively
|
|
- clocks: this clock will have main chrystal as parent
|
|
|
|
|
|
HCLK nodes: these represent the clock gates on individual
|
|
lines from the HCLK clock tree and the gate for individual
|
|
lines from the PCLK clock tree.
|
|
|
|
Requires properties for the HCLK nodes:
|
|
- compatible: must be "st,nomadik-hclk-clock"
|
|
- clock-cells: must be 0
|
|
- clock-id: must be the clock ID from 0 to 63 according to
|
|
this table:
|
|
|
|
0: HCLKDMA0
|
|
1: HCLKSMC
|
|
2: HCLKSDRAM
|
|
3: HCLKDMA1
|
|
4: HCLKCLCD
|
|
5: PCLKIRDA
|
|
6: PCLKSSP
|
|
7: PCLKUART0
|
|
8: PCLKSDI
|
|
9: PCLKI2C0
|
|
10: PCLKI2C1
|
|
11: PCLKUART1
|
|
12: PCLMSP0
|
|
13: HCLKUSB
|
|
14: HCLKDIF
|
|
15: HCLKSAA
|
|
16: HCLKSVA
|
|
17: PCLKHSI
|
|
18: PCLKXTI
|
|
19: PCLKUART2
|
|
20: PCLKMSP1
|
|
21: PCLKMSP2
|
|
22: PCLKOWM
|
|
23: HCLKHPI
|
|
24: PCLKSKE
|
|
25: PCLKHSEM
|
|
26: HCLK3D
|
|
27: HCLKHASH
|
|
28: HCLKCRYP
|
|
29: PCLKMSHC
|
|
30: HCLKUSBM
|
|
31: HCLKRNG
|
|
(32, 33, 34, 35 RESERVED)
|
|
36: CLDCLK
|
|
37: IRDACLK
|
|
38: SSPICLK
|
|
39: UART0CLK
|
|
40: SDICLK
|
|
41: I2C0CLK
|
|
42: I2C1CLK
|
|
43: UART1CLK
|
|
44: MSPCLK0
|
|
45: USBCLK
|
|
46: DIFCLK
|
|
47: IPI2CCLK
|
|
48: IPBMCCLK
|
|
49: HSICLKRX
|
|
50: HSICLKTX
|
|
51: UART2CLK
|
|
52: MSPCLK1
|
|
53: MSPCLK2
|
|
54: OWMCLK
|
|
(55 RESERVED)
|
|
56: SKECLK
|
|
(57 RESERVED)
|
|
58: 3DCLK
|
|
59: PCLKMSP3
|
|
60: MSPCLK3
|
|
61: MSHCCLK
|
|
62: USBMCLK
|
|
63: RNGCCLK
|