Merge tag 'pstore-v4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / i2c / i2c-rk3x.txt
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
9  - compatible: should be one of the following:
10    - "rockchip,rk3066-i2c": for rk3066
11    - "rockchip,rk3188-i2c": for rk3188
12    - "rockchip,rk3228-i2c": for rk3228
13    - "rockchip,rk3288-i2c": for rk3288
14    - "rockchip,rk3328-i2c", "rockchip,rk3399-i2c": for rk3328
15    - "rockchip,rk3399-i2c": for rk3399
16  - interrupts : interrupt number
17  - clocks: See ../clock/clock-bindings.txt
18    - For older hardware (rk3066, rk3188, rk3228, rk3288):
19      - There is one clock that's used both to derive the functional clock
20        for the device and as the bus clock.
21    - For newer hardware (rk3399): specified by name
22      - "i2c": This is used to derive the functional clock.
23      - "pclk": This is the bus clock.
24
25 Required on RK3066, RK3188 :
26
27  - rockchip,grf : the phandle of the syscon node for the general register
28                   file (GRF)
29  - on those SoCs an alias with the correct I2C bus ID (bit offset in the GRF)
30    is also required.
31
32 Optional properties :
33
34  - clock-frequency : SCL frequency to use (in Hz). If omitted, 100kHz is used.
35  - i2c-scl-rising-time-ns : Number of nanoseconds the SCL signal takes to rise
36         (t(r) in I2C specification). If not specified this is assumed to be
37         the maximum the specification allows(1000 ns for Standard-mode,
38         300 ns for Fast-mode) which might cause slightly slower communication.
39  - i2c-scl-falling-time-ns : Number of nanoseconds the SCL signal takes to fall
40         (t(f) in the I2C specification). If not specified this is assumed to
41         be the maximum the specification allows (300 ns) which might cause
42         slightly slower communication.
43  - i2c-sda-falling-time-ns : Number of nanoseconds the SDA signal takes to fall
44         (t(f) in the I2C specification). If not specified we'll use the SCL
45         value since they are the same in nearly all cases.
46
47 Example:
48
49 aliases {
50         i2c0 = &i2c0;
51 }
52
53 i2c0: i2c@2002d000 {
54         compatible = "rockchip,rk3188-i2c";
55         reg = <0x2002d000 0x1000>;
56         interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
57         #address-cells = <1>;
58         #size-cells = <0>;
59
60         rockchip,grf = <&grf>;
61
62         clock-names = "i2c";
63         clocks = <&cru PCLK_I2C0>;
64
65         i2c-scl-rising-time-ns = <800>;
66         i2c-scl-falling-time-ns = <100>;
67 };