Add usb phy support for STiH41x SoCs.
Subsystems (3)
v3 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 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.
.../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 | 192 +++++++++++++++++++++ 6 files changed, 227 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
PATCH v3 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 | 192 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 drivers/phy/phy-stih41x-usb.c
drivers/phy/Kconfig +8 -0
@@ -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
@@ -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 +192 -0
192 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 2/4 phy: phy-stih41x-usb: Add dt documentation for USB phy on STiH415/6
In reply to Peter GriffinThis 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
@@ -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
PATCH v3 3/4 MAINTAINERS: Add phy-stih41x-usb.c to ARCH/STI architecture
In reply to Peter GriffinThis 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
@@ -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
PATCH v3 4/4 ARM: multi_v7_defconfig: Enable stih41x usb phy driver.
In reply to Peter GriffinThis 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
@@ -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
Re: [PATCH v3 1/4] phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.
In reply to Peter GriffinHi,
drivers/phy/phy-stih41x-usb.c
Quoted 44 lines · Peter Griffin
This driver adds support for USB (1.1 and 2.0) phy for STiH415 and STiH416 System-On-Chips from STMicroelectronics.
Signed-off-by Maxime Coquelin <[email protected]>Signed-off-by Peter Griffin <[email protected]>--- drivers/phy/Kconfig | 8 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-stih41x-usb.c | 192 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+) create mode 100644 drivers/phy/phy-stih41x-usb.cdrivers/phy/Kconfig +8
-0@@ -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. + endmenudrivers/phy/Makefile +1
-0@@ -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.odrivers/phy/phy-stih41x-usb.c new file +0
-0@@ -0,0 +1,192 @@
.
.
<skip>
.
.
Quoted 9 lines
drivers/phy/phy-stih41x-usb.c new file +9
-0+ + phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate); +if (IS_ERR (phy_provider)) +return PTR_ERR (phy_provider); + + phy =devm_phy_create (dev,NULL , &stih41x_usb_phy_ops,NULL ); + +if (IS_ERR (phy)) { +dev_err (dev,"failed to create Display Port PHY\n" );
drivers/phy/phy-stih41x-usb.c line 168
Quoted 10 lines
drivers/phy/phy-stih41x-usb.c new file +10
-0+return PTR_ERR (phy); + } + + phy_dev->dev = dev; + +phy_set_drvdata (phy, phy_dev); + + phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate); +if (IS_ERR (phy_provider)) +return PTR_ERR (phy_provider);
registering phy provider multiple times..
Thanks
Kishon
Re: [PATCH v3 4/4] ARM: multi_v7_defconfig: Enable stih41x usb phy driver.
In reply to Peter GriffinQuoted 3 lines · Peter Griffin
This driver is used by the ehci / ohci usb controllers on stih41x SoCs.
Signed-off-by Peter Griffin <[email protected]>
FWIW
Quoted 17 lines
--- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+)arch/arm/configs/multi_v7_defconfig +1
-0@@ -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
Re: [PATCH v3 1/4] phy: phy-stih41x-usb: Add usb phy support for STiH41x SoCs.
In reply to Kishon Vijay Abraham IHi Kishon,
Quoted 5 lines
drivers/phy/phy-stih41x-usb.c line 153
Quoted 3 lines
drivers/phy/phy-stih41x-usb.c new file +3
-0+ phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate); +if (IS_ERR (phy_provider)) +return PTR_ERR (phy_provider);registering phy provider multiple times..
Doh. Sorry for the noise, will send a v4 shortly.
regards,
Peter.