mbox series

[v2,0/2] Add MUSB for MT7623

Message ID 20210808123840.176738-1-mans0n@gorani.run
Headers show
Series Add MUSB for MT7623 | expand

Message

Sungbo Eo Aug. 8, 2021, 12:38 p.m. UTC
These patches add support for the MUSB controller on Mediatek MT7623.
Tested on Mercury RUSH-318AC Wi-Fi router.

v2:
* dt-bindings
  * add reviewed by Matthias
* DTS
  * rename usb3 label to usb0
  * move usb0 & u2phy1 nodes to the right sorted place
  * disable u2phy1 by default
  * correct u2port2 node name to match its reg address

Sungbo Eo (2):
  dt-bindings: usb: mtk-musb: add MT7623 compatible
  arm: dts: mt7623: add musb device nodes

 .../bindings/usb/mediatek,musb.yaml           |  1 +
 arch/arm/boot/dts/mt7623.dtsi                 | 34 +++++++++++++++++++
 arch/arm/boot/dts/mt7623a.dtsi                |  4 +++
 3 files changed, 39 insertions(+)

Comments

Rob Herring (Arm) Aug. 13, 2021, 8:49 p.m. UTC | #1
On Sun, 08 Aug 2021 21:38:39 +0900, Sungbo Eo wrote:
> Document MT7623 compatible for mtk-musb.
> 
> Signed-off-by: Sungbo Eo <mans0n@gorani.run>
> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> v2:
> * add reviewed by Matthias
> ---
>  Documentation/devicetree/bindings/usb/mediatek,musb.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>
Sungbo Eo Aug. 22, 2021, 4:13 a.m. UTC | #2
These patches add support for the MUSB controller on Mediatek MT7623.
Tested on Mercury RUSH-318AC Wi-Fi router.

v3:
* dt-bindings
  * remove the queued patch
* DTS
  * remove unnecessary status=okay from u2port2

v2:
* dt-bindings
  * add reviewed by Matthias
* DTS
  * rename usb3 label to usb0
  * move usb0 & u2phy1 nodes to the right sorted place
  * disable u2phy1 by default
  * correct u2port2 node name to match its reg address

Sungbo Eo (1):
  arm: dts: mt7623: add musb device nodes

 arch/arm/boot/dts/mt7623.dtsi  | 33 +++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/mt7623a.dtsi |  4 ++++
 2 files changed, 37 insertions(+)
Chunfeng Yun (云春峰) Aug. 31, 2021, 6:15 a.m. UTC | #3
On Tue, 2021-08-31 at 00:59 +0900, Sungbo Eo wrote:
> The allow_userspace_control flag enables manual role-switch from

> userspace.

> Turn this feature on like several other USB DRD controller drivers.

> 

> Signed-off-by: Sungbo Eo <mans0n@gorani.run>

> Tested-by: Frank Wunderlich <frank-w@public-files.de>

> ---

>  drivers/usb/musb/mediatek.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/usb/musb/mediatek.c

> b/drivers/usb/musb/mediatek.c

> index 6b92d037d8fc..f5d97eb84cb5 100644

> --- a/drivers/usb/musb/mediatek.c

> +++ b/drivers/usb/musb/mediatek.c

> @@ -185,6 +185,7 @@ static int mtk_otg_switch_init(struct mtk_glue

> *glue)

>  

>  	role_sx_desc.set = musb_usb_role_sx_set;

>  	role_sx_desc.get = musb_usb_role_sx_get;

> +	role_sx_desc.allow_userspace_control = true;

>  	role_sx_desc.fwnode = dev_fwnode(glue->dev);

>  	role_sx_desc.driver_data = glue;

>  	glue->role_sw = usb_role_switch_register(glue->dev,

> &role_sx_desc);


Acked-by: Chunfeng Yun <chunfeng.yun@mediatek.com>


Thanks