Re: Issues while implementing Designware DWC3 on an Actions S700 chip.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I was trying to make the mainline kernel work, but the system won't
run without the Debian patches. Would the 6.9 kernel from the testing
repository be enough for you to help me out?

Regards, Ana.

Em ter., 2 de jul. de 2024 às 21:47, Thinh Nguyen
<Thinh.Nguyen@xxxxxxxxxxxx> escreveu:
>
> On Tue, Jul 02, 2024, Ana Clara Forcelli wrote:
> > Greetings!
> >
> > I've come to you because I stumbled upon an impasse while attempting to make
> > the USB3 device work in my company's custom SBC project, which uses Actions
> > Semiconductor's S700 SoC.
> >
> > First, the context: since the chip was discontinued, the manufacturer stopped
> > updating the kernel source, so it was stuck in version 3.something. The USB3
> > subsystem used to work with the manufacturer's code at that point, but so many
> > new features were added to the mainline that we had to move on to newer
> > versions.
>
> The dwc3 controller here is quite old base on the regdump.
>
> >
> > Right now, we are using Debian's patched version of the 6.1.76 kernel. Our repo
> > is public at github.com/caninos-loucos/labrador-linux-6 . We implemented the
>
> 6.1.x is still old. Please try mainline. Otherwise it be difficult to
> provide feedback on your custom kernel.
>
> > device tree nodes, glue layer and PHY code on the usb3 branch. Some code is
> > from the old repo (the phys especially), some was adapted to the more modern
> > format.
> >
> > The problem: Only a few devices (keyboard, mouse and some pendrives) work
> > correctly using the usb3 port, and only when they are connected before the
> > modules load. Otherwise, the device stops at the stop endpoint  command and the
> > whole XHCI module dies. I tried to debug using the guide at kernel.org/doc/html
> > /latest/driver-api/usb/dwc3.html, but I was quickly overwhelmed by how complex
> > this system is. I followed the commands
> >
> > # mkdir -p /d
> > # mkdir -p /t
> > # mount -t debugfs none /d
> > # mount -t tracefs none /t
> > # echo 81920 > /t/buffer_size_kb
> > # echo 1 > /t/events/dwc3/enable
> >
> > # cp /t/trace /root/trace.txt
> > # cat /d/usb/*dwc3*/regdump > /root/regdump.txt <--- this had to be modified
> >
> > but tracefs returned nothing from dwc3 and the regdump is incomprehensible to
> > me, since I don't have access to the IP handbook. I tried more ways to access
> > the trace, and even enabled all functions, but I'm mostly sure that the
> > aforementioned command works just fine.
>
> The trace.txt is empty because this is host mode, and you probably
> enabled the trace after loading the driver, so the controller
> initialization isn't captured.
>
> You should capture xhci tracepoints instead. Same steps, but enable xhci
> trace events:
>
> echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable
>
> >
> > The regdump.txt file attached to this email shows the dump after connecting a
> > generic USB pendrive and waiting for the dmesg output:
> > [   90.800444] xhci-hcd xhci-hcd.0.auto: xHCI host not responding to stop
> > endpoint command
> > [   90.828621] xhci-hcd xhci-hcd.0.auto: xHCI host controller not responding,
> > assume dead
> > [   90.836534] xhci-hcd xhci-hcd.0.auto: HC died; cleaning up
> > [   90.842256] usb usb3-port1: couldn't allocate usb_device
> >
>
> This may be difficult to debug without knowing your setup quirks. But
> I'd suggest to try against the latest kernel first.
>
> BR,
> Thinh





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux