Allwinner A10 @ Ampe A90: Enabling hidden usb host

Okay, recently I got myself such a tablet. So here goes the trick. It has a hidded USB host inside. You’d like to enable it in case you want to pop in some internal goodies like an usb jump drive, gps, 3g whatsoever.

However, you have to enable the host. This is done in the following steps:

grab my sw-switcher module on github, use prebuilt one, or compile your own: https://github.com/nekromant/ampe-sw-switch

grab a copy of these: https://github.com/amery/sunxi-tools

Next, we need to alter chip’s config, so that we can enable the hidded host. To do so we need to create a new script.bin using sunxi-tools.

exec this on the tablet

mkdir /t
mount -t vfat /dev/block/nanda /t
cd /t

then, on the host via adb:

adb pull /t/script.bin
bin2fex script.bin script.fex

Edit script.fex with your favourite editor, look for line
usb_host_init_state = 1
and change that to
usb_host_init_state = 0
save, exit the editor

fex2bin script.fex script.bin
adb push ./script.bin /t/script.bin
adb push ./script.bin /t/script0.bin

Reboot, and enable the host via

echo "host 1 1" > /sys/module/sw_switch/power

Disable at any time via

echo "host 1 0" > /sys/module/sw_switch/power

You are done. This also turns on and off VBUS voltage, so you get your powersaving here.

11 thoughts on “Allwinner A10 @ Ampe A90: Enabling hidden usb host

  1. Hi Necromant,

    I have a Micromax FunBook P300, which is very similar to the Allwinner A10 tab.

    I’m able to use most USB devices like flash drives, mice, keyboard etc. with the stock ROM itself.

    But I have a problem connecting devices like USB to serial converters etc. I can get these to enumerate, but am not able to use the UsbManager APIs (from Google USB Host APIs) to communicate with them.

    Does this mean that the stock kernel has locked away these API support? Any suggestions to unlock them?

    I’m taking a look at your switcher module in the meantime.

    Thanks!
    -Arv

    1. Dunno about UsbManager API, but I guess you’re out of luck because kernel is missing modules for cdc-acm, pl2303, ft232 and others. Just compile them, insert and you will be able to use /dev/ttyUSBX/ || /dev/ttyACMX, as usual.

  2. Hi Necromant,

    how can I use the USB host once enabled? Do I need to open the tablet? and then?

    Thanks!
    Luck

  3. Ok thanks!

    Did you manage to pair a bluetooth keyboard to the ampe? I compiled a working hidp module, but my keyboard (actually the iCade) keeps disconnecting after some seconds of work… I use the official ICS 4.0.3 v1.1 firmware.

    Thanks again!

    Luck

  4. Hi Necromant,

    I also own a tablet with Allwinner A10 inside, mine is Shuoying Tablet PC A10 but my problem is that in the box it says it has USB OTG supported but when I plug in my MINI USB ADAPTER and try plug in a few hard disk (external) but nothing happens. I tried plug in mouse receiver but the same thing happens. Why is that? When I go look at the Setting>>>Storage>>>usbhost1 the words “Mount SD Card” is shadowed (means I cannot press that menu). So my question is that what seems to be the problem and can I use your above method to gain USB Host access?

    Thank you, Necromant

    1. @Sam: This tells absolutely nothing. Does the drive spin up? Is anything in dmesg? Does the tablet give the drive enough power? Check all of that before messing with configs.

  5. Hello,
    I used your module to enable the second usb port in my cubieboard.
    The second port is configured for usb wlan devices, so I deleted the wlan modules to have full controll of usb port.
    Your module works to activate the port power but the changes don’t remain after reboot.
    How can I turn on the power of usb port all the time it boots?
    And why the usb port1 is allways enabled for defaut and usb port2 no?

    Thanks

  6. @Diogoc: For cubieboard just use the 3.4 kernel. Or add the needed stuff somewhere to init scripts.

Leave a Reply to NecromantCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.