]> git.sur5r.net Git - u-boot/commitdiff
rockchip: i2c: Enable i2c for rk3399
authoreric.gao@rock-chips.com <eric.gao@rock-chips.com>
Mon, 10 Apr 2017 02:17:03 +0000 (10:17 +0800)
committerSimon Glass <sjg@chromium.org>
Sat, 15 Apr 2017 16:13:17 +0000 (10:13 -0600)
To enable mipi display, we need to enable pmic
rk808 first for lcd3v3 power,which use i2c0 to
communicate with soc. So enable i2c0.

Signed-off-by: Eric Gao <eric.gao@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
arch/arm/dts/rk3399.dtsi
configs/evb-rk3399_defconfig
drivers/i2c/rk_i2c.c

index dbe55f2b32ad7123ee570d280c7cc4a5203009bd..d94d7802cb420b8ffc70603294c9b4293510c97e 100644 (file)
@@ -26,6 +26,7 @@
                serial4 = &uart4;
                mmc0 = &sdhci;
                mmc1 = &sdmmc;
+               i2c0 = &i2c0;
        };
 
        cpus {
                status = "disabled";
        };
 
+       i2c0: i2c@ff3c0000 {
+               compatible = "rockchip,rk3399-i2c";
+               reg = <0x0 0xff3c0000 0x0 0x1000>;
+               assigned-clocks = <&pmucru SCLK_I2C0_PMU>;
+               assigned-clock-rates = <200000000>;
+               clocks = <&pmucru SCLK_I2C0_PMU>, <&pmucru PCLK_I2C0_PMU>;
+               clock-names = "i2c", "pclk";
+               interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH 0>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&i2c0_xfer>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+
        pinctrl: pinctrl {
                u-boot,dm-pre-reloc;
                compatible = "rockchip,rk3399-pinctrl";
index 50b0d749abbc943ccbe319c55ea84c2370d41b42..c644084cdfc2cb831de07fa3108e7eb0da169b58 100644 (file)
@@ -60,3 +60,4 @@ CONFIG_USB_EHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_ERRNO_STR=y
+CONFIG_SYS_I2C_ROCKCHIP=y
index af925cecdbb891701b1bdf53bc75d500829c7d0b..76f41f7e85791c82d0192b7770aa27dda6f9d8c7 100644 (file)
@@ -383,6 +383,7 @@ static const struct udevice_id rockchip_i2c_ids[] = {
        { .compatible = "rockchip,rk3066-i2c" },
        { .compatible = "rockchip,rk3188-i2c" },
        { .compatible = "rockchip,rk3288-i2c" },
+       { .compatible = "rockchip,rk3399-i2c" },
        { }
 };