I2C controller embedded in STMicroelectronics STM32 I2C platform

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

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

Maintainers (maintainers): "Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.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

Rule for matching array elements (contains)

Allowed values (enum): "st,stm32f7-i2c", "st,stm32mp13-i2c", "st,stm32mp15-i2c", "st,stm32mp25-i2c"

When the condition matches (then) #

Properties and child nodes (properties)

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

Default value (default): 25

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

Default value (default): 10

When the condition does not match (else) #

Properties and child nodes (properties)

st,syscfg-fmp — not listed as required here

false — Not permitted by this property rule.

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "st,stm32f4-i2c"

When the condition matches (then) #

Properties and child nodes (properties)

clock-frequency — not listed as required here

Allowed values (enum): 100000, 400000

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "st,stm32f4-i2c", "st,stm32f7-i2c", "st,stm32mp13-i2c", "st,stm32mp15-i2c"

When the condition matches (then) #

Properties and child nodes (properties)

interrupts — not listed as required here

Minimum number of items (minItems): 2

interrupt-names — not listed as required here

Minimum number of items (minItems): 2

When the condition does not match (else) #

Properties and child nodes (properties)

interrupts — not listed as required here

Maximum number of items (maxItems): 1

interrupt-names — not listed as required here

Maximum number of items (maxItems): 1

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "st,stm32f4-i2c", "st,stm32f7-i2c", "st,stm32mp13-i2c", "st,stm32mp15-i2c", "st,stm32mp25-i2c"

reg — required here #

Maximum number of items (maxItems): 1

interrupts — required here #

Array item rules (items) #

Item 1

interrupt ID for I2C event

Item 2

interrupt ID for I2C error

Minimum number of items (minItems): 1

interrupt-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "event"

Item 2

Exact value (const): "error"

Minimum number of items (minItems): 1

resets — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Maximum number of items (maxItems): 1

dmas — not listed as required here #

Array item rules (items) #

Item 1

RX DMA Channel phandle

Item 2

TX DMA Channel phandle

dma-names — not listed as required here #

Array item rules (items) #

Item 1

Exact value (const): "rx"

Item 2

Exact value (const): "tx"

clock-frequency — not listed as required here #

Desired I2C bus clock frequency in Hz. If not specified, the default 100 kHz frequency will be used. For STM32F7, STM32H7 and STM32MP1 SoCs, if timing parameters match, the bus clock frequency can be from 1Hz to 1MHz.

Default value (default): 100000

Minimum value (minimum): 1

Maximum value (maximum): 1000000

st,syscfg-fmp — not listed as required here #

Use to set Fast Mode Plus bit within SYSCFG when Fast Mode Plus speed is selected by slave.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle-array

Array item rules (items) #

Item 1

Array item rules (items)

Item 1

phandle to syscfg

Item 2

register offset within syscfg

Item 3

register bitmask for FMP bit

wakeup-source — not listed as required here #

true — No constraints added by this property rule.

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

access-controllers — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

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

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/mfd/stm32f7-rcc.h>
#include <dt-bindings/clock/stm32fx-clock.h>
//Example 1 (with st,stm32f4-i2c compatible)
i2c@40005400 {
    compatible = "st,stm32f4-i2c";
    reg = <0x40005400 0x400>;
    interrupts = <31>,
                 <32>;
    resets = <&rcc 277>;
    clocks = <&rcc 0 149>;
    #address-cells = <1>;
    #size-cells = <0>;
};
#include <dt-bindings/mfd/stm32f7-rcc.h>
#include <dt-bindings/clock/stm32fx-clock.h>
//Example 2 (with st,stm32f7-i2c compatible)
i2c@40005800 {
    compatible = "st,stm32f7-i2c";
    reg = <0x40005800 0x400>;
    interrupts = <31>,
                 <32>;
    resets = <&rcc STM32F7_APB1_RESET(I2C1)>;
    clocks = <&rcc 1 CLK_I2C1>;
    #address-cells = <1>;
    #size-cells = <0>;
};
#include <dt-bindings/mfd/stm32f7-rcc.h>
#include <dt-bindings/clock/stm32fx-clock.h>
//Example 3 (with st,stm32mp15-i2c compatible on stm32mp)
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/stm32mp1-clks.h>
#include <dt-bindings/reset/stm32mp1-resets.h>
i2c@40013000 {
    compatible = "st,stm32mp15-i2c";
    reg = <0x40013000 0x400>;
    interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
                 <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&rcc I2C2_K>;
    resets = <&rcc I2C2_R>;
    i2c-scl-rising-time-ns = <185>;
    i2c-scl-falling-time-ns = <20>;
    st,syscfg-fmp = <&syscfg 0x4 0x2>;
    #address-cells = <1>;
    #size-cells = <0>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page