[PATCH v2 0/4] Add Exynos5 USB 3.0 phy driver based on generic PHYframework

From: Vivek Gautam
Date: Wed Dec 04 2013 - 05:09:57 EST


Adding a phy driver for USB 3.0 PHY controller present on Exynos5
series of SoCs alongwith DWC3 controller for USB 3.0 operations.

Few functions used in this driver to translate ref clock rate are
common to Kamil's usb2.0 phy driver [1]. So we can figure out how
to re-use them across these drivers.

Theses patches are based on usb-next branch and tested with
Kishon's patches for adapting DWC3 to generic phy framework, [2]
on smdk5250 as well as smdk5420 board.

[1] [PATCH v3 1/3] phy: Add new Exynos USB PHY driver
https://lkml.org/lkml/2013/11/5/272
[2] [PATCH v2 1/7] usb: dwc3: get "usb_phy" only if the platform indicates the presence of PHY's
(http://www.spinics.net/lists/linux-usb/msg95733.html)
[PATCH v2 2/7] usb: dwc3: adapt dwc3 core to use Generic PHY Framework
(http://www.spinics.net/lists/linux-usb/msg95734.html)

Changed from RFC patch-set:
1) fixes in documentation file
- added provision for syscon interface for using PMU register.
- added clock names and description
- modified description style for 'compatible property'
- made usb30_sclk as additional clock rather then making it optional, since
it is actually an additional clock for Exynos5420 Soc.
2) fixes in phy-exynos5-usb3 driver file
- removed unnecessary #ifndef around KHZ and MHZ definitions
- removed 'samsung_cpu_type', 'usb3phy_state' enums; and merged necessary
necessary from 'usb3phy_instance' structure to 'usb3phy_driver'.
- changed name 'sclk_usbphy30' to 'usb30_sclk_100m' since this is the name
indicated as input to the PHY block; and also added (!IS_ERR()) check for
using usb30_sclk.
- removed unnecessary 'state' check code.
- moved 'of_device_id' structure definitions before 'probe()' to avoid
unnecessary declaration.
- added (pdev->dev.of_node == NULL) check at the starting of probe()
- moved 'devm_of_phy_provider_register()' call to end of the probe().
- removed 'label' for usb3drd phy.
- corrected macros definition 'PHYCLKRST_MPLL_MULTIPLIER_50M_REF' from
0x02 to 0x32 after confirming same from PHY's data sheet.
- replaced pmu register handling, used for power-isolation, with syscon
interface api's.
- added '.init' and '.exit' callbacks and using them for one time
PHY-initialization and deinitialization.
- Filtering out the PHY 'power-on' and 'power-off' sequence to '.power_on"
and ".power_off" callbacks.
- Removed drivers/usb/phy/phy-samsung-usb3.c driver and related code.
3) fixes in dt files
- added reference for 'samsung,syscon-phandle' to used for PMU register.
- removed second register field which was earlier used for PMU.

Vivek Gautam (4):
phy: Add new Exynos5 USB 3.0 PHY driver
dt: exynos5250: Enable support for generic USB 3.0 phy
dt: exynos5420: Enable support for USB 3.0 PHY controller
dt: exynos5420: Enable support for DWC3 controller

.../devicetree/bindings/phy/samsung-phy.txt | 43 ++
arch/arm/boot/dts/exynos5250.dtsi | 16 +-
arch/arm/boot/dts/exynos5420.dtsi | 54 ++
drivers/phy/Kconfig | 8 +
drivers/phy/Makefile | 1 +
drivers/phy/phy-exynos5-usb3.c | 545 ++++++++++++++++++++
drivers/usb/phy/Kconfig | 10 +-
drivers/usb/phy/Makefile | 1 -
drivers/usb/phy/phy-samsung-usb.h | 80 ---
drivers/usb/phy/phy-samsung-usb3.c | 350 -------------
10 files changed, 658 insertions(+), 450 deletions(-)
create mode 100644 drivers/phy/phy-exynos5-usb3.c
delete mode 100644 drivers/usb/phy/phy-samsung-usb3.c

--
1.7.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/