Mainline Linux
The stock kernel (4.4.205-perf+, built 2022-04-14) cannot be rebuilt or
patched, and no public GPL kernel source has been found from Sonim. A modern
kernel therefore means mainline Linux plus a custom XP8 device tree
(sdm630-sonim-xp8.dts) built on the SDM630 upstream support.
Upstream support (approximate)
The SDM630 family has broad upstream support via the SoMainline project and the
sdm660-mainline community, packaged by Nura (formerly postmarketOS) as
linux-postmarketos-qcom-sdm660. Rows marked SoC level mean the SoC block is
supported but the XP8 board still needs its own nodes.
| Subsystem | Status | Since |
|---|---|---|
| Clocks (GCC, RPM) | Upstream | 5.11+ |
| Pinctrl (TLMM) | Upstream | 5.11+ |
| Interconnects | Upstream | 5.11+ |
| UART / I²C / SPI | Upstream | 5.11+ |
| SPMI (PMIC bus) | Upstream | 5.11+ |
| Storage (eMMC / SDHCI) | Upstream | 5.11+ |
| CPUfreq / CPUidle / SMP | Upstream (SoC) | 5.11–5.15 |
| GPU (Adreno 508) | Upstream (SoC) | 5.14+ |
| USB (DWC3) | Upstream | 5.11+ |
| Remoteproc (modem, DSP) | Upstream | 5.11+ |
Display (DPU via drm/msm) |
Upstream (SoC) | 5.15+ |
| Camera (CAMSS) | Upstream (SoC) | 5.15+ |
| Audio (WCD934x, SLIMbus) | Upstream (SoC) | 5.11+ |
| Wi-Fi (WCN3990) | Upstream | 5.11+ |
| Bluetooth (WCN3990) | Upstream | 5.11+ |
Reference devices with similar hardware: Sony Xperia XA2 (sony-pioneer,
the original SDM630 reference), Xiaomi Redmi Note 7 (lavender, SDM660),
Xiaomi Mi Pad 4 (clover, SDM660), and Vsmart Active 1 (SDM660). Their
device trees are useful blueprints but do not copy board details — the XP8
differs in keys, GPIO reservations, panel, and connectors.
Per-peripheral status
| Part | Mainline driver | XP8 status |
|---|---|---|
| Cypress/Parade Gen5 touch | cyttsp5 |
Works (multi-touch verified) |
| Two TFA9890 amplifiers | tfa989x |
Works (tone played) |
| WCD934x codec | wcd934x |
Driver exists; needs ADSP + SLIMbus |
| NFC | nxp-nci (I²C) |
Powers up; no tag read |
| OV8856 front camera | ov8856 |
Driver exists; needs camera nodes |
| OV12A10 rear camera | none | New driver required |
| IMU / mag / pressure | st_lsm6dsx / bmi160, ak8975, st_pressure |
Behind the ADSP (SSC) |
| STK3420 prox/light | stk3310 lacks the ID |
Needs an ID or out-of-tree driver; behind the ADSP |
| PM660 charger | qcom_smbx |
Works |
| PM660 fuel gauge | not in mainline | Fork driver works |
| PM660 haptics | not in mainline | Fork driver runs; vibration unconfirmed |
| PM660L WLED / flash / RGB | qcom-wled, leds-qcom-flash, leds-qcom-lpg |
Works |
| Panel | none dedicated | Local NT35696 driver works |
| WCN3990 | ath10k_snoc, hci_qca |
Bluetooth up; Wi-Fi blocked by the aggre2 SMMU |
| aggre2 SMMU | arm-smmu |
Hangs on probe; needs a skip-init-style change |
| Adreno 508 | drm/msm + Freedreno |
Works (OpenGL ES 3.1; no Vulkan on Adreno 5xx) |
| Fingerprint | none | TEE-bound; out of scope |
Bring-up order
A low-risk order that proves control early:
- Core I/O and keys — storage (microSD boot, eMMC read-only), UART, and the nine GPIO/PMIC keys.
- Display and input — the DSI panel under
drm/msm, then touch. - GPU — Adreno 508 with the signed
a508_zapfirmware. - Power — charger, fuel gauge, battery ID, suspend-to-idle.
- Wireless —
qcom_q6v5_mss+ read-onlyrmtfs+pd-mapper+tqftpserv+ WCN3990 Wi-Fi/Bluetooth. - Remaining peripherals — audio, NFC, LEDs/flash, haptics, connectors, cameras, sensors.
XP8-specific quirks
- TrustZone GPIOs. The device tree must carry
gpio-reserved-ranges = <0 4>, <8 4>. Omitting<0 4>triggers an instant SoC reset during pinctrl init. - microSD. The slot has no card-detect line; use
non-removable;. - Touch power. PM660L L3 must be at 2.8 V before the controller answers.
- Interconnect / power-domain / clock
sync_statetraps. Around 10 s after boot, the interconnect, RPM power-domain, and MMCC providers can drop the display’s bandwidth and power, blanking the panel. Thesimple-framebuffernode must hold themdp0-meminterconnect and the multimedia SMMU clocks, and the RPM power-domain levels must be pinned (required-opps). - USB attached-bind reset. Binding the USB gadget while a host is attached resets the phone within ~0.3 s. Booting with the cable detached and binding later works. Avoid re-binding the UDC with a host attached.
- No CPU frequency scaling. No SDM630 cpufreq driver in the baseline; thermal passive trips cannot act, so guard sustained loads (critical shutdown is 110 °C).
rmtfsread-only. Any modem/WLAN bring-up must keeprmtfsread-only.- Debug output. The stock/derived kernel may have
CONFIG_PANIC_TIMEOUT=-1, which reboots instantly on panic — passpanic=0and log to storage while debugging. - Slot A boot counter. After flashing
boot_a, mark slot A successful again, or the phone fails over to slot B.
Graphics notes
- Adreno 508 needs the stock signed
a508_zap.*firmware to leave TrustZone secure mode. - Mesa
freedrenoprovides OpenGL 4.5 / OpenGL ES 3.2. Mesaturnip(Vulkan) does not support Adreno 5xx, so UI toolkits must use GLES or software rendering. - Rust UI built for
aarch64-unknown-linux-musldefaults to static linking, which breaksdlopenof MesalibEGL/libgbm/freedreno_dri.so. Build dynamically (-C target-feature=-crt-static) or link natively.