ARM: UniPhier: enable I2C input pins for PH1-sLD8
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 5 Feb 2015 05:43:00 +0000 (14:43 +0900)
committerMasahiro Yamada <yamada.m@jp.panasonic.com>
Fri, 6 Feb 2015 15:15:03 +0000 (00:15 +0900)
To use I2C controllers on PH1-sLD8, the bit 10 (SCL0/SDA0)
and bit 11 (SCL1/SDA1) of IECTRL register must be set.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
arch/arm/cpu/armv7/uniphier/ph1-sld8/pinctrl.c

index 2b6403f88fc7dc3113c2acf6226c4a08cdfdbf6a..5e80335b581ff25c0e28ad6a4e19f5ddd4fa0109 100644 (file)
@@ -26,6 +26,15 @@ void pin_init(void)
        sg_set_pinsel(111, 1);  /* SBI0 -> RXD3 */
 #endif
 
+#ifdef CONFIG_SYS_I2C_UNIPHIER
+       {
+               u32 tmp;
+               tmp = readl(SG_IECTRL);
+               tmp |= 0xc00; /* enable SCL0, SDA0, SCL1, SDA1 */
+               writel(tmp, SG_IECTRL);
+       }
+#endif
+
 #ifdef CONFIG_NAND_DENALI
        sg_set_pinsel(15, 0);   /* XNFRE_GB -> XNFRE_GB */
        sg_set_pinsel(16, 0);   /* XNFWE_GB -> XNFWE_GB */