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,mt7981-i2c 27 - const: mediatek,mt7986-i2c 28 - const: mediatek,mt8168-i2c 29 - const: mediatek,mt8173-i2c 30 - const: mediatek,mt8183-i2c 31 - const: mediatek,mt8186-i2c 32 - const: mediatek,mt8188-i2c 33 - const: mediatek,mt8192-i2c 34 - items: 35 - enum: 36 - mediatek,mt7629-i2c 37 - mediatek,mt8516-i2c 38 - const: mediatek,mt2712-i2c 39 - items: 40 - enum: 41 - mediatek,mt2701-i2c 42 - mediatek,mt6797-i2c 43 - mediatek,mt7623-i2c 44 - const: mediatek,mt6577-i2c 45 - items: 46 - enum: 47 - mediatek,mt8365-i2c 48 - const: mediatek,mt8168-i2c 49 - items: 50 - enum: 51 - mediatek,mt6795-i2c 52 - const: mediatek,mt8173-i2c 53 - items: 54 - enum: 55 - mediatek,mt6893-i2c 56 - mediatek,mt8195-i2c 57 - const: mediatek,mt8192-i2c 58 59 reg: 60 items: 61 - description: Physical base address 62 - description: DMA base address 63 64 interrupts: 65 maxItems: 1 66 67 clocks: 68 minItems: 2 69 items: 70 - description: Main clock for I2C bus 71 - description: Clock for I2C via DMA 72 - description: Bus arbitrator clock 73 - description: Clock for I2C from PMIC 74 75 clock-names: 76 minItems: 2 77 items: 78 - const: main 79 - const: dma 80 - const: arb 81 - const: pmic 82 83 clock-div: 84 $ref: /schemas/types.yaml#/definitions/uint32 85 description: Frequency divider of clock source in I2C module 86 87 clock-frequency: 88 default: 100000 89 description: 90 SCL frequency to use (in Hz). If omitted, 100kHz is used. 91 92 mediatek,have-pmic: 93 description: Platform controls I2C from PMIC side 94 type: boolean 95 96 mediatek,use-push-pull: 97 description: Use push-pull mode I/O config 98 type: boolean 99 100 vbus-supply: 101 description: Phandle to the regulator providing power to SCL/SDA 102 103required: 104 - compatible 105 - reg 106 - clocks 107 - clock-names 108 - clock-div 109 - interrupts 110 111unevaluatedProperties: false 112 113examples: 114 - | 115 #include <dt-bindings/interrupt-controller/arm-gic.h> 116 #include <dt-bindings/interrupt-controller/irq.h> 117 118 i2c0: i2c@1100d000 { 119 compatible = "mediatek,mt6577-i2c"; 120 reg = <0x1100d000 0x70>, <0x11000300 0x80>; 121 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>; 122 clocks = <&i2c0_ck>, <&ap_dma_ck>; 123 clock-names = "main", "dma"; 124 clock-div = <16>; 125 clock-frequency = <400000>; 126 mediatek,have-pmic; 127 128 #address-cells = <1>; 129 #size-cells = <0>; 130 }; 131