Skip to content

Draft: hp-tenderloin: new device

Administrator requested to merge hp-tenderloin into master

Adds support for the HP TouchPad tablet, using the downstream 3.4 kernel used by the Evervolv Android ROM. USB networking, framebuffer, touchscreen, wifi, and headphone UART are working. Notable missing features are audio, Bluetooth (didn't try to make it work), camera (no big loss), USB host and GPU acceleration. CmdrWgls apparently worked on this device several years ago, but this is not based on any of their work. I plan to incorporate the relevant information below into the wiki article for the device.

Boot process and partitioning

From the factory, the TouchPad ran webOS, Palm's Linux based operating system. WebOS was installed to an LVM volume in /dev/mmcblk0p14. When Android was ported to the device, LVM remained in use, allowing Android to be easily installed alongside WebOS. I have continued this tradition, installing postmarketOS to an LVM volume. Unfortunately, this makes the TouchPad somewhat of a unique device in postmarketOS. I had to add a hook to activate LVM volumes, and because hooks run after the subpartition setup code, I had to manually run this hook earlier to avoid a long wait during boot.

We could likely find some more elegant way to accomplish this, but if you think using LVM is not worth the effort, it is probably possible to use a traditional subpartition setup in /dev/mmcblk0p14. I don't think the TouchPad's bootloader relies on the LVM partition, so it should be fine to wipe it, although I haven't tested that.

The bootloader loads a file named uImage from an ext3 filesystem in /dev/mmcblk0p13. This must be a multi-file uImage containing the kernel as the first file and the initramfs as the second. The commands to create this uImage are included as comments in the device package in this MR. I use (as does pretty much anyone running Android on the TouchPad) an intermediate LK based bootloader called moboot. It presents a UI to select from multiple uImages stored in /dev/mmcblk0p13 to enable multi-boot. In addition, it has an option to enable the headphone UART by setting GPIO pin 58.

Installation

None of the existing supported installation methods work out of the box on this device. I installed postmarketOS through the Android recovery installed on my device, first by manually creating new LVM volumes and then writing the rootfs with dd. webOS has a recovery/bootloader that uses Palm's novacom protocol, which I believe can boot a uImage but I don't think can write to the eMMC. Android ROMs are installed by booting some form of recovery through novacom and then flashing through it.

The device info currently has fastboot as a flasher, but this is a placeholder until we figure out a real flashing technique.

Hardware

Headphone UART

Like many devices, the TouchPad has a headphone UART, although there is almost no information about it on the internet. It is activated by setting GPIO pin 58. moboot provides a convenient way of enabling this feature by creating a file in /dev/mmcblk0p13 named moboot.sercon.<os_name> containing the string yes. The headphone UART is named /dev/ttyHSL0 in the downstream kernel. This MR enables a getty on this port. The voltage is somewhere around 2.7V, so I use a voltage divider to avoid any chance of damaging it with a 3.3V adapter. The left channel is TX and the right is RX.

Touchscreen

Most of the touchscreen driver is implemented in userspace, using a program called ts_srv. Currently this package is named ts-srv, but perhaps I should change it to something more device specific.

Audio

Audio doesn't work, even though the drivers are there and the alsa devices are created. Attempting to play or record audio results in an I/O error.

USB host

When a USB OTG cable is connected, dmesg shows the controller switching to host mode. The USB port is unable to supply power, but even if self powered devices are connected, they are not recognized. I have seen reports that USB host works in Android, although I haven't tested it myself.

GPU acceleration

One of the most important missing features to make this device useful (to me at least) is GPU acceleration. The downstream kernel supports KGSL, including kgsl_drm. I tried to use xf86-video-freedreno with kgsl_drm, but there appears to be some incompatibility. X crashes after running into the assertion here: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/freedreno/kgsl/kgsl_ringbuffer.c#L168. It seems like it might not be that hard to get past this problem, but it is beyond my current knowledge.

Mainline

I plan to look into getting mainline running on this device, particularly if I can't GPU acceleration working with the downstream kernel. There has been some recent work here: https://github.com/mbd98/hp-touchpad-linux. A lot of the hardware is supported upstream, but there is still a lot of work required to actually get it working.

Edited by Administrator

Merge request reports

Loading