summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2013-05-16 11:57:11 +0200
committerFelipe Balbi <balbi@ti.com>2013-05-28 20:07:31 +0300
commit1b635f0ff3f7fcc15e2a5fdc430c99f88904d3c6 (patch)
tree235b38da676b8e32df89b5d66cb2e24a4726fd8f
parent84035f09adf81c2554bb39ff100651f167f7d384 (diff)
downloadblackbird-obmc-linux-1b635f0ff3f7fcc15e2a5fdc430c99f88904d3c6.tar.gz
blackbird-obmc-linux-1b635f0ff3f7fcc15e2a5fdc430c99f88904d3c6.zip
usb: phy: samsung: Add support for USB 2.0 PHY on Exynos 4x12
This patch adds driver data for Exynos 4x12 USB 2.0 PHY. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/phy/phy-samsung-usb.h1
-rw-r--r--drivers/usb/phy/phy-samsung-usb2.c18
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/usb/phy/phy-samsung-usb.h b/drivers/usb/phy/phy-samsung-usb.h
index 31e2ec3b2eb9..585d12f5c044 100644
--- a/drivers/usb/phy/phy-samsung-usb.h
+++ b/drivers/usb/phy/phy-samsung-usb.h
@@ -241,6 +241,7 @@
enum samsung_cpu_type {
TYPE_S3C64XX,
TYPE_EXYNOS4210,
+ TYPE_EXYNOS4X12,
TYPE_EXYNOS5250,
};
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c
index 1c3abd434b85..03180c06bfca 100644
--- a/drivers/usb/phy/phy-samsung-usb2.c
+++ b/drivers/usb/phy/phy-samsung-usb2.c
@@ -177,6 +177,7 @@ static void samsung_usb2phy_enable(struct samsung_usbphy *sphy)
rstcon |= RSTCON_SWRST;
break;
case TYPE_EXYNOS4210:
+ case TYPE_EXYNOS4X12:
phypwr &= ~PHYPWR_NORMAL_MASK_PHY0;
rstcon |= RSTCON_SWRST;
default:
@@ -240,6 +241,7 @@ static void samsung_usb2phy_disable(struct samsung_usbphy *sphy)
phypwr |= PHYPWR_NORMAL_MASK;
break;
case TYPE_EXYNOS4210:
+ case TYPE_EXYNOS4X12:
phypwr |= PHYPWR_NORMAL_MASK_PHY0;
default:
break;
@@ -451,6 +453,16 @@ static const struct samsung_usbphy_drvdata usb2phy_exynos4 = {
.phy_disable = samsung_usb2phy_disable,
};
+static const struct samsung_usbphy_drvdata usb2phy_exynos4x12 = {
+ .cpu_type = TYPE_EXYNOS4X12,
+ .devphy_en_mask = EXYNOS_USBPHY_ENABLE,
+ .hostphy_en_mask = EXYNOS_USBPHY_ENABLE,
+ .rate_to_clksel = samsung_usbphy_rate_to_clksel_4x12,
+ .set_isolation = samsung_usbphy_set_isolation_4210,
+ .phy_enable = samsung_usb2phy_enable,
+ .phy_disable = samsung_usb2phy_disable,
+};
+
static struct samsung_usbphy_drvdata usb2phy_exynos5 = {
.cpu_type = TYPE_EXYNOS5250,
.hostphy_en_mask = EXYNOS_USBPHY_ENABLE,
@@ -470,6 +482,9 @@ static const struct of_device_id samsung_usbphy_dt_match[] = {
.compatible = "samsung,exynos4210-usb2phy",
.data = &usb2phy_exynos4,
}, {
+ .compatible = "samsung,exynos4x12-usb2phy",
+ .data = &usb2phy_exynos4x12,
+ }, {
.compatible = "samsung,exynos5250-usb2phy",
.data = &usb2phy_exynos5
},
@@ -486,6 +501,9 @@ static struct platform_device_id samsung_usbphy_driver_ids[] = {
.name = "exynos4210-usb2phy",
.driver_data = (unsigned long)&usb2phy_exynos4,
}, {
+ .name = "exynos4x12-usb2phy",
+ .driver_data = (unsigned long)&usb2phy_exynos4x12,
+ }, {
.name = "exynos5250-usb2phy",
.driver_data = (unsigned long)&usb2phy_exynos5,
},
OpenPOWER on IntegriCloud