1# SPDX-License-Identifier: GPL-2.0 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/i2c/i2c-rk3x.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Rockchip RK3xxx I2C controller 8 9description: 10 This driver interfaces with the native I2C controller present in Rockchip 11 RK3xxx SoCs. 12 13allOf: 14 - $ref: /schemas/i2c/i2c-controller.yaml# 15 16maintainers: 17 - Heiko Stuebner <heiko@sntech.de> 18 19# Everything else is described in the common file 20properties: 21 compatible: 22 oneOf: 23 - const: rockchip,rv1108-i2c 24 - const: rockchip,rk3066-i2c 25 - const: rockchip,rk3188-i2c 26 - const: rockchip,rk3228-i2c 27 - const: rockchip,rk3288-i2c 28 - const: rockchip,rk3399-i2c 29 - items: 30 - enum: 31 - rockchip,rk3036-i2c 32 - rockchip,rk3128-i2c 33 - rockchip,rk3368-i2c 34 - const: rockchip,rk3288-i2c 35 - items: 36 - enum: 37 - rockchip,px30-i2c 38 - rockchip,rk3308-i2c 39 - rockchip,rk3328-i2c 40 - rockchip,rk3506-i2c 41 - rockchip,rk3528-i2c 42 - rockchip,rk3562-i2c 43 - rockchip,rk3568-i2c 44 - rockchip,rk3576-i2c 45 - rockchip,rk3588-i2c 46 - rockchip,rv1126-i2c 47 - const: rockchip,rk3399-i2c 48 49 reg: 50 maxItems: 1 51 52 interrupts: 53 maxItems: 1 54 55 clocks: 56 minItems: 1 57 items: 58 - description: 59 For older hardware (rk3066, rk3188, rk3228, rk3288) 60 there is one clock that is used both to derive the functional clock 61 for the device and as the bus clock. 62 For newer hardware (rk3399) this clock is used to derive 63 the functional clock 64 - description: 65 For newer hardware (rk3399) this is the bus clock 66 67 clock-names: 68 minItems: 1 69 items: 70 - const: i2c 71 - const: pclk 72 73 rockchip,grf: 74 $ref: /schemas/types.yaml#/definitions/phandle 75 description: 76 Required on RK3066, RK3188 the phandle of the syscon node for 77 the general register file (GRF) 78 On those SoCs an alias with the correct I2C bus ID 79 (bit offset in the GRF) is also required. 80 81 clock-frequency: 82 default: 100000 83 description: 84 SCL frequency to use (in Hz). If omitted, 100kHz is used. 85 86 i2c-scl-rising-time-ns: 87 default: 1000 88 description: 89 Number of nanoseconds the SCL signal takes to rise 90 (t(r) in I2C specification). If not specified this is assumed to be 91 the maximum the specification allows(1000 ns for Standard-mode, 92 300 ns for Fast-mode) which might cause slightly slower communication. 93 94 i2c-scl-falling-time-ns: 95 default: 300 96 description: 97 Number of nanoseconds the SCL signal takes to fall 98 (t(f) in the I2C specification). If not specified this is assumed to 99 be the maximum the specification allows (300 ns) which might cause 100 slightly slower communication. 101 102 i2c-sda-falling-time-ns: 103 default: 300 104 description: 105 Number of nanoseconds the SDA signal takes to fall 106 (t(f) in the I2C specification). If not specified we will use the SCL 107 value since they are the same in nearly all cases. 108 109 power-domains: 110 maxItems: 1 111 112required: 113 - compatible 114 - reg 115 - interrupts 116 - clocks 117 - clock-names 118 119if: 120 properties: 121 compatible: 122 contains: 123 enum: 124 - rockchip,rk3066-i2c 125 - rockchip,rk3188-i2c 126 127then: 128 required: 129 - rockchip,grf 130 131unevaluatedProperties: false 132 133examples: 134 - | 135 #include <dt-bindings/clock/rk3188-cru-common.h> 136 #include <dt-bindings/interrupt-controller/arm-gic.h> 137 #include <dt-bindings/interrupt-controller/irq.h> 138 i2c0: i2c@2002d000 { 139 compatible = "rockchip,rk3188-i2c"; 140 reg = <0x2002d000 0x1000>; 141 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 142 clocks = <&cru PCLK_I2C0>; 143 clock-names = "i2c"; 144 rockchip,grf = <&grf>; 145 i2c-scl-falling-time-ns = <100>; 146 i2c-scl-rising-time-ns = <800>; 147 #address-cells = <1>; 148 #size-cells = <0>; 149 }; 150