A13 Q8 tablet & mainline kernel problems

50 views
Skip to first unread message

Oranż Metylowy

unread,
Mar 27, 2022, 10:16:10 PM3/27/22
to linux-sunxi
Hello,
I'm trying to run mainline Linux kernel on a Q8-format A13 tablet. In particular, along with Alpine Linux initramfs and packages.
I have three of them, one is a Q8_V07 and two are identical Q8A_V1.2.
I'm compiling v5.15 mainline on sunxi_defconfig and U-Boot v2021.10 on q8_a13_tablet_defconfig. (Newer U-Boot crashes with "initcall sequence failed", but that's already a different topic). Device trees for both images are sun5i_a13_q8_tablet. I did change some config options, but the problems described below aren't affected by my changes.

There are numerous problems regarding the LCD and USB. I thought I could ask here for help, because I'm running out of options.

[Q8, Q8A problem]
The LCD works perfectly fine in U-Boot. Booting the kernel corrupts the image (white flashes, colorful stripes, etc), unless I use the DTB straight from U-Boot, which makes it work.

[Q8A problem]
A much bigger issue is the USB. On the Q8A tablet, for some reason, the device just turns off when booting the kernel. I found that it happens whenever LDO3 is being turned on (USB1 VCC). The display goes black, the CPU stops responding, just like the power was cut. I can confirm it on both Q8A tablets (so it's not a hardware-faulty device), *however* this doesn't occur on the Q8. The Q8A power cut happens during hardware init, about 1.5sec after the kernel starts (also happens with Alpine generic-arm7l kernel, though in phase of loading kernel modules, 30sec later). LDO3 is responsible for WiFi USB card, so I just disabled it in DTB for now.

[Q8, Q8A problem]
With LDO3 disabled, the kernel boots fine on all three devices. And on all three of them, USB just doesn't work. It finds the two "Linux foundation" root HUBs, and nothing else. OTG power isn't applied (dmesg even states clearly "vcc-vusb0: disabling"). Devices aren't recognized with a powered USB hub. Plugging the USB at any time does not log anything in dmesg, even after enabling verbose identification. Forcing the power on ("regulator-always-on" for PG12 in DTB) makes no difference, except the power is actually ON. Disabling ID and power detect pins in DTB doesn't change anything.

On alpine generic-arm7l the same happens, with a slight difference of just one root HUB present.
USB OTG works perfectly fine in U-Boot. Also with keyboard input, I can type in the console on the LCD.

About the USB1 power:
In all DTBs I could find, USB1 is powered by AXP209's LDO3. Although, from script.bin files pulled from Q8A and Q8 firmwares, I still see different values. Q8 has it on PG11 in the FEX file, and strangely, Q8A has it on "port:power203" (which probably also translates to PG11). Does PG11 has something to do with AXP?

Now, here's the question. Where should I look in order to resolve these issues? Are there any more debugging options to enable in the kernel? Or maybe should I look for clues in the vendor kernels? Possibly on running Android instances? Or maybe does anyone know why do these issues occur?

I can post more information if you need any. I guess I'm doing something wrong, something probably very little and stupid.. but I can't figure it out by myself.

Thanks in advance
Kuba
Reply all
Reply to author
Forward
0 new messages