-
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.
i2c: rk3x: add driver for Rockchip RK3xxx SoC I2C adapter
Driver for the native I2C adapter found in Rockchip RK3xxx SoCs. Configuration is only possible through devicetree. The driver is interrupt driven and supports the I2C_M_IGNORE_NAK mangling bit. Signed-off-by: Max Schwarz <max.schwarz@online.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
- Loading branch information
Max Schwarz
authored and
Wolfram Sang
committed
Jun 11, 2014
1 parent
c31c24b
commit c41aa3c
Showing
4 changed files
with
815 additions
and
0 deletions.
There are no files selected for viewing
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,42 @@ | ||
* Rockchip RK3xxx I2C controller | ||
|
||
This driver interfaces with the native I2C controller present in Rockchip | ||
RK3xxx SoCs. | ||
|
||
Required properties : | ||
|
||
- reg : Offset and length of the register set for the device | ||
- compatible : should be "rockchip,rk3066-i2c", "rockchip,rk3188-i2c" or | ||
"rockchip,rk3288-i2c". | ||
- interrupts : interrupt number | ||
- clocks : parent clock | ||
|
||
Required on RK3066, RK3188 : | ||
|
||
- rockchip,grf : the phandle of the syscon node for the general register | ||
file (GRF) | ||
- on those SoCs an alias with the correct I2C bus ID (bit offset in the GRF) | ||
is also required. | ||
|
||
Optional properties : | ||
|
||
- clock-frequency : SCL frequency to use (in Hz). If omitted, 100kHz is used. | ||
|
||
Example: | ||
|
||
aliases { | ||
i2c0 = &i2c0; | ||
} | ||
|
||
i2c0: i2c@2002d000 { | ||
compatible = "rockchip,rk3188-i2c"; | ||
reg = <0x2002d000 0x1000>; | ||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
rockchip,grf = <&grf>; | ||
|
||
clock-names = "i2c"; | ||
clocks = <&cru PCLK_I2C0>; | ||
}; |
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
Oops, something went wrong.