mediatek: add support for the new MT7623 Arm SoC
[openwrt/staging/wigyori.git] / target / linux / mediatek / patches / 0029-dt-bindings-Add-I2C-bindings-for-mt65xx-mt81xx.patch
1 From d1447a6815913823ef5e75d70efc6f08f288ee40 Mon Sep 17 00:00:00 2001
2 From: Xudong Chen <xudong.chen@mediatek.com>
3 Date: Wed, 6 May 2015 16:37:05 +0800
4 Subject: [PATCH 29/76] dt-bindings: Add I2C bindings for mt65xx/mt81xx.
5
6 Add devicetree bindings for Mediatek Soc I2C driver.
7
8 Signed-off-by: Xudong Chen <xudong.chen@mediatek.com>
9 Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
10 ---
11 .../devicetree/bindings/i2c/i2c-mt6577.txt | 41 ++++++++++++++++++++
12 1 file changed, 41 insertions(+)
13 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
14
15 diff --git a/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
16 new file mode 100644
17 index 0000000..0ce6fa3
18 --- /dev/null
19 +++ b/Documentation/devicetree/bindings/i2c/i2c-mt6577.txt
20 @@ -0,0 +1,41 @@
21 +* Mediatek's I2C controller
22 +
23 +The Mediatek's I2C controller is used to interface with I2C devices.
24 +
25 +Required properties:
26 + - compatible: value should be either of the following.
27 + (a) "mediatek,mt6577-i2c", for i2c compatible with mt6577 i2c.
28 + (b) "mediatek,mt6589-i2c", for i2c compatible with mt6589 i2c.
29 + (c) "mediatek,mt8127-i2c", for i2c compatible with mt8127 i2c.
30 + (d) "mediatek,mt8135-i2c", for i2c compatible with mt8135 i2c.
31 + (e) "mediatek,mt8173-i2c", for i2c compatible with mt8173 i2c.
32 + - reg: physical base address of the controller and dma base, length of memory
33 + mapped region.
34 + - interrupts: interrupt number to the cpu.
35 + - clock-div: the fixed value for frequency divider of clock source in i2c
36 + module. Each IC may be different.
37 + - clocks: clock name from clock manager
38 + - clock-names: Must include "main" and "dma", if enable have-pmic need include
39 + "pmic" extra.
40 +
41 +Optional properties:
42 + - clock-frequency: Frequency in Hz of the bus when transfer, the default value
43 + is 100000.
44 + - mediatek,have-pmic: platform can control i2c form special pmic side.
45 + Only mt6589 and mt8135 support this feature.
46 + - mediatek,use-push-pull: IO config use push-pull mode.
47 +
48 +Example:
49 +
50 + i2c0: i2c@1100d000 {
51 + compatible = "mediatek,mt6577-i2c";
52 + reg = <0x1100d000 0x70>,
53 + <0x11000300 0x80>;
54 + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_LOW>;
55 + clock-frequency = <400000>;
56 + mediatek,have-pmic;
57 + clock-div = <16>;
58 + clocks = <&i2c0_ck>, <&ap_dma_ck>;
59 + clock-names = "main", "dma";
60 + };
61 +
62 --
63 1.7.10.4
64