arm64: allwinner: h6: add R_I2C controller
authorIcenowy Zheng <icenowy@aosc.io>
Thu, 3 May 2018 18:38:46 +0000 (02:38 +0800)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Fri, 4 May 2018 15:11:14 +0000 (17:11 +0200)
Allwinner H6 SoC has a R_I2C controller wired to the PL0/PL1 pins, which
are used in the reference design to connect AXP805 PMIC.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi

index 2334ba0..c72da8c 100644 (file)
                        #gpio-cells = <3>;
                        interrupt-controller;
                        #interrupt-cells = <3>;
+
+                       r_i2c_pins: r-i2c {
+                               pins = "PL0", "PL1";
+                               function = "s_i2c";
+                       };
+               };
+
+               r_i2c: i2c@7081400 {
+                       compatible = "allwinner,sun6i-a31-i2c";
+                       reg = <0x07081400 0x400>;
+                       interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
+                       clocks = <&r_ccu 8>;
+                       resets = <&r_ccu 4>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&r_i2c_pins>;
+                       status = "disabled";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
                };
        };
 };