Documentation / devicetree / bindings / i2c / i2c-mt65xx.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/i2c/i2c-mt65xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: MediaTek I2C controller

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

allOf:
  - $ref: /schemas/i2c/i2c-controller.yaml#

maintainers:
  - Qii Wang <qii.wang@mediatek.com>

properties:
  compatible:
    oneOf:
      - const: mediatek,mt2712-i2c
      - const: mediatek,mt6577-i2c
      - const: mediatek,mt6589-i2c
      - const: mediatek,mt7622-i2c
      - const: mediatek,mt7981-i2c
      - const: mediatek,mt7986-i2c
      - const: mediatek,mt8168-i2c
      - const: mediatek,mt8173-i2c
      - const: mediatek,mt8183-i2c
      - const: mediatek,mt8186-i2c
      - const: mediatek,mt8188-i2c
      - const: mediatek,mt8192-i2c
      - items:
          - enum:
              - mediatek,mt7629-i2c
              - mediatek,mt8516-i2c
          - const: mediatek,mt2712-i2c
      - items:
          - enum:
              - mediatek,mt2701-i2c
              - mediatek,mt6797-i2c
              - mediatek,mt7623-i2c
          - const: mediatek,mt6577-i2c
      - items:
          - enum:
              - mediatek,mt8365-i2c
          - const: mediatek,mt8168-i2c
      - items:
          - enum:
              - mediatek,mt6795-i2c
          - const: mediatek,mt8173-i2c
      - items:
          - enum:
              - mediatek,mt8195-i2c
          - const: mediatek,mt8192-i2c

  reg:
    items:
      - description: Physical base address
      - description: DMA base address

  interrupts:
    maxItems: 1

  clocks:
    minItems: 2
    items:
      - description: Main clock for I2C bus
      - description: Clock for I2C via DMA
      - description: Bus arbitrator clock
      - description: Clock for I2C from PMIC

  clock-names:
    minItems: 2
    items:
      - const: main
      - const: dma
      - const: arb
      - const: pmic

  clock-div:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: Frequency divider of clock source in I2C module

  clock-frequency:
    default: 100000
    description:
      SCL frequency to use (in Hz). If omitted, 100kHz is used.

  mediatek,have-pmic:
    description: Platform controls I2C from PMIC side
    type: boolean

  mediatek,use-push-pull:
    description: Use push-pull mode I/O config
    type: boolean

  vbus-supply:
    description: Phandle to the regulator providing power to SCL/SDA

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - clock-div
  - interrupts

unevaluatedProperties: false

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>;
    };