Appendix · reference

PineTab2 kernel and source map

Megi, DanctNIX, postmarketOS, U-Boot, and the board-specific lessons worth carrying into FreeBSD.

This is the PineTab2 software-source map: which Linux/U-Boot trees are worth reading, what each one teaches, and which details should change our FreeBSD bring-up plan. It is intentionally source-driven; the tablet already has enough folklore.

Source Repositories

SourceWhat it isWhy it matters
Megi LinuxOndrej Jirman’s Linux branch stack, now on Codeberg after xff.cz/git/linux redirects thereHas explicit PineTab2 branch families: pt2-*, bes2600-*, husb311-*, typec-extcon-*, rk817-*
Megi U-BootPinePhone/PinePhone Pro-heavy U-Boot tree with Rockchip side branchesUseful for style and Rockchip boot ideas, but mainline U-Boot now has the PineTab2 target
DanctNIX linux-pinetab2PineTab2 mainline kernel plus distribution patch releasesLatest GitHub release inspected here: v6.15.2-danctnix2, published 2025-06-22, 23-patch zstd bundle
DanctNIX / Pine64 ArchArch Linux ARM distribution integration for Pine64 devicesPackage/release lineage for the factory-style PineTab2 images
postmarketOS PineTab2 wikiCurrent pmOS device statusShows the practical state: many tablet features work, WiFi remains partial, Bluetooth untested
postmarketOS package indexBuilt package metadataAs of the package page checked on 2026-05-01: linux-pine64-pinetab2 is 6.17.8-r0, maintained by Danct12
mainline U-Boot PineTab2 defconfigUpstream boot targetConfirms pinetab2-rk3566_defconfig, rk3566-pinetab2-v2.0.dtb, 1500000 baud UART, RockUSB/UMS, and both v0.1/v2.0 DTBs
mainline Linux/U-Boot DTS importShared PineTab2 hardware descriptionBest single table of board wiring: RK817, Goodix GT911, BOE DSI panel, SC7A20, OV5648, SARADC keys, USB rails, SD/eMMC
Pine64 PineTab2 docsBoard docs, recovery, known issuesRecords debug adapter behavior, Maskrom recovery, and known BES2600/camera/suspend limits
Pine64 USB guideNetwork workaround guideExplicitly says built-in BES2600 WiFi is not stable/functioning and recommends USB WiFi/Ethernet/phone tethering

What Megi Teaches

Megi’s current Linux branch list is more useful than a single diff. The branch families say which PineTab2 problems have needed independent maintenance across kernel versions:

Two Megi-authored patches are directly visible in the DanctNIX v6.15.2-danctnix2 patch bundle:

What DanctNIX Teaches

DanctNIX’s v6.15.2-danctnix2 release is a compact checklist of the non-mainline PineTab2 delta. The patch bundle contains 23 patches; the interesting board ones are:

Patch areaLesson for FreeBSD
RK817 charger overflow fixDo not copy RK818 assumptions blindly; the first FreeBSD pass keeps RK817 read-only and exposes charger/gauge sysctls before programming NVRAM or charge limits
vdd_gpu_npu always-on / boot-onTurning the GPU/NPU rail off can panic later when the driver re-enables it; first FreeBSD DT should keep it on
BES2600 staging driverThis is a huge mac80211 staging import, not a small SDIO quirk; first FreeBSD support should continue to use USB networking
BES2600 node/power sequencingThe tablet has vcc_wl, reset/power GPIOs, host-wake GPIOs, and U-Boot interaction; WiFi power state is board-fragile
HUSB311 + typec-extconFreeBSD needs a PineTab2 Type-C story distinct from PinePhone Pro FUSB302
RK3568 USB2 PHY tuningUSB host reliability may depend on PHY tuning, not only xHCI attach
SPI NOR at 50 MHzKeep SFC conservative until bench-proven
microSD SDR50Linux dropped from SDR104 to SDR50 after random read errors on fast UHS-1 cards
BES2600 P2P/testmode cleanupEven the Linux side is still removing feature surface to make the driver behave

The headline: DanctNIX treats the PineTab2 as mostly-mainline RK3566 plus a narrow but important board patch stack. FreeBSD should do the same.

Those lessons are now encoded in the local rk3566-pinetab2-v2.0-freebsd.dts wrapper rather than carried as prose only: TSADC stays disabled, microSD is capped at SDR50, SFC flash is kept at 50 MHz, and vdd_gpu_npu is marked boot-on/always-on.

What Mainline U-Boot Teaches

Mainline U-Boot already has a PineTab2 target. The defconfig says:

The PineTab2 U-Boot DTS overlay marks early-boot dependencies with bootph-*: GPIO0, I2C0, RK817 regulators, SFC flash, and the SD power rail. That is a good checklist for what must attach early or be left in firmware-safe state on FreeBSD.

What The Mainline DTS Teaches

The upstream DTS confirms several components we should not guess:

BlockDTS detailFreeBSD implication
Goodix touchgoodix,gt911 at i2c1 addr 0x5d, IRQ GPIO0_B0, reset GPIO0_C2Shared Goodix driver now handles GT911’s address-select reset and 0x8047 / 186-byte config block; orientation still needs panel proof
GPIO switchesgpio-keys children with linux,input-type = <EV_SW> for SW_TABLET_MODE and SW_LIDFreeBSD gpiokeys(4) needs switch-event handling, not keyboard scan-code mapping; local patch now adds that path
RK817 PMICi2c0 addr 0x20, IRQ GPIO0_A3, system-power-controllerNeeds RK817-specific battery/charger and codec work
CPU regulatorTCS4525 at i2c0 addr 0x1cDVFS can wait, but firmware defaults should be treated as a dependency
Panel pathVOP2 VP1 -> DSI0 -> BOE th101mb31ig002-28a, rotation 90Linux proves the panel path; FreeBSD should still use HDMI first
HDMI pathVOP2 VP0 -> DW-HDMI -> type-D connectorBest first graphical target
AudioRK817 codec on I2S1, speaker amp GPIO4_C2, HP detect GPIO4_C6Not a reuse of the phone’s RT5640 path
Accelerometersilan,sc7a20 at i2c5 addr 0x18, IRQ GPIO3_A2Different sensor from the phone’s MPU-6500; candidate FreeBSD sc7a20 driver now handles probe and polled axis reads
SARADC keyschannel 0, volume-up threshold 297500 uV, volume-down 1750 uVrk_saradc now matches RK3568-compatible nodes; rk_adc_keys uses the DTS thresholds and reports last sample/threshold/delta sysctls
SPI NORSFC jedec,spi-nor, dual-rx, single-txStart slow; DanctNIX/Megi use 50 MHz
microSDmainline advertises SDR104; DanctNIX forces SDR50FreeBSD should bias to SDR50 until transfer tests prove otherwise

What postmarketOS Teaches

postmarketOS is useful because it records user-visible state, not just kernel code. Its PineTab2 wiki says the port is in testing, uses a mainline-ish kernel, and marks these as working: battery, screen, touchscreen, keyboard, touchpad, 3D acceleration, audio, camera flash, USB OTG, HDMI/DP, accelerometer, U-Boot SD/eMMC boot, and U-Boot buttons. WiFi is Partial; Bluetooth is Untested.

The same page warns not to flash postmarketOS to internal storage because the image does not include a bootloader, and notes that devices from before November 2024 need a U-Boot update to at least 2023.07.02-2 before SD cards boot reliably.

FreeBSD Takeaways

  1. Keep PineTab2 first boot boring. Use mainline U-Boot’s PineTab2 target, serial, microSD/eMMC, USB, and micro-HDMI. Do not make DSI, internal WiFi, suspend, or cameras part of the first success criteria.
  2. Carry over the board scars immediately. The local first-boot DTB starts with SPI NOR 50 MHz, microSD SDR50, vdd_gpu_npu always-on, and TSADC disabled until the RK3566 thermal path is audited. It also disables DSI/panel, camera CSI, audio/I2S, PCIe, GPU, and internal SDIO WiFi so the first run stays focused on boot, storage, USB, HDMI, and I2C visibility.
  3. Treat Type-C as a new driver problem. PinePhone Pro’s FUSB302 work is conceptually useful, but PineTab2 uses a HUSB311/TCPCI-style path plus role-switch/extcon plumbing in Linux.
  4. Treat RK817 as its own PMIC. Charger, battery, codec, boost, OTG switch, and poweroff sequencing deserve a separate audit from RK818.
  5. Leave BES2600 out of phase one. The Linux driver is large, staging-quality, firmware-coupled, and affected by board reset limitations. USB WiFi/Ethernet is the pragmatic FreeBSD network path.
  6. Use Linux DTS as the component backlog. Goodix GT911, SC7A20, SARADC keys, GPIO tablet/hall switches, RK817 audio, BOE DSI panel, and OV5648 all have enough board description to write targeted FreeBSD candidates later.