MediaTek I2C controller

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

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

This driver interfaces with the native I2C controller present in various MediaTek SoCs.

All of these rules must match (allOf) #

Rule 1 #

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

Maintainers (maintainers): "Qii Wang <qii.wang@mediatek.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Exact value (const): "mediatek,mt2712-i2c"

Rule 2

Exact value (const): "mediatek,mt6577-i2c"

Rule 3

Exact value (const): "mediatek,mt6589-i2c"

Rule 4

Exact value (const): "mediatek,mt7622-i2c"

Rule 5

Exact value (const): "mediatek,mt7981-i2c"

Rule 6

Exact value (const): "mediatek,mt7986-i2c"

Rule 7

Exact value (const): "mediatek,mt8168-i2c"

Rule 8

Exact value (const): "mediatek,mt8173-i2c"

Rule 9

Exact value (const): "mediatek,mt8183-i2c"

Rule 10

Exact value (const): "mediatek,mt8186-i2c"

Rule 11

Exact value (const): "mediatek,mt8188-i2c"

Rule 12

Exact value (const): "mediatek,mt8192-i2c"

Rule 13

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt7629-i2c", "mediatek,mt8516-i2c"

Item 2

Exact value (const): "mediatek,mt2712-i2c"

Rule 14

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt2701-i2c", "mediatek,mt6797-i2c", "mediatek,mt7623-i2c"

Item 2

Exact value (const): "mediatek,mt6577-i2c"

Rule 15

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt8365-i2c"

Item 2

Exact value (const): "mediatek,mt8168-i2c"

Rule 16

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt6795-i2c"

Item 2

Exact value (const): "mediatek,mt8173-i2c"

Rule 17

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt6878-i2c", "mediatek,mt6991-i2c", "mediatek,mt8189-i2c", "mediatek,mt8196-i2c"

Item 2

Exact value (const): "mediatek,mt8188-i2c"

Rule 18

Array item rules (items)

Item 1

Allowed values (enum): "mediatek,mt6893-i2c", "mediatek,mt8195-i2c"

Item 2

Exact value (const): "mediatek,mt8192-i2c"

reg — required here #

Array item rules (items) #

Item 1

Physical base address

Item 2

DMA base address

interrupts — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

Main clock for I2C bus

Item 2

Clock for I2C via DMA

Item 3

Bus arbitrator clock

Item 4

Clock for I2C from PMIC

clock-names — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

Exact value (const): "main"

Item 2

Exact value (const): "dma"

Item 3

Exact value (const): "arb"

Item 4

Exact value (const): "pmic"

clock-div — required here #

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

Frequency divider of clock source in I2C module

clock-frequency — not listed as required here #

Default value (default): 100000

SCL frequency to use (in Hz). If omitted, 100kHz is used.

mediatek,have-pmic — not listed as required here #

Platform controls I2C from PMIC side

Value type (type): "boolean"

mediatek,use-push-pull — not listed as required here #

Use push-pull mode I/O config

Value type (type): "boolean"

vbus-supply — not listed as required here #

Phandle to the regulator providing power to SCL/SDA

Required in this object (required): "compatible", "reg", "clocks", "clock-names", "clock-div", "interrupts"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>

i2c0: i2c@1100d000 {
  compatible = "mediatek,mt6577-i2c";
  reg = <0x1100d000 0x70>, <0x11000300 0x80>;
  interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
  clocks = <&i2c0_ck>, <&ap_dma_ck>;
  clock-names = "main", "dma";
  clock-div = <16>;
  clock-frequency = <400000>;
  mediatek,have-pmic;

  #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