-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This driver allows to provide DT clocks for core clocks found on Marvell Kirkwood, Dove & 370/XP SoCs. The core clock frequencies and ratios are determined by decoding the Sample-At-Reset registers. Although technically correct, using a divider of 0 will lead to div_by_zero panic. Let's use a ratio of 0/1 instead to fail later with a zero clock. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by Gregory CLEMENT <gregory.clement@free-electrons.com>
- Loading branch information
Sebastian Hesselbarth
authored and
Thomas Petazzoni
committed
Nov 20, 2012
1 parent
f4a75d2
commit 97fa4cf
Showing
9 changed files
with
792 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
Documentation/devicetree/bindings/clock/mvebu-core-clock.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
* Core Clock bindings for Marvell MVEBU SoCs | ||
|
||
Marvell MVEBU SoCs usually allow to determine core clock frequencies by | ||
reading the Sample-At-Reset (SAR) register. The core clock consumer should | ||
specify the desired clock by having the clock ID in its "clocks" phandle cell. | ||
|
||
The following is a list of provided IDs and clock names on Armada 370/XP: | ||
0 = tclk (Internal Bus clock) | ||
1 = cpuclk (CPU clock) | ||
2 = nbclk (L2 Cache clock) | ||
3 = hclk (DRAM control clock) | ||
4 = dramclk (DDR clock) | ||
|
||
The following is a list of provided IDs and clock names on Kirkwood and Dove: | ||
0 = tclk (Internal Bus clock) | ||
1 = cpuclk (CPU0 clock) | ||
2 = l2clk (L2 Cache clock derived from CPU0 clock) | ||
3 = ddrclk (DDR controller clock derived from CPU0 clock) | ||
|
||
Required properties: | ||
- compatible : shall be one of the following: | ||
"marvell,armada-370-core-clock" - For Armada 370 SoC core clocks | ||
"marvell,armada-xp-core-clock" - For Armada XP SoC core clocks | ||
"marvell,dove-core-clock" - for Dove SoC core clocks | ||
"marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) | ||
"marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC | ||
- reg : shall be the register address of the Sample-At-Reset (SAR) register | ||
- #clock-cells : from common clock binding; shall be set to 1 | ||
|
||
Optional properties: | ||
- clock-output-names : from common clock binding; allows overwrite default clock | ||
output names ("tclk", "cpuclk", "l2clk", "ddrclk") | ||
|
||
Example: | ||
|
||
core_clk: core-clocks@d0214 { | ||
compatible = "marvell,dove-core-clock"; | ||
reg = <0xd0214 0x4>; | ||
#clock-cells = <1>; | ||
}; | ||
|
||
spi0: spi@10600 { | ||
compatible = "marvell,orion-spi"; | ||
/* ... */ | ||
/* get tclk from core clock provider */ | ||
clocks = <&core_clk 0>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
config MVEBU_CLK_CORE | ||
bool | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj-$(CONFIG_MVEBU_CLK_CORE) += clk.o clk-core.o |
Oops, something went wrong.