* [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16
@ 2014-07-04 9:55 Roger Quadros
2014-07-04 9:55 ` [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw)
To: tony, kishon, balbi
Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap,
linux-usb, linux-kernel, Roger Quadros
Hi,
On DRA7-evm, the VDDA_1V8_PHY supply must be always-on for proper functioning
of the PHYs on the SoC.
The 3.3V USB supply (ldousb_reg) can be turned OFF when the High Speed USB PHYs
are not in use. We add regulator support in the PHY framework core to manage
the PHY's regulator during PHY power on/off.
Finally we add the 3.3V regulator information to the USB2 PHYs.
This series should get the USB and SATA working again on 3.16 on DRA7-evm.
cheers,
-roger
Changelog:
v2:
- removed if (!NULL) check around regulator_put()
- added more technical information in commit message about 1V8_PHY power line
- added pm_runtime_disable in omap_usb2_remove()
---
Roger Quadros (6):
ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on
phy: core: Fix error path in phy_create()
phy: core: Support regulator supply for PHY power
phy: core: Add phy-supply to DT binding documentation
phy: omap-usb2: Balance pm_runtime_enable() on probe failure and
remove
ARM: dts: dra7-evm: Add regulator information to USB2 PHYs
.../devicetree/bindings/phy/phy-bindings.txt | 4 +++
arch/arm/boot/dts/dra7-evm.dts | 9 ++++++
drivers/phy/phy-core.c | 33 ++++++++++++++++++++--
drivers/phy/phy-omap-usb2.c | 7 +++--
include/linux/phy/phy.h | 2 ++
5 files changed, 50 insertions(+), 5 deletions(-)
--
1.8.3.2
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on 2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros @ 2014-07-04 9:55 ` Roger Quadros [not found] ` <1404467748-12154-2-git-send-email-rogerq-l0cyMroinI0@public.gmane.org> 2014-07-04 9:55 ` [PATCH v2 2/6] phy: core: Fix error path in phy_create() Roger Quadros ` (4 subsequent siblings) 5 siblings, 1 reply; 12+ messages in thread From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Roger Quadros, Rajendra Nayak, Tero Kristo After clarification from the hardware team it was found that this 1.8V PHY supply can't be switched OFF when SoC is Active. Since the PHY IPs don't contain isolation logic built in the design to allow the power rail to be switched off, there is a very high risk of IP reliability and additional leakage paths which can result in additional power consumption. The only scenario where this rail can be switched off is part of Power on reset sequencing, but it needs to be kept always-on during operation. This patch is required for proper functionality of USB, SATA and PCIe on DRA7-evm. CC: Rajendra Nayak <rnayak@ti.com> CC: Tero Kristo <t-kristo@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com> --- arch/arm/boot/dts/dra7-evm.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 4adc280..8308954 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -240,6 +240,7 @@ regulator-name = "ldo3"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; }; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
[parent not found: <1404467748-12154-2-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on [not found] ` <1404467748-12154-2-git-send-email-rogerq-l0cyMroinI0@public.gmane.org> @ 2014-07-07 8:29 ` Tony Lindgren 2014-07-07 8:34 ` Roger Quadros 0 siblings, 1 reply; 12+ messages in thread From: Tony Lindgren @ 2014-07-07 8:29 UTC (permalink / raw) To: Roger Quadros Cc: kishon-l0cyMroinI0, balbi-l0cyMroinI0, nsekhar-l0cyMroinI0, nm-l0cyMroinI0, george.cherian-l0cyMroinI0, sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8, linux-omap-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rajendra Nayak, Tero Kristo * Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> [140704 02:57]: > After clarification from the hardware team it was found that > this 1.8V PHY supply can't be switched OFF when SoC is Active. > > Since the PHY IPs don't contain isolation logic built in the design to > allow the power rail to be switched off, there is a very high risk > of IP reliability and additional leakage paths which can result in > additional power consumption. > > The only scenario where this rail can be switched off is part of Power on > reset sequencing, but it needs to be kept always-on during operation. > > This patch is required for proper functionality of USB, SATA > and PCIe on DRA7-evm. > > CC: Rajendra Nayak <rnayak-l0cyMroinI0@public.gmane.org> > CC: Tero Kristo <t-kristo-l0cyMroinI0@public.gmane.org> > Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org> Best that you queue this with the series: Acked-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> > --- > arch/arm/boot/dts/dra7-evm.dts | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts > index 4adc280..8308954 100644 > --- a/arch/arm/boot/dts/dra7-evm.dts > +++ b/arch/arm/boot/dts/dra7-evm.dts > @@ -240,6 +240,7 @@ > regulator-name = "ldo3"; > regulator-min-microvolt = <1800000>; > regulator-max-microvolt = <1800000>; > + regulator-always-on; > regulator-boot-on; > }; > > -- > 1.8.3.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on 2014-07-07 8:29 ` Tony Lindgren @ 2014-07-07 8:34 ` Roger Quadros 2014-07-07 8:44 ` Tony Lindgren 0 siblings, 1 reply; 12+ messages in thread From: Roger Quadros @ 2014-07-07 8:34 UTC (permalink / raw) To: Tony Lindgren Cc: kishon, balbi, nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Rajendra Nayak, Tero Kristo Hi Tony, On 07/07/2014 11:29 AM, Tony Lindgren wrote: > * Roger Quadros <rogerq@ti.com> [140704 02:57]: >> After clarification from the hardware team it was found that >> this 1.8V PHY supply can't be switched OFF when SoC is Active. >> >> Since the PHY IPs don't contain isolation logic built in the design to >> allow the power rail to be switched off, there is a very high risk >> of IP reliability and additional leakage paths which can result in >> additional power consumption. >> >> The only scenario where this rail can be switched off is part of Power on >> reset sequencing, but it needs to be kept always-on during operation. >> >> This patch is required for proper functionality of USB, SATA >> and PCIe on DRA7-evm. >> >> CC: Rajendra Nayak <rnayak@ti.com> >> CC: Tero Kristo <t-kristo@ti.com> >> Signed-off-by: Roger Quadros <rogerq@ti.com> > > Best that you queue this with the series: This patch doesn't have any dependency with the others and we're not even sure if this series will hit 3.16. But this 1V8 regulator _is_ required for normal operation of the SoC, whether the PHYs are in use or not. Can you please queue just this patch for SoC fixes for 3.16? Thanks. cheers, -roger > > Acked-by: Tony Lindgren <tony@atomide.com> > >> --- >> arch/arm/boot/dts/dra7-evm.dts | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts >> index 4adc280..8308954 100644 >> --- a/arch/arm/boot/dts/dra7-evm.dts >> +++ b/arch/arm/boot/dts/dra7-evm.dts >> @@ -240,6 +240,7 @@ >> regulator-name = "ldo3"; >> regulator-min-microvolt = <1800000>; >> regulator-max-microvolt = <1800000>; >> + regulator-always-on; >> regulator-boot-on; >> }; >> >> -- >> 1.8.3.2 >> ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on 2014-07-07 8:34 ` Roger Quadros @ 2014-07-07 8:44 ` Tony Lindgren 0 siblings, 0 replies; 12+ messages in thread From: Tony Lindgren @ 2014-07-07 8:44 UTC (permalink / raw) To: Roger Quadros Cc: kishon, balbi, nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Rajendra Nayak, Tero Kristo * Roger Quadros <rogerq@ti.com> [140707 01:36]: > Hi Tony, > > On 07/07/2014 11:29 AM, Tony Lindgren wrote: > > * Roger Quadros <rogerq@ti.com> [140704 02:57]: > >> After clarification from the hardware team it was found that > >> this 1.8V PHY supply can't be switched OFF when SoC is Active. > >> > >> Since the PHY IPs don't contain isolation logic built in the design to > >> allow the power rail to be switched off, there is a very high risk > >> of IP reliability and additional leakage paths which can result in > >> additional power consumption. > >> > >> The only scenario where this rail can be switched off is part of Power on > >> reset sequencing, but it needs to be kept always-on during operation. > >> > >> This patch is required for proper functionality of USB, SATA > >> and PCIe on DRA7-evm. > >> > >> CC: Rajendra Nayak <rnayak@ti.com> > >> CC: Tero Kristo <t-kristo@ti.com> > >> Signed-off-by: Roger Quadros <rogerq@ti.com> > > > > Best that you queue this with the series: > > This patch doesn't have any dependency with the others and we're not even sure if > this series will hit 3.16. > > But this 1V8 regulator _is_ required for normal operation of the SoC, whether the > PHYs are in use or not. > > Can you please queue just this patch for SoC fixes for 3.16? Thanks. OK will do. Regards, Tony ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/6] phy: core: Fix error path in phy_create() 2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros 2014-07-04 9:55 ` [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros @ 2014-07-04 9:55 ` Roger Quadros 2014-07-04 9:55 ` [PATCH v2 3/6] phy: core: Support regulator supply for PHY power Roger Quadros ` (3 subsequent siblings) 5 siblings, 0 replies; 12+ messages in thread From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Roger Quadros Prevent resources from being freed twice in case device_add() call fails within phy_create(). Also use ida_simple_remove() instead of ida_remove() as we had used ida_simple_get() to allocate the ida. Signed-off-by: Roger Quadros <rogerq@ti.com> --- drivers/phy/phy-core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index c64a2f3..49c4465 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -614,8 +614,9 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops, return phy; put_dev: - put_device(&phy->dev); - ida_remove(&phy_ida, phy->id); + put_device(&phy->dev); /* calls phy_release() which frees resources */ + return ERR_PTR(ret); + free_phy: kfree(phy); return ERR_PTR(ret); @@ -799,7 +800,7 @@ static void phy_release(struct device *dev) phy = to_phy(dev); dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); - ida_remove(&phy_ida, phy->id); + ida_simple_remove(&phy_ida, phy->id); kfree(phy); } -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 3/6] phy: core: Support regulator supply for PHY power 2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros 2014-07-04 9:55 ` [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros 2014-07-04 9:55 ` [PATCH v2 2/6] phy: core: Fix error path in phy_create() Roger Quadros @ 2014-07-04 9:55 ` Roger Quadros 2014-07-04 9:55 ` [PATCH v2 4/6] phy: core: Add phy-supply to DT binding documentation Roger Quadros ` (2 subsequent siblings) 5 siblings, 0 replies; 12+ messages in thread From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Roger Quadros Some PHYs can be powered by an external power regulator. e.g. USB_HS PHY on DRA7 SoC. Make the PHY core support a power regulator. Signed-off-by: Roger Quadros <rogerq@ti.com> --- drivers/phy/phy-core.c | 26 ++++++++++++++++++++++++++ include/linux/phy/phy.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 49c4465..75c9739 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -21,6 +21,7 @@ #include <linux/phy/phy.h> #include <linux/idr.h> #include <linux/pm_runtime.h> +#include <linux/regulator/consumer.h> static struct class *phy_class; static DEFINE_MUTEX(phy_provider_mutex); @@ -226,6 +227,12 @@ int phy_power_on(struct phy *phy) if (!phy) return 0; + if (phy->pwr) { + ret = regulator_enable(phy->pwr); + if (ret) + return ret; + } + ret = phy_pm_runtime_get_sync(phy); if (ret < 0 && ret != -ENOTSUPP) return ret; @@ -247,6 +254,8 @@ int phy_power_on(struct phy *phy) out: mutex_unlock(&phy->mutex); phy_pm_runtime_put_sync(phy); + if (phy->pwr) + regulator_disable(phy->pwr); return ret; } @@ -272,6 +281,9 @@ int phy_power_off(struct phy *phy) mutex_unlock(&phy->mutex); phy_pm_runtime_put(phy); + if (phy->pwr) + regulator_disable(phy->pwr); + return 0; } EXPORT_SYMBOL_GPL(phy_power_off); @@ -588,6 +600,16 @@ struct phy *phy_create(struct device *dev, const struct phy_ops *ops, goto free_phy; } + /* phy-supply */ + phy->pwr = regulator_get_optional(dev, "phy"); + if (IS_ERR(phy->pwr)) { + if (PTR_ERR(phy->pwr) == -EPROBE_DEFER) { + ret = -EPROBE_DEFER; + goto free_ida; + } + phy->pwr = NULL; + } + device_initialize(&phy->dev); mutex_init(&phy->mutex); @@ -617,6 +639,9 @@ put_dev: put_device(&phy->dev); /* calls phy_release() which frees resources */ return ERR_PTR(ret); +free_ida: + ida_simple_remove(&phy_ida, phy->id); + free_phy: kfree(phy); return ERR_PTR(ret); @@ -800,6 +825,7 @@ static void phy_release(struct device *dev) phy = to_phy(dev); dev_vdbg(dev, "releasing '%s'\n", dev_name(dev)); + regulator_put(phy->pwr); ida_simple_remove(&phy_ida, phy->id); kfree(phy); } diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h index 2760744..9a86945 100644 --- a/include/linux/phy/phy.h +++ b/include/linux/phy/phy.h @@ -18,6 +18,7 @@ #include <linux/of.h> #include <linux/device.h> #include <linux/pm_runtime.h> +#include <linux/regulator/consumer.h> struct phy; @@ -65,6 +66,7 @@ struct phy { int init_count; int power_count; struct phy_attrs attrs; + struct regulator *pwr; }; /** -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 4/6] phy: core: Add phy-supply to DT binding documentation 2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros ` (2 preceding siblings ...) 2014-07-04 9:55 ` [PATCH v2 3/6] phy: core: Support regulator supply for PHY power Roger Quadros @ 2014-07-04 9:55 ` Roger Quadros 2014-07-04 9:55 ` [PATCH v2 5/6] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove Roger Quadros 2014-07-04 9:55 ` [PATCH v2 6/6] ARM: dts: dra7-evm: Add regulator information to USB2 PHYs Roger Quadros 5 siblings, 0 replies; 12+ messages in thread From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Roger Quadros phy-supply is a phandle to the regulator that provides power to the PHY. This regulator is managed during the PHY power on/off sequence by the phy core driver. Signed-off-by: Roger Quadros <rogerq@ti.com> --- Documentation/devicetree/bindings/phy/phy-bindings.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt b/Documentation/devicetree/bindings/phy/phy-bindings.txt index 8ae844f..2aa1840 100644 --- a/Documentation/devicetree/bindings/phy/phy-bindings.txt +++ b/Documentation/devicetree/bindings/phy/phy-bindings.txt @@ -10,6 +10,10 @@ Required Properties: provider can use the values in cells to find the appropriate PHY. +Optional Properties: +phy-supply: Phandle to a regulator that provides power to the PHY. This + regulator will be managed during the PHY power on/off sequence. + For example: phys: phy { -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 5/6] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove 2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros ` (3 preceding siblings ...) 2014-07-04 9:55 ` [PATCH v2 4/6] phy: core: Add phy-supply to DT binding documentation Roger Quadros @ 2014-07-04 9:55 ` Roger Quadros 2014-07-04 9:55 ` [PATCH v2 6/6] ARM: dts: dra7-evm: Add regulator information to USB2 PHYs Roger Quadros 5 siblings, 0 replies; 12+ messages in thread From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Roger Quadros If probe fails then we need to call pm_runtime_disable() to balance out the previous pm_runtime_enable() call. Else it will cause unbalanced pm_runtime_enable() call in the succeding probe call. This anomaly was observed when the call to devm_phy_create() failed with -EPROBE_DEFER. Balance out the pm_runtime_enable() call in .remove() as well. Signed-off-by: Roger Quadros <rogerq@ti.com> --- drivers/phy/phy-omap-usb2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c index 7007c11..3a1d00e 100644 --- a/drivers/phy/phy-omap-usb2.c +++ b/drivers/phy/phy-omap-usb2.c @@ -262,7 +262,6 @@ static int omap_usb2_probe(struct platform_device *pdev) otg->phy = &phy->phy; platform_set_drvdata(pdev, phy); - pm_runtime_enable(phy->dev); generic_phy = devm_phy_create(phy->dev, &ops, NULL); if (IS_ERR(generic_phy)) @@ -270,10 +269,13 @@ static int omap_usb2_probe(struct platform_device *pdev) phy_set_drvdata(generic_phy, phy); + pm_runtime_enable(phy->dev); phy_provider = devm_of_phy_provider_register(phy->dev, of_phy_simple_xlate); - if (IS_ERR(phy_provider)) + if (IS_ERR(phy_provider)) { + pm_runtime_disable(phy->dev); return PTR_ERR(phy_provider); + } phy->wkupclk = devm_clk_get(phy->dev, "wkupclk"); if (IS_ERR(phy->wkupclk)) { @@ -317,6 +319,7 @@ static int omap_usb2_remove(struct platform_device *pdev) if (!IS_ERR(phy->optclk)) clk_unprepare(phy->optclk); usb_remove_phy(&phy->phy); + pm_runtime_disable(phy->dev); return 0; } -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 6/6] ARM: dts: dra7-evm: Add regulator information to USB2 PHYs 2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros ` (4 preceding siblings ...) 2014-07-04 9:55 ` [PATCH v2 5/6] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove Roger Quadros @ 2014-07-04 9:55 ` Roger Quadros 2014-07-07 8:29 ` Tony Lindgren 5 siblings, 1 reply; 12+ messages in thread From: Roger Quadros @ 2014-07-04 9:55 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel, Roger Quadros The ldousb_reg regulator provides power to the USB1 and USB2 High Speed PHYs. Signed-off-by: Roger Quadros <rogerq@ti.com> --- arch/arm/boot/dts/dra7-evm.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 8308954..50f8022 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -496,3 +496,11 @@ }; }; }; + +&usb2_phy1 { + phy-supply = <&ldousb_reg>; +}; + +&usb2_phy2 { + phy-supply = <&ldousb_reg>; +}; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 6/6] ARM: dts: dra7-evm: Add regulator information to USB2 PHYs 2014-07-04 9:55 ` [PATCH v2 6/6] ARM: dts: dra7-evm: Add regulator information to USB2 PHYs Roger Quadros @ 2014-07-07 8:29 ` Tony Lindgren 0 siblings, 0 replies; 12+ messages in thread From: Tony Lindgren @ 2014-07-07 8:29 UTC (permalink / raw) To: Roger Quadros Cc: kishon, balbi, nsekhar, nm, george.cherian, sergei.shtylyov, linux-omap, linux-usb, linux-kernel * Roger Quadros <rogerq@ti.com> [140704 02:58]: > The ldousb_reg regulator provides power to the USB1 and USB2 > High Speed PHYs. > > Signed-off-by: Roger Quadros <rogerq@ti.com> This too: Acked-by: Tony Lindgren <tony@atomide.com> > --- > arch/arm/boot/dts/dra7-evm.dts | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts > index 8308954..50f8022 100644 > --- a/arch/arm/boot/dts/dra7-evm.dts > +++ b/arch/arm/boot/dts/dra7-evm.dts > @@ -496,3 +496,11 @@ > }; > }; > }; > + > +&usb2_phy1 { > + phy-supply = <&ldousb_reg>; > +}; > + > +&usb2_phy2 { > + phy-supply = <&ldousb_reg>; > +}; > -- > 1.8.3.2 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/6] omap: phy: dra7-evm PHY fixes for 3.16 @ 2014-07-02 12:03 Roger Quadros 2014-07-02 12:03 ` [PATCH 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros 0 siblings, 1 reply; 12+ messages in thread From: Roger Quadros @ 2014-07-02 12:03 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, linux-omap, linux-usb, linux-kernel, Roger Quadros Hi, On DRA7-evm, the VDDA_1V8_PHY supply must be always-on for proper functioning of the PHYs on the SoC. The 3.3V USB supply (ldousb_reg) can be turned OFF when the High Speed USB PHYs are not in use. We add regulator support in the PHY framework core to manage the PHY's regulator during PHY power on/off. Finally we add the 3.3V regulator information to the USB2 PHYs. This series should get the USB and SATA working again on 3.16 on DRA7-evm. cheers, -roger --- Roger Quadros (6): ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on phy: core: Fix error path in phy_create() phy: core: Support regulator supply for PHY power phy: core: Add phy-supply to DT binding documentation phy: omap-usb2: Balance pm_runtime_enable() on probe failure ARM: dts: dra7-evm: Add regulator information to USB2 PHYs .../devicetree/bindings/phy/phy-bindings.txt | 4 +++ arch/arm/boot/dts/dra7-evm.dts | 9 +++++ drivers/phy/phy-core.c | 39 ++++++++++++++++++++-- drivers/phy/phy-omap-usb2.c | 8 +++-- include/linux/phy/phy.h | 2 ++ 5 files changed, 57 insertions(+), 5 deletions(-) -- 1.8.3.2 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on 2014-07-02 12:03 [PATCH 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros @ 2014-07-02 12:03 ` Roger Quadros 2014-07-03 9:40 ` [PATCH v2 " Roger Quadros 0 siblings, 1 reply; 12+ messages in thread From: Roger Quadros @ 2014-07-02 12:03 UTC (permalink / raw) To: tony, kishon, balbi Cc: nsekhar, nm, george.cherian, linux-omap, linux-usb, linux-kernel, Roger Quadros, Rajendra Nayak, Tero Kristo After clarification from the hardware team it was found that this 1.8V PHY supply can't be switched OFF when SoC is Active. It can only be switched off when in PORz (power on reset). This patch is required for proper functionality of USB, SATA and PCIe on DRA7-evm. CC: Rajendra Nayak <rnayak@ti.com> CC: Tero Kristo <t-kristo@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com> --- arch/arm/boot/dts/dra7-evm.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 4adc280..8308954 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -240,6 +240,7 @@ regulator-name = "ldo3"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; }; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on 2014-07-02 12:03 ` [PATCH 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros @ 2014-07-03 9:40 ` Roger Quadros 0 siblings, 0 replies; 12+ messages in thread From: Roger Quadros @ 2014-07-03 9:40 UTC (permalink / raw) To: tony, kishon, balbi, nm Cc: nsekhar, george.cherian, linux-omap, linux-usb, linux-kernel, Rajendra Nayak, Tero Kristo From: Roger Quadros <rogerq@ti.com> After clarification from the hardware team it was found that this 1.8V PHY supply can't be switched OFF when SoC is Active. Since the PHY IPs don't contain isolation logic built in the design to allow the power rail to be switched off, there is a very high risk of IP reliability and additional leakage paths which can result in additional power consumption. The only scenario where this rail can be switched off is part of Power on reset sequencing, but it needs to be kept always-on during operation. This patch is required for proper functionality of USB, SATA and PCIe on DRA7-evm. CC: Rajendra Nayak <rnayak@ti.com> CC: Tero Kristo <t-kristo@ti.com> Signed-off-by: Roger Quadros <rogerq@ti.com> --- arch/arm/boot/dts/dra7-evm.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/dra7-evm.dts b/arch/arm/boot/dts/dra7-evm.dts index 4adc280..8308954 100644 --- a/arch/arm/boot/dts/dra7-evm.dts +++ b/arch/arm/boot/dts/dra7-evm.dts @@ -240,6 +240,7 @@ regulator-name = "ldo3"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; + regulator-always-on; regulator-boot-on; }; -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-07-07 8:44 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04 9:55 [PATCH v2 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros
2014-07-04 9:55 ` [PATCH v2 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros
[not found] ` <1404467748-12154-2-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-07-07 8:29 ` Tony Lindgren
2014-07-07 8:34 ` Roger Quadros
2014-07-07 8:44 ` Tony Lindgren
2014-07-04 9:55 ` [PATCH v2 2/6] phy: core: Fix error path in phy_create() Roger Quadros
2014-07-04 9:55 ` [PATCH v2 3/6] phy: core: Support regulator supply for PHY power Roger Quadros
2014-07-04 9:55 ` [PATCH v2 4/6] phy: core: Add phy-supply to DT binding documentation Roger Quadros
2014-07-04 9:55 ` [PATCH v2 5/6] phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove Roger Quadros
2014-07-04 9:55 ` [PATCH v2 6/6] ARM: dts: dra7-evm: Add regulator information to USB2 PHYs Roger Quadros
2014-07-07 8:29 ` Tony Lindgren
-- strict thread matches above, loose matches on Subject: below --
2014-07-02 12:03 [PATCH 0/6] omap: phy: dra7-evm PHY fixes for 3.16 Roger Quadros
2014-07-02 12:03 ` [PATCH 1/6] ARM: dts: dra7-evm: Make VDDA_1V8_PHY supply always on Roger Quadros
2014-07-03 9:40 ` [PATCH v2 " Roger Quadros
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).