* [PATCH 0/4] the fix for the USB HOST1 at rk3288 platform
@ 2016-09-08 14:27 ` Randy Li
0 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-09-08 14:27 UTC (permalink / raw)
To: linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li,
Randy Li
At this stage it is the only "full features" and well verified
USB EHCI controller in this platform. More review is always necessary.
Changelog:
- v7:
adding a wrapper for the reset operation for phy
using that wrapper
- v6:
move pwms pinctrl to pwms node
fix the order of the dtb file in Makefile
- v5:
- correct the mail format
- v4:
- re-order some nodes in alphabetical order
- fix some minor bugs
- add a entry in vendor list
- v3:
- fixing the rtc clock, using clock source from PMIC
- enable the tmu
- enable the fimc for elite board
- suuport the audio codec at elite board
- fixing minor bugs in the last commit
- v2:
- removing rtc node
the clock source driver is not done yet.
- adding exynos-bus
- fixing the MFC
Randy Li (4):
phy: Add reset callback
phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during
wakeup
usb: dwc2: assert phy reset when waking up in rk3288 platform
ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
.../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
arch/arm/boot/dts/rk3288.dtsi | 4 ++++
drivers/phy/phy-core.c | 14 ++++++++++++++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
drivers/usb/dwc2/core_intr.c | 11 +++++++++++
include/linux/phy/phy.h | 3 +++
6 files changed, 55 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 0/4] the fix for the USB HOST1 at rk3288 platform
@ 2016-09-08 14:27 ` Randy Li
0 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-09-08 14:27 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: John.Youn-HKixBCOQz3hWk0Htik3J/w, kishon-l0cyMroinI0,
felipe.balbi-VuQAYsv1563Yd54FQh9/CA, mark.rutland-5wv7dgnIgG8,
devicetree-u79uwXL29TY76Z2rM5mHXA, heiko-4mtYJXux2i+zQB+pC5nmwQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, randy.li-TNX95d0MmH7DzftRWevZcw,
Randy Li
At this stage it is the only "full features" and well verified
USB EHCI controller in this platform. More review is always necessary.
Changelog:
- v7:
adding a wrapper for the reset operation for phy
using that wrapper
- v6:
move pwms pinctrl to pwms node
fix the order of the dtb file in Makefile
- v5:
- correct the mail format
- v4:
- re-order some nodes in alphabetical order
- fix some minor bugs
- add a entry in vendor list
- v3:
- fixing the rtc clock, using clock source from PMIC
- enable the tmu
- enable the fimc for elite board
- suuport the audio codec at elite board
- fixing minor bugs in the last commit
- v2:
- removing rtc node
the clock source driver is not done yet.
- adding exynos-bus
- fixing the MFC
Randy Li (4):
phy: Add reset callback
phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during
wakeup
usb: dwc2: assert phy reset when waking up in rk3288 platform
ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
.../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
arch/arm/boot/dts/rk3288.dtsi | 4 ++++
drivers/phy/phy-core.c | 14 ++++++++++++++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
drivers/usb/dwc2/core_intr.c | 11 +++++++++++
include/linux/phy/phy.h | 3 +++
6 files changed, 55 insertions(+)
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 20+ messages in thread
* [PATCH 1/4] phy: Add reset callback
2016-09-08 14:27 ` Randy Li
(?)
@ 2016-09-08 14:27 ` Randy Li
2016-09-08 15:30 ` Heiko Stuebner
-1 siblings, 1 reply; 20+ messages in thread
From: Randy Li @ 2016-09-08 14:27 UTC (permalink / raw)
To: linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li,
Randy Li
The only use for this is for solving a hardware design problem in
usb of Rockchip RK3288.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
drivers/phy/phy-core.c | 14 ++++++++++++++
include/linux/phy/phy.h | 3 +++
2 files changed, 17 insertions(+)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 8eca906..32e838d 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -357,6 +357,20 @@ int phy_set_mode(struct phy *phy, enum phy_mode mode)
}
EXPORT_SYMBOL_GPL(phy_set_mode);
+int phy_reset(struct phy *phy)
+{
+ int ret;
+ if (!phy || !phy->ops->reset)
+ return 0;
+
+ mutex_lock(&phy->mutex);
+ ret = phy->ops->reset(phy);
+ mutex_unlock(&phy->mutex);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(phy_reset);
+
/**
* _of_phy_get() - lookup and obtain a reference to a phy by phandle
* @np: device_node for which to get the phy
diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
index f08b672..7978df6 100644
--- a/include/linux/phy/phy.h
+++ b/include/linux/phy/phy.h
@@ -36,6 +36,7 @@ enum phy_mode {
* @power_on: powering on the phy
* @power_off: powering off the phy
* @set_mode: set the mode of the phy
+ * @reset: reseting the phy
* @owner: the module owner containing the ops
*/
struct phy_ops {
@@ -44,6 +45,7 @@ struct phy_ops {
int (*power_on)(struct phy *phy);
int (*power_off)(struct phy *phy);
int (*set_mode)(struct phy *phy, enum phy_mode mode);
+ int (*reset)(struct phy *phy);
struct module *owner;
};
@@ -136,6 +138,7 @@ int phy_exit(struct phy *phy);
int phy_power_on(struct phy *phy);
int phy_power_off(struct phy *phy);
int phy_set_mode(struct phy *phy, enum phy_mode mode);
+int phy_reset(struct phy *phy);
static inline int phy_get_bus_width(struct phy *phy)
{
return phy->attrs.bus_width;
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 1/4] phy: Add reset callback
2016-09-08 14:27 ` [PATCH 1/4] phy: Add reset callback Randy Li
@ 2016-09-08 15:30 ` Heiko Stuebner
0 siblings, 0 replies; 20+ messages in thread
From: Heiko Stuebner @ 2016-09-08 15:30 UTC (permalink / raw)
To: Randy Li
Cc: linux-usb, John.Youn, kishon, felipe.balbi, mark.rutland,
devicetree, gregkh, linux-kernel, linux-rockchip, robh+dt,
randy.li
Am Donnerstag, 8. September 2016, 22:27:13 CEST schrieb Randy Li:
> The only use for this is for solving a hardware design problem in
> usb of Rockchip RK3288.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
to me this looks good.
Although Kishon suggested earlier to have the init callback do the reset and
simply call it again in the reset-case, the whole refcounting done in phy_init
and phy_exit (phy->init_count) really shows that init and exit should be
called pairwise, so that extra reset callback seems justified, so from my phy-
noob-pov
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
with one minor style nitpick below
> ---
> drivers/phy/phy-core.c | 14 ++++++++++++++
> include/linux/phy/phy.h | 3 +++
> 2 files changed, 17 insertions(+)
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index 8eca906..32e838d 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -357,6 +357,20 @@ int phy_set_mode(struct phy *phy, enum phy_mode mode)
> }
> EXPORT_SYMBOL_GPL(phy_set_mode);
>
> +int phy_reset(struct phy *phy)
> +{
> + int ret;
I think a blank line between declarations and code is customary.
> + if (!phy || !phy->ops->reset)
> + return 0;
> +
> + mutex_lock(&phy->mutex);
> + ret = phy->ops->reset(phy);
> + mutex_unlock(&phy->mutex);
> +
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(phy_reset);
> +
> /**
> * _of_phy_get() - lookup and obtain a reference to a phy by phandle
> * @np: device_node for which to get the phy
Heiko
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
2016-09-08 14:27 ` Randy Li
(?)
(?)
@ 2016-09-08 14:27 ` Randy Li
-1 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-09-08 14:27 UTC (permalink / raw)
To: linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li,
Randy Li
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
.../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
index cc6be96..57dc388 100644
--- a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
@@ -27,6 +27,9 @@ Optional Properties:
- clocks : phandle + clock specifier for the phy clocks
- clock-names: string, clock name, must be "phyclk"
- #clock-cells: for users of the phy-pll, should be 0
+- reset-names: Only allow the following entries:
+ - phy-reset
+- resets: Must contain an entry for each entry in reset-names.
Example:
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 2a7381f..734987f 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -29,6 +29,7 @@
#include <linux/reset.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
+#include <linux/delay.h>
static int enable_usb_uart;
@@ -64,6 +65,7 @@ struct rockchip_usb_phy {
struct clk_hw clk480m_hw;
struct phy *phy;
bool uart_enabled;
+ struct reset_control *reset;
};
static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
@@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
return clk_prepare_enable(phy->clk480m);
}
+static int rockchip_usb_phy_reset(struct phy *_phy)
+{
+ struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
+
+ if (phy->reset) {
+ reset_control_assert(phy->reset);
+ udelay(10);
+ reset_control_deassert(phy->reset);
+ }
+
+ return 0;
+}
+
static const struct phy_ops ops = {
.power_on = rockchip_usb_phy_power_on,
.power_off = rockchip_usb_phy_power_off,
+ .reset = rockchip_usb_phy_reset,
.owner = THIS_MODULE,
};
@@ -185,6 +201,10 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base,
return -EINVAL;
}
+ rk_phy->reset = of_reset_control_get(child, "phy-reset");
+ if (IS_ERR(rk_phy->reset))
+ rk_phy->reset = NULL;
+
rk_phy->reg_offset = reg_offset;
rk_phy->clk = of_clk_get_by_name(child, "phyclk");
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform
2016-09-08 14:27 ` Randy Li
` (2 preceding siblings ...)
(?)
@ 2016-09-08 14:27 ` Randy Li
2016-09-08 18:09 ` John Youn
-1 siblings, 1 reply; 20+ messages in thread
From: Randy Li @ 2016-09-08 14:27 UTC (permalink / raw)
To: linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li,
Randy Li
On the rk3288 USB host-only port (the one that's not the OTG-enabled
port) the PHY can get into a bad state when a wakeup is asserted (not
just a wakeup from full system suspend but also a wakeup from
autosuspend).
We can get the PHY out of its bad state by asserting its "port reset",
but unfortunately that seems to assert a reset onto the USB bus so it
could confuse things if we don't actually deenumerate / reenumerate the
device.
We can also get the PHY out of its bad state by fully resetting it using
the reset from the CRU (clock reset unit) in chip, which does a more full
reset. The CRU-based reset appears to actually cause devices on the bus
to be removed and reinserted, which fixes the problem (albeit in a hacky
way).
It's unfortunate that we need to do a full re-enumeration of devices at
wakeup time, but this is better than alternative of letting the bus get
wedged.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
drivers/usb/dwc2/core_intr.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index d85c5c9..5b9b671 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -345,6 +345,7 @@ static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg)
static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
{
int ret;
+ struct device_node *np = hsotg->dev->of_node;
/* Clear interrupt */
dwc2_writel(GINTSTS_WKUPINT, hsotg->regs + GINTSTS);
@@ -379,6 +380,16 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
/* Restart the Phy Clock */
pcgcctl &= ~PCGCTL_STOPPCLK;
dwc2_writel(pcgcctl, hsotg->regs + PCGCTL);
+
+ /*
+ * It is a quirk in Rockchip RK3288, causing by
+ * a hardware bug. This will propagate out and
+ * eventually we'll re-enumerate the device.
+ * Not great but the best we can do
+ */
+ if (of_device_is_compatible(np, "rockchip,rk3288-usb"))
+ phy_reset(hsotg->phy);
+
mod_timer(&hsotg->wkp_timer,
jiffies + msecs_to_jiffies(71));
} else {
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform
2016-09-08 14:27 ` [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Randy Li
@ 2016-09-08 18:09 ` John Youn
0 siblings, 0 replies; 20+ messages in thread
From: John Youn @ 2016-09-08 18:09 UTC (permalink / raw)
To: Randy Li, linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li
On 9/8/2016 7:27 AM, Randy Li wrote:
> On the rk3288 USB host-only port (the one that's not the OTG-enabled
> port) the PHY can get into a bad state when a wakeup is asserted (not
> just a wakeup from full system suspend but also a wakeup from
> autosuspend).
>
> We can get the PHY out of its bad state by asserting its "port reset",
> but unfortunately that seems to assert a reset onto the USB bus so it
> could confuse things if we don't actually deenumerate / reenumerate the
> device.
>
> We can also get the PHY out of its bad state by fully resetting it using
> the reset from the CRU (clock reset unit) in chip, which does a more full
> reset. The CRU-based reset appears to actually cause devices on the bus
> to be removed and reinserted, which fixes the problem (albeit in a hacky
> way).
>
> It's unfortunate that we need to do a full re-enumeration of devices at
> wakeup time, but this is better than alternative of letting the bus get
> wedged.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> drivers/usb/dwc2/core_intr.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
> index d85c5c9..5b9b671 100644
> --- a/drivers/usb/dwc2/core_intr.c
> +++ b/drivers/usb/dwc2/core_intr.c
> @@ -345,6 +345,7 @@ static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg)
> static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
> {
> int ret;
> + struct device_node *np = hsotg->dev->of_node;
>
> /* Clear interrupt */
> dwc2_writel(GINTSTS_WKUPINT, hsotg->regs + GINTSTS);
> @@ -379,6 +380,16 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
> /* Restart the Phy Clock */
> pcgcctl &= ~PCGCTL_STOPPCLK;
> dwc2_writel(pcgcctl, hsotg->regs + PCGCTL);
> +
> + /*
> + * It is a quirk in Rockchip RK3288, causing by
> + * a hardware bug. This will propagate out and
> + * eventually we'll re-enumerate the device.
> + * Not great but the best we can do
Hi Randy,
Please run ./scripts/checkpatch.pl on your patches and fix trailing
whitespace in above two lines.
Thanks,
John
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform
@ 2016-09-08 18:09 ` John Youn
0 siblings, 0 replies; 20+ messages in thread
From: John Youn @ 2016-09-08 18:09 UTC (permalink / raw)
To: Randy Li, linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li
On 9/8/2016 7:27 AM, Randy Li wrote:
> On the rk3288 USB host-only port (the one that's not the OTG-enabled
> port) the PHY can get into a bad state when a wakeup is asserted (not
> just a wakeup from full system suspend but also a wakeup from
> autosuspend).
>
> We can get the PHY out of its bad state by asserting its "port reset",
> but unfortunately that seems to assert a reset onto the USB bus so it
> could confuse things if we don't actually deenumerate / reenumerate the
> device.
>
> We can also get the PHY out of its bad state by fully resetting it using
> the reset from the CRU (clock reset unit) in chip, which does a more full
> reset. The CRU-based reset appears to actually cause devices on the bus
> to be removed and reinserted, which fixes the problem (albeit in a hacky
> way).
>
> It's unfortunate that we need to do a full re-enumeration of devices at
> wakeup time, but this is better than alternative of letting the bus get
> wedged.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> drivers/usb/dwc2/core_intr.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
> index d85c5c9..5b9b671 100644
> --- a/drivers/usb/dwc2/core_intr.c
> +++ b/drivers/usb/dwc2/core_intr.c
> @@ -345,6 +345,7 @@ static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg)
> static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
> {
> int ret;
> + struct device_node *np = hsotg->dev->of_node;
>
> /* Clear interrupt */
> dwc2_writel(GINTSTS_WKUPINT, hsotg->regs + GINTSTS);
> @@ -379,6 +380,16 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
> /* Restart the Phy Clock */
> pcgcctl &= ~PCGCTL_STOPPCLK;
> dwc2_writel(pcgcctl, hsotg->regs + PCGCTL);
> +
> + /*
> + * It is a quirk in Rockchip RK3288, causing by
> + * a hardware bug. This will propagate out and
> + * eventually we'll re-enumerate the device.
> + * Not great but the best we can do
Hi Randy,
Please run ./scripts/checkpatch.pl on your patches and fix trailing
whitespace in above two lines.
Thanks,
John
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 4/4] ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
2016-09-08 14:27 ` Randy Li
` (3 preceding siblings ...)
(?)
@ 2016-09-08 14:27 ` Randy Li
-1 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-09-08 14:27 UTC (permalink / raw)
To: linux-usb
Cc: John.Youn, kishon, felipe.balbi, mark.rutland, devicetree, heiko,
gregkh, linux-kernel, linux-rockchip, robh+dt, randy.li,
Randy Li
The "host1" port (AKA the dwc2 port that isn't the OTG port) on rk3288
has a hardware errata that causes everything to get confused when we get
a remote wakeup. We'll use the reset that's in the CRU to reset the
port when it's in a bad state.
Note that we add the reset to both dwc2 controllers even though only one
has the errata in case we find some other use for this reset that's
unrelated to the current hardware errata. Only the host port gets the
quirk property, though.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
arch/arm/boot/dts/rk3288.dtsi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 17ec2e2..34de803 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -857,6 +857,8 @@
clocks = <&cru SCLK_OTGPHY0>;
clock-names = "phyclk";
#clock-cells = <0>;
+ resets = <&cru SRST_USBOTG_PHY>;
+ reset-names = "phy-reset";
};
usbphy1: usb-phy@334 {
@@ -873,6 +875,8 @@
clocks = <&cru SCLK_OTGPHY2>;
clock-names = "phyclk";
#clock-cells = <0>;
+ resets = <&cru SRST_USBHOST1_PHY>;
+ reset-names = "phy-reset";
};
};
};
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform
@ 2016-08-20 21:30 Sergei Shtylyov
2016-08-21 7:56 ` [PATCH 0/4 v5] usb: dwc2: fix the usb host for host port at RK32 Randy Li
0 siblings, 1 reply; 20+ messages in thread
From: Sergei Shtylyov @ 2016-08-20 21:30 UTC (permalink / raw)
To: Randy Li, linux-usb
Cc: johnyoun, gregkh, robh+dt, mark.rutland, devicetree, eddie.cai,
randy.li, kishon, linux-kernel, heiko
Hello.
On 08/20/2016 11:32 PM, Randy Li wrote:
> On the rk3288 USB host-only port (the one that's not the OTG-enabled
> port) the PHY can get into a bad state when a wakeup is asserted (not
> just a wakeup from full system suspend but also a wakeup from
> autosuspend).
>
> We can get the PHY out of its bad state by asserting its "port reset",
> but unfortunately that seems to assert a reset onto the USB bus so it
> could confuse things if we don't actually deenumerate / reenumerate the
> device.
>
> We can also get the PHY out of its bad state by fully resetting it using
> the reset from the CRU (clock reset unit) in chip, which does a more full
> reset. The CRU-based reset appears to actually cause devices on the bus
> to be removed and reinserted, which fixes the problem (albeit in a hacky
> way).
>
> It's unfortunate that we need to do a full re-enumeration of devices at
> wakeup time, but this is better than alternative of letting the bus get
> wedged.
>
> The original patches came from Doug Anderson <dianders@chromium.org>.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> drivers/usb/dwc2/core_intr.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
> index d85c5c9..c31c3fe 100644
> --- a/drivers/usb/dwc2/core_intr.c
> +++ b/drivers/usb/dwc2/core_intr.c
[...]
> @@ -379,6 +380,14 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
> /* Restart the Phy Clock */
> pcgcctl &= ~PCGCTL_STOPPCLK;
> dwc2_writel(pcgcctl, hsotg->regs + PCGCTL);
> +
> + /* It is a quirk in Rockchip RK3288, causing by
> + * a hardware bug. This will propagate out and
> + * eventually we'll re-enumerate the device.
> + * Not great but the best we can do */
The preferred multi-line comment style is this:
/*
* bla
* bla
*/
Yours is close. :-)
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 0/4 v5] usb: dwc2: fix the usb host for host port at RK32
2016-08-20 21:30 [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Sergei Shtylyov
@ 2016-08-21 7:56 ` Randy Li
2016-08-21 7:56 ` Randy Li
0 siblings, 1 reply; 20+ messages in thread
From: Randy Li @ 2016-08-21 7:56 UTC (permalink / raw)
To: linux-usb
Cc: johnyoun, gregkh, robh+dt, mark.rutland, devicetree, eddie.cai,
randy.li, kishon, linux-kernel, heiko, linux-rockchip, Randy Li
Hello All:
This version would move reset into phy. I wanted to implement a hard
code version but I meet some problem with ioremap reset controller,
in order to keep my word, I offer this version this time.
Changelog:
v5
A few modification at style, add the missing doc in the last
commit.
v4
1. Adding the reset callback in struct phy_ops.
2. Moving the reset into phy rockchip usb.
3. Trying to call a reset when dwc2 wakeup in rk3288.
v3
Rebased from previous commit.
Randy Li (4):
phy: Add reset callback
phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during
wakeup
usb: dwc2: assert phy reset when waking up in rk3288 platform
ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
arch/arm/boot/dts/rk3288.dtsi | 5 +++++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
drivers/usb/dwc2/core_intr.c | 9 +++++++++
include/linux/phy/phy.h | 2 ++
4 files changed, 36 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-21 7:56 ` Randy Li
0 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-08-21 7:56 UTC (permalink / raw)
To: linux-usb
Cc: johnyoun, gregkh, robh+dt, mark.rutland, devicetree, eddie.cai,
randy.li, kishon, linux-kernel, heiko, linux-rockchip, Randy Li
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
.../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
index cc6be96..57dc388 100644
--- a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
@@ -27,6 +27,9 @@ Optional Properties:
- clocks : phandle + clock specifier for the phy clocks
- clock-names: string, clock name, must be "phyclk"
- #clock-cells: for users of the phy-pll, should be 0
+- reset-names: Only allow the following entries:
+ - phy-reset
+- resets: Must contain an entry for each entry in reset-names.
Example:
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 2a7381f..734987f 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -29,6 +29,7 @@
#include <linux/reset.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
+#include <linux/delay.h>
static int enable_usb_uart;
@@ -64,6 +65,7 @@ struct rockchip_usb_phy {
struct clk_hw clk480m_hw;
struct phy *phy;
bool uart_enabled;
+ struct reset_control *reset;
};
static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
@@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
return clk_prepare_enable(phy->clk480m);
}
+static int rockchip_usb_phy_reset(struct phy *_phy)
+{
+ struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
+
+ if (phy->reset) {
+ reset_control_assert(phy->reset);
+ udelay(10);
+ reset_control_deassert(phy->reset);
+ }
+
+ return 0;
+}
+
static const struct phy_ops ops = {
.power_on = rockchip_usb_phy_power_on,
.power_off = rockchip_usb_phy_power_off,
+ .reset = rockchip_usb_phy_reset,
.owner = THIS_MODULE,
};
@@ -185,6 +201,10 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base,
return -EINVAL;
}
+ rk_phy->reset = of_reset_control_get(child, "phy-reset");
+ if (IS_ERR(rk_phy->reset))
+ rk_phy->reset = NULL;
+
rk_phy->reg_offset = reg_offset;
rk_phy->clk = of_clk_get_by_name(child, "phyclk");
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-21 7:56 ` Randy Li
0 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-08-21 7:56 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
heiko-4mtYJXux2i+zQB+pC5nmwQ, johnyoun-HKixBCOQz3hWk0Htik3J/w,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, Randy Li,
randy.li-TNX95d0MmH7DzftRWevZcw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, kishon-l0cyMroinI0,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, eddie.cai-TNX95d0MmH7DzftRWevZcw
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.
Signed-off-by: Randy Li <ayaka-xPW3/0Ywev/iB9QmIjCX8w@public.gmane.org>
---
.../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
index cc6be96..57dc388 100644
--- a/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
+++ b/Documentation/devicetree/bindings/phy/rockchip-usb-phy.txt
@@ -27,6 +27,9 @@ Optional Properties:
- clocks : phandle + clock specifier for the phy clocks
- clock-names: string, clock name, must be "phyclk"
- #clock-cells: for users of the phy-pll, should be 0
+- reset-names: Only allow the following entries:
+ - phy-reset
+- resets: Must contain an entry for each entry in reset-names.
Example:
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 2a7381f..734987f 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -29,6 +29,7 @@
#include <linux/reset.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
+#include <linux/delay.h>
static int enable_usb_uart;
@@ -64,6 +65,7 @@ struct rockchip_usb_phy {
struct clk_hw clk480m_hw;
struct phy *phy;
bool uart_enabled;
+ struct reset_control *reset;
};
static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
@@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
return clk_prepare_enable(phy->clk480m);
}
+static int rockchip_usb_phy_reset(struct phy *_phy)
+{
+ struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
+
+ if (phy->reset) {
+ reset_control_assert(phy->reset);
+ udelay(10);
+ reset_control_deassert(phy->reset);
+ }
+
+ return 0;
+}
+
static const struct phy_ops ops = {
.power_on = rockchip_usb_phy_power_on,
.power_off = rockchip_usb_phy_power_off,
+ .reset = rockchip_usb_phy_reset,
.owner = THIS_MODULE,
};
@@ -185,6 +201,10 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base,
return -EINVAL;
}
+ rk_phy->reset = of_reset_control_get(child, "phy-reset");
+ if (IS_ERR(rk_phy->reset))
+ rk_phy->reset = NULL;
+
rk_phy->reg_offset = reg_offset;
rk_phy->clk = of_clk_get_by_name(child, "phyclk");
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-23 17:53 ` Rob Herring
0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2016-08-23 17:53 UTC (permalink / raw)
To: Randy Li
Cc: linux-usb, johnyoun, gregkh, mark.rutland, devicetree, eddie.cai,
randy.li, kishon, linux-kernel, heiko, linux-rockchip
On Sun, Aug 21, 2016 at 03:56:43PM +0800, Randy Li wrote:
> It is a hardware bug in RK3288, the only way to solve it is to
> reset the phy.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> .../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
> drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
> 2 files changed, 23 insertions(+)
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-23 17:53 ` Rob Herring
0 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2016-08-23 17:53 UTC (permalink / raw)
To: Randy Li
Cc: mark.rutland-5wv7dgnIgG8, devicetree-u79uwXL29TY76Z2rM5mHXA,
heiko-4mtYJXux2i+zQB+pC5nmwQ, johnyoun-HKixBCOQz3hWk0Htik3J/w,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
randy.li-TNX95d0MmH7DzftRWevZcw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, kishon-l0cyMroinI0,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
eddie.cai-TNX95d0MmH7DzftRWevZcw
On Sun, Aug 21, 2016 at 03:56:43PM +0800, Randy Li wrote:
> It is a hardware bug in RK3288, the only way to solve it is to
> reset the phy.
>
> Signed-off-by: Randy Li <ayaka-xPW3/0Ywev/iB9QmIjCX8w@public.gmane.org>
> ---
> .../devicetree/bindings/phy/rockchip-usb-phy.txt | 3 +++
> drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
> 2 files changed, 23 insertions(+)
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 1/2] usb: dwc2: optionally assert phy "full reset" when waking up
@ 2016-08-16 2:33 John Youn
2016-08-20 20:32 ` [PATCH 0/4 v4] usb: dwc2: fix the usb host for host port at RK32 Randy Li
0 siblings, 1 reply; 20+ messages in thread
From: John Youn @ 2016-08-16 2:33 UTC (permalink / raw)
To: Randy Li, John Youn, linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
devicetree-u79uwXL29TY76Z2rM5mHXA, ayaka-xPW3/0Ywev/iB9QmIjCX8w,
eddie.cai-TNX95d0MmH7DzftRWevZcw
On 8/15/2016 6:11 PM, Randy Li wrote:
>
>
> On 08/16/2016 06:19 AM, John Youn wrote:
>> On 7/19/2016 5:06 AM, Randy Li wrote:
>>> From: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>>>
>>> On the rk3288 USB host-only port (the one that's not the OTG-enabled
>>> port) the PHY can get into a bad state when a wakeup is asserted (not
>>> just a wakeup from full system suspend but also a wakeup from
>>> autosuspend). The problem is caused by a design fault in IC, Rockchip
>>> have confirmed it and fix this problem in the future IC model.
>>>
>>> We can get the PHY out of its bad state by asserting its "port reset",
>>> but unfortunately that seems to assert a reset onto the USB bus so it
>>> could confuse things if we don't actually deenumerate / reenumerate the
>>> device.
>>>
>>> We can also get the PHY out of its bad state by fully resetting it using
>>> the reset from the CRU (clock reset unit), which does a more full
>>> reset. The CRU-based reset appears to actually cause devices on the bus
>>> to be removed and reinserted, which fixes the problem (albeit in a hacky
>>> way).
>>>
>>> It's unfortunate that we need to do a full re-enumeration of devices at
>>> wakeup time, but this is better than alternative of letting the bus get
>>> wedged.
>>>
>>> Signed-off-by: Douglas Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>>> Signed-off-by: Yunzhi Li <lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>> Reviewed-by: Randy Li <randy.li-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>>> ---
>>> Documentation/devicetree/bindings/usb/dwc2.txt | 7 +++++++
>>> drivers/usb/dwc2/core.h | 5 +++++
>>> drivers/usb/dwc2/core_intr.c | 14 ++++++++++++++
>>> drivers/usb/dwc2/platform.c | 13 +++++++++++++
>>> 4 files changed, 39 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
>>> index 20a68bf..40c63ae 100644
>>> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
>>> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
>>> @@ -20,6 +20,13 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties
>>> Optional properties:
>>> - phys: phy provider specifier
>>> - phy-names: shall be "usb2-phy"
>>> +- snps,need-phy-full-reset-on-wake: if present indicates that we need to reset
>>> + the PHY when we detect a wakeup due to a hardware errata. If present you
>>> + must specify a "phy-full-reset" reset.
>>> +
>>> +Resets:
>>> +- phy-full-reset (optional): Fully resets the PHY (Only used by rk3288 Soc).
>>> +
>>> Refer to phy/phy-bindings.txt for generic phy consumer properties
>>> - dr_mode: shall be one of "host", "peripheral" and "otg"
>>> Refer to usb/generic.txt
>>> diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
>>> index dec0b21..951abe0 100644
>>> --- a/drivers/usb/dwc2/core.h
>>> +++ b/drivers/usb/dwc2/core.h
>>> @@ -719,8 +719,11 @@ struct dwc2_hregs_backup {
>>> * @hcd_enabled Host mode sub-driver initialization indicator.
>>> * @gadget_enabled Peripheral mode sub-driver initialization indicator.
>>> * @ll_hw_enabled Status of low-level hardware resources.
>>> + * @need_phy_full_reset_on_wake: Quirk saying that we should assert
>>> + * phy_full_reset on a remote wakeup.
>>> * @phy: The otg phy transceiver structure for phy control.
>>> * @uphy: The otg phy transceiver structure for old USB phy control.
>>> + * @phy_full_reset: Reset control for the PHY's "full reset".
>>> * @plat: The platform specific configuration data. This can be removed once
>>> * all SoCs support usb transceiver.
>>> * @supplies: Definition of USB power supplies
>>> @@ -853,9 +856,11 @@ struct dwc2_hsotg {
>>> unsigned int hcd_enabled:1;
>>> unsigned int gadget_enabled:1;
>>> unsigned int ll_hw_enabled:1;
>>> + unsigned int need_phy_full_reset_on_wake:1;
>>>
>>> struct phy *phy;
>>> struct usb_phy *uphy;
>>> + struct reset_control *phy_full_reset;
>>> struct dwc2_hsotg_plat *plat;
>>> struct regulator_bulk_data supplies[ARRAY_SIZE(dwc2_hsotg_supply_names)];
>>> u32 phyif;
>>> diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
>>> index d85c5c9..53d8327 100644
>>> --- a/drivers/usb/dwc2/core_intr.c
>>> +++ b/drivers/usb/dwc2/core_intr.c
>>> @@ -45,6 +45,7 @@
>>> #include <linux/dma-mapping.h>
>>> #include <linux/io.h>
>>> #include <linux/slab.h>
>>> +#include <linux/reset.h>
>>> #include <linux/usb.h>
>>>
>>> #include <linux/usb/hcd.h>
>>> @@ -379,6 +380,19 @@ static void dwc2_handle_wakeup_detected_intr(struct dwc2_hsotg *hsotg)
>>> /* Restart the Phy Clock */
>>> pcgcctl &= ~PCGCTL_STOPPCLK;
>>> dwc2_writel(pcgcctl, hsotg->regs + PCGCTL);
>>> +
>>> + /*
>>> + * If we've got this quirk then the PHY is stuck upon
>>> + * wakeup. Assert reset. This will propagate out and
>>> + * eventually we'll re-enumerate the device. Not great
>>> + * but the best we can do.
>>> + */
>>> + if (hsotg->need_phy_full_reset_on_wake) {
>>> + reset_control_assert(hsotg->phy_full_reset);
>>> + udelay(50);
>>> + reset_control_deassert(hsotg->phy_full_reset);
>>> + }
>>> +
>>> mod_timer(&hsotg->wkp_timer,
>>> jiffies + msecs_to_jiffies(71));
>>> } else {
>>> diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c
>>> index fc6f525..d8894a1 100644
>>> --- a/drivers/usb/dwc2/platform.c
>>> +++ b/drivers/usb/dwc2/platform.c
>>> @@ -45,6 +45,7 @@
>>> #include <linux/platform_device.h>
>>> #include <linux/phy/phy.h>
>>> #include <linux/platform_data/s3c-hsotg.h>
>>> +#include <linux/reset.h>
>>>
>>> #include <linux/usb/of.h>
>>>
>>> @@ -529,6 +530,18 @@ static int dwc2_driver_probe(struct platform_device *dev)
>>> dev_dbg(&dev->dev, "mapped PA %08lx to VA %p\n",
>>> (unsigned long)res->start, hsotg->regs);
>>>
>>> + hsotg->need_phy_full_reset_on_wake =
>>> + of_property_read_bool(dev->dev.of_node,
>>> + "snps,need-phy-full-reset-on-wake");
>>> + hsotg->phy_full_reset = devm_reset_control_get(hsotg->dev,
>>> + "phy-full-reset");
>>> + if (IS_ERR(hsotg->phy_full_reset) &&
>>> + hsotg->need_phy_full_reset_on_wake) {
>>
>> Should use the devm_reset_control_get_optional() variant so that we
>> can check whether it is a legitimate error, or the PHY is not
>> specified or !CONFIG_OF.
> I see.
Just a correction, I meant in case the reset controller is unspecified
or !CONFIG_RESET_CONTROLLER.
>>
>>> + dev_warn(hsotg->dev, "Missing phy full reset (%ld); skipping\n",
>>> + PTR_ERR(hsotg->phy_full_reset));
>>> + hsotg->need_phy_full_reset_on_wake = false;
>>> + }
>>> +
>>
>> Also this code can go into the dwc2_lowlevel_hw_init() function so as
>> not to clutter up the probe() function futher.
>>
>> A similar patch adding a reset was submitted by Dinh which you can use
>> as a reference:
>>
>> http://marc.info/?l=linux-usb&m=147085447403019&w=2
>
> I am a little busy recently, but I would submit a new version in this week.
Ok sure.
Regards,
John
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 20+ messages in thread
* [PATCH 0/4 v4] usb: dwc2: fix the usb host for host port at RK32
2016-08-16 2:33 [PATCH 1/2] usb: dwc2: optionally assert phy "full reset" when waking up John Youn
@ 2016-08-20 20:32 ` Randy Li
2016-08-20 20:32 ` Randy Li
0 siblings, 1 reply; 20+ messages in thread
From: Randy Li @ 2016-08-20 20:32 UTC (permalink / raw)
To: linux-usb
Cc: johnyoun, gregkh, robh+dt, mark.rutland, devicetree, eddie.cai,
randy.li, kishon, linux-kernel, heiko, Randy Li
Hello All:
This version would move reset into phy. I wanted to implement a hard
code version but I meet some problem with ioremap reset controller,
in order to keep my word, I offer this version this time.
Randy Li (4):
phy: Add reset callback
phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during
wakeup
usb: dwc2: assert phy reset when waking up in rk3288 platform
ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset
arch/arm/boot/dts/rk3288.dtsi | 5 +++++
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
drivers/usb/dwc2/core_intr.c | 9 +++++++++
include/linux/phy/phy.h | 2 ++
4 files changed, 36 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-20 20:32 ` Randy Li
0 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-08-20 20:32 UTC (permalink / raw)
To: linux-usb
Cc: johnyoun, gregkh, robh+dt, mark.rutland, devicetree, eddie.cai,
randy.li, kishon, linux-kernel, heiko, Randy Li
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 2a7381f..734987f 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -29,6 +29,7 @@
#include <linux/reset.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
+#include <linux/delay.h>
static int enable_usb_uart;
@@ -64,6 +65,7 @@ struct rockchip_usb_phy {
struct clk_hw clk480m_hw;
struct phy *phy;
bool uart_enabled;
+ struct reset_control *reset;
};
static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
@@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
return clk_prepare_enable(phy->clk480m);
}
+static int rockchip_usb_phy_reset(struct phy *_phy)
+{
+ struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
+
+ if (phy->reset) {
+ reset_control_assert(phy->reset);
+ udelay(10);
+ reset_control_deassert(phy->reset);
+ }
+
+ return 0;
+}
+
static const struct phy_ops ops = {
.power_on = rockchip_usb_phy_power_on,
.power_off = rockchip_usb_phy_power_off,
+ .reset = rockchip_usb_phy_reset,
.owner = THIS_MODULE,
};
@@ -185,6 +201,10 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base,
return -EINVAL;
}
+ rk_phy->reset = of_reset_control_get(child, "phy-reset");
+ if (IS_ERR(rk_phy->reset))
+ rk_phy->reset = NULL;
+
rk_phy->reg_offset = reg_offset;
rk_phy->clk = of_clk_get_by_name(child, "phyclk");
--
2.7.4
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-20 20:32 ` Randy Li
0 siblings, 0 replies; 20+ messages in thread
From: Randy Li @ 2016-08-20 20:32 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: johnyoun-HKixBCOQz3hWk0Htik3J/w,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
devicetree-u79uwXL29TY76Z2rM5mHXA,
eddie.cai-TNX95d0MmH7DzftRWevZcw,
randy.li-TNX95d0MmH7DzftRWevZcw, kishon-l0cyMroinI0,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
heiko-4mtYJXux2i+zQB+pC5nmwQ, Randy Li
It is a hardware bug in RK3288, the only way to solve it is to
reset the phy.
Signed-off-by: Randy Li <ayaka-xPW3/0Ywev/iB9QmIjCX8w@public.gmane.org>
---
drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
index 2a7381f..734987f 100644
--- a/drivers/phy/phy-rockchip-usb.c
+++ b/drivers/phy/phy-rockchip-usb.c
@@ -29,6 +29,7 @@
#include <linux/reset.h>
#include <linux/regmap.h>
#include <linux/mfd/syscon.h>
+#include <linux/delay.h>
static int enable_usb_uart;
@@ -64,6 +65,7 @@ struct rockchip_usb_phy {
struct clk_hw clk480m_hw;
struct phy *phy;
bool uart_enabled;
+ struct reset_control *reset;
};
static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
@@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
return clk_prepare_enable(phy->clk480m);
}
+static int rockchip_usb_phy_reset(struct phy *_phy)
+{
+ struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
+
+ if (phy->reset) {
+ reset_control_assert(phy->reset);
+ udelay(10);
+ reset_control_deassert(phy->reset);
+ }
+
+ return 0;
+}
+
static const struct phy_ops ops = {
.power_on = rockchip_usb_phy_power_on,
.power_off = rockchip_usb_phy_power_off,
+ .reset = rockchip_usb_phy_reset,
.owner = THIS_MODULE,
};
@@ -185,6 +201,10 @@ static int rockchip_usb_phy_init(struct rockchip_usb_phy_base *base,
return -EINVAL;
}
+ rk_phy->reset = of_reset_control_get(child, "phy-reset");
+ if (IS_ERR(rk_phy->reset))
+ rk_phy->reset = NULL;
+
rk_phy->reg_offset = reg_offset;
rk_phy->clk = of_clk_get_by_name(child, "phyclk");
--
2.7.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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 related [flat|nested] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-22 11:47 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 20+ messages in thread
From: Kishon Vijay Abraham I @ 2016-08-22 11:47 UTC (permalink / raw)
To: Randy Li, linux-usb
Cc: johnyoun, gregkh, robh+dt, mark.rutland, devicetree, eddie.cai,
randy.li, linux-kernel, heiko
Hi,
On Sunday 21 August 2016 02:02 AM, Randy Li wrote:
> It is a hardware bug in RK3288, the only way to solve it is to
> reset the phy.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
> index 2a7381f..734987f 100644
> --- a/drivers/phy/phy-rockchip-usb.c
> +++ b/drivers/phy/phy-rockchip-usb.c
> @@ -29,6 +29,7 @@
> #include <linux/reset.h>
> #include <linux/regmap.h>
> #include <linux/mfd/syscon.h>
> +#include <linux/delay.h>
>
> static int enable_usb_uart;
>
> @@ -64,6 +65,7 @@ struct rockchip_usb_phy {
> struct clk_hw clk480m_hw;
> struct phy *phy;
> bool uart_enabled;
> + struct reset_control *reset;
> };
>
> static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
> @@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
> return clk_prepare_enable(phy->clk480m);
> }
>
> +static int rockchip_usb_phy_reset(struct phy *_phy)
> +{
> + struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
> +
> + if (phy->reset) {
> + reset_control_assert(phy->reset);
> + udelay(10);
> + reset_control_deassert(phy->reset);
> + }
> +
> + return 0;
> +}
> +
> static const struct phy_ops ops = {
> .power_on = rockchip_usb_phy_power_on,
> .power_off = rockchip_usb_phy_power_off,
> + .reset = rockchip_usb_phy_reset,
why not just reuse the .init ops? reset can be done during initialization right?
Thanks
Kishon
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-22 11:47 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 20+ messages in thread
From: Kishon Vijay Abraham I @ 2016-08-22 11:47 UTC (permalink / raw)
To: Randy Li, linux-usb-u79uwXL29TY76Z2rM5mHXA
Cc: johnyoun-HKixBCOQz3hWk0Htik3J/w,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
devicetree-u79uwXL29TY76Z2rM5mHXA,
eddie.cai-TNX95d0MmH7DzftRWevZcw,
randy.li-TNX95d0MmH7DzftRWevZcw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
heiko-4mtYJXux2i+zQB+pC5nmwQ
Hi,
On Sunday 21 August 2016 02:02 AM, Randy Li wrote:
> It is a hardware bug in RK3288, the only way to solve it is to
> reset the phy.
>
> Signed-off-by: Randy Li <ayaka-xPW3/0Ywev/iB9QmIjCX8w@public.gmane.org>
> ---
> drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/drivers/phy/phy-rockchip-usb.c b/drivers/phy/phy-rockchip-usb.c
> index 2a7381f..734987f 100644
> --- a/drivers/phy/phy-rockchip-usb.c
> +++ b/drivers/phy/phy-rockchip-usb.c
> @@ -29,6 +29,7 @@
> #include <linux/reset.h>
> #include <linux/regmap.h>
> #include <linux/mfd/syscon.h>
> +#include <linux/delay.h>
>
> static int enable_usb_uart;
>
> @@ -64,6 +65,7 @@ struct rockchip_usb_phy {
> struct clk_hw clk480m_hw;
> struct phy *phy;
> bool uart_enabled;
> + struct reset_control *reset;
> };
>
> static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
> @@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy *_phy)
> return clk_prepare_enable(phy->clk480m);
> }
>
> +static int rockchip_usb_phy_reset(struct phy *_phy)
> +{
> + struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
> +
> + if (phy->reset) {
> + reset_control_assert(phy->reset);
> + udelay(10);
> + reset_control_deassert(phy->reset);
> + }
> +
> + return 0;
> +}
> +
> static const struct phy_ops ops = {
> .power_on = rockchip_usb_phy_power_on,
> .power_off = rockchip_usb_phy_power_off,
> + .reset = rockchip_usb_phy_reset,
why not just reuse the .init ops? reset can be done during initialization right?
Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
2016-08-22 11:47 ` Kishon Vijay Abraham I
(?)
@ 2016-08-22 13:00 ` Heiko Stübner
2016-08-29 9:32 ` Kishon Vijay Abraham I
-1 siblings, 1 reply; 20+ messages in thread
From: Heiko Stübner @ 2016-08-22 13:00 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: Randy Li, linux-usb, johnyoun, gregkh, robh+dt, mark.rutland,
devicetree, eddie.cai, randy.li, linux-kernel
Am Montag, 22. August 2016, 17:17:41 schrieb Kishon Vijay Abraham I:
> Hi,
>
> On Sunday 21 August 2016 02:02 AM, Randy Li wrote:
> > It is a hardware bug in RK3288, the only way to solve it is to
> > reset the phy.
> >
> > Signed-off-by: Randy Li <ayaka@soulik.info>
> > ---
> >
> > drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
> > 1 file changed, 20 insertions(+)
> >
> > diff --git a/drivers/phy/phy-rockchip-usb.c
> > b/drivers/phy/phy-rockchip-usb.c index 2a7381f..734987f 100644
> > --- a/drivers/phy/phy-rockchip-usb.c
> > +++ b/drivers/phy/phy-rockchip-usb.c
> > @@ -29,6 +29,7 @@
> >
> > #include <linux/reset.h>
> > #include <linux/regmap.h>
> > #include <linux/mfd/syscon.h>
> >
> > +#include <linux/delay.h>
> >
> > static int enable_usb_uart;
> >
> > @@ -64,6 +65,7 @@ struct rockchip_usb_phy {
> >
> > struct clk_hw clk480m_hw;
> > struct phy *phy;
> > bool uart_enabled;
> >
> > + struct reset_control *reset;
> >
> > };
> >
> > static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
> >
> > @@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy
> > *_phy)
> >
> > return clk_prepare_enable(phy->clk480m);
> >
> > }
> >
> > +static int rockchip_usb_phy_reset(struct phy *_phy)
> > +{
> > + struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
> > +
> > + if (phy->reset) {
> > + reset_control_assert(phy->reset);
> > + udelay(10);
> > + reset_control_deassert(phy->reset);
> > + }
> > +
> > + return 0;
> > +}
> > +
> >
> > static const struct phy_ops ops = {
> >
> > .power_on = rockchip_usb_phy_power_on,
> > .power_off = rockchip_usb_phy_power_off,
> >
> > + .reset = rockchip_usb_phy_reset,
>
> why not just reuse the .init ops? reset can be done during initialization
> right?
The naming of power_on + power_off and init + exit probably suggests that they
are supposed to be used in pairs. (aka module_init + module_exit and probably
more)
But in fact I've seen different combinations so far (phy_init + phy_power_on
... phy_power_off + phy_exit but also phy_power_on + phy_init ... phy_exit +
phy_power_off), so I guess the semantics are not that strictly defined.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
2016-08-22 13:00 ` Heiko Stübner
@ 2016-08-29 9:32 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 20+ messages in thread
From: Kishon Vijay Abraham I @ 2016-08-29 9:32 UTC (permalink / raw)
To: Heiko Stübner
Cc: Randy Li, linux-usb, johnyoun, gregkh, robh+dt, mark.rutland,
devicetree, eddie.cai, randy.li, linux-kernel
Hi,
On Monday 22 August 2016 06:30 PM, Heiko Stübner wrote:
> Am Montag, 22. August 2016, 17:17:41 schrieb Kishon Vijay Abraham I:
>> Hi,
>>
>> On Sunday 21 August 2016 02:02 AM, Randy Li wrote:
>>> It is a hardware bug in RK3288, the only way to solve it is to
>>> reset the phy.
>>>
>>> Signed-off-by: Randy Li <ayaka@soulik.info>
>>> ---
>>>
>>> drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
>>> 1 file changed, 20 insertions(+)
>>>
>>> diff --git a/drivers/phy/phy-rockchip-usb.c
>>> b/drivers/phy/phy-rockchip-usb.c index 2a7381f..734987f 100644
>>> --- a/drivers/phy/phy-rockchip-usb.c
>>> +++ b/drivers/phy/phy-rockchip-usb.c
>>> @@ -29,6 +29,7 @@
>>>
>>> #include <linux/reset.h>
>>> #include <linux/regmap.h>
>>> #include <linux/mfd/syscon.h>
>>>
>>> +#include <linux/delay.h>
>>>
>>> static int enable_usb_uart;
>>>
>>> @@ -64,6 +65,7 @@ struct rockchip_usb_phy {
>>>
>>> struct clk_hw clk480m_hw;
>>> struct phy *phy;
>>> bool uart_enabled;
>>>
>>> + struct reset_control *reset;
>>>
>>> };
>>>
>>> static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
>>>
>>> @@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy
>>> *_phy)
>>>
>>> return clk_prepare_enable(phy->clk480m);
>>>
>>> }
>>>
>>> +static int rockchip_usb_phy_reset(struct phy *_phy)
>>> +{
>>> + struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
>>> +
>>> + if (phy->reset) {
>>> + reset_control_assert(phy->reset);
>>> + udelay(10);
>>> + reset_control_deassert(phy->reset);
>>> + }
>>> +
>>> + return 0;
>>> +}
>>> +
>>>
>>> static const struct phy_ops ops = {
>>>
>>> .power_on = rockchip_usb_phy_power_on,
>>> .power_off = rockchip_usb_phy_power_off,
>>>
>>> + .reset = rockchip_usb_phy_reset,
>>
>> why not just reuse the .init ops? reset can be done during initialization
>> right?
>
> The naming of power_on + power_off and init + exit probably suggests that they
> are supposed to be used in pairs. (aka module_init + module_exit and probably
> more)
>
> But in fact I've seen different combinations so far (phy_init + phy_power_on
> ... phy_power_off + phy_exit but also phy_power_on + phy_init ... phy_exit +
> phy_power_off), so I guess the semantics are not that strictly defined.
yeah, it got difficult to maintain the semantics once the number of phy users
increased. Thought it was better than bloating the framework with platform
specific callbacks.
Thanks
Kishon
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup
@ 2016-08-29 9:32 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 20+ messages in thread
From: Kishon Vijay Abraham I @ 2016-08-29 9:32 UTC (permalink / raw)
To: Heiko Stübner
Cc: Randy Li, linux-usb-u79uwXL29TY76Z2rM5mHXA,
johnyoun-HKixBCOQz3hWk0Htik3J/w,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A, mark.rutland-5wv7dgnIgG8,
devicetree-u79uwXL29TY76Z2rM5mHXA,
eddie.cai-TNX95d0MmH7DzftRWevZcw,
randy.li-TNX95d0MmH7DzftRWevZcw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Hi,
On Monday 22 August 2016 06:30 PM, Heiko Stübner wrote:
> Am Montag, 22. August 2016, 17:17:41 schrieb Kishon Vijay Abraham I:
>> Hi,
>>
>> On Sunday 21 August 2016 02:02 AM, Randy Li wrote:
>>> It is a hardware bug in RK3288, the only way to solve it is to
>>> reset the phy.
>>>
>>> Signed-off-by: Randy Li <ayaka-xPW3/0Ywev/iB9QmIjCX8w@public.gmane.org>
>>> ---
>>>
>>> drivers/phy/phy-rockchip-usb.c | 20 ++++++++++++++++++++
>>> 1 file changed, 20 insertions(+)
>>>
>>> diff --git a/drivers/phy/phy-rockchip-usb.c
>>> b/drivers/phy/phy-rockchip-usb.c index 2a7381f..734987f 100644
>>> --- a/drivers/phy/phy-rockchip-usb.c
>>> +++ b/drivers/phy/phy-rockchip-usb.c
>>> @@ -29,6 +29,7 @@
>>>
>>> #include <linux/reset.h>
>>> #include <linux/regmap.h>
>>> #include <linux/mfd/syscon.h>
>>>
>>> +#include <linux/delay.h>
>>>
>>> static int enable_usb_uart;
>>>
>>> @@ -64,6 +65,7 @@ struct rockchip_usb_phy {
>>>
>>> struct clk_hw clk480m_hw;
>>> struct phy *phy;
>>> bool uart_enabled;
>>>
>>> + struct reset_control *reset;
>>>
>>> };
>>>
>>> static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
>>>
>>> @@ -144,9 +146,23 @@ static int rockchip_usb_phy_power_on(struct phy
>>> *_phy)
>>>
>>> return clk_prepare_enable(phy->clk480m);
>>>
>>> }
>>>
>>> +static int rockchip_usb_phy_reset(struct phy *_phy)
>>> +{
>>> + struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
>>> +
>>> + if (phy->reset) {
>>> + reset_control_assert(phy->reset);
>>> + udelay(10);
>>> + reset_control_deassert(phy->reset);
>>> + }
>>> +
>>> + return 0;
>>> +}
>>> +
>>>
>>> static const struct phy_ops ops = {
>>>
>>> .power_on = rockchip_usb_phy_power_on,
>>> .power_off = rockchip_usb_phy_power_off,
>>>
>>> + .reset = rockchip_usb_phy_reset,
>>
>> why not just reuse the .init ops? reset can be done during initialization
>> right?
>
> The naming of power_on + power_off and init + exit probably suggests that they
> are supposed to be used in pairs. (aka module_init + module_exit and probably
> more)
>
> But in fact I've seen different combinations so far (phy_init + phy_power_on
> ... phy_power_off + phy_exit but also phy_power_on + phy_init ... phy_exit +
> phy_power_off), so I guess the semantics are not that strictly defined.
yeah, it got difficult to maintain the semantics once the number of phy users
increased. Thought it was better than bloating the framework with platform
specific callbacks.
Thanks
Kishon
--
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] 20+ messages in thread
end of thread, other threads:[~2016-09-08 18:09 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 14:27 [PATCH 0/4] the fix for the USB HOST1 at rk3288 platform Randy Li
2016-09-08 14:27 ` Randy Li
2016-09-08 14:27 ` [PATCH 1/4] phy: Add reset callback Randy Li
2016-09-08 15:30 ` Heiko Stuebner
2016-09-08 14:27 ` [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup Randy Li
2016-09-08 14:27 ` [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Randy Li
2016-09-08 18:09 ` John Youn
2016-09-08 18:09 ` John Youn
2016-09-08 14:27 ` [PATCH 4/4] ARM: dts: rockchip: Point rk3288 dwc2 usb at the full PHY reset Randy Li
-- strict thread matches above, loose matches on Subject: below --
2016-08-20 21:30 [PATCH 3/4] usb: dwc2: assert phy reset when waking up in rk3288 platform Sergei Shtylyov
2016-08-21 7:56 ` [PATCH 0/4 v5] usb: dwc2: fix the usb host for host port at RK32 Randy Li
2016-08-21 7:56 ` [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup Randy Li
2016-08-21 7:56 ` Randy Li
2016-08-23 17:53 ` Rob Herring
2016-08-23 17:53 ` Rob Herring
2016-08-16 2:33 [PATCH 1/2] usb: dwc2: optionally assert phy "full reset" when waking up John Youn
2016-08-20 20:32 ` [PATCH 0/4 v4] usb: dwc2: fix the usb host for host port at RK32 Randy Li
2016-08-20 20:32 ` [PATCH 2/4] phy: rockchip-usb: use rockchip_usb_phy_reset to reset phy during wakeup Randy Li
2016-08-20 20:32 ` Randy Li
2016-08-22 11:47 ` Kishon Vijay Abraham I
2016-08-22 11:47 ` Kishon Vijay Abraham I
2016-08-22 13:00 ` Heiko Stübner
2016-08-29 9:32 ` Kishon Vijay Abraham I
2016-08-29 9:32 ` Kishon Vijay Abraham I
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.