phy: for 4.4 merge window
Subsystems (5)
Hi Greg,
Please find the pull request for 4.4 merge window below. It's a rather short pull request adding two new PHY drivers for broadcom and mediatek SoCs and a cleanup in sun4i usb PHY driver.
Let me know If I have to modify something.
Thanks
Kishon
The following changes since commit 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f:
Linux 4.3-rc1 (2015-09-12 16:35:56 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git next
for you to fetch changes up to 0f8669e343982ac66f4420335777cb5456b8abb0:
MAINTAINERS: add Mediatek usb3 phy driver (2015-10-17 07:32:22 +0530)
----------------------------------------------------------------
phy: for 4.4
*) Add new PHY driver for Broadcom's cygnus PCIe PHY *) Add USB3 PHY driver for mediatek's SoCs
*) Add VBUS regulator support for Samsung's exynos PHY *) Misc cleanup
----------------------------------------------------------------
Axel Lin (1):
phy: sun4i-usb: Use devm_gpiod_get_optional for optional GPIOs
Chunfeng Yun (3):
dt-bindings: Add usb3.0 phy binding for MT65xx SoCs
phy: add usb3.0 phy driver for mt65xx SoCs
MAINTAINERS: add Mediatek usb3 phy driver
Marek Szyprowski (1):
phy: exynos-usb2: add vbus regulator support
Ray Jui (2):
dt-bindings: Add Cygnus PCIe PHY binding doc
phy: cygnus: pcie: Add Cygnus PCIe PHY support
.../bindings/phy/brcm,cygnus-pcie-phy.txt | 47 ++ .../devicetree/bindings/phy/phy-mt65xx-usb.txt | 68 +++ .../devicetree/bindings/phy/samsung-phy.txt | 3 + MAINTAINERS | 7 + drivers/phy/Kconfig | 18 + drivers/phy/Makefile | 2 + drivers/phy/phy-bcm-cygnus-pcie.c | 213 ++++++++ drivers/phy/phy-mt65xx-usb3.c | 506 ++++++++++++++++++++ drivers/phy/phy-samsung-usb2.c | 25 +- drivers/phy/phy-samsung-usb2.h | 2 + drivers/phy/phy-sun4i-usb.c | 22 +- 11 files changed, 898 insertions(+), 15 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt create mode 100644 Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt create mode 100644 drivers/phy/phy-bcm-cygnus-pcie.c create mode 100644 drivers/phy/phy-mt65xx-usb3.c
Signature · 1 line
1.7.9.5
PATCH 1/7 phy: exynos-usb2: add vbus regulator support
From: Marek Szyprowski <[email protected]>
Exynos USB2 PHY has separate power supply, which is usually provided by VBUS regulator. This patch adds support for it. VBUS regulator is optional, to keep compatibility with boards, which have VBUS provided from some always-on power source.
--- .../devicetree/bindings/phy/samsung-phy.txt | 3 +++ drivers/phy/phy-samsung-usb2.c | 25 ++++++++++++++++++-- drivers/phy/phy-samsung-usb2.h | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/phy/samsung-phy.txt +3 -0
@@ -44,6 +44,9 @@ Required properties: - the "ref" clock is used to get the rate of the clock provided to the PHY module +Optional properties: +- vbus-supply: power-supply phandle for vbus power source + The first phandle argument in the PHY specifier identifies the PHY, its meaning is compatible dependent. For the currently supported SoCs (Exynos 4210 and Exynos 4212) it is as follows:
drivers/phy/phy-samsung-usb2.c +23 -2
@@ -27,6 +27,13 @@ static int samsung_usb2_phy_power_on(struct phy *phy)dev_dbg (drv->dev,"Request to power_on \"%s\" usb phy\n" , inst->cfg->label); + +if (drv->vbus) { + ret =regulator_enable (drv->vbus); +if (ret) + goto err_regulator; + } + ret =clk_prepare_enable (drv->clk);if (ret) goto err_main_clk;
@@ -48,6 +55,9 @@ err_power_on: err_instance_clk:clk_disable_unprepare (drv->clk); err_main_clk: +if (drv->vbus) +regulator_disable (drv->vbus); +err_regulator:return ret; }
@@ -55,7 +65,7 @@ static int samsung_usb2_phy_power_off(struct phy *phy) {struct samsung_usb2_phy_instance *inst =phy_get_drvdata (phy);struct samsung_usb2_phy_driver *drv = inst->drv; -int ret; +int ret =0 ;dev_dbg (drv->dev,"Request to power_off \"%s\" usb phy\n" , inst->cfg->label);
@@ -68,7 +78,10 @@ static int samsung_usb2_phy_power_off(struct phy *phy) }clk_disable_unprepare (drv->ref_clk);clk_disable_unprepare (drv->clk); -return 0 ; +if (drv->vbus) + ret =regulator_disable (drv->vbus); + +return ret; }static const struct phy_ops samsung_usb2_phy_ops = {
@@ -203,6 +216,14 @@ static int samsung_usb2_phy_probe(struct platform_device *pdev)return ret; } + drv->vbus =devm_regulator_get (dev,"vbus" ); +if (IS_ERR (drv->vbus)) { + ret =PTR_ERR (drv->vbus); +if (ret == -EPROBE_DEFER ) +return ret; + drv->vbus =NULL ; + } +for (i =0 ; i < drv->cfg->num_phys; i++) {char *label = drv->cfg->phys[i].label;struct samsung_usb2_phy_instance *p = &drv->instances[i];
drivers/phy/phy-samsung-usb2.h +2 -0
@@ -17,6 +17,7 @@#include <linux/device.h> #include <linux/regmap.h> #include <linux/spinlock.h> +#include <linux/regulator/consumer.h> #define KHZ 1000#define MHZ (KHZ * KHZ)
@@ -37,6 +38,7 @@ struct samsung_usb2_phy_driver {const struct samsung_usb2_phy_config *cfg;struct clk *clk;struct clk *ref_clk; +struct regulator *vbus;unsigned long ref_rate;u32 ref_reg_val;struct device *dev;
Signature · 1 line
1.7.9.5
PATCH 2/7 dt-bindings: Add usb3.0 phy binding for MT65xx SoCs
In reply to Kishon Vijay Abraham IFrom: Chunfeng Yun <[email protected]>
add a DT binding documentation of usb3.0 phy for MT65xx SoCs from Mediatek.
--- .../devicetree/bindings/phy/phy-mt65xx-usb.txt | 68 ++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt
Documentation/devicetree/bindings/phy/phy-mt65xx-usb.txt new file +68 -0
@@ -0,0 +1,68 @@ +mt65xx USB3.0 PHY binding +-------------------------- + +This binding describes a usb3.0 phy for mt65xx platforms of Medaitek SoC. + +Required properties (controller (parent) node): + - compatible : should be "mediatek,mt8173-u3phy" + - reg : offset and length of register for phy, exclude port's + register. + - clocks : a list of phandle + clock-specifier pairs, one for each + entry in clock-names + - clock-names : must contain + "u3phya_ref": for reference clock of usb3.0 analog phy. + +Required nodes : a sub-node is required for each port the controller + provides. Address range information including the usual + 'reg' property is used inside these nodes to describe + the controller's topology. + +Required properties (port (child) node): +- reg : address and length of the register set for the port. +- #phy-cells : should be 1 (See second example) + cell after port phandle is phy type from: + - PHY_TYPE_USB2 + - PHY_TYPE_USB3 + +Example: + +u3phy: usb-phy@11290000 { + compatible = "mediatek,mt8173-u3phy"; + reg = <0 0x11290000 0 0x800>; + clocks = <&apmixedsys CLK_APMIXED_REF2USB_TX>; + clock-names = "u3phya_ref"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "okay"; + + phy_port0: port@11290800 { + reg = <0 0x11290800 0 0x800>; + #phy-cells = <1>; + status = "okay"; + }; + + phy_port1: port@11291000 { + reg = <0 0x11291000 0 0x800>; + #phy-cells = <1>; + status = "okay"; + }; +}; + +Specifying phy control of devices +--------------------------------- + +Device nodes should specify the configuration required in their "phys" +property, containing a phandle to the phy port node and a device type; +phy-names for each port are optional. + +Example: + +#include <dt-bindings/phy/phy.h> + +usb30: usb@11270000 { + ... + phys = <&phy_port0 PHY_TYPE_USB3>; + phy-names = "usb3-0"; + ... +};
Signature · 1 line
1.7.9.5
PATCH 3/7 phy: add usb3.0 phy driver for mt65xx SoCs
In reply to Kishon Vijay Abraham IFrom: Chunfeng Yun <[email protected]>
support usb3.0 phy of mt65xx SoCs
--- drivers/phy/Kconfig | 9 + drivers/phy/Makefile | 1 + drivers/phy/phy-mt65xx-usb3.c | 506 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 516 insertions(+) create mode 100644 drivers/phy/phy-mt65xx-usb3.c
drivers/phy/Kconfig +9 -0
@@ -206,6 +206,15 @@ config PHY_HIX5HD2_SATA help Support for SATA PHY on Hisilicon hix5hd2 Soc. +config PHY_MT65XX_USB3 + tristate "Mediatek USB3.0 PHY Driver" + depends on ARCH_MEDIATEK && OF + select GENERIC_PHY + help + Say 'Y' here to add support for Mediatek USB3.0 PHY driver + for mt65xx SoCs. it supports two usb2.0 ports and + one usb3.0 port. + config PHY_SUN4I_USB tristate "Allwinner sunxi SoC USB PHY driver" depends on ARCH_SUNXI && HAS_IOMEM && OF
drivers/phy/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_TI_PIPE3) += phy-ti-pipe3.o obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o obj-$(CONFIG_PHY_EXYNOS5250_SATA) += phy-exynos5250-sata.o obj-$(CONFIG_PHY_HIX5HD2_SATA) += phy-hix5hd2-sata.o +obj-$(CONFIG_PHY_MT65XX_USB3) += phy-mt65xx-usb3.o obj-$(CONFIG_PHY_SUN4I_USB) += phy-sun4i-usb.o obj-$(CONFIG_PHY_SUN9I_USB) += phy-sun9i-usb.o obj-$(CONFIG_PHY_SAMSUNG_USB2) += phy-exynos-usb2.o
drivers/phy/phy-mt65xx-usb3.c new file +506 -0
506 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 4/7 phy: sun4i-usb: Use devm_gpiod_get_optional for optional GPIOs
In reply to Kishon Vijay Abraham IFrom: Axel Lin <[email protected]>
Both data->id_det_gpio and data->vbus_det_gpio are optional, so use devm_gpiod_get_optional for them.
--- drivers/phy/phy-sun4i-usb.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
drivers/phy/phy-sun4i-usb.c +9 -13
@@ -551,19 +551,15 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)if (IS_ERR (data->base))return PTR_ERR (data->base); - data->id_det_gpio =devm_gpiod_get (dev,"usb0_id_det" ,GPIOD_IN ); -if (IS_ERR (data->id_det_gpio)) { -if (PTR_ERR (data->id_det_gpio) == -EPROBE_DEFER ) -return -EPROBE_DEFER ; - data->id_det_gpio =NULL ; - } - - data->vbus_det_gpio =devm_gpiod_get (dev,"usb0_vbus_det" ,GPIOD_IN ); -if (IS_ERR (data->vbus_det_gpio)) { -if (PTR_ERR (data->vbus_det_gpio) == -EPROBE_DEFER ) -return -EPROBE_DEFER ; - data->vbus_det_gpio =NULL ; - } + data->id_det_gpio =devm_gpiod_get_optional (dev,"usb0_id_det" , +GPIOD_IN ); +if (IS_ERR (data->id_det_gpio)) +return PTR_ERR (data->id_det_gpio); + + data->vbus_det_gpio =devm_gpiod_get_optional (dev,"usb0_vbus_det" , +GPIOD_IN ); +if (IS_ERR (data->vbus_det_gpio)) +return PTR_ERR (data->vbus_det_gpio);if (of_find_property (np,"usb0_vbus_power-supply" ,NULL )) { data->vbus_power_supply = devm_power_supply_get_by_phandle(dev,
Signature · 1 line
1.7.9.5
PATCH 5/7 dt-bindings: Add Cygnus PCIe PHY binding doc
In reply to Kishon Vijay Abraham IFrom: Ray Jui <[email protected]>
Add DT binding document for Broadcom Cygnus PCIe PHYs
--- .../bindings/phy/brcm,cygnus-pcie-phy.txt | 47 ++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt
Documentation/devicetree/bindings/phy/brcm,cygnus-pcie-phy.txt new file +47 -0
@@ -0,0 +1,47 @@ +Broadcom Cygnus PCIe PHY + +Required properties: +- compatible: must be "brcm,cygnus-pcie-phy" +- reg: base address and length of the PCIe PHY block +- #address-cells: must be 1 +- #size-cells: must be 0 + +Each PCIe PHY should be represented by a child node + +Required properties For the child node: +- reg: the PHY ID +0 - PCIe RC 0 +1 - PCIe RC 1 +- #phy-cells: must be 0 + +Example: + pcie_phy: phy@0301d0a0 { + compatible = "brcm,cygnus-pcie-phy"; + reg = <0x0301d0a0 0x14>; + + pcie0_phy: phy@0 { + reg = <0>; + #phy-cells = <0>; + }; + + pcie1_phy: phy@1 { + reg = <1>; + #phy-cells = <0>; + }; + }; + + /* users of the PCIe phy */ + + pcie0: pcie@18012000 { + ... + ... + phys = <&pcie0_phy>; + phy-names = "pcie-phy"; + }; + + pcie1: pcie@18013000 { + ... + ... + phys = <pcie1_phy>; + phy-names = "pcie-phy"; + };
Signature · 1 line
1.7.9.5
PATCH 6/7 phy: cygnus: pcie: Add Cygnus PCIe PHY support
In reply to Kishon Vijay Abraham IFrom: Ray Jui <[email protected]>
This patch adds the PCIe PHY support for the Broadcom PCIe RC interface on Cygnus
--- drivers/phy/Kconfig | 9 ++ drivers/phy/Makefile | 1 + drivers/phy/phy-bcm-cygnus-pcie.c | 213 +++++++++++++++++++++++++++++++++++++ 3 files changed, 223 insertions(+) create mode 100644 drivers/phy/phy-bcm-cygnus-pcie.c
drivers/phy/Kconfig +9 -0
@@ -380,4 +380,13 @@ config PHY_BRCMSTB_SATA Enable this to support the SATA3 PHY on 28nm Broadcom STB SoCs. Likely useful only with CONFIG_SATA_BRCMSTB enabled. +config PHY_CYGNUS_PCIE + tristate "Broadcom Cygnus PCIe PHY driver" + depends on OF && (ARCH_BCM_CYGNUS || COMPILE_TEST) + select GENERIC_PHY + default ARCH_BCM_CYGNUS + help + Enable this to support the Broadcom Cygnus PCIe PHY. + If unsure, say N. + endmenu
drivers/phy/Makefile +1 -0
@@ -47,3 +47,4 @@ obj-$(CONFIG_PHY_QCOM_UFS) += phy-qcom-ufs-qmp-14nm.o obj-$(CONFIG_PHY_TUSB1210) += phy-tusb1210.o obj-$(CONFIG_PHY_BRCMSTB_SATA) += phy-brcmstb-sata.o obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o +obj-$(CONFIG_PHY_CYGNUS_PCIE) += phy-bcm-cygnus-pcie.o
drivers/phy/phy-bcm-cygnus-pcie.c new file +213 -0
213 lines not on this page · raw message
Signature · 1 line
1.7.9.5
PATCH 7/7 MAINTAINERS: add Mediatek usb3 phy driver
In reply to Kishon Vijay Abraham IFrom: Chunfeng Yun <[email protected]>
Add Mediatek usb3 phy driver to maintainer entry.
--- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
@@ -1291,6 +1291,13 @@ F: arch/arm/mach-mediatek/ N: mtk K: mediatek +ARM/Mediatek USB3 PHY DRIVER +M: Chunfeng Yun <[email protected]> +L: [email protected] (moderated for non-subscribers) +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: drivers/phy/phy-mt65xx-usb3.c + ARM/MICREL KS8695 ARCHITECTURE M: Greg Ungerer <[email protected]> L: [email protected] (moderated for non-subscribers)
Signature · 1 line
1.7.9.5
Quoted 11 lines · Kishon Vijay Abraham I
Hi Greg,
Please find the pull request for 4.4 merge window below. It's a rather short pull request adding two new PHY drivers for broadcom and mediatek SoCs and a cleanup in sun4i usb PHY driver.
Let me know If I have to modify something.
Thanks
Kishon
Quoted 7 lines
The following changes since commit
6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f:Linux 4.3-rc1 (2015-09-12 16:35:56 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.gitnext
This isn't a signed tag, it's just a random branch :(
Please fix up and I'll be glad to pull it.
thanks,
greg k-h
Hi,
Quoted 14 lines · Greg KH
Quoted 13 lines · Kishon Vijay Abraham I
Hi Greg,
Please find the pull request for 4.4 merge window below. It's a rather short pull request adding two new PHY drivers for broadcom and mediatek SoCs and a cleanup in sun4i usb PHY driver.
Let me know If I have to modify something.
Thanks
KishonThe following changes since commit
6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f:
Quoted 7 lines
Quoted 5 lines
Linux 4.3-rc1 (2015-09-12 16:35:56 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.gitnextThis isn't a signed tag, it's just a random branch :(
Not sure how it ended up with next branch. Anyway will resend the pull request.
Thanks
Kishon