Skip to contentSkip to conversation

Add usb phy support for STiH41x SoCs.

PATCH New Peter Griffin 1 participant 5 messages Sep 8, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover Add usb phy support for STiH41x SoCs.

This series adds support for the on-chip PHY used for USB 1.1 and 2.0 found on STiH415 and STiH416 consumer electronics SoC's from STMicroelectronics.

Changes since v3:
- Fix copy/paste typo whereby phy is registered twice
- Remove .owner field, as device is registered using module_platform_driver API

Changes since v2:
- Rebased on top of 3.17-rc3
- Enable driver in multi_v7_defconfig

Changes since v1:
- Change to select GENERIC_PHY rather than depends for uniformity
- Ensure phy_provider_register is called after PHY is created
- Add extra commit message for MAINTAINERS patch

Peter Griffin (4):
phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.
phy: phy-stih41x-usb: Add dt documentation for USB phy on STiH415/6
MAINTAINERS: Add phy-stih41x-usb.c to ARCH/STI architecture
ARM: multi_v7_defconfig: Enable stih41x usb phy driver.

Peter Griffin (4):
phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.
phy: phy-stih41x-usb: Add dt documentation for USB phy on STiH415/6
MAINTAINERS: Add phy-stih41x-usb.c to ARCH/STI architecture
ARM: multi_v7_defconfig: Enable stih41x usb phy driver.

 .../devicetree/bindings/phy/phy-stih41x-usb.txt    |  24 +++
 MAINTAINERS                                        |   1 +
 arch/arm/configs/multi_v7_defconfig                |   1 +
 drivers/phy/Kconfig                                |   8 +
 drivers/phy/Makefile                               |   1 +
 drivers/phy/phy-stih41x-usb.c                      | 187 +++++++++++++++++++++
 6 files changed, 222 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt
 create mode 100644 drivers/phy/phy-stih41x-usb.c
Signature · 1 line
1.9.1
#1 lore raw

PATCH v4 1/4 phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.

This driver adds support for USB (1.1 and 2.0) phy for STiH415 and STiH416 System-On-Chips from STMicroelectronics.

---
 drivers/phy/Kconfig           |   8 ++
 drivers/phy/Makefile          |   1 +
 drivers/phy/phy-stih41x-usb.c | 187 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 196 insertions(+)
 create mode 100644 drivers/phy/phy-stih41x-usb.c
drivers/phy/Kconfig +8 -0
index 0dd7427..26f8a86 100644
@@ -230,4 +230,12 @@ config PHY_XGENE
 	help
 	  This option enables support for APM X-Gene SoC multi-purpose PHY.
 
+config PHY_STIH41X_USB
+	tristate "STMicroelectronics USB2 PHY driver for STiH41x series"
+	depends on ARCH_STI
+	select GENERIC_PHY
+	help
+	  Enable this to support the USB transceiver that is part of
+	  STMicroelectronics STiH41x SoC series.
+
 endmenu
drivers/phy/Makefile +1 -0
index 95c69ed..d02f365 100644
@@ -28,3 +28,4 @@ obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA)	+= phy-qcom-ipq806x-sata.o
 obj-$(CONFIG_PHY_ST_SPEAR1310_MIPHY)	+= phy-spear1310-miphy.o
 obj-$(CONFIG_PHY_ST_SPEAR1340_MIPHY)	+= phy-spear1340-miphy.o
 obj-$(CONFIG_PHY_XGENE)			+= phy-xgene.o
+obj-$(CONFIG_PHY_STIH41X_USB)		+= phy-stih41x-usb.o
drivers/phy/phy-stih41x-usb.c new file +187 -0

187 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH v4 2/4 phy: phy-stih41x-usb: Add dt documentation for USB phy on STiH415/6

In reply to Peter Griffin

This patch adds dt documentation bindings for the usb phy found on STiH415/5 SoC's from STMicroelectronics, which support USB 1.1 and 2.0.

---
 .../devicetree/bindings/phy/phy-stih41x-usb.txt    | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt
Documentation/devicetree/bindings/phy/phy-stih41x-usb.txt new file +24 -0
new file mode 100644
index 0000000..00944a0
@@ -0,0 +1,24 @@
+STMicroelectronics STiH41x USB PHY binding
+------------------------------------------
+
+This file contains documentation for the usb phy found in STiH415/6 SoCs from
+STMicroelectronics.
+
+Required properties:
+- compatible	: should be "st,stih416-usb-phy" or "st,stih415-usb-phy"
+- st,syscfg	: should be a phandle of the syscfg node
+- clock-names	: must contain "osc_phy"
+- clocks	: must contain an entry for each name in clock-names.
+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:
+
+usb2_phy: usb2phy at 0 {
+	compatible	= "st,stih416-usb-phy";
+	#phy-cell	= <0>;
+	st,syscfg	= <&syscfg_rear>;
+	clocks		= <&clk_sysin>;
+	clock-names	= "osc_phy";
+};
Signature · 1 line
1.9.1
#3 lore raw

PATCH v4 3/4 MAINTAINERS: Add phy-stih41x-usb.c to ARCH/STI architecture

In reply to Peter Griffin

This patch adds the new phy-sti41x-usb.c PHY driver found on STMicroelectronics stih41x consumer electronics SoC's into the STI arch section of the maintainers file.

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index cf24bb5..4cb59cf 100644
@@ -1398,6 +1398,7 @@ F:	drivers/media/rc/st_rc.c
 F:	drivers/i2c/busses/i2c-st.c
 F:	drivers/tty/serial/st-asc.c
 F:	drivers/mmc/host/sdhci-st.c
+F:	drivers/phy/phy-stih41x-usb.c
 
 ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
 M:	Lennert Buytenhek <[email protected]>
Signature · 1 line
1.9.1
#4 lore raw

PATCH v4 4/4 ARM: multi_v7_defconfig: Enable stih41x usb phy driver.

In reply to Peter Griffin

This driver is used by the ehci / ohci usb controllers on stih41x SoCs.

---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/configs/multi_v7_defconfig +1 -0
index 5fb95fb..74fd4a1 100644
@@ -387,6 +387,7 @@ CONFIG_PWM_VT8500=y
 CONFIG_OMAP_USB2=y
 CONFIG_TI_PIPE3=y
 CONFIG_PHY_MIPHY365X=y
+CONFIG_PHY_STIH41X_USB=y
 CONFIG_PHY_SUN4I_USB=y
 CONFIG_EXT4_FS=y
 CONFIG_VFAT_FS=y
Signature · 1 line
1.9.1