Author: sgalabov Date: Fri Apr 8 15:20:58 2016 New Revision: 297715 URL: https://svnweb.freebsd.org/changeset/base/297715
Log: Disable USB PHY slew rate calibration for Mediatek SoCs for now USB on both MT7621 and MT7688 seems to work much better without doing slew rate calibration. These are the only two SoCs, apart from MT7628, which actually make use of the slew rate calibration routines implemented in the mtk_usb_phy driver. Since MT7628 is actually a superset of MT7688 things should be the same for it as well. We do not remove the code, we simply define it out. Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5884 Modified: head/sys/mips/mediatek/mtk_usb_phy.c Modified: head/sys/mips/mediatek/mtk_usb_phy.c ============================================================================== --- head/sys/mips/mediatek/mtk_usb_phy.c Fri Apr 8 15:13:38 2016 (r297714) +++ head/sys/mips/mediatek/mtk_usb_phy.c Fri Apr 8 15:20:58 2016 (r297715) @@ -206,6 +206,11 @@ mtk_usb_phy_detach(device_t dev) return (0); } +/* + * Things currently seem to work a lot better without slew rate calibration + * both on MT7621 and MT7688, so we leave it out for now. + */ +#ifdef notyet static void mtk_usb_phy_slew_rate_calibration(struct mtk_usb_phy_softc *sc) { @@ -250,10 +255,12 @@ mtk_usb_phy_slew_rate_calibration(struct USB_PHY_BARRIER(sc); } } +#endif static void mtk_usb_phy_mt7621_init(device_t dev) { +#ifdef notyet struct mtk_usb_phy_softc *sc = device_get_softc(dev); /* Slew rate calibration only, but for 2 ports */ @@ -261,6 +268,7 @@ mtk_usb_phy_mt7621_init(device_t dev) sc->u2_base = MT7621_U2_BASE_P1; mtk_usb_phy_slew_rate_calibration(sc); +#endif } static void @@ -286,8 +294,10 @@ mtk_usb_phy_mt7628_init(device_t dev) USB_PHY_WRITE_U2(sc, U2_PHY_DTM0, 0x02000000); USB_PHY_BARRIER(sc); +#ifdef notyet /* Slew rate calibration */ - //mtk_usb_phy_slew_rate_calibration(sc); + mtk_usb_phy_slew_rate_calibration(sc); +#endif } static device_method_t mtk_usb_phy_methods[] = { _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"