Commit | Line | Data |
---|---|---|
c41aa3ce MS |
1 | * Rockchip RK3xxx I2C controller |
2 | ||
3 | This driver interfaces with the native I2C controller present in Rockchip | |
4 | RK3xxx SoCs. | |
5 | ||
6 | Required properties : | |
7 | ||
8 | - reg : Offset and length of the register set for the device | |
b0b6d123 YY |
9 | - compatible : should be "rockchip,rk3066-i2c", "rockchip,rk3188-i2c", |
10 | "rockchip,rk3228-i2c" or "rockchip,rk3288-i2c". | |
c41aa3ce MS |
11 | - interrupts : interrupt number |
12 | - clocks : parent clock | |
13 | ||
14 | Required on RK3066, RK3188 : | |
15 | ||
16 | - rockchip,grf : the phandle of the syscon node for the general register | |
17 | file (GRF) | |
18 | - on those SoCs an alias with the correct I2C bus ID (bit offset in the GRF) | |
19 | is also required. | |
20 | ||
21 | Optional properties : | |
22 | ||
23 | - clock-frequency : SCL frequency to use (in Hz). If omitted, 100kHz is used. | |
387f0de6 | 24 | - i2c-scl-rising-time-ns : Number of nanoseconds the SCL signal takes to rise |
1330e291 | 25 | (t(r) in I2C specification). If not specified this is assumed to be |
26 | the maximum the specification allows(1000 ns for Standard-mode, | |
27 | 300 ns for Fast-mode) which might cause slightly slower communication. | |
387f0de6 | 28 | - i2c-scl-falling-time-ns : Number of nanoseconds the SCL signal takes to fall |
1330e291 | 29 | (t(f) in the I2C specification). If not specified this is assumed to |
30 | be the maximum the specification allows (300 ns) which might cause | |
31 | slightly slower communication. | |
387f0de6 DA |
32 | - i2c-sda-falling-time-ns : Number of nanoseconds the SDA signal takes to fall |
33 | (t(f) in the I2C specification). If not specified we'll use the SCL | |
34 | value since they are the same in nearly all cases. | |
c41aa3ce MS |
35 | |
36 | Example: | |
37 | ||
38 | aliases { | |
39 | i2c0 = &i2c0; | |
40 | } | |
41 | ||
42 | i2c0: i2c@2002d000 { | |
43 | compatible = "rockchip,rk3188-i2c"; | |
44 | reg = <0x2002d000 0x1000>; | |
45 | interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; | |
46 | #address-cells = <1>; | |
47 | #size-cells = <0>; | |
48 | ||
49 | rockchip,grf = <&grf>; | |
50 | ||
51 | clock-names = "i2c"; | |
52 | clocks = <&cru PCLK_I2C0>; | |
1330e291 | 53 | |
54 | i2c-scl-rising-time-ns = <800>; | |
55 | i2c-scl-falling-time-ns = <100>; | |
c41aa3ce | 56 | }; |