diff --git a/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c b/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c index d4ea8162d0ec..3ce109bf851f 100644 --- a/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c +++ b/drivers/amlogic/usb/dwc_otg/310/dwc_otg_driver.c @@ -71,6 +71,7 @@ #include #include #include +#include #ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND #include #endif @@ -1058,6 +1059,11 @@ static int dwc_otg_driver_probe(struct platform_device *pdev) if (prop) phy_interface = of_read_ulong(prop, 1); + if (is_meson_g12b_cpu()) { + if (!is_meson_rev_a()) + phy_interface = 2; + } + dwc_otg_module_params.host_rx_fifo_size = dwc_otg_module_params.data_fifo_size / 2; DWC_PRINTF("dwc_otg: %s: type: %d speed: %d, ", s_clock_name, port_type, port_speed); diff --git a/drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.c b/drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.c index 82fc567f8b52..787da97d9a7d 100644 --- a/drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.c +++ b/drivers/amlogic/usb/phy/phy-aml-new-usb2-v2.c @@ -27,6 +27,7 @@ #include #include #include +#include #include "phy-aml-new-usb-v2.h" struct amlogic_usb_v2 *g_phy2_v2; @@ -243,6 +244,11 @@ static int amlogic_new_usb2_probe(struct platform_device *pdev) else phy_version = 0; + if (is_meson_g12b_cpu()) { + if (!is_meson_rev_a()) + phy_version = 1; + } + phy_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); phy_base = devm_ioremap_resource(dev, phy_mem); if (IS_ERR(phy_base))