Common i2c-controller class

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

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

Maintainers (maintainers): "Rob Herring <robh@kernel.org>"

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^i2c(@.+|-[a-z0-9]+)?$"

i2c-bus — not listed as required here #

Value type (type): "object"

Shared schema rule ($ref): #

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

clock-frequency — not listed as required here #

Minimum value (minimum): 1

Maximum value (maximum): 5000000

label — not listed as required here #

true — No constraints added by this property rule.

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

Number of nanoseconds the SCL signal takes to fall; t(f) in the I2C specification.

i2c-scl-internal-delay-ns — not listed as required here #

Number of nanoseconds the IP core additionally needs to setup SCL.

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

Number of nanoseconds the SCL signal takes to rise; t(r) in the I2C specification.

i2c-scl-clk-low-timeout-us — not listed as required here #

Number of microseconds the clock line needs to be pulled down in order to force a waiting state.

i2c-transfer-timeout-us — not listed as required here #

Number of microseconds to wait before considering an I2C transfer has failed.

i2c-scl-has-clk-low-timeout — not listed as required here #

Value type (type): "boolean"

Indicates whether the controller implements the feature of wait induction through SCL low, with the timeout being implemented internally by the controller.

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

Number of nanoseconds the SDA signal takes to fall; t(f) in the I2C specification.

i2c-analog-filter — not listed as required here #

Value type (type): "boolean"

Enable analog filter for i2c lines.

i2c-digital-filter — not listed as required here #

Value type (type): "boolean"

Enable digital filter for i2c lines.

i2c-digital-filter-width-ns — not listed as required here #

Width of spikes which can be filtered by digital filter (i2c-digital-filter). This width is specified in nanoseconds.

i2c-analog-filter-cutoff-frequency — not listed as required here #

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

Frequency that the analog filter (i2c-analog-filter) uses to distinguish which signal to filter. Signal with higher frequency than specified will be filtered out. Only lower frequency will pass (this is applicable to a low-pass analog filter). Typical value should be above the normal i2c bus clock frequency (clock-frequency). Specified in Hz.

interrupts — not listed as required here #

If not using interrupt-names, the first interrupt will be treated as the primary interrupt for the controller.

interrupt-names — not listed as required here #

At least one of these rules must match (anyOf) #

Rule 1

This rule adds no constraints.

Rule 2

Rule for matching array elements (contains)

Allowed values (enum): "smbus_alert"

Generic name is "smbus_alert" for the SMBusAlert signal. Other names are left to individual bindings.

mctp-controller — not listed as required here #

Value type (type): "boolean"

Indicates that the system is accessible via this bus as an endpoint for MCTP over I2C transport.

multi-master — not listed as required here #

Value type (type): "boolean"

States that there is another controller active on this bus. The OS can use this information to adapt power management to keep the arbitration awake all the time, for example. Can not be combined with 'single-master'.

scl-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Specifies the GPIO related to SCL pin. Used for GPIO bus recovery.

sda-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Specifies the GPIO related to SDA pin. Optional for GPIO bus recovery.

single-master — not listed as required here #

Value type (type): "boolean"

States that there is no other controller active on this bus. The OS can use this information to detect a stalled bus more reliably, for example. Can not be combined with 'multi-master'.

smbalert-gpios — not listed as required here #

Maximum number of items (maxItems): 1

Specifies the GPIO used for the SMBALERT# line. Optional.

smbus — not listed as required here #

Value type (type): "boolean"

States that additional SMBus restrictions and features apply to this bus. An example of feature is SMBusHostNotify. Examples of restrictions are more reserved addresses and timeout definitions.

smbus-alert — not listed as required here #

Value type (type): "boolean"

states that the optional SMBus-Alert feature apply to this bus.

All of these rules must match (allOf) #

Rule 1 #

This rule must not match (not) #

Required in this object (required): "i2c-scl-clk-low-timeout-us", "i2c-scl-has-clk-low-timeout"

Properties matching a name pattern (patternProperties) #

@[0-9a-f]+$ — name matches this regular expression #

Value type (type): "object"

Properties and child nodes (properties) #

reg — required here

Array item rules (items)

Array item rules (items)

Item 1

Exactly one of these rules must match (oneOf)

Rule 1

Maximum value (maximum): 127

Rule 2

Minimum value (minimum): 1073741824

Maximum value (maximum): 1073741951

Rule 3

Minimum value (minimum): 2147483648

Maximum value (maximum): 2147484671

Rule 4

Minimum value (minimum): 3221225472

Maximum value (maximum): 3221226495

One or many I2C target addresses. These are usually 7 bit addresses. However, flags can be attached to an address. I2C_TEN_BIT_ADDRESS is used to mark a 10 bit address. It is needed to avoid the ambiguity between e.g. a 7 bit address of 0x50 and a 10 bit address of 0x050 which, in theory, can be on the same bus. Another flag is I2C_OWN_SLAVE_ADDRESS to mark addresses on which we listen to be devices ourselves.

host-notify — not listed as required here

Value type (type): "boolean"

Device uses SMBus host notify protocol instead of interrupt line. Requires being connected to an adapter that supports this feature.

interrupts — not listed as required here

If not using interrupt-names, the first interrupt will be treated as the primary interrupt for the target.

interrupt-names — not listed as required here

At least one of these rules must match (anyOf)

Rule 1

This rule adds no constraints.

Rule 2

Rule for matching array elements (contains)

Allowed values (enum): "irq", "wakeup"

Generic names are "irq" for the primary interrupt and "wakeup" for the wakeup interrupt. Other names are left to individual bindings.

wakeup-source — not listed as required here

Device can be used as a wakeup source. The device should also have "wakeup" interrupt for the device. If "wakeup" interrupt name is not present in the binding, then primary interrupt will be used as wakeup interrupt.

Required in this object (required): "reg"

Requirements triggered by another property (dependentRequired): { i2c-analog-filter-cutoff-frequency: "i2c-analog-filter", i2c-digital-filter-width-ns: "i2c-digital-filter" }

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

true

Allowed by this rule.

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: BSD-2-Clause

Line 2: Copyright 2018 Linaro Ltd.

Line 3: Copyright 2015,2020 Wolfram Sang <wsa@sang-engineering.com>

Line 4: Copyright 2022 Arm Ltd.

Line 102: Any name is allowed.

Line 201: Any name is allowed.

Edit this page