diff options
author | Andrew Lunn <andrew@lunn.ch> | 2012-07-22 12:51:35 +0200 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-23 22:04:11 +0200 |
commit | b61d15758941166b9cac41b87751dea21978bebc (patch) | |
tree | 3d627f2a324b39bc9e3e9656adddf49ca6be658a /Documentation/devicetree | |
parent | i2c: stu300: use devm managed resources (diff) | |
download | linux-b61d15758941166b9cac41b87751dea21978bebc.tar.xz linux-b61d15758941166b9cac41b87751dea21978bebc.zip |
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 @@ -* I2C +* Marvell MMP I2C controller Required properties : @@ -32,3 +32,20 @@ Examples: interrupts = <58>; }; +* Marvell MV64XXX I2C controller + +Required properties : + + - reg : Offset and length of the register set for the device + - compatible : Should be "marvell,mv64xxx-i2c" + - interrupts : The interrupt number + - clock-frequency : Desired I2C bus clock frequency in Hz. + +Examples: + + i2c@11000 { + compatible = "marvell,mv64xxx-i2c"; + reg = <0x11000 0x20>; + interrupts = <29>; + clock-frequency = <100000>; + }; |