Synopsys DesignWare APB I2C Controller

Schema identifier ($id): "http://devicetree.org/schemas/i2c/snps,designware-i2c.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Mika Westerberg <mika.westerberg@linux.intel.com>"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/i2c/i2c-controller.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

This rule must not match (not)

Rule for matching array elements (contains)

Exact value (const): "mscc,ocelot-i2c"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Maximum number of items (maxItems): 1

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Generic Synopsys DesignWare I2C controller

Exact value (const): "snps,designware-i2c"

Rule 2

Renesas RZ/N1D I2C controller

Array item rules (items)

Item 1

Exact value (const): "renesas,r9a06g032-i2c"

Item 2

Exact value (const): "renesas,rzn1-i2c"

Item 3

Exact value (const): "snps,designware-i2c"

Rule 3

Baikal-T1 SoC System I2C controller

Exact value (const): "baikal,bt1-sys-i2c"

Rule 4

Mobileye EyeQ DesignWare I2C controller

Array item rules (items)

Item 1

Allowed values (enum): "mobileye,eyeq7h-i2c"

Item 2

Exact value (const): "mobileye,eyeq6lplus-i2c"

Item 3

Exact value (const): "snps,designware-i2c"

Rule 5

Array item rules (items)

Item 1

Allowed values (enum): "mobileye,eyeq6lplus-i2c", "mscc,ocelot-i2c", "sophgo,sg2044-i2c", "thead,th1520-i2c"

Item 2

Exact value (const): "snps,designware-i2c"

reg — required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

DW APB I2C controller memory mapped registers

Item 2

ICPU_CFG:TWI_DELAY registers to setup the SDA hold time. This registers are specific to the Ocelot I2C-controller.

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

I2C controller reference clock source

Item 2

APB interface clock source

clock-names — not listed as required here #

Minimum number of items (minItems): 1

Array item rules (items) #

Item 1

Exact value (const): "ref"

Item 2

Exact value (const): "pclk"

resets — not listed as required here #

Maximum number of items (maxItems): 1

clock-frequency — not listed as required here #

Desired I2C bus clock frequency in Hz

Allowed values (enum): 100000, 400000, 1000000, 3400000

Default value (default): 400000

i2c-sda-hold-time-ns — not listed as required here #

The property should contain the SDA hold time in nanoseconds. This option is only supported in hardware blocks version 1.11a or newer or on Microsemi SoCs.

i2c-scl-falling-time-ns — not listed as required here #

The property should contain the SCL falling time in nanoseconds. This value is used to compute the tLOW period.

Default value (default): 300

i2c-sda-falling-time-ns — not listed as required here #

The property should contain the SDA falling time in nanoseconds. This value is used to compute the tHIGH period.

Default value (default): 300

dmas — not listed as required here #

Array item rules (items) #

Item 1

TX DMA Channel

Item 2

RX DMA Channel

dma-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "tx"

Item 2

Exact value (const): "rx"

snps,bus-capacitance-pf — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

This property indicates the bus capacitance in picofarads (pF). This value is used to compute the tHIGH and tLOW periods for high speed mode.

Allowed values (enum): 100, 400

Default value (default): 100

snps,clk-freq-optimized — not listed as required here #

This property indicates whether the hardware reduce its clock frequency by reducing the internal latency required to generate the high period and low period of SCL line.

Value type (type): "boolean"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Required in this object (required): "compatible", "reg", "interrupts"

Examples (examples) #

i2c@f0000 {
  compatible = "snps,designware-i2c";
  reg = <0xf0000 0x1000>;
  interrupts = <11>;
  clock-frequency = <400000>;
};
i2c@1120000 {
  compatible = "snps,designware-i2c";
  reg = <0x1120000 0x1000>;
  interrupts = <12 1>;
  clock-frequency = <400000>;
  i2c-sda-hold-time-ns = <300>;
  i2c-sda-falling-time-ns = <300>;
  i2c-scl-falling-time-ns = <300>;
  snps,bus-capacitance-pf = <400>;
  snps,clk-freq-optimized;
};
i2c@2000 {
  compatible = "snps,designware-i2c";
  reg = <0x2000 0x100>;
  #address-cells = <1>;
  #size-cells = <0>;
  clock-frequency = <400000>;
  clocks = <&i2cclk>;
  interrupts = <0>;

  eeprom@64 {
    compatible = "atmel,24c02";
    reg = <0x64>;
  };
};
i2c@100400 {
  compatible = "mscc,ocelot-i2c", "snps,designware-i2c";
  reg = <0x100400 0x100>, <0x198 0x8>;
  pinctrl-0 = <&i2c_pins>;
  pinctrl-names = "default";
  interrupts = <8>;
  clocks = <&ahb_clk>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Line 32: RZ/N1D

Line 33: RZ/N1

Edit this page