Path: blob/master/Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml
26307 views
# SPDX-License-Identifier: GPL-2.01%YAML 1.22---3$id: http://devicetree.org/schemas/i2c/i2c-rk3x.yaml#4$schema: http://devicetree.org/meta-schemas/core.yaml#56title: Rockchip RK3xxx I2C controller78description:9This driver interfaces with the native I2C controller present in Rockchip10RK3xxx SoCs.1112allOf:13- $ref: /schemas/i2c/i2c-controller.yaml#1415maintainers:16- Heiko Stuebner <heiko@sntech.de>1718# Everything else is described in the common file19properties:20compatible:21oneOf:22- const: rockchip,rv1108-i2c23- const: rockchip,rk3066-i2c24- const: rockchip,rk3188-i2c25- const: rockchip,rk3228-i2c26- const: rockchip,rk3288-i2c27- const: rockchip,rk3399-i2c28- items:29- enum:30- rockchip,rk3036-i2c31- rockchip,rk3128-i2c32- rockchip,rk3368-i2c33- const: rockchip,rk3288-i2c34- items:35- enum:36- rockchip,px30-i2c37- rockchip,rk3308-i2c38- rockchip,rk3328-i2c39- rockchip,rk3528-i2c40- rockchip,rk3562-i2c41- rockchip,rk3568-i2c42- rockchip,rk3576-i2c43- rockchip,rk3588-i2c44- rockchip,rv1126-i2c45- const: rockchip,rk3399-i2c4647reg:48maxItems: 14950interrupts:51maxItems: 15253clocks:54minItems: 155items:56- description:57For older hardware (rk3066, rk3188, rk3228, rk3288)58there is one clock that is used both to derive the functional clock59for the device and as the bus clock.60For newer hardware (rk3399) this clock is used to derive61the functional clock62- description:63For newer hardware (rk3399) this is the bus clock6465clock-names:66minItems: 167items:68- const: i2c69- const: pclk7071rockchip,grf:72$ref: /schemas/types.yaml#/definitions/phandle73description:74Required on RK3066, RK3188 the phandle of the syscon node for75the general register file (GRF)76On those SoCs an alias with the correct I2C bus ID77(bit offset in the GRF) is also required.7879clock-frequency:80default: 10000081description:82SCL frequency to use (in Hz). If omitted, 100kHz is used.8384i2c-scl-rising-time-ns:85default: 100086description:87Number of nanoseconds the SCL signal takes to rise88(t(r) in I2C specification). If not specified this is assumed to be89the maximum the specification allows(1000 ns for Standard-mode,90300 ns for Fast-mode) which might cause slightly slower communication.9192i2c-scl-falling-time-ns:93default: 30094description:95Number of nanoseconds the SCL signal takes to fall96(t(f) in the I2C specification). If not specified this is assumed to97be the maximum the specification allows (300 ns) which might cause98slightly slower communication.99100i2c-sda-falling-time-ns:101default: 300102description:103Number of nanoseconds the SDA signal takes to fall104(t(f) in the I2C specification). If not specified we will use the SCL105value since they are the same in nearly all cases.106107power-domains:108maxItems: 1109110required:111- compatible112- reg113- interrupts114- clocks115- clock-names116117if:118properties:119compatible:120contains:121enum:122- rockchip,rk3066-i2c123- rockchip,rk3188-i2c124125then:126required:127- rockchip,grf128129unevaluatedProperties: false130131examples:132- |133#include <dt-bindings/clock/rk3188-cru-common.h>134#include <dt-bindings/interrupt-controller/arm-gic.h>135#include <dt-bindings/interrupt-controller/irq.h>136i2c0: i2c@2002d000 {137compatible = "rockchip,rk3188-i2c";138reg = <0x2002d000 0x1000>;139interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;140clocks = <&cru PCLK_I2C0>;141clock-names = "i2c";142rockchip,grf = <&grf>;143i2c-scl-falling-time-ns = <100>;144i2c-scl-rising-time-ns = <800>;145#address-cells = <1>;146#size-cells = <0>;147};148149150