Hello people, I've disabled these lines in script.bin: usb_drv_vbus_gpio = port:PH06<1><0><default><0> usb_drv_vbus_gpio = port:PH03<1><0><default><0> in order to use them as standard GPIO, enabling to switch on and off the usb port.
The results is that I receive a super-kernel-panic at boot: <6>ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver > [ 2.156913] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver > <6>ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver > [ 2.168608] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):[ 2.178486] > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):ERR: get usbc1(usbc1) id failed > ERR: get usbc1(usbc1) id failed > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):[ 2.192860] > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):ERR: gpio_request failed > ERR: gpio_request failed > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):[ 2.206014] > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):ERR: alloc_pin failed > ERR: alloc_pin failed > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):[ 2.218657] > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):ERR: get usbc1(usbc1) id failed > ERR: get usbc1(usbc1) id failed > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):[ 2.233026] > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):ERR: gpio_request failed > ERR: gpio_request failed > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):[ 2.246177] > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):ERR: alloc_pin failed > ERR: alloc_pin failed > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):[ 2.258821] > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):ERR: get usbc2(usbc2) id failed > ERR: get usbc2(usbc2) id failed > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):[ 2.273189] > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):ERR: gpio_request failed > ERR: gpio_request failed > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):[ 2.286342] > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):ERR: alloc_pin failed > ERR: alloc_pin failed > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):[ 2.298985] > WRN:L104(drivers/usb/host/sw_hci_sunxi.c):ERR: get usbc2(usbc2) id failed > ERR: get usbc2(usbc2) id failed > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):[ 2.313354] > WRN:L430(drivers/usb/host/sw_hci_sunxi.c):ERR: gpio_request failed > ERR: gpio_request failed > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):[ 2.326507] > WRN:L816(drivers/usb/host/sw_hci_sunxi.c):ERR: alloc_pin failed > ERR: alloc_pin failed > <1>Unable to handle kernel NULL pointer dereference at virtual address > 00000000 > [ 2.342599] Unable to handle kernel NULL pointer dereference at virtual > address 00000000 > <1>pgd = c0004000 > [ 2.352363] pgd = c0004000 > <1>[00000000] *pgd=00000000[ 2.357427] [00000000] *pgd=00000000 It does look clear that the kernel tries to take control of the gpio used to switch on the TCS9708 IC (which powers the USB as you can see from Cubiebooard schematic) but it fails. I'm thinking I should edit something in kernel sources, but I'd like to ask you if I'm doing somehow wrong and/or there are other ways, Thanks in advance. Vincenzo Il giorno venerdì 4 ottobre 2013 21:54:23 UTC+2, Patrick Wood ha scritto: > > > > On Tuesday, September 24, 2013 8:34:52 AM UTC-4, Jon Smirl wrote: >> >> On Tue, Sep 24, 2013 at 8:28 AM, Arokux X <[email protected]> wrote: >> > >> > >> > >> > On Tue, Sep 24, 2013 at 2:27 PM, [email protected] <[email protected]> >> > wrote: >> >> >> >> On Tue, Sep 24, 2013 at 8:16 AM, Arokux X <[email protected]> wrote: >> >> > Hi, >> >> > >> >> > >> >> > On Tue, Sep 24, 2013 at 7:59 AM, <[email protected]> wrote: >> >> >> >> >> >> I want to control the power off my Usb Device conected to >> cubieboard >> >> >> (power off - power on the device by usb1-drv or usb2-drv ) >> >> > >> >> > what is usb1-drv and usb2-drv? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> I googled a lot and find this article >> >> >> http://e2e.ti.com/support/arm/sitara_arm/f/791/t/270060.aspx >> >> >> but it is not for cubie can anybody help me for this issue? >> >> >> >> >> >> according to attached image it must be a way to control USB1-DRV >> from >> >> >> Linux. >> >> >> I have checked the usb power at startup and i see the power goes on >> >> >> when >> >> >> in terminal report [sw-ehci1]: Set USB Power ON , but i dont know >> how >> >> >> it >> >> >> works. >> >> >> >> >> >> <6>hub 2-0:1.0: USB hub found >> >> >> [ 1.894384] hub 2-0:1.0: USB hub found >> >> >> <6>hub 2-0:1.0: 1 port detected >> >> >> [ 1.901073] hub 2-0:1.0: 1 port detected >> >> >> [sw-ehci2]: open clock >> >> >> [ 1.907602] [sw-ehci2]: open clock >> >> >> [sw-ehci2]: Set USB Power ON >> >> >> [ 1.923679] [sw-ehci2]: Set USB Power ON >> >> > >> >> > The power to USB devices is turned on by setting a certain GPIO pin >> >> > (likely >> >> > PH06 or PH03 - check your fex config in sections usbc) to output >> one. If >> >> > you >> >> > figure out a way how to poke at that pins from user space just set >> them >> >> > to >> >> > output 0 to switch off the power and to output 1 to turn off the >> power. >> >> > >> >> > Now, I do not know how to poke at GPIO pins from user space, So tell >> me >> >> > if >> >> > you find out. >> >> >> >> sysfs interface... >> >> >> >> http://squidge.sourceforge.net/gpio/ >> > >> > Well yes, but will it work in sunxi-3.4? >> >> Fix the kernel if it doesn't work. The code is very simple. 90% of it >> is implemented in gpiolib and doesn't need to be written again. The >> same code that makes gpio sysfs work also handles gpio support in >> device trees. >> >> Good chance of it working in the sunxi kernel and not so likely in an >> Allwinner kernel. I'm not in front of a system to check it on. >> > > sysfs gpio has worked on A10 since at least 3.4.29 (I use it for sensing a > switch) and on the A20 since early in 3.4.43. The AW 3.3.0 A20 kernel also > supported it. > > Pat > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
