On Wed, 14 Oct 2015 00:09:36 +0100 Adam Sampson <a...@offog.org> wrote:
> Hi all, > > What kernel config options do I need to turn on for OTG to work on the > A20? It doesn't appear to be enabled in sunxi_defconfig or > multi_v7_defconfig. Hi, Yes, indeed. Currently everyone needs to waste some time solving this kernel config puzzle when enabling USB OTG support. And I'm embarrassed to admit that it took me several hours until I got it working. If I find some time for it, I might write a howto guide in the wiki. But don't take this as a promise. This is what I used for testing USB OTG on pcDuino2: https://github.com/ssvb/linux-sunxi/commits/20151014-4.3.0-rc5-pcduino2-otg-test It is based on the current 'sunxi-next' branch from https://github.com/linux-sunxi/linux-sunxi and applies a few patches on top of it. This way I get the system successfully booting on pcDuino2 from NFS via cdc_ether if a Micro-B cable is connected (that's the primary use case for me). And if a USB OTG cable is connected, then it works as USB host. The important parts were the CONFIG_MUSB_PIO_ONLY=y option (without it enabled, I had DMA related errors in the kernel log) and the old 'sunxi: initialize pinctrl before module init, fix "could not find pctldev for node %s, deferring probe"' patch from willswang (without it, there were these "deferred probe" errors also making USB OTG fail). > The patch below adds support for OTG for the pcDuino v3 Nano based on > the schematic, and I've verified that PH4 is indeed the ID pin by > reading it as a GPIO (it reads 0 with a host adaptor plugged in and 1 > with nothing plugged in), but trying various likely-looking config > options hasn't resulted in it actually detecting devices, so I assume > there's something I'm meant to have enabled that I haven't... You can try to apply your patch to my test branch and check if it works. Good luck. -- Best regards, Siarhei Siamashka -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.