s5pc110: usb: s5pc110 support
authorMinkyu Kang <mk7.kang@samsung.com>
Tue, 28 Jul 2009 23:59:57 +0000 (08:59 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 28 Jul 2009 23:59:57 +0000 (08:59 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c
include/asm-arm/arch-s5pc1xx/power.h

index 1e81749..a582165 100644 (file)
@@ -325,12 +325,19 @@ static void s5pc1xx_otg_write_reg(int value, int offset)
 
 void s5p_usb_init_phy(void)
 {
-       s5pc1xx_phy_write_reg(0x0, OTG_PHYPWR);
+
+       if (cpu_is_s5pc110()) {
+               s5pc1xx_phy_write_reg(0xA0, OTG_PHYPWR);
+               s5pc1xx_phy_write_reg(0x3, OTG_PHYCTRL);
+       } else {
+               s5pc1xx_phy_write_reg(0x0, OTG_PHYPWR);
 #ifdef CONFIG_OTG_CLK_OSCC
-       s5pc1xx_phy_write_reg(0x22, OTG_PHYCTRL);
+               s5pc1xx_phy_write_reg(0x22, OTG_PHYCTRL);
 #else
-       s5pc1xx_phy_write_reg(0x2, OTG_PHYCTRL);
+               s5pc1xx_phy_write_reg(0x2, OTG_PHYCTRL);
 #endif
+       }
+
        s5pc1xx_phy_write_reg(0x1, OTG_RSTCON);
        udelay(20);
        s5pc1xx_phy_write_reg(0x0, OTG_RSTCON);
@@ -438,9 +445,13 @@ int s5p_usbctl_init(void)
        u8 ucMode;
        u32 reg;
 
-       if (cpu_is_s5pc100()) {
+       if (cpu_is_s5pc110()) {
+               reg = readl(S5PC110_USB_PHY_CON);
+               reg |= (1 << 0); /* USB PHY0 enable */
+               writel(reg, S5PC110_USB_PHY_CON);
+       } else {
                reg = readl(S5PC100_OTHERS);
-               reg |= (1 << 16); /*unmask usb signal */
+               reg |= (1 << 16); /* unmask usb signal */
                writel(reg, S5PC100_OTHERS);
        }
 
index ecffe7f..57e2a2b 100644 (file)
@@ -36,6 +36,7 @@
 #define S5PC110_SLEEP_WAKEUP           (1 << 3)
 #define S5PC110_WAKEUP_STAT            0xE010C200
 #define S5PC110_OTHERS                 0xE010E000
+#define S5PC110_USB_PHY_CON            0xE010E80C
 #define S5PC110_INFORM0                        0xE010F000
 
 #endif