0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/i2c/i2c-mt65xx.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: MediaTek I2C controller
0008
0009 description:
0010 This driver interfaces with the native I2C controller present in
0011 various MediaTek SoCs.
0012
0013 allOf:
0014 - $ref: /schemas/i2c/i2c-controller.yaml#
0015
0016 maintainers:
0017 - Qii Wang <qii.wang@mediatek.com>
0018
0019 properties:
0020 compatible:
0021 oneOf:
0022 - const: mediatek,mt2712-i2c
0023 - const: mediatek,mt6577-i2c
0024 - const: mediatek,mt6589-i2c
0025 - const: mediatek,mt7622-i2c
0026 - const: mediatek,mt8168-i2c
0027 - const: mediatek,mt8173-i2c
0028 - const: mediatek,mt8183-i2c
0029 - const: mediatek,mt8186-i2c
0030 - const: mediatek,mt8188-i2c
0031 - const: mediatek,mt8192-i2c
0032 - items:
0033 - enum:
0034 - mediatek,mt7629-i2c
0035 - mediatek,mt8516-i2c
0036 - const: mediatek,mt2712-i2c
0037 - items:
0038 - enum:
0039 - mediatek,mt2701-i2c
0040 - mediatek,mt6797-i2c
0041 - mediatek,mt7623-i2c
0042 - const: mediatek,mt6577-i2c
0043 - items:
0044 - enum:
0045 - mediatek,mt8195-i2c
0046 - const: mediatek,mt8192-i2c
0047
0048 reg:
0049 items:
0050 - description: Physical base address
0051 - description: DMA base address
0052
0053 interrupts:
0054 maxItems: 1
0055
0056 clocks:
0057 minItems: 2
0058 items:
0059 - description: Main clock for I2C bus
0060 - description: Clock for I2C via DMA
0061 - description: Bus arbitrator clock
0062 - description: Clock for I2C from PMIC
0063
0064 clock-names:
0065 minItems: 2
0066 items:
0067 - const: main
0068 - const: dma
0069 - const: arb
0070 - const: pmic
0071
0072 clock-div:
0073 $ref: /schemas/types.yaml#/definitions/uint32
0074 description: Frequency divider of clock source in I2C module
0075
0076 clock-frequency:
0077 default: 100000
0078 description:
0079 SCL frequency to use (in Hz). If omitted, 100kHz is used.
0080
0081 mediatek,have-pmic:
0082 description: Platform controls I2C from PMIC side
0083 type: boolean
0084
0085 mediatek,use-push-pull:
0086 description: Use push-pull mode I/O config
0087 type: boolean
0088
0089 vbus-supply:
0090 description: Phandle to the regulator providing power to SCL/SDA
0091
0092 required:
0093 - compatible
0094 - reg
0095 - clocks
0096 - clock-names
0097 - clock-div
0098 - interrupts
0099
0100 unevaluatedProperties: false
0101
0102 examples:
0103 - |
0104 #include <dt-bindings/interrupt-controller/arm-gic.h>
0105 #include <dt-bindings/interrupt-controller/irq.h>
0106
0107 i2c0: i2c@1100d000 {
0108 compatible = "mediatek,mt6577-i2c";
0109 reg = <0x1100d000 0x70>, <0x11000300 0x80>;
0110 interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
0111 clocks = <&i2c0_ck>, <&ap_dma_ck>;
0112 clock-names = "main", "dma";
0113 clock-div = <16>;
0114 clock-frequency = <400000>;
0115 mediatek,have-pmic;
0116
0117 #address-cells = <1>;
0118 #size-cells = <0>;
0119 };