Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Allwiner A10 tablet USB not working [SOLVED]

Featured Replies

Hi

I've successfully booted amrbian (Armbian_21.02.3_Cubieboard_focal_current_5.10.21.img.xz) on GoClever A971 tab. System starts normally but it doesn't recognize usb keyboard (uboot and armbian). I can connected via shh over wifi but i have no idea how to fix it. Anyone?

I'd wager it's a DTB difference, which is telling the kernel that there's substantially different hardware than is actually there.

 

I'd suggest starting with the provided software image. See if you can disassemble it, extract the device tree / DTB, and start looking for differences.

 

It might be as simple as telling the kernel that there's a USB controller at address XXXX, but might need to specify resets, regulators, etc ...

  • Author

Since this is old android 4 I've extracted script.bin and converted it to fex.

 

[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 = port:PH05<0><0><default><default>
usb_drv_vbus_gpio = port:PB09<1><0><default><0>
usb_host_init_state = 0

 

in cubieboard.dts we have this

	usb0_id_detect_pin: usb0-id-detect-pin {
		pins = "PH4";
		function = "gpio_in";
		bias-pull-up;
	};

 

so it should be PH5? it there any other usb configuration?

On 5/22/2021 at 4:34 AM, bartek666666 said:

so it should be PH5? it there any other usb configuration?

 

There might be, but offhand I don't have any experience with this tablet. Try it and see if you get further?

 

It is possible that a GPIO might control USB power, or hold the USB PHY in reset. Chasing these issues is sometimes difficult.

  • Author

Nope, PH4 or PH5 is not working, lsusb shows onlny wifi adapter (witch is soldered to second usb).

 

bartek@cubieboard:~$ lsusb
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

system diagnostic http://ix.io/3nFl

  • Author

When I've plugged an USB drive lsusb didn't show anything, and led didnt blink or anything. So Im guessing USB is getting no power. So I've added:

 

&pio {
        usb0_id_detect_pin: usb0-id-detect-pin {
                pins = "PH4";
                function = "gpio_in";
                bias-pull-up;
        };
        usb0_vbus_detect_pin: usb0-vbus-detect-pin {
                pins = "PH5";
                function = "gpio_in";
                bias-pull-down;
        };

};
&usbphy {
        pinctrl-names = "default";
        pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
        usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_det-gpio = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
};

 But still no power. Any ideas?

  • Author

Okay, I'm a noob but finally it works. .dts for anyone that is curious. now i just need to enable LCD in u-boot

 

/dts-v1/;
#include "sun4i-a10.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pwm/pwm.h>

/ {
        model = "Cubietech Cubieboard";
        compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10";

        aliases {
                serial0 = &uart0;
        };

        chosen {
                stdout-path = "serial0:115200n8";
        };

        hdmi-connector {
                compatible = "hdmi-connector";
                type = "a";

                port {
                        hdmi_con_in: endpoint {
                                remote-endpoint = <&hdmi_out_con>;
                        };
                };
        };
        
};

&ahci {
        target-supply = <&reg_ahci_5v>;
        status = "okay";
};

&codec {
        status = "okay";
};

&cpu0 {
        cpu-supply = <&reg_dcdc2>;
};

&de {
        status = "okay";
};

&ehci0 {
        status = "okay";
};

&ehci1 {
        status = "okay";
};

&emac {
        phy-handle = <&phy1>;
        status = "okay";
};

&emac_sram {
        status = "okay";
};

&hdmi {
        status = "okay";
};

&hdmi_out {
        hdmi_out_con: endpoint {
                remote-endpoint = <&hdmi_con_in>;
        };
};

&i2c0 {
        status = "okay";

        axp209: pmic@34 {
                reg = <0x34>;
                interrupts = <0>;
        };
};

&i2c1 {
        status = "okay";
};

&ir0 {
        pinctrl-names = "default";
        pinctrl-0 = <&ir0_rx_pins>;
        status = "okay";
};

&mdio {
        status = "okay";

        phy1: ethernet-phy@1 {
                reg = <1>;
        };
};

&mmc0 {
        vmmc-supply = <&reg_vcc3v3>;
        bus-width = <4>;
        cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
        status = "okay";
};

&ohci0 {
        status = "okay";
};

&ohci1 {
        status = "okay";
};

&otg_sram {
        status = "okay";
};

&pio {
        usb0_id_detect_pin: usb0-id-detect-pin {
                pins = "PH4";
                function = "gpio_in";
                bias-pull-up;
        };
        usb0_vbus_detect_pin: usb0-vbus-detect-pin {
                pins = "PH5";
                function = "gpio_in";
                bias-pull-down;
        };

};

&reg_ahci_5v {
        status = "okay";
};

#include "axp209.dtsi"

&ac_power_supply {
        status = "okay";
};

&reg_dcdc2 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
        regulator-max-microvolt = <1400000>;
        regulator-name = "vdd-cpu";
};

&reg_dcdc3 {
        regulator-always-on;
        regulator-min-microvolt = <1000000>;
        regulator-max-microvolt = <1250000>;
        regulator-name = "vdd-int-dll";
};

&reg_ldo1 {
        regulator-name = "vdd-rtc";
};

&reg_ldo2 {
        regulator-always-on;
        regulator-min-microvolt = <3000000>;
        regulator-max-microvolt = <3000000>;
        regulator-name = "avcc";
};

&reg_usb0_vbus {
        status = "okay";
};

&reg_usb1_vbus {
        status = "okay";
};

&reg_usb2_vbus {
        status = "okay";
};

&spi0 {
        pinctrl-names = "default";
        pinctrl-0 = <&spi0_pi_pins>,
                    <&spi0_cs0_pi_pin>;
        status = "okay";
};

&uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pb_pins>;
        status = "okay";
};

&usb_otg {
        dr_mode = "host";
        status = "okay";
};

&usbphy {
        pinctrl-names = "default";
        pinctrl-0 = <&usb0_id_detect_pin>, <&usb0_vbus_detect_pin>;
        usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
        usb0_vbus_det-gpio = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
        usb0_vbus-supply = <&reg_usb0_vbus>;
        usb1_vbus-supply = <&reg_usb1_vbus>;
        usb2_vbus-supply = <&reg_usb2_vbus>;
        status = "okay";
};

 

  • bartek666666 changed the title to Allwiner A10 tablet USB not working [SOLVED]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.