mbox series

[0/2] Add MUSB for MT7623

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

Message

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

I got to know this from a BPI-R2 forum post [1], and managed to make it work on OpenWrt snapshot.
I'd like to know if this also works on BPI-R2, I can happily share the details if needed.
And I've just copy & pasted nodes from mt2701, please let me know if I missed some big differences between SoCs...

[1] http://forum.banana-pi.org/t/bpi-r2-otg-port/10551

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

Frank Wunderlich Aug. 4, 2021, 11:33 a.m. UTC | #1
Hi,

another strange thing is, after some bootups (i boot kernel from tftp, but also on full power cycle),
musb-driver maps musb-hdrc.4.auto instead of #1

root@bpi-r2:~# dmesg | grep musb
[    5.502914] musb-hdrc musb-hdrc.4.auto: MUSB HDRC host driver
[    5.508782] musb-hdrc musb-hdrc.4.auto: new USB bus registered, assigned bus number 5

and then nothing works (no roleswitch, no power which does not work with pinctl / without regulator).
It's hard to test if things working before, do no more work if device is named differently.

maybe Min Guo can help here?

after bootup mode is b_idle in my case (currently do not change if i connect otg cable)

root@bpi-r2:~# cat /sys/devices/platform/11200000.usb/musb-hdrc.4.auto/mode
b_idle

regards Frank
Matthias Brugger Aug. 4, 2021, 3:01 p.m. UTC | #2
Hi Sungbo,

On 03/08/2021 17:13, Sungbo Eo wrote:
> These patches add support for the MUSB controller on Mediatek MT7623.

> Tested on Mercury RUSH-318AC Wi-Fi router.

> 


Nice to see you are working on Mediatek devices.
Are you planning to add the device tree for the router to the kernel? I'd be
happy to see them submitted.

Regards,
Matthias

> I got to know this from a BPI-R2 forum post [1], and managed to make it work on OpenWrt snapshot.

> I'd like to know if this also works on BPI-R2, I can happily share the details if needed.

> And I've just copy & pasted nodes from mt2701, please let me know if I missed some big differences between SoCs...

> 

> [1] http://forum.banana-pi.org/t/bpi-r2-otg-port/10551

> 

> 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(+)

>
Sungbo Eo Aug. 5, 2021, 1:36 a.m. UTC | #3
Hi Matthias,
Thanks for your kind review.

On 2021-08-05 00:01, Matthias Brugger wrote:
> Hi Sungbo,
> 
> On 03/08/2021 17:13, Sungbo Eo wrote:
>> These patches add support for the MUSB controller on Mediatek MT7623.
>> Tested on Mercury RUSH-318AC Wi-Fi router.
>>
> 
> Nice to see you are working on Mediatek devices.
> Are you planning to add the device tree for the router to the kernel? I'd be
> happy to see them submitted.

Actually I've never thought about it.
My router device is not for public sale, and the device might have been
locked up in recent versions, so I don't think anyone can ever use it
for that specific model.
Come to think of it, I've tried another model before, which is more in
public, I might submit its device tree if it gets ready someday.

Thanks.

> 
> Regards,
> Matthias
> 
>> I got to know this from a BPI-R2 forum post [1], and managed to make it work on OpenWrt snapshot.
>> I'd like to know if this also works on BPI-R2, I can happily share the details if needed.
>> And I've just copy & pasted nodes from mt2701, please let me know if I missed some big differences between SoCs...
>>
>> [1] http://forum.banana-pi.org/t/bpi-r2-otg-port/10551
>>
>> 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(+)
>>
Sungbo Eo Aug. 8, 2021, 12:38 p.m. UTC | #4
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(+)