144 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/i2c/i2c-rk3x.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Rockchip RK3xxx I2C controller8 9description:10 This driver interfaces with the native I2C controller present in Rockchip11 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 file20properties:21 compatible:22 oneOf:23 - const: rockchip,rv1108-i2c24 - const: rockchip,rk3066-i2c25 - const: rockchip,rk3188-i2c26 - const: rockchip,rk3228-i2c27 - const: rockchip,rk3288-i2c28 - const: rockchip,rk3399-i2c29 - items:30 - enum:31 - rockchip,rk3036-i2c32 - rockchip,rk3128-i2c33 - rockchip,rk3368-i2c34 - const: rockchip,rk3288-i2c35 - items:36 - enum:37 - rockchip,px30-i2c38 - rockchip,rk3308-i2c39 - rockchip,rk3328-i2c40 - rockchip,rk3568-i2c41 - rockchip,rk3576-i2c42 - rockchip,rk3588-i2c43 - rockchip,rv1126-i2c44 - const: rockchip,rk3399-i2c45 46 reg:47 maxItems: 148 49 interrupts:50 maxItems: 151 52 clocks:53 minItems: 154 items:55 - description:56 For older hardware (rk3066, rk3188, rk3228, rk3288)57 there is one clock that is used both to derive the functional clock58 for the device and as the bus clock.59 For newer hardware (rk3399) this clock is used to derive60 the functional clock61 - description:62 For newer hardware (rk3399) this is the bus clock63 64 clock-names:65 minItems: 166 items:67 - const: i2c68 - const: pclk69 70 rockchip,grf:71 $ref: /schemas/types.yaml#/definitions/phandle72 description:73 Required on RK3066, RK3188 the phandle of the syscon node for74 the general register file (GRF)75 On those SoCs an alias with the correct I2C bus ID76 (bit offset in the GRF) is also required.77 78 clock-frequency:79 default: 10000080 description:81 SCL frequency to use (in Hz). If omitted, 100kHz is used.82 83 i2c-scl-rising-time-ns:84 default: 100085 description:86 Number of nanoseconds the SCL signal takes to rise87 (t(r) in I2C specification). If not specified this is assumed to be88 the maximum the specification allows(1000 ns for Standard-mode,89 300 ns for Fast-mode) which might cause slightly slower communication.90 91 i2c-scl-falling-time-ns:92 default: 30093 description:94 Number of nanoseconds the SCL signal takes to fall95 (t(f) in the I2C specification). If not specified this is assumed to96 be the maximum the specification allows (300 ns) which might cause97 slightly slower communication.98 99 i2c-sda-falling-time-ns:100 default: 300101 description:102 Number of nanoseconds the SDA signal takes to fall103 (t(f) in the I2C specification). If not specified we will use the SCL104 value since they are the same in nearly all cases.105 106required:107 - compatible108 - reg109 - interrupts110 - clocks111 - clock-names112 113if:114 properties:115 compatible:116 contains:117 enum:118 - rockchip,rk3066-i2c119 - rockchip,rk3188-i2c120 121then:122 required:123 - rockchip,grf124 125unevaluatedProperties: false126 127examples:128 - |129 #include <dt-bindings/clock/rk3188-cru-common.h>130 #include <dt-bindings/interrupt-controller/arm-gic.h>131 #include <dt-bindings/interrupt-controller/irq.h>132 i2c0: i2c@2002d000 {133 compatible = "rockchip,rk3188-i2c";134 reg = <0x2002d000 0x1000>;135 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;136 clocks = <&cru PCLK_I2C0>;137 clock-names = "i2c";138 rockchip,grf = <&grf>;139 i2c-scl-falling-time-ns = <100>;140 i2c-scl-rising-time-ns = <800>;141 #address-cells = <1>;142 #size-cells = <0>;143 };144