]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: dts: mt7622: add i2c support
authorWeijie Gao <weijie.gao@mediatek.com>
Fri, 9 Sep 2022 11:59:50 +0000 (19:59 +0800)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2022 19:09:15 +0000 (15:09 -0400)
Add both hardware and software i2c support for mt7622.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
arch/arm/dts/mt7622-rfb.dts
arch/arm/dts/mt7622.dtsi

index 30a913740708b4681be81b5787f80c97d5e4657d..b44f19f05a18c27466e9b35edceb383aa08e771e 100644 (file)
                };
 
        };
+
+       i2c1_pins_default: i2c1-default {
+               mux {
+                       function = "i2c";
+                       groups = "i2c1_0";
+               };
+       };
+
 };
 
 &snfi {
 &u3phy {
        status = "okay";
 };
+
+&soft_i2c {
+       status = "disabled";
+};
+
+&i2c1 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c1_pins_default>;
+       status = "okay";
+};
index fb6c1b715493530f025c9241e42dffe248bb4422..2d89fa08b4d7f8a86e28ddb9f98e2c180c0c90fb 100644 (file)
                status = "disabled";
        };
 
+       soft_i2c: soft_i2c@0 {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               compatible = "i2c-gpio";
+               gpios = <&gpio 56 GPIO_ACTIVE_HIGH>, /* SDA */
+                       <&gpio 55 GPIO_ACTIVE_HIGH>; /* CLK */
+               i2c-gpio,delay-us = <5>;
+               status = "disabled";
+       };
+
+       i2c1: i2c@11008000 {
+               compatible = "mediatek,mt7622-i2c";
+               reg = <0x11008000 0x90>,
+                     <0x11000180 0x80>;
+               interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
+               clock-div = <16>;
+               clocks = <&pericfg CLK_PERI_I2C1_PD>,
+                        <&pericfg CLK_PERI_AP_DMA_PD>;
+               clock-names = "main", "dma";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
 };