Max Schwarz | c41aa3c | 2014-06-11 22:34:37 +0200 | [diff] [blame] | 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 |
David Wu | 908dbd5 | 2016-05-16 22:04:12 +0800 | [diff] [blame] | 9 | - compatible: should be one of the following: |
Andy Yan | f14cb3e | 2017-08-11 11:38:29 +0800 | [diff] [blame] | 10 | - "rockchip,rv1108-i2c": for rv1108 |
David Wu | 908dbd5 | 2016-05-16 22:04:12 +0800 | [diff] [blame] | 11 | - "rockchip,rk3066-i2c": for rk3066 |
| 12 | - "rockchip,rk3188-i2c": for rk3188 |
| 13 | - "rockchip,rk3228-i2c": for rk3228 |
| 14 | - "rockchip,rk3288-i2c": for rk3288 |
Liang Chen | 2e15768 | 2017-03-16 21:17:20 +0800 | [diff] [blame] | 15 | - "rockchip,rk3328-i2c", "rockchip,rk3399-i2c": for rk3328 |
David Wu | 908dbd5 | 2016-05-16 22:04:12 +0800 | [diff] [blame] | 16 | - "rockchip,rk3399-i2c": for rk3399 |
Max Schwarz | c41aa3c | 2014-06-11 22:34:37 +0200 | [diff] [blame] | 17 | - interrupts : interrupt number |
David Wu | 908dbd5 | 2016-05-16 22:04:12 +0800 | [diff] [blame] | 18 | - clocks: See ../clock/clock-bindings.txt |
| 19 | - For older hardware (rk3066, rk3188, rk3228, rk3288): |
| 20 | - There is one clock that's used both to derive the functional clock |
| 21 | for the device and as the bus clock. |
| 22 | - For newer hardware (rk3399): specified by name |
| 23 | - "i2c": This is used to derive the functional clock. |
| 24 | - "pclk": This is the bus clock. |
Max Schwarz | c41aa3c | 2014-06-11 22:34:37 +0200 | [diff] [blame] | 25 | |
| 26 | Required on RK3066, RK3188 : |
| 27 | |
| 28 | - rockchip,grf : the phandle of the syscon node for the general register |
| 29 | file (GRF) |
| 30 | - on those SoCs an alias with the correct I2C bus ID (bit offset in the GRF) |
| 31 | is also required. |
| 32 | |
| 33 | Optional properties : |
| 34 | |
| 35 | - clock-frequency : SCL frequency to use (in Hz). If omitted, 100kHz is used. |
Doug Anderson | 387f0de | 2014-12-18 09:44:07 -0800 | [diff] [blame] | 36 | - i2c-scl-rising-time-ns : Number of nanoseconds the SCL signal takes to rise |
addy ke | 1330e29 | 2014-12-11 19:02:40 +0800 | [diff] [blame] | 37 | (t(r) in I2C specification). If not specified this is assumed to be |
| 38 | the maximum the specification allows(1000 ns for Standard-mode, |
| 39 | 300 ns for Fast-mode) which might cause slightly slower communication. |
Doug Anderson | 387f0de | 2014-12-18 09:44:07 -0800 | [diff] [blame] | 40 | - i2c-scl-falling-time-ns : Number of nanoseconds the SCL signal takes to fall |
addy ke | 1330e29 | 2014-12-11 19:02:40 +0800 | [diff] [blame] | 41 | (t(f) in the I2C specification). If not specified this is assumed to |
| 42 | be the maximum the specification allows (300 ns) which might cause |
| 43 | slightly slower communication. |
Doug Anderson | 387f0de | 2014-12-18 09:44:07 -0800 | [diff] [blame] | 44 | - i2c-sda-falling-time-ns : Number of nanoseconds the SDA signal takes to fall |
| 45 | (t(f) in the I2C specification). If not specified we'll use the SCL |
| 46 | value since they are the same in nearly all cases. |
Max Schwarz | c41aa3c | 2014-06-11 22:34:37 +0200 | [diff] [blame] | 47 | |
| 48 | Example: |
| 49 | |
| 50 | aliases { |
| 51 | i2c0 = &i2c0; |
| 52 | } |
| 53 | |
| 54 | i2c0: i2c@2002d000 { |
| 55 | compatible = "rockchip,rk3188-i2c"; |
| 56 | reg = <0x2002d000 0x1000>; |
| 57 | interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; |
| 58 | #address-cells = <1>; |
| 59 | #size-cells = <0>; |
| 60 | |
| 61 | rockchip,grf = <&grf>; |
| 62 | |
| 63 | clock-names = "i2c"; |
| 64 | clocks = <&cru PCLK_I2C0>; |
addy ke | 1330e29 | 2014-12-11 19:02:40 +0800 | [diff] [blame] | 65 | |
| 66 | i2c-scl-rising-time-ns = <800>; |
| 67 | i2c-scl-falling-time-ns = <100>; |
Max Schwarz | c41aa3c | 2014-06-11 22:34:37 +0200 | [diff] [blame] | 68 | }; |