1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/i2c/i2c-mt65xx.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: MediaTek I2C controller 8 9description: 10 This driver interfaces with the native I2C controller present in 11 various MediaTek SoCs. 12 13allOf: 14 - $ref: /schemas/i2c/i2c-controller.yaml# 15 16maintainers: 17 - Qii Wang <qii.wang@mediatek.com> 18 19properties: 20 compatible: 21 oneOf: 22 - const: mediatek,mt2712-i2c 23 - const: mediatek,mt6577-i2c 24 - const: mediatek,mt6589-i2c 25 - const: mediatek,mt7622-i2c 26 - const: mediatek,mt7986-i2c 27 - const: mediatek,mt8168-i2c 28 - const: mediatek,mt8173-i2c 29 - const: mediatek,mt8183-i2c 30 - const: mediatek,mt8186-i2c 31 - const: mediatek,mt8188-i2c 32 - const: mediatek,mt8192-i2c 33 - items: 34 - enum: 35 - mediatek,mt7629-i2c 36 - mediatek,mt8516-i2c 37 - const: mediatek,mt2712-i2c 38 - items: 39 - enum: 40 - mediatek,mt2701-i2c 41 - mediatek,mt6797-i2c 42 - mediatek,mt7623-i2c 43 - const: mediatek,mt6577-i2c 44 - items: 45 - enum: 46 - mediatek,mt8195-i2c 47 - const: mediatek,mt8192-i2c 48 49 reg: 50 items: 51 - description: Physical base address 52 - description: DMA base address 53 54 interrupts: 55 maxItems: 1 56 57 clocks: 58 minItems: 2 59 items: 60 - description: Main clock for I2C bus 61 - description: Clock for I2C via DMA 62 - description: Bus arbitrator clock 63 - description: Clock for I2C from PMIC 64 65 clock-names: 66 minItems: 2 67 items: 68 - const: main 69 - const: dma 70 - const: arb 71 - const: pmic 72 73 clock-div: 74 $ref: /schemas/types.yaml#/definitions/uint32 75 description: Frequency divider of clock source in I2C module 76 77 clock-frequency: 78 default: 100000 79 description: 80 SCL frequency to use (in Hz). If omitted, 100kHz is used. 81 82 mediatek,have-pmic: 83 description: Platform controls I2C from PMIC side 84 type: boolean 85 86 mediatek,use-push-pull: 87 description: Use push-pull mode I/O config 88 type: boolean 89 90 vbus-supply: 91 description: Phandle to the regulator providing power to SCL/SDA 92 93required: 94 - compatible 95 - reg 96 - clocks 97 - clock-names 98 - clock-div 99 - interrupts 100 101unevaluatedProperties: false 102 103examples: 104 - | 105 #include <dt-bindings/interrupt-controller/arm-gic.h> 106 #include <dt-bindings/interrupt-controller/irq.h> 107 108 i2c0: i2c@1100d000 { 109 compatible = "mediatek,mt6577-i2c"; 110 reg = <0x1100d000 0x70>, <0x11000300 0x80>; 111 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>; 112 clocks = <&i2c0_ck>, <&ap_dma_ck>; 113 clock-names = "main", "dma"; 114 clock-div = <16>; 115 clock-frequency = <400000>; 116 mediatek,have-pmic; 117 118 #address-cells = <1>; 119 #size-cells = <0>; 120 }; 121