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