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,rk3528-i2c 41 - rockchip,rk3562-i2c 42 - rockchip,rk3568-i2c 43 - rockchip,rk3576-i2c 44 - rockchip,rk3588-i2c 45 - rockchip,rv1126-i2c 46 - const: rockchip,rk3399-i2c 47 48 reg: 49 maxItems: 1 50 51 interrupts: 52 maxItems: 1 53 54 clocks: 55 minItems: 1 56 items: 57 - description: 58 For older hardware (rk3066, rk3188, rk3228, rk3288) 59 there is one clock that is used both to derive the functional clock 60 for the device and as the bus clock. 61 For newer hardware (rk3399) this clock is used to derive 62 the functional clock 63 - description: 64 For newer hardware (rk3399) this is the bus clock 65 66 clock-names: 67 minItems: 1 68 items: 69 - const: i2c 70 - const: pclk 71 72 rockchip,grf: 73 $ref: /schemas/types.yaml#/definitions/phandle 74 description: 75 Required on RK3066, RK3188 the phandle of the syscon node for 76 the general register file (GRF) 77 On those SoCs an alias with the correct I2C bus ID 78 (bit offset in the GRF) is also required. 79 80 clock-frequency: 81 default: 100000 82 description: 83 SCL frequency to use (in Hz). If omitted, 100kHz is used. 84 85 i2c-scl-rising-time-ns: 86 default: 1000 87 description: 88 Number of nanoseconds the SCL signal takes to rise 89 (t(r) in I2C specification). If not specified this is assumed to be 90 the maximum the specification allows(1000 ns for Standard-mode, 91 300 ns for Fast-mode) which might cause slightly slower communication. 92 93 i2c-scl-falling-time-ns: 94 default: 300 95 description: 96 Number of nanoseconds the SCL signal takes to fall 97 (t(f) in the I2C specification). If not specified this is assumed to 98 be the maximum the specification allows (300 ns) which might cause 99 slightly slower communication. 100 101 i2c-sda-falling-time-ns: 102 default: 300 103 description: 104 Number of nanoseconds the SDA signal takes to fall 105 (t(f) in the I2C specification). If not specified we will use the SCL 106 value since they are the same in nearly all cases. 107 108 power-domains: 109 maxItems: 1 110 111required: 112 - compatible 113 - reg 114 - interrupts 115 - clocks 116 - clock-names 117 118if: 119 properties: 120 compatible: 121 contains: 122 enum: 123 - rockchip,rk3066-i2c 124 - rockchip,rk3188-i2c 125 126then: 127 required: 128 - rockchip,grf 129 130unevaluatedProperties: false 131 132examples: 133 - | 134 #include <dt-bindings/clock/rk3188-cru-common.h> 135 #include <dt-bindings/interrupt-controller/arm-gic.h> 136 #include <dt-bindings/interrupt-controller/irq.h> 137 i2c0: i2c@2002d000 { 138 compatible = "rockchip,rk3188-i2c"; 139 reg = <0x2002d000 0x1000>; 140 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; 141 clocks = <&cru PCLK_I2C0>; 142 clock-names = "i2c"; 143 rockchip,grf = <&grf>; 144 i2c-scl-falling-time-ns = <100>; 145 i2c-scl-rising-time-ns = <800>; 146 #address-cells = <1>; 147 #size-cells = <0>; 148 }; 149