From 560ea827374836766435d0ec58e0e613bca448dc Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Wed, 29 Jul 2009 08:59:57 +0900 Subject: [PATCH] s5pc110: usb: s5pc110 support Signed-off-by: Minkyu Kang --- cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c | 21 ++++++++++++++++----- include/asm-arm/arch-s5pc1xx/power.h | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c b/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c index 1e81749..a582165 100644 --- a/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c +++ b/cpu/arm_cortexa8/s5pc1xx/usb-hs-otg.c @@ -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); } diff --git a/include/asm-arm/arch-s5pc1xx/power.h b/include/asm-arm/arch-s5pc1xx/power.h index ecffe7f..57e2a2b 100644 --- a/include/asm-arm/arch-s5pc1xx/power.h +++ b/include/asm-arm/arch-s5pc1xx/power.h @@ -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 -- 2.7.4