Skip to content

Commit

Permalink
usb: phy: samsung: Common out the generic stuff
Browse files Browse the repository at this point in the history
Moving register and structure definitions to header file,
and keeping the generic functions to be used across
multiple PHYs in common phy helper driver under SAMSUNG_USBPHY,
and moving USB 2.0 PHY driver under SAMSUNG_USB2PHY.

Also allowing samsung PHY drivers be built as modules.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Vivek Gautam authored and Felipe Balbi committed Mar 18, 2013
1 parent 2ba7943 commit dc2377d
Show file tree
Hide file tree
Showing 6 changed files with 800 additions and 720 deletions.
22 changes: 15 additions & 7 deletions Documentation/devicetree/bindings/usb/samsung-usbphy.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
* Samsung's usb phy transceiver
SAMSUNG USB-PHY controllers

The Samsung's phy transceiver is used for controlling usb phy for
s3c-hsotg as well as ehci-s5p and ohci-exynos usb controllers
across Samsung SOCs.
** Samsung's usb 2.0 phy transceiver

The Samsung's usb 2.0 phy transceiver is used for controlling
usb 2.0 phy for s3c-hsotg as well as ehci-s5p and ohci-exynos
usb controllers across Samsung SOCs.
TODO: Adding the PHY binding with controller(s) according to the under
developement generic PHY driver.

Required properties:

Exynos4210:
- compatible : should be "samsung,exynos4210-usbphy"
- compatible : should be "samsung,exynos4210-usb2phy"
- reg : base physical address of the phy registers and length of memory mapped
region.
- clocks: Clock IDs array as required by the controller.
- clock-names: names of clock correseponding IDs clock property as requested
by the controller driver.

Exynos5250:
- compatible : should be "samsung,exynos5250-usbphy"
- compatible : should be "samsung,exynos5250-usb2phy"
- reg : base physical address of the phy registers and length of memory mapped
region.

Expand Down Expand Up @@ -44,10 +49,13 @@ Example:
usbphy@125B0000 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "samsung,exynos4210-usbphy";
compatible = "samsung,exynos4210-usb2phy";
reg = <0x125B0000 0x100>;
ranges;

clocks = <&clock 2>, <&clock 305>;
clock-names = "xusbxti", "otg";

usbphy-sys {
/* USB device and host PHY_CONTROL registers */
reg = <0x10020704 0x8>;
Expand Down
15 changes: 11 additions & 4 deletions drivers/usb/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,18 @@ config OMAP_USB3
on/off the PHY.

config SAMSUNG_USBPHY
bool "Samsung USB PHY controller Driver"
depends on USB_S3C_HSOTG || USB_EHCI_S5P || USB_OHCI_EXYNOS
tristate "Samsung USB PHY Driver"
help
Enable this to support Samsung USB phy controller for samsung
SoCs.
Enable this to support Samsung USB phy helper driver for Samsung SoCs.
This driver provides common interface to interact, for Samsung USB 2.0 PHY
driver and later for Samsung USB 3.0 PHY driver.

config SAMSUNG_USB2PHY
tristate "Samsung USB 2.0 PHY controller Driver"
select SAMSUNG_USBPHY
help
Enable this to support Samsung USB 2.0 (High Speed) PHY controller
driver for Samsung SoCs.

config TWL4030_USB
tristate "TWL4030 USB Transceiver Driver"
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/phy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ obj-$(CONFIG_OMAP_CONTROL_USB) += phy-omap-control.o
obj-$(CONFIG_OMAP_USB2) += phy-omap-usb2.o
obj-$(CONFIG_OMAP_USB3) += phy-omap-usb3.o
obj-$(CONFIG_SAMSUNG_USBPHY) += phy-samsung-usb.o
obj-$(CONFIG_SAMSUNG_USB2PHY) += phy-samsung-usb2.o
obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o
obj-$(CONFIG_TWL6030_USB) += phy-twl6030-usb.o
obj-$(CONFIG_USB_EHCI_TEGRA) += phy-tegra-usb.o
Expand Down
Loading

0 comments on commit dc2377d

Please sign in to comment.