Thread (18 messages) 18 messages, 4 authors, 2020-01-07

Re: [PATCH v3 4/6] usb: dwc3: Add Amlogic A1 DWC3 glue

From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: 2020-01-02 21:52:58
Also in: linux-amlogic, linux-devicetree, linux-usb

Hello Hanjie,

On Thu, Jan 2, 2020 at 1:30 AM Hanjie Lin [off-list ref] wrote:
[...]
quoted
quoted
-               if (i == USB2_OTG_PHY) {
+               if (priv->soc_id == MESON_SOC_G12A && i == USB2_OTG_PHY) {
on GXL we have two PHYs (0 and 1), the second one is OTG capable
on GXM we have three PHYs (0..2), the second one is OTG capable
on G12A/G12B we have two PHYs (0 and 1), the second one is OTG capable

you already wrote that there is only one USB2 PHY on the A1 SoC
is really only the second PHY port ("usb2-phy1" instead of
"usb2-phy0") used on A1?
if "usb2-phy0" is correct then you don't need these checks (there are
more checks like this below)
Actually, A1 have same phys("usb2-phy0", "usb2-phy1", "usb3-phy0") and register base with G12A.
But A1 driver is designed to support host mode with usb2-phy1 only.
OK, thank you for clarifying this interesting decision made by the HW team

...]
quoted
quoted
-       usb_role_switch_unregister(priv->role_switch);
+       if (priv->soc_id == MESON_SOC_G12A)
+               usb_role_switch_unregister(priv->role_switch);
I didn't expect this because in _probe usb_role_switch_register is still called
on A1 we now call usb_role_switch_register() but we never call
usb_role_switch_unregister()
Actually, usb_role_switch_register() can be called only in G12A.

dwc3_meson_g12a_probe()
         ...
         if (priv->soc_id != MESON_SOC_G12A)
                 goto setup_pm_runtime;
I completely missed that, thank you for clarifying it
Same with second suggestion, this different SoC extra logic could avoided by add constraints
to .yaml.
I will do this in next version.
that would be awesome if it works out!


Martin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help