]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
driver:usb:s3c_udc: add support for Exynos4x12
authorPiotr Wilczek <p.wilczek@samsung.com>
Thu, 21 Nov 2013 14:46:44 +0000 (15:46 +0100)
committerMinkyu Kang <mk7.kang@samsung.com>
Mon, 2 Dec 2013 02:22:32 +0000 (11:22 +0900)
This patch add new defines for usb phy for Exynos4x12.

Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/usb/gadget/regs-otg.h
drivers/usb/gadget/s3c_udc_otg.c

index 84bfcc5a01d38aedf67ec4f51abdb2aa67c41cc9..ac5d11213de47858fce6dc7691439bba522e1b92 100644 (file)
@@ -226,6 +226,11 @@ struct s3c_usbotg_reg {
 #define CLK_SEL_12MHZ                   (0x2 << 0)
 #define CLK_SEL_48MHZ                   (0x0 << 0)
 
+#define EXYNOS4X12_ID_PULLUP0          (0x01 << 3)
+#define EXYNOS4X12_COMMON_ON_N0        (0x01 << 4)
+#define EXYNOS4X12_CLK_SEL_12MHZ       (0x02 << 0)
+#define EXYNOS4X12_CLK_SEL_24MHZ       (0x05 << 0)
+
 /* Device Configuration Register DCFG */
 #define DEV_SPEED_HIGH_SPEED_20         (0x0 << 0)
 #define DEV_SPEED_FULL_SPEED_20         (0x1 << 0)
index 7e2020915e0b359a6504c8e34a73de32aae6f108..ba17a04265ebbbb11a06679874ed9ef23f35fa1a 100644 (file)
@@ -167,8 +167,13 @@ void otg_phy_init(struct s3c_udc *dev)
                writel((readl(&phy->phypwr) &~(OTG_DISABLE_0 | ANALOG_PWRDOWN)
                        &~FORCE_SUSPEND_0), &phy->phypwr);
 
-       writel((readl(&phy->phyclk) &~(ID_PULLUP0 | COMMON_ON_N0)) |
-              CLK_SEL_24MHZ, &phy->phyclk); /* PLL 24Mhz */
+       if (s5p_cpu_id == 0x4412)
+               writel((readl(&phy->phyclk) & ~(EXYNOS4X12_ID_PULLUP0 |
+                       EXYNOS4X12_COMMON_ON_N0)) | EXYNOS4X12_CLK_SEL_24MHZ,
+                      &phy->phyclk); /* PLL 24Mhz */
+       else
+               writel((readl(&phy->phyclk) & ~(ID_PULLUP0 | COMMON_ON_N0)) |
+                      CLK_SEL_24MHZ, &phy->phyclk); /* PLL 24Mhz */
 
        writel((readl(&phy->rstcon) &~(LINK_SW_RST | PHYLNK_SW_RST))
               | PHY_SW_RST0, &phy->rstcon);