EXYNOS5: Add function to enable exynos5420 usbdev phy ctrl
Subsystems (2)
PATCH 1/1 EXYNOS5: Add function to enable exynos5420 usbdev phy ctrl
Exynos5420 has different registers with other exynos5 SoCs to control usb device phy, so need separated function to enable exynos5420 usb device phy.
---
I used "usbdev" instead of "usbdrd" on function name because registers name prefix is usbdev_.
arch/arm/cpu/armv7/exynos/power.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/exynos/power.c +26 -2
@@ -102,10 +102,34 @@ static void exynos5_set_usbdrd_phy_ctrl(unsigned int enable) } } +static void exynos5420_set_usbdev_phy_ctrl (unsigned int enable) +{ +struct exynos5420_power *power = + (struct exynos5420_power *)samsung_get_base_power (); + +if (enable) { +/* Enabling USBDEV_PHY */ +setbits_le32 (&power->usbdev_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); +setbits_le32 (&power->usbdev1_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); + }else { +/* Disabling USBDEV_PHY */ +clrbits_le32 (&power->usbdev_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); +clrbits_le32 (&power->usbdev1_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); + } +} +void set_usbdrd_phy_ctrl (unsigned int enable) { -if (cpu_is_exynos5 ()) -exynos5_set_usbdrd_phy_ctrl (enable); +if (cpu_is_exynos5 ()) { +if (proid_is_exynos5420 () ||proid_is_exynos5800 ()) +exynos5420_set_usbdev_phy_ctrl (enable); +else +exynos5_set_usbdrd_phy_ctrl (enable); + } }static void exynos5_dp_phy_control (unsigned int enable)
Signature · 1 line
1.9.1
PATCH 1/1 EXYNOS5: Add function to enable exynos5420 usbdev phy ctrl
Quoted 44 lines · Joonyoung Shim
Exynos5420 has different registers with other exynos5 SoCs to control usb device phy, so need separated function to enable exynos5420 usb device phy.
Signed-off-by Joonyoung Shim <[email protected]>---
I used "usbdev" instead of "usbdrd" on function name because registers name prefix isusbdev_.arch/arm/cpu/armv7/exynos/power.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-)arch/arm/cpu/armv7/exynos/power.c +20
-1@@ -102,10 +102,34 @@ static void exynos5_set_usbdrd_phy_ctrl(unsigned int enable) } } +static void exynos5420_set_usbdev_phy_ctrl (unsigned int enable) +{ +struct exynos5420_power *power = + (struct exynos5420_power *)samsung_get_base_power (); + +if (enable) { +/* Enabling USBDEV_PHY */ +setbits_le32 (&power->usbdev_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); +setbits_le32 (&power->usbdev1_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); + }else { +/* Disabling USBDEV_PHY */ +clrbits_le32 (&power->usbdev_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); +clrbits_le32 (&power->usbdev1_phy_control, +POWER_USB_DRD_PHY_CTRL_EN ); + } +} +void set_usbdrd_phy_ctrl (unsigned int enable) { -if (cpu_is_exynos5 ())
arch/arm/cpu/armv7/exynos/power.c static void exynos5_set_usbdrd_phy_ctrl(unsigned int enable) · line 135
Quoted 10 lines
arch/arm/cpu/armv7/exynos/power.c +6
-1-exynos5_set_usbdrd_phy_ctrl (enable); +if (cpu_is_exynos5 ()) { +if (proid_is_exynos5420 () ||proid_is_exynos5800 ()) +exynos5420_set_usbdev_phy_ctrl (enable); +else +exynos5_set_usbdrd_phy_ctrl (enable); + } }static void exynos5_dp_phy_control (unsigned int enable)
applied to u-boot-samsung.
Thank,
Minkyu Kang.