Jump to content

Allwiner A10 tablet USB not working [SOLVED]


bartek666666

Recommended Posts

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?

Link to comment
Share on other sites

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 ...

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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";
};

 

Link to comment
Share on other sites

  • 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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines