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