* [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property
@ 2022-05-23 9:04 Chunfeng Yun
2022-05-23 9:04 ` [PATCH 2/4] dt-bindings: usb: mtu3: " Chunfeng Yun
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Chunfeng Yun @ 2022-05-23 9:04 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring
Cc: Chunfeng Yun, Krzysztof Kozlowski, Matthias Brugger,
Mathias Nyman, linux-usb, linux-arm-kernel, linux-mediatek,
devicetree, linux-kernel, Eddie Hung
Add 'resets' property to support IP reset usually by top pericfg.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
index 084d7135b2d9..892718459d25 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
@@ -113,6 +113,9 @@ properties:
vbus-supply:
description: Regulator of USB VBUS5v
+ resets:
+ maxItems: 1
+
usb3-lpm-capable: true
usb2-lpm-disable: true
--
2.18.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] dt-bindings: usb: mtu3: add support 'resets' property
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
@ 2022-05-23 9:04 ` Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-06-02 13:04 ` Rob Herring
2022-05-23 9:04 ` [PATCH 3/4] usb: xhci-mtk: add support optional controller reset Chunfeng Yun
` (4 subsequent siblings)
5 siblings, 2 replies; 12+ messages in thread
From: Chunfeng Yun @ 2022-05-23 9:04 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring
Cc: Chunfeng Yun, Krzysztof Kozlowski, Matthias Brugger,
Mathias Nyman, linux-usb, linux-arm-kernel, linux-mediatek,
devicetree, linux-kernel, Eddie Hung
Add 'resets' property to support IP reset usually by top pericfg.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
index df766f8de872..208d3f780b2a 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
@@ -106,6 +106,9 @@ properties:
maximum-speed:
enum: [super-speed-plus, super-speed, high-speed, full-speed]
+ resets:
+ maxItems: 1
+
"#address-cells":
enum: [1, 2]
--
2.18.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/4] usb: xhci-mtk: add support optional controller reset
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
2022-05-23 9:04 ` [PATCH 2/4] dt-bindings: usb: mtu3: " Chunfeng Yun
@ 2022-05-23 9:04 ` Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-05-23 9:04 ` [PATCH 4/4] usb: mtu3: add support " Chunfeng Yun
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Chunfeng Yun @ 2022-05-23 9:04 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring
Cc: Chunfeng Yun, Krzysztof Kozlowski, Matthias Brugger,
Mathias Nyman, linux-usb, linux-arm-kernel, linux-mediatek,
devicetree, linux-kernel, Eddie Hung
Add support controller reset via a reset-controller usually in infracfg,
it's different with the software reset by IPPC which only used to reset MAC,
and it will also reset IPPC meanwhile.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/host/xhci-mtk.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c
index b1045f534a4b..01705e559c42 100644
--- a/drivers/usb/host/xhci-mtk.c
+++ b/drivers/usb/host/xhci-mtk.c
@@ -18,6 +18,7 @@
#include <linux/pm_wakeirq.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+#include <linux/reset.h>
#include "xhci.h"
#include "xhci-mtk.h"
@@ -550,6 +551,12 @@ static int xhci_mtk_probe(struct platform_device *pdev)
if (ret)
goto disable_ldos;
+ ret = device_reset_optional(dev);
+ if (ret) {
+ dev_err_probe(dev, ret, "failed to reset controller\n");
+ goto disable_clk;
+ }
+
hcd = usb_create_hcd(driver, dev, dev_name(dev));
if (!hcd) {
ret = -ENOMEM;
--
2.18.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/4] usb: mtu3: add support controller reset
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
2022-05-23 9:04 ` [PATCH 2/4] dt-bindings: usb: mtu3: " Chunfeng Yun
2022-05-23 9:04 ` [PATCH 3/4] usb: xhci-mtk: add support optional controller reset Chunfeng Yun
@ 2022-05-23 9:04 ` Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-05-23 10:41 ` [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Rex-BC Chen
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Chunfeng Yun @ 2022-05-23 9:04 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring
Cc: Chunfeng Yun, Krzysztof Kozlowski, Matthias Brugger,
Mathias Nyman, linux-usb, linux-arm-kernel, linux-mediatek,
devicetree, linux-kernel, Eddie Hung
Add support controller reset via a reset-controller usually in infracfg,
it's different with the software reset by IPPC which only used to reset MAC,
and it will also reset IPPC meanwhile.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/mtu3/mtu3_plat.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index 4309ed939178..d14494b30064 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -13,6 +13,7 @@
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
+#include <linux/reset.h>
#include "mtu3.h"
#include "mtu3_dr.h"
@@ -345,6 +346,12 @@ static int mtu3_probe(struct platform_device *pdev)
dev_info(dev, "wakeup irq %d\n", ssusb->wakeup_irq);
}
+ ret = device_reset_optional(dev);
+ if (ret) {
+ dev_err_probe(dev, ret, "failed to reset controller\n");
+ goto comm_exit;
+ }
+
ssusb_ip_sw_reset(ssusb);
if (IS_ENABLED(CONFIG_USB_MTU3_HOST))
--
2.18.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
` (2 preceding siblings ...)
2022-05-23 9:04 ` [PATCH 4/4] usb: mtu3: add support " Chunfeng Yun
@ 2022-05-23 10:41 ` Rex-BC Chen
2022-05-24 3:02 ` Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-06-02 13:04 ` Rob Herring
5 siblings, 1 reply; 12+ messages in thread
From: Rex-BC Chen @ 2022-05-23 10:41 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring
Cc: Krzysztof Kozlowski, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Eddie Hung
On Mon, 2022-05-23 at 17:04 +0800, Chunfeng Yun wrote:
> Add 'resets' property to support IP reset usually by top pericfg.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> xhci.yaml
> index 084d7135b2d9..892718459d25 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> @@ -113,6 +113,9 @@ properties:
> vbus-supply:
> description: Regulator of USB VBUS5v
>
> + resets:
> + maxItems: 1
> +
> usb3-lpm-capable: true
>
> usb2-lpm-disable: true
Hello Chunfeng,
Which soc we will use this reset?
I am upstreaming another series for system clock reset.
I think you should add how to use for this series base on [1].
[1]:
https://lore.kernel.org/linux-clk/5067ec46-7a82-6b7b-5b07-3102cfaefbf6@collabora.com/T/#m5b6abb9bd2109e4ed9a1a3eeee6e7976892cb8c2
BRs,
Rex
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property
2022-05-23 10:41 ` [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Rex-BC Chen
@ 2022-05-24 3:02 ` Chunfeng Yun
0 siblings, 0 replies; 12+ messages in thread
From: Chunfeng Yun @ 2022-05-24 3:02 UTC (permalink / raw)
To: Rex-BC Chen, Greg Kroah-Hartman, Rob Herring
Cc: Krzysztof Kozlowski, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Eddie Hung
Hi Rex-BC,
On Mon, 2022-05-23 at 18:41 +0800, Rex-BC Chen wrote:
> On Mon, 2022-05-23 at 17:04 +0800, Chunfeng Yun wrote:
> > Add 'resets' property to support IP reset usually by top pericfg.
> >
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 3
> > +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-
> > xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-
> > xhci.yaml
> > index 084d7135b2d9..892718459d25 100644
> > --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml
> > @@ -113,6 +113,9 @@ properties:
> > vbus-supply:
> > description: Regulator of USB VBUS5v
> >
> > + resets:
> > + maxItems: 1
> > +
> > usb3-lpm-capable: true
> >
> > usb2-lpm-disable: true
>
> Hello Chunfeng,
>
> Which soc we will use this reset?
This is common for all SoCs, can use it if there is a reset controller
driver supported.
> I am upstreaming another series for system clock reset.
That's good
> I think you should add how to use for this series base on [1].
Currently I test it on mt8195 based on ti-syscon reset driver, luckly
this is transparent for our usb controller drivers;
I could add patches to use this 'resets' property on mt8195/8186 if the
below series are applied.
Thanks
>
> [1]:
>
https://lore.kernel.org/linux-clk/5067ec46-7a82-6b7b-5b07-3102cfaefbf6@collabora.com/T/#m5b6abb9bd2109e4ed9a1a3eeee6e7976892cb8c2
>
> BRs,
> Rex
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] usb: xhci-mtk: add support optional controller reset
2022-05-23 9:04 ` [PATCH 3/4] usb: xhci-mtk: add support optional controller reset Chunfeng Yun
@ 2022-05-24 10:37 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-24 10:37 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring
Cc: Krzysztof Kozlowski, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Eddie Hung
Il 23/05/22 11:04, Chunfeng Yun ha scritto:
> Add support controller reset via a reset-controller usually in infracfg,
> it's different with the software reset by IPPC which only used to reset MAC,
> and it will also reset IPPC meanwhile.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] usb: mtu3: add support controller reset
2022-05-23 9:04 ` [PATCH 4/4] usb: mtu3: add support " Chunfeng Yun
@ 2022-05-24 10:37 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-24 10:37 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring
Cc: Krzysztof Kozlowski, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Eddie Hung
Il 23/05/22 11:04, Chunfeng Yun ha scritto:
> Add support controller reset via a reset-controller usually in infracfg,
> it's different with the software reset by IPPC which only used to reset MAC,
> and it will also reset IPPC meanwhile.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] dt-bindings: usb: mtu3: add support 'resets' property
2022-05-23 9:04 ` [PATCH 2/4] dt-bindings: usb: mtu3: " Chunfeng Yun
@ 2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-06-02 13:04 ` Rob Herring
1 sibling, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-24 10:37 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring
Cc: Krzysztof Kozlowski, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Eddie Hung
Il 23/05/22 11:04, Chunfeng Yun ha scritto:
> Add 'resets' property to support IP reset usually by top pericfg.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
` (3 preceding siblings ...)
2022-05-23 10:41 ` [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Rex-BC Chen
@ 2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-06-02 13:04 ` Rob Herring
5 siblings, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-24 10:37 UTC (permalink / raw)
To: Chunfeng Yun, Greg Kroah-Hartman, Rob Herring
Cc: Krzysztof Kozlowski, Matthias Brugger, Mathias Nyman, linux-usb,
linux-arm-kernel, linux-mediatek, devicetree, linux-kernel,
Eddie Hung
Il 23/05/22 11:04, Chunfeng Yun ha scritto:
> Add 'resets' property to support IP reset usually by top pericfg.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
` (4 preceding siblings ...)
2022-05-24 10:37 ` AngeloGioacchino Del Regno
@ 2022-06-02 13:04 ` Rob Herring
5 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-06-02 13:04 UTC (permalink / raw)
To: Chunfeng Yun
Cc: Matthias Brugger, devicetree, linux-kernel, linux-usb,
Eddie Hung, Greg Kroah-Hartman, linux-mediatek, Rob Herring,
linux-arm-kernel, Krzysztof Kozlowski, Mathias Nyman
On Mon, 23 May 2022 17:04:46 +0800, Chunfeng Yun wrote:
> Add 'resets' property to support IP reset usually by top pericfg.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] dt-bindings: usb: mtu3: add support 'resets' property
2022-05-23 9:04 ` [PATCH 2/4] dt-bindings: usb: mtu3: " Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
@ 2022-06-02 13:04 ` Rob Herring
1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-06-02 13:04 UTC (permalink / raw)
To: Chunfeng Yun
Cc: linux-mediatek, linux-usb, Rob Herring, devicetree,
linux-arm-kernel, Krzysztof Kozlowski, Matthias Brugger,
Eddie Hung, linux-kernel, Greg Kroah-Hartman, Mathias Nyman
On Mon, 23 May 2022 17:04:47 +0800, Chunfeng Yun wrote:
> Add 'resets' property to support IP reset usually by top pericfg.
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-06-02 13:05 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 9:04 [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Chunfeng Yun
2022-05-23 9:04 ` [PATCH 2/4] dt-bindings: usb: mtu3: " Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-06-02 13:04 ` Rob Herring
2022-05-23 9:04 ` [PATCH 3/4] usb: xhci-mtk: add support optional controller reset Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-05-23 9:04 ` [PATCH 4/4] usb: mtu3: add support " Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-05-23 10:41 ` [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Rex-BC Chen
2022-05-24 3:02 ` Chunfeng Yun
2022-05-24 10:37 ` AngeloGioacchino Del Regno
2022-06-02 13:04 ` Rob Herring
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).