Jump to content

[Solved] Debian on A20 TV box: USB partially working


alexy314

Recommended Posts

Hi all,

 

I'm trying to get Debian on an A20 TV box. Now I've successfully got debian up and running, but only one of the two usb ports is working.

There is +5V power on the non-working USB port, but plugged in device cannot be seen in lsusb, and nothing is logged in dmesg.

 

My current script.fex: http://paste.ubuntu.com/13887802/

 

 

[usbc0]
usb_used = 1
usb_port_type = 2
usb_detect_type = 1
usb_id_gpio = port:PH04<0><1><default><default>
usb_det_vbus_gpio = "axp_ctrl"
usb_drv_vbus_gpio = port:PB09<1><default><default><0>
usb_restrict_gpio = port:PH00<1><0><default><0>
usb_host_init_state = 0
usb_restric_flag = 0
usb_restric_voltage = 3550000
usb_restric_capacity = 5


[usbc1]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_drv_vbus_gpio = port:PH06<1><0><default><0>
usb_restrict_gpio =
usb_host_init_state = 1
usb_restric_flag = 0


[usbc2]
usb_used = 1
usb_port_type = 1
usb_detect_type = 0
usb_drv_vbus_gpio = port:PH03<1><0><default><0>
usb_restrict_gpio =
usb_host_init_state = 1
usb_restric_flag = 0

[usb_wifi_para]
usb_wifi_used = 1
usb_wifi_usbc_num = 2
 

 

 

Why usb_id_gpio is not configured in [usbc1] and [usbc2]?

 

My guess of the USB schematics:

 

A20 USB OTG - USB Port

A20 USB Host 1 - USB Port

A20 USB Host 2 - Realtek RTL8188etv Onboard WLAN

 

 

I'm relatively new to this, and currently have little idea about how to find out the correct configuration.

 

Any hints?

 

Thanks in advance! And sorry for my bad English. ;-)

Link to comment
Share on other sites

I'm completely confused...

 

My idea is: If I cannot enable the non-working port, try if I can disable the working port to find out which one of [usbc0] [usbc1] and [usbc2] is the currently working port.

 

I tried altering usb_id_gpio in [usbc0], usb_drv_vbus_gpio in [usbc0] [usbc1] and [usbc2], but cannot disable the working port.

 

So...I'm completely lost. Where is the 'key' config?

 

Thanks!

Link to comment
Share on other sites

OK. I've partially solved my own problem.

 

I managed to find out the non-working usb port is [usbc0], which is linked to the OTG controller in the A20 SoC.

 

So I added the following config and recompiled the kernel:

 

Changed 0 to 1 at the line #37 of the drivers/usb/host/sw_hci_sunxi.h 

CONFIG_USB_SW_SUNXI_USB=y
CONFIG_USB_SW_SUNXI_USB_MANAGER=y
CONFIG_USB_SW_SUNXI_USB0_OTG=y
CONFIG_USB_SW_SUNXI_USB_DEBUG=y
Then use the [usbc0] config from ybkj_a20_jn.fex

 

Then a fifth bus appeared in lsusb, and I'm able to see a USB flash drive attached to the port:

# lsusb
Bus 001 Device 002: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0179 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Now the only problem is the drive cannot be seen in /dev.

http://paste.ubuntu.com/13966784/

 

Reference:

https://github.com/linux-sunxi/linux-sunxi/issues/158

https://www.olimex.com/forum/index.php?topic=86.0

http://www.cubieforums.com/index.php?topic=672.10;wap2

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines