Message ID | 20200909160409.8678-4-narmstrong@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | usb: dwc-meson-g12a: Add support for USB on S400 board | expand |
Hi Neil, On Wed, Sep 9, 2020 at 6:04 PM Neil Armstrong <narmstrong@baylibre.com> wrote: > > The Amlogic AXG is close from the GXL Glue but with a single OTG PHY. s/close from/close to/ [...] > +static struct dwc3_meson_g12a_drvdata axg_drvdata = { > + .otg_switch_supported = true, > + .clks = meson_gxl_clocks, > + .num_clks = ARRAY_SIZE(meson_gxl_clocks), > + .phy_names = meson_a1_phy_names, > + .num_phys = ARRAY_SIZE(meson_a1_phy_names), I wonder if we should also update the comment for meson_a1_phy_names to understand that part I had to go back to the dt-bindings patch Best regards, Martin
On 15/09/2020 21:59, Martin Blumenstingl wrote: > Hi Neil, > > On Wed, Sep 9, 2020 at 6:04 PM Neil Armstrong <narmstrong@baylibre.com> wrote: >> >> The Amlogic AXG is close from the GXL Glue but with a single OTG PHY. > s/close from/close to/ > > [...] >> +static struct dwc3_meson_g12a_drvdata axg_drvdata = { >> + .otg_switch_supported = true, >> + .clks = meson_gxl_clocks, >> + .num_clks = ARRAY_SIZE(meson_gxl_clocks), >> + .phy_names = meson_a1_phy_names, >> + .num_phys = ARRAY_SIZE(meson_a1_phy_names), > I wonder if we should also update the comment for meson_a1_phy_names > to understand that part I had to go back to the dt-bindings patch Sure, Thanks, Neil > > > Best regards, > Martin >
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 1f7f4d88ed9d..90275c13c224 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -215,6 +215,19 @@ static struct dwc3_meson_g12a_drvdata gxm_drvdata = { .usb_post_init = dwc3_meson_gxl_usb_post_init, }; +static struct dwc3_meson_g12a_drvdata axg_drvdata = { + .otg_switch_supported = true, + .clks = meson_gxl_clocks, + .num_clks = ARRAY_SIZE(meson_gxl_clocks), + .phy_names = meson_a1_phy_names, + .num_phys = ARRAY_SIZE(meson_a1_phy_names), + .setup_regmaps = dwc3_meson_gxl_setup_regmaps, + .usb2_init_phy = dwc3_meson_gxl_usb2_init_phy, + .set_phy_mode = dwc3_meson_gxl_set_phy_mode, + .usb_init = dwc3_meson_g12a_usb_init, + .usb_post_init = dwc3_meson_gxl_usb_post_init, +}; + static struct dwc3_meson_g12a_drvdata g12a_drvdata = { .otg_switch_supported = true, .clks = meson_g12a_clocks, @@ -930,6 +943,10 @@ static const struct of_device_id dwc3_meson_g12a_match[] = { .compatible = "amlogic,meson-gxm-usb-ctrl", .data = &gxm_drvdata, }, + { + .compatible = "amlogic,meson-axg-usb-ctrl", + .data = &axg_drvdata, + }, { .compatible = "amlogic,meson-g12a-usb-ctrl", .data = &g12a_drvdata,
The Amlogic AXG is close from the GXL Glue but with a single OTG PHY. It needs the same init sequence as GXL & GXM, but it seems it doesn't need the host disconnect bit. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> --- drivers/usb/dwc3/dwc3-meson-g12a.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)