xref: /freebsd/sys/contrib/device-tree/Bindings/i2c/i2c-mt65xx.txt (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1c66ec88fSEmmanuel Vadot* MediaTek's I2C controller
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotThe MediaTek's I2C controller is used to interface with I2C devices.
4c66ec88fSEmmanuel Vadot
5c66ec88fSEmmanuel VadotRequired properties:
6c66ec88fSEmmanuel Vadot  - compatible: value should be either of the following.
7c66ec88fSEmmanuel Vadot      "mediatek,mt2701-i2c", "mediatek,mt6577-i2c": for MediaTek MT2701
8c66ec88fSEmmanuel Vadot      "mediatek,mt2712-i2c": for MediaTek MT2712
9c66ec88fSEmmanuel Vadot      "mediatek,mt6577-i2c": for MediaTek MT6577
10c66ec88fSEmmanuel Vadot      "mediatek,mt6589-i2c": for MediaTek MT6589
11c66ec88fSEmmanuel Vadot      "mediatek,mt6797-i2c", "mediatek,mt6577-i2c": for MediaTek MT6797
12c66ec88fSEmmanuel Vadot      "mediatek,mt7622-i2c": for MediaTek MT7622
13c66ec88fSEmmanuel Vadot      "mediatek,mt7623-i2c", "mediatek,mt6577-i2c": for MediaTek MT7623
14c66ec88fSEmmanuel Vadot      "mediatek,mt7629-i2c", "mediatek,mt2712-i2c": for MediaTek MT7629
15*c9ccf3a3SEmmanuel Vadot      "mediatek,mt8168-i2c": for MediaTek MT8168
16c66ec88fSEmmanuel Vadot      "mediatek,mt8173-i2c": for MediaTek MT8173
17c66ec88fSEmmanuel Vadot      "mediatek,mt8183-i2c": for MediaTek MT8183
18*c9ccf3a3SEmmanuel Vadot      "mediatek,mt8186-i2c": for MediaTek MT8186
19c66ec88fSEmmanuel Vadot      "mediatek,mt8192-i2c": for MediaTek MT8192
205956d97fSEmmanuel Vadot      "mediatek,mt8195-i2c", "mediatek,mt8192-i2c": for MediaTek MT8195
21c66ec88fSEmmanuel Vadot      "mediatek,mt8516-i2c", "mediatek,mt2712-i2c": for MediaTek MT8516
22c66ec88fSEmmanuel Vadot  - reg: physical base address of the controller and dma base, length of memory
23c66ec88fSEmmanuel Vadot    mapped region.
24c66ec88fSEmmanuel Vadot  - interrupts: interrupt number to the cpu.
25c66ec88fSEmmanuel Vadot  - clock-div: the fixed value for frequency divider of clock source in i2c
26c66ec88fSEmmanuel Vadot    module. Each IC may be different.
27c66ec88fSEmmanuel Vadot  - clocks: clock name from clock manager
28c66ec88fSEmmanuel Vadot  - clock-names: Must include "main" and "dma", "arb" is for multi-master that
29c66ec88fSEmmanuel Vadot    one bus has more than two i2c controllers, if enable have-pmic need include
30c66ec88fSEmmanuel Vadot    "pmic" extra.
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel VadotOptional properties:
33c66ec88fSEmmanuel Vadot  - clock-frequency: Frequency in Hz of the bus when transfer, the default value
34c66ec88fSEmmanuel Vadot    is 100000.
35c66ec88fSEmmanuel Vadot  - mediatek,have-pmic: platform can control i2c form special pmic side.
36c66ec88fSEmmanuel Vadot    Only mt6589 and mt8135 support this feature.
37c66ec88fSEmmanuel Vadot  - mediatek,use-push-pull: IO config use push-pull mode.
385956d97fSEmmanuel Vadot  - vbus-supply: phandle to the regulator that provides power to SCL/SDA.
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel VadotExample:
41c66ec88fSEmmanuel Vadot
42c66ec88fSEmmanuel Vadot	i2c0: i2c@1100d000 {
43c66ec88fSEmmanuel Vadot			compatible = "mediatek,mt6577-i2c";
44c66ec88fSEmmanuel Vadot			reg = <0x1100d000 0x70>,
45c66ec88fSEmmanuel Vadot			      <0x11000300 0x80>;
46c66ec88fSEmmanuel Vadot			interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
47c66ec88fSEmmanuel Vadot			clock-frequency = <400000>;
48c66ec88fSEmmanuel Vadot			mediatek,have-pmic;
49c66ec88fSEmmanuel Vadot			clock-div = <16>;
50c66ec88fSEmmanuel Vadot			clocks = <&i2c0_ck>, <&ap_dma_ck>;
51c66ec88fSEmmanuel Vadot			clock-names = "main", "dma";
52c66ec88fSEmmanuel Vadot	};
53c66ec88fSEmmanuel Vadot
54