diff options
author | Andrew Lunn <andrew@lunn.ch> | 2012-07-22 06:51:35 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-23 16:04:11 -0400 |
commit | b61d15758941166b9cac41b87751dea21978bebc (patch) | |
tree | 3d627f2a324b39bc9e3e9656adddf49ca6be658a /Documentation/devicetree | |
parent | 6f535b94261b16343cfbc4576a941bd7901b96e1 (diff) |
I2C: MV64XYZ: Add Device Tree support
Extends the driver to get properties from device tree. Rather than
pass the N & M factors in DT, use the more standard clock-frequency
property. Calculate N & M at run time. In order to do this, we need to
know tclk. So the driver uses clk_get() etc in order to get the clock
and clk_get_rate() to determine the tclk rate. Not all platforms
however have CLK, so some #ifdefery is needed to ensure the driver
still compiles when CLK is not available.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
[wsa: converted some ints to u32 to match signedness]
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/i2c/mrvl-i2c.txt | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt index b891ee218354..0f7945019f6f 100644 --- a/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt +++ b/Documentation/devicetree/bindings/i2c/mrvl-i2c.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | * I2C | 1 | * Marvell MMP I2C controller |
2 | 2 | ||
3 | Required properties : | 3 | Required properties : |
4 | 4 | ||
@@ -32,3 +32,20 @@ Examples: | |||
32 | interrupts = <58>; | 32 | interrupts = <58>; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | * Marvell MV64XXX I2C controller | ||
36 | |||
37 | Required properties : | ||
38 | |||
39 | - reg : Offset and length of the register set for the device | ||
40 | - compatible : Should be "marvell,mv64xxx-i2c" | ||
41 | - interrupts : The interrupt number | ||
42 | - clock-frequency : Desired I2C bus clock frequency in Hz. | ||
43 | |||
44 | Examples: | ||
45 | |||
46 | i2c@11000 { | ||
47 | compatible = "marvell,mv64xxx-i2c"; | ||
48 | reg = <0x11000 0x20>; | ||
49 | interrupts = <29>; | ||
50 | clock-frequency = <100000>; | ||
51 | }; | ||