Skip to contentSkip to conversation

USB OTG PHY driver for NXP LPC18xx family

PATCH Superseded Joachim Eastwood 2 participants 5 messages May 29, 2015 – Jun 11, 2015

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover USB OTG PHY driver for NXP LPC18xx family

This patch set adds support for the internal USB OTG PHY found on NXP LPC18xx and LPC43xx devices. Driver takes care of enabling the PHY and setting the clock rate which is need for USB0 support on this platform.

This version address the comments from Kishon Vijay Abraham I.

Changes in v3:
- depend on MFD_SYSCON

Changes in v2:
- use PTR_ERR_OR_ZERO in phy driver
- rename binding doc
- update doc commit message

Base support for this platform can now be found in arm-soc next.

Joachim Eastwood (2):
phy: add lpc18xx usb otg phy driver
phy: dt bindings: add XP LPC18xx/43xx USB OTG PHY bindings

 .../bindings/phy/phy-lpc18xx-usb-otg.txt           |  19 +++
 drivers/phy/Kconfig                                |  11 ++
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-lpc18xx-usb-otg.c                  | 143 +++++++++++++++++++++
 4 files changed, 174 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt
 create mode 100644 drivers/phy/phy-lpc18xx-usb-otg.c
Signature · 1 line
1.8.0
#1 lore raw

PATCH v3 1/2 phy: add lpc18xx usb otg phy driver

Add PHY driver for the internal USB OTG PHY found on NXP LPC18xx and LPC43xx devices. This driver takes care of enabling the PHY in CREG (syscon) and setting the required clock frequency.

---
 drivers/phy/Kconfig               |  11 +++
 drivers/phy/Makefile              |   1 +
 drivers/phy/phy-lpc18xx-usb-otg.c | 143 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 155 insertions(+)
 create mode 100644 drivers/phy/phy-lpc18xx-usb-otg.c
drivers/phy/Kconfig +11 -0
index a53bd5b52df9..1728faf68ccd 100644
@@ -52,6 +52,17 @@ config PHY_EXYNOS_MIPI_VIDEO
 	  Support for MIPI CSI-2 and MIPI DSI DPHY found on Samsung S5P
 	  and EXYNOS SoCs.
 
+config PHY_LPC18XX_USB_OTG
+	tristate "NXP LPC18xx/43xx SoC USB OTG PHY driver"
+	depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
+	depends on MFD_SYSCON
+	select GENERIC_PHY
+	help
+	  Enable this to support NXP LPC18xx/43xx internal USB OTG PHY.
+
+	  This driver is need for USB0 support on LPC18xx/43xx and takes
+	  care of enabling and clock setup.
+
 config PHY_MVEBU_SATA
 	def_bool y
 	depends on ARCH_DOVE || MACH_DOVE || MACH_KIRKWOOD
drivers/phy/Makefile +1 -0
index f12625178780..b7251f3b9ef7 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY)	+= phy-armada375-usb2.o
 obj-$(CONFIG_BCM_KONA_USB2_PHY)		+= phy-bcm-kona-usb2.o
 obj-$(CONFIG_PHY_EXYNOS_DP_VIDEO)	+= phy-exynos-dp-video.o
 obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO)	+= phy-exynos-mipi-video.o
+obj-$(CONFIG_PHY_LPC18XX_USB_OTG)	+= phy-lpc18xx-usb-otg.o
 obj-$(CONFIG_PHY_MVEBU_SATA)		+= phy-mvebu-sata.o
 obj-$(CONFIG_PHY_MIPHY28LP) 		+= phy-miphy28lp.o
 obj-$(CONFIG_PHY_MIPHY365X)		+= phy-miphy365x.o
drivers/phy/phy-lpc18xx-usb-otg.c new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
1.8.0
#2 lore raw

PATCH v3 2/2 phy: dt bindings: add XP LPC18xx/43xx USB OTG PHY bindings

In reply to Joachim Eastwood

Add binding documentation for NXP LPC18xx/43xx USB OTG PHY. This PHY can found on NXP LPC18xx and LPC43xx devices with USB support.

---
 .../devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt   | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt
Documentation/devicetree/bindings/phy/phy-lpc18xx-usb-otg.txt new file +19 -0
new file mode 100644
index 000000000000..3da60ca04a42
@@ -0,0 +1,19 @@
+NXP LPC18xx/43xx internal USB OTG PHY binding
+---------------------------------------------
+
+This file contains documentation for the internal USB OTG PHY found
+in NXP LPC18xx and LPC43xx SoCs.
+
+Required properties:
+- compatible	: must be "nxp,lpc1850-usb-otg-phy"
+- clocks	: must be exactly one entry
+See: Documentation/devicetree/bindings/clock/clock-bindings.txt
+- #phy-cells	: must be 0 for this phy
+See: Documentation/devicetree/bindings/phy/phy-bindings.txt
+
+Example:
+usb0_otg_phy: usb0-otg-phy {
+	compatible = "nxp,lpc1850-usb-otg-phy";
+	clocks = <&ccu1 CLK_USB0>;
+	#phy-cells = <0>;
+};
Signature · 1 line
1.8.0
#3 lore raw

v3 cover USB OTG PHY driver for NXP LPC18xx family

In reply to Joachim Eastwood

Hi Kishon,

Quoted 15 lines · Joachim Eastwood

This patch set adds support for the internal USB OTG PHY found on NXP LPC18xx and LPC43xx devices. Driver takes care of enabling the PHY and setting the clock rate which is need for USB0 support on this platform.

This version address the comments from Kishon Vijay Abraham I.

Changes in v3:
- depend on MFD_SYSCON

Changes in v2:
- use PTR_ERR_OR_ZERO in phy driver
- rename binding doc
- update doc commit message

Quoted 5 lines

Base support for this platform can now be found in arm-soc next.

Joachim Eastwood (2):
phy: add lpc18xx usb otg phy driver
phy: dt bindings: add XP LPC18xx/43xx USB OTG PHY bindings

Do you have any more comments on the patches or are they okey now?

regards,
Joachim Eastwood

#4 lore raw

v3 cover USB OTG PHY driver for NXP LPC18xx family

Hi Joachim,

Quoted 18 lines · Joachim Eastwood

Hi Kishon,

Quoted 15 lines · Joachim Eastwood

This patch set adds support for the internal USB OTG PHY found on NXP LPC18xx and LPC43xx devices. Driver takes care of enabling the PHY and setting the clock rate which is need for USB0 support on this platform.

This version address the comments from Kishon Vijay Abraham I.

Changes in v3:
- depend on MFD_SYSCON

Changes in v2:
- use PTR_ERR_OR_ZERO in phy driver
- rename binding doc
- update doc commit message

Quoted 7 lines
Quoted 5 lines

Base support for this platform can now be found in arm-soc next.

Joachim Eastwood (2):
phy: add lpc18xx usb otg phy driver
phy: dt bindings: add XP LPC18xx/43xx USB OTG PHY bindings

Do you have any more comments on the patches or are they okey now?

The patches look fine. But it can go only in 4.3.

Thanks
Kishon