Rockchip RK3xxx I2C controller
Schema identifier ($id): "http://devicetree.org/schemas/i2c/i2c-rk3x.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
This driver interfaces with the native I2C controller present in Rockchip RK3xxx SoCs.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):/schemas/i2c/i2c-controller.yaml#
Maintainers (maintainers): "Heiko Stuebner <heiko@sntech.de>"
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"rockchip,rv1108-i2c"
Rule 2
Exact value (
const):"rockchip,rk3066-i2c"
Rule 3
Exact value (
const):"rockchip,rk3188-i2c"
Rule 4
Exact value (
const):"rockchip,rk3228-i2c"
Rule 5
Exact value (
const):"rockchip,rk3288-i2c"
Rule 6
Exact value (
const):"rockchip,rk3399-i2c"
Rule 7
Array item rules (
items)Item 1
Allowed values (
enum):"rockchip,rk3036-i2c","rockchip,rk3128-i2c","rockchip,rk3368-i2c"Item 2
Exact value (
const):"rockchip,rk3288-i2c"
Rule 8
Array item rules (
items)Item 1
Allowed values (
enum):"rockchip,px30-i2c","rockchip,rk3308-i2c","rockchip,rk3328-i2c","rockchip,rk3506-i2c","rockchip,rk3528-i2c","rockchip,rk3562-i2c","rockchip,rk3568-i2c","rockchip,rk3576-i2c","rockchip,rk3588-i2c","rockchip,rv1126-i2c"Item 2
Exact value (
const):"rockchip,rk3399-i2c"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
clocks — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
For older hardware (rk3066, rk3188, rk3228, rk3288) there is one clock that is used both to derive the functional clock for the device and as the bus clock. For newer hardware (rk3399) this clock is used to derive the functional clock
Item 2
For newer hardware (rk3399) this is the bus clock
clock-names — required here #
Minimum number of items (minItems): 1
Array item rules (items) #
Item 1
Exact value (
const):"i2c"
Item 2
Exact value (
const):"pclk"
rockchip,grf — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
Required on RK3066, RK3188 the phandle of the syscon node for the general register file (GRF) On those SoCs an alias with the correct I2C bus ID (bit offset in the GRF) is also required.
clock-frequency — not listed as required here #
Default value (default): 100000
SCL frequency to use (in Hz). If omitted, 100kHz is used.
i2c-scl-rising-time-ns — not listed as required here #
Default value (default): 1000
Number of nanoseconds the SCL signal takes to rise (t(r) in I2C specification). If not specified this is assumed to be the maximum the specification allows(1000 ns for Standard-mode, 300 ns for Fast-mode) which might cause slightly slower communication.
i2c-scl-falling-time-ns — not listed as required here #
Default value (default): 300
Number of nanoseconds the SCL signal takes to fall (t(f) in the I2C specification). If not specified this is assumed to be the maximum the specification allows (300 ns) which might cause slightly slower communication.
i2c-sda-falling-time-ns — not listed as required here #
Default value (default): 300
Number of nanoseconds the SDA signal takes to fall (t(f) in the I2C specification). If not specified we will use the SCL value since they are the same in nearly all cases.
power-domains — not listed as required here #
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg", "interrupts", "clocks", "clock-names"
Condition (if) #
Properties and child nodes (
properties) #
compatible— not listed as required here #Rule for matching array elements (
contains)Allowed values (
enum):"rockchip,rk3066-i2c","rockchip,rk3188-i2c"
When the condition matches (then) #
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/rk3188-cru-common.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c0: i2c@2002d000 {
compatible = "rockchip,rk3188-i2c";
reg = <0x2002d000 0x1000>;
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru PCLK_I2C0>;
clock-names = "i2c";
rockchip,grf = <&grf>;
i2c-scl-falling-time-ns = <100>;
i2c-scl-rising-time-ns = <800>;
#address-cells = <1>;
#size-cells = <0>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: GPL-2.0
Line 19: Everything else is described in the common file