From 6767c50a07ceec0b4bb100a966ba8b616ff19fcf Mon Sep 17 00:00:00 2001 From: BFE Engineering Date: Mon, 24 Aug 2026 23:08:32 -0600 Subject: [PATCH] kernel/rv1106: capabilities audit + driver-provenance/openness ledger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Capabilities audit — classify every RV1106 SoC block against a 6.18 driver: GMAC (wired eth, enabled on-board), crypto-v3, trngv1 (hw RNG), OTP, mailbox, NPU, audio codec/DSM, pvtm still to port; camera/ISP + SPI are N/A (no HW). Provenance ledger — per [maintainer]'s openness directive extended to already-ported drivers: every ported driver is GPL-2.0 kernel source (vendor-src or mainline-sibling); the only binary in the whole path is on-device wifi-chip firmware, which by construction cannot be host source. No vendor binary is loaded into our kernel. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_017wB8KB3MMQztRDXCMCkPrf --- .../rv1106-enablement/CAPABILITIES-AUDIT.md | 35 ++++++++++++ kernel/rv1106-enablement/PROVENANCE.md | 54 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 kernel/rv1106-enablement/CAPABILITIES-AUDIT.md create mode 100644 kernel/rv1106-enablement/PROVENANCE.md diff --git a/kernel/rv1106-enablement/CAPABILITIES-AUDIT.md b/kernel/rv1106-enablement/CAPABILITIES-AUDIT.md new file mode 100644 index 0000000..29c9b28 --- /dev/null +++ b/kernel/rv1106-enablement/CAPABILITIES-AUDIT.md @@ -0,0 +1,35 @@ +# RV1106 hardware-capabilities audit — nothing left on the table + +Every block in the vendor SoC DT (`rv1106.dtsi`), classified. Goal: a 6.18 driver +for every capability the hardware actually has, open-source, verified. Camera/ISP +is the only whole class deliberately skipped — the 86-Panel has no camera. + +## ✅ Done / at parity (verified on warden-c8a3) +CRU clk · pinctrl (+ioc/pmuioc) · GIC · arch timer · pl330 DMA · 8250 uart (×3) · +dw_mmc eMMC · i2c · dw-wdt · **RTC** · **tsadc** · **RGA** (rga2, hw 3.3.87975) · +PWM backlight · **USB host** (dwc3/xhci) + usb2phy · grf/pmu syscons. + +## 🔨 In flight +- **AIC8800 wifi/BT** (SDIO on &sdmmc) — the M5 port (subagent building it). +- **VOP display** — binds; connector is tomorrow's on-panel work. +- **i2s-tdm** — DAI builds; needs the codec + card (below). +- **saradc** — driver matches; probe −22 (a clk-rv1106 SARADC divider issue). + +## ⬜ Remaining capabilities to port (open vendor source exists for all) +| Block | vendor compat | 6.18 mainline? | value | plan | +|---|---|---|---|---| +| **GMAC** (wired ethernet) | dwmac, `&gmac` okay on-board | no rv1106 in dwmac-rockchip | HIGH (wired net) | add rv1106 glue to dwmac-rockchip + PHY/DT | +| **crypto-v3** (accelerator) | rockchip,crypto-v3 | mainline has only v1 (rk3288) | med | port vendor crypto-v3 driver | +| **trngv1** (hardware RNG) | rockchip,trngv1 | none | HIGH (entropy for keys) | port vendor trng → hwrng | +| **OTP/nvmem** | rockchip,rv1106-otp | no rv1106 in rockchip-otp | med (chip id / MAC) | add rv1106 to rockchip-otp | +| **mailbox** (HPMCU) | rockchip,rv1106-mailbox | only rk3368 | med (proper coproc mbox vs /dev/mem) | port | +| **NPU** (rknpu) | rockchip,rknpu | none (no open userspace) | low-med | port kernel driver (`npu/PORT-PLAN.md`) | +| **audio codec + DSM** | rv1106-codec, codec-digital | none | med (panel has speaker) | port rv1106_codec.c + rk_dsm.c + card | +| **pvtm** (PVT monitors) | rv1106-{core,pmu}-pvtm | limited | low (DVFS) | port if DVFS pursued | + +## ❌ Not applicable (no hardware on the 86-Panel) +cif · csi2-dphy · mipi-csi2 · rkisp (all camera/ISP) · SPI (no on-board SPI device). + +## Order (after wifi) +GMAC → trngv1 → crypto-v3 → OTP → audio (codec/dsm) → NPU → mailbox → pvtm. +GMAC + trngv1 first: highest real value (wired net + hardware entropy). diff --git a/kernel/rv1106-enablement/PROVENANCE.md b/kernel/rv1106-enablement/PROVENANCE.md new file mode 100644 index 0000000..76f69eb --- /dev/null +++ b/kernel/rv1106-enablement/PROVENANCE.md @@ -0,0 +1,54 @@ +# Driver provenance & openness ledger + +[maintainer]'s directive: **every** driver we run on the self-built 6.18 kernel must be +open source we can read, harden, and bend — not a binary blob — and this applies +to the drivers *already* ported, not just the new ones. This ledger records, for +each, where the source came from and under what license. Every entry is GPL-2.0 +kernel source; nothing here is a binary-only kernel module. + +## Legend +- **vendor-src** — C source from the Rockchip 5.10 vendor SDK + (`flare-edge/sdk/sysdrv/source/kernel/`), forward-ported 5.10 → 6.18. +- **mainline-sibling** — 6.18 mainline driver, extended with an rv1106 data table + derived from a sibling SoC (rv1126/px30/rk3562) whose IP block matches. +- All Rockchip vendor kernel code is a GPL-2.0 fork of mainline Linux → GPL-clean. + +## Already-ported drivers (audited for openness per directive) +| Driver | Origin | License | Openness notes | +|---|---|---|---| +| clk-rv1106 (CRU) | vendor-src | GPL-2.0 | full register/PLL source; readable + hardenable | +| pinctrl-rockchip | vendor-src | GPL-2.0-only | rv1106 mux/drive tables in-source | +| rockchip_vop_reg VOP | mainline-sibling (rv1126) | GPL-2.0-only | data table only; no blob | +| phy-rockchip-inno-usb2 | mainline-sibling + vendor regs | GPL-2.0-or-later | rv1106_phy_cfgs from TRM/vendor | +| rockchip_saradc | mainline-sibling (v2) | GPL-2.0-or-later | 2-ch data table | +| rtc-rockchip | vendor-src | GPL-2.0 | whole driver, source | +| rockchip_thermal (tsadc) | vendor-src | GPL-2.0-only | rv1106 code-table + init from source | +| RGA (rga3/) | vendor-src | GPL-2.0 | full multicore 2D engine source | + +## In-flight +| Driver | Origin | License | Openness notes | +|---|---|---|---| +| AIC8800 wifi/BT | vendor-src (AICSemi) | `MODULE_LICENSE("GPL")` | full full-MAC source; 50 files use GPL-only kernel/cfg80211/sdio symbols; **no** proprietary/redistribution restriction in-tree | + +## The one unavoidable blob — and why it is *not* kernel code +- **`aic8800dc_fw`** (`/oem/usr/ko/`) is device firmware that the GPL host driver + *uploads to the wifi chip's on-die processor*. It never runs on the A7; it is not + linked into the kernel. This is the standard Linux firmware split (cf. every + ath10k/mt76 device) and is the only binary in the wifi path — the driver itself + is source. No open re-implementation of the AIC on-die MAC firmware exists; + reverse-engineering it is out of scope for the panel and buys nothing (the host + driver is where our control + hardening lives). + +## NPU — the openness line we will not cross +The **kernel** rknpu driver is portable GPL source (`npu/PORT-PLAN.md`). What is +closed is the *userspace* RKNN runtime + the regcmd stream format — a binary blob. +Per directive we do **not** ship that blob; if NPU compute is ever wanted, the open +path is a from-scratch/reverse-engineered regcmd encoder, tracked separately, never +a vendored binary runtime. (See `npu/PORT-PLAN.md` and the graphics investigation.) + +## Posture +Every kernel driver we run is source we hold. The only binaries in the whole +enablement are on-device *firmware* (wifi chip), which by construction cannot be +source on the host. That is the intended openness boundary: **host = source, +device-internal firmware = vendor blob**, and no vendor binary is ever loaded into +*our* kernel's address space.