usb: mtu3: check capability of usb3 dual role
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Fri, 8 Jul 2022 07:19:02 +0000 (15:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 12:53:26 +0000 (14:53 +0200)
commit683ff6e485f1d16fe3ad4f5fbd04af11ce917caf
treeac254fe5a1ffefcdce9dcccbc76f7b9c7ee3a9f1
parent269f49ff381aade6cfd20deeae86a8af7ae35b5a
usb: mtu3: check capability of usb3 dual role

It is capable of supporting usb3 dual role if there is at least one
usb3 port for device and xhci controller, we can check it from the
controller's capability, so no need the property "mediatek,usb3-drd"
anymore, but I find the property is not decribed in dt-binding.
Meanwhile, also take into account if the u3 port is disabled when the
u3 phy is shared with pcie.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220708071903.25752-4-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_plat.c