> -----Original Message----- > From: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx> > Sent: Monday, June 10, 2019 12:52 PM > To: Leo Li <leoyang.li@xxxxxxx>; Ran Wang <ran.wang_1@xxxxxxx>; linux- > usb@xxxxxxxxxxxxxxx > Subject: Re: fsl_udc status? > > On Mon, 2019-06-10 at 17:12 +0000, Leo Li wrote: > > > -----Original Message----- > > > From: Joakim Tjernlund <Joakim.Tjernlund@xxxxxxxxxxxx> > > > Sent: Monday, June 10, 2019 2:52 AM > > > To: Leo Li <leoyang.li@xxxxxxx>; linux-usb@xxxxxxxxxxxxxxx > > > Subject: fsl_udc status? > > > > > > We are trying to get fsl_udc up and running on a T1042 with without > success. > > > Seems like this driver is lagging behind the corresponding host > driver(mph). > > > The mph driver has a number of USB errata workarounds while udc has > none. > > > At least erratas A007792 seems applicable for udc too. > > > > > > Is the fsl_udc driver functional on 4.14.x(which we use)? What is missing ? > > > > We are currently providing 4.14 support with our QorIQ SDK. You can try > the kernel tree at > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourc > e.codeaurora.org%2Fexternal%2Fqoriq%2Fqoriq- > components%2Flinux%2Flog%2F%3Fh%3Dlinux- > 4.14&data=02%7C01%7Cleoyang.li%40nxp.com%7C70fbfaa92c8e4e8a92 > 7008d6edcc48a0%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369 > 57858984804209&sdata=YivmkgjDhJ1kMLK3V5o3XFXqOZQaJu4ghnqjQ8 > SZUTU%3D&reserved=0. I think it is tested on T1042. > > > > I see that there are a few udc related patches that only exist on our SDK > code base. Adding Ran Wang who is maintaining these USB patches > internally. We should definitely try to upstream them instead of maintaining > them internally forever. > > Hi Leo > > I checked and cherry-picked the few changes there were in your repo into > my 4.14.x stable and no joy :( Anyhow, I suspect udc gadget was never > tested on T1042 as this driver has no support for errata A007792, without that > simple workaround the USB I/F is completely dead. I will double check the testing result with the testing team. But I doubt that the A007792 is causing this total failure otherwise the problem should have been there for a long time and unlikely to be left unnoticed. > > Could you check if udc/gadget works on T1042RDB(or any T10xy)? > Is there a better driver nowadays than fsl_udc ? There was some effort to make use of the chipidea driver(drivers/usb/chipidea) for the QorIQ platforms. But I guess the effort stopped when the guy working on it left. You can try it out, but I don't think the erratum workaround get into that driver either. > > Jocke > PS. > > With some extra debug in IRQ handling and the A007792 we only get this far: > 12.999592] udc:[fsl_udc_irq] irq_src [0x 40] > [ 12.999598] udc:[fsl_udc_irq] reset int > [ 12.999601] udc:[reset_irq] Bus reset > [ 13.001860] udc:[fsl_udc_irq] irq_src [0x 4] > [ 13.001863] udc:[fsl_udc_irq] port change > [ 13.215395] udc:[fsl_udc_irq] irq_src [0x 40] > [ 13.215398] udc:[fsl_udc_irq] reset int > [ 13.215401] udc:[reset_irq] Bus reset > [ 13.217667] udc:[fsl_udc_irq] irq_src [0x 4] > [ 13.217670] udc:[fsl_udc_irq] port change > [ 13.326035] udc:[fsl_udc_irq] irq_src [0x 10] > [ 13.326038] udc:[fsl_udc_irq] Error IRQ 10 > [ 18.631463] udc:[fsl_udc_irq] irq_src [0x 40] > [ 18.631469] udc:[fsl_udc_irq] reset int > [ 18.631473] udc:[reset_irq] Bus reset > [ 18.633732] udc:[fsl_udc_irq] irq_src [0x 4] > [ 18.633735] udc:[fsl_udc_irq] port change > [ 18.843936] udc:[fsl_udc_irq] irq_src [0x 10] > [ 18.843939] udc:[fsl_udc_irq] Error IRQ 10 > [ 24.263656] udc:[fsl_udc_irq] irq_src [0x 40] > [ 24.263661] udc:[fsl_udc_irq] reset int > [ 24.263665] udc:[reset_irq] Bus reset > [ 24.265926] udc:[fsl_udc_irq] irq_src [0x 4] > [ 24.265929] udc:[fsl_udc_irq] port change > [ 24.479144] udc:[fsl_udc_irq] irq_src [0x 100] > [ 24.479147] udc:[fsl_udc_irq] suspend int > .... > "Error IRQ 10" is USB_STS_SYS_ERR and that is were we are stuck. > > Jocke