From 79ef2df67a4619bdbd654fa00de44f723c1b62e6 Mon Sep 17 00:00:00 2001 From: BFE Engineering Date: Mon, 24 Aug 2026 21:12:49 -0600 Subject: [PATCH] =?UTF-8?q?kernel:=20full-SoC=20DT=20transplant=20?= =?UTF-8?q?=E2=80=94=20batch-1=20peripherals=20at=20parity=20on=206.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move from the hand-built minimal DT to the vendor rv1106.dtsi (full SoC: pinctrl, gpio×5, dmac, cru+grf_cru, all peripherals), with our lean board DTS (rv1106-warden.dts) enabling only the wall-HMI's needs — no camera/ISP/CSI. Two deltas made it boot on 6.18: overwrite boot-mode.h with the vendor's (extra BOOT_* constants) and DELETE the psci node (no secure monitor → SMC fault → "Attempted to kill the idle task"). Recipe in dts/README.md. Verified on warden-c8a3 (uname 6.18.46, full WardenOS userspace): pinctrl, gpio0-4, pl330 DMA, uart1/2/4 (ttyS1/2/4), i2c3, dw-wdt (watchdog0) all probe. DRIVER-PARITY.md tracks the remaining ports (VOP display, AIC8800 wifi, rknpu, usb2phy, saradc-compat, RGA) toward full parity with the 5.10 kernel. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_017wB8KB3MMQztRDXCMCkPrf --- kernel/rv1106-enablement/DRIVER-PARITY.md | 41 +++++++++++++ kernel/rv1106-enablement/dts/README.md | 26 ++++++++ .../rv1106-enablement/dts/rv1106-warden.dts | 61 +++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 kernel/rv1106-enablement/DRIVER-PARITY.md create mode 100644 kernel/rv1106-enablement/dts/README.md create mode 100644 kernel/rv1106-enablement/dts/rv1106-warden.dts diff --git a/kernel/rv1106-enablement/DRIVER-PARITY.md b/kernel/rv1106-enablement/DRIVER-PARITY.md new file mode 100644 index 0000000..12a2276 --- /dev/null +++ b/kernel/rv1106-enablement/DRIVER-PARITY.md @@ -0,0 +1,41 @@ +# RV1106 6.18 driver parity vs the 5.10 vendor kernel + +Goal: every driver the panel's 5.10 kernel runs must work at ≥ parity on our +self-built 6.18. Source of truth = the running 5.10 system on warden-c8a3 +(`lsmod` + `/proc/interrupts`, captured 2026-08-24). Verify each on hardware via +the A/B `_b`-slot loop (`../docs/m2-boot-on-c8a3.md`); ✅ means confirmed on +c8a3, not just compiled. + +| Driver / node | 5.10 evidence | mainline? | 6.18 status | +|---|---|---|---| +| CRU clock (clk-rv1106) | — | ported | ✅ M2 | +| pinctrl-rockchip (rv1106) | — | ported | ✅ M2 | +| GIC-400 / arch_timer | arch_timer | mainline | ✅ M2 | +| dw_mmc (eMMC) | dw-mci | mainline | ✅ M3 | +| 8250 uart2 (console) | ttyS2 | mainline | ✅ M2 | +| GPIO (rockchip, ×5 banks) | gpio-rockchip | mainline | ✅ batch1 (chips 0–4) | +| DMA (pl330, ff420000) | ff420000.dma-controller | mainline | ✅ batch1 | +| uart1 / uart4 | ttyS1, ttyS4 | mainline | ✅ batch1 | +| I2C (dw-apb, ff460000=i2c3) | ff460000.i2c | mainline | ✅ batch1 (i2c-3) | +| watchdog (dw-wdt, ff5a0000) | ff5a0000.watchdog | mainline | ✅ batch1 (watchdog0) | +| thermal governor | rockchip_thermal | mainline | 🔨 gov up; tsadc node TODO | +| SARADC (ff3c0000) | ff3c0000.saradc | mainline (no rv1106 compat) | ⬜ needs compat fallback | +| GPIO_SYSFS (legacy /sys/class/gpio) | — | mainline (config) | ⬜ goodix script needs it | +| PWM (rockchip) | — | mainline (=m) | ⬜ batch2 =y (backlight) | +| RTC (rv1106-rtc) | — | **no mainline driver** | ⬜ port (low prio) | +| USB2 phy (inno, rv1106) | rockchip_usb2phy_* | mainline (no rv1106 data) | ⬜ port (data + tuning) | +| USB OTG gadget (DWC3, eth0) | eth0 | mainline dwc3 (needs phy) | ⬜ M6 (after phy) | +| USB host (xhci, usb1) | xhci-hcd:usb1 | mainline | ⬜ M6 | +| crypto (aes/ccm/ctr/arc4) | modules | mainline | ⬜ batch2 (config =y) | +| PSCI node (removed) | — | — | ✅ deleted (no secure monitor → SMC fault) | +| VOP display (ff990000) | ff990000.vop | rockchip DRM | ⬜ M4 | +| RGB666 720×720 panel + backlight | — | panel-simple/rockchip | ⬜ M4 | +| GT911 touch (goodix) | goodix, gt911 | mainline | ⬜ M4 | +| AIC8800 wifi (bsp/fdrv) | aic8800_* | **out-of-tree** | ⬜ M5 | +| AIC8800 BT (btlpm) | aic8800_btlpm | **out-of-tree** | ⬜ M5 | +| NPU (rknpu, ff660000) | rknpu, ff660000.npu | **out-of-tree** | ⬜ M6 | +| RGA 2D (rga2) | rga2 | rockchip | ⬜ M6 | +| I2S audio | i2s | rockchip | ⬜ M6 | +| FIQ debugger (ttyFIQ0) | fiq_glue | rockchip | ⬜ optional (we use ttyS2) | + +Legend: ✅ verified on hardware · 🔨 built, not yet verified · ⬜ not started. diff --git a/kernel/rv1106-enablement/dts/README.md b/kernel/rv1106-enablement/dts/README.md new file mode 100644 index 0000000..a31fa6d --- /dev/null +++ b/kernel/rv1106-enablement/dts/README.md @@ -0,0 +1,26 @@ +# RV1106 6.18 devicetree + +- **`rv1106-warden.dts`** — our board DT. `#include`s the vendor `rv1106.dtsi` + (the full SoC: pinctrl, gpio×5, dmac, cru+grf_cru, uart, emmc, i2c, saradc, + watchdog, usb, vop, npu, rga, …), then enables only what the wall-HMI needs. + No camera/ISP/CSI. Grows one driver batch at a time (see `../DRIVER-PARITY.md`). +- **`rv1106-warden-m2.dts`** — the earlier standalone minimal DT used to bring up + M2/M3 before the full-SoC transplant; kept for reference. + +## Transplanting the vendor SoC DT onto 6.18 (recipe) + +Copy into `arch/arm/boot/dts/rockchip/` of the 6.18 tree: +`rv1106.dtsi`, `rv1106-pinctrl.dtsi`, `rockchip-pinconf.dtsi`. Copy the +vendor-only dt-bindings headers into `include/dt-bindings/`: +`soc/rockchip-system-status.h`, `suspend/rockchip-rv1106.h`, +`display/media-bus-format.h`, and **overwrite** `soc/rockchip,boot-mode.h` +with the vendor's (it has extra BOOT_CHARGING/UMS/PANIC/WATCHDOG constants the +DT uses). Then the two hardware deltas: + +1. **Delete the `psci` node** from `rv1106.dtsi`. RV1106 has no secure monitor in + our boot chain, so `arm,psci-1.0` + `method="smc"` makes the SMC call fault → + `Oops - bad mode` → `Attempted to kill the idle task`. (Confirmed on c8a3.) +2. Enable the peripherals in the board DTS (`&uart2`, `&emmc`, …). + +Verified on warden-c8a3: pinctrl, gpio0–4, pl330 DMA, uart1/2/4, i2c3, dw-wdt all +probe; full WardenOS userspace boots. diff --git a/kernel/rv1106-enablement/dts/rv1106-warden.dts b/kernel/rv1106-enablement/dts/rv1106-warden.dts new file mode 100644 index 0000000..db8ab18 --- /dev/null +++ b/kernel/rv1106-enablement/dts/rv1106-warden.dts @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * WardenOS 86-Panel board DT for the self-built Linux 6.18 forward-port. + * + * Includes the full vendor rv1106.dtsi (SoC nodes + pinctrl + gpio + dmac), then + * enables only what our wall-HMI needs — no camera/ISP/CSI. Grows one driver + * batch at a time toward full parity with the 5.10 kernel (DRIVER-PARITY.md). + */ +/dts-v1/; + +#include "rv1106.dtsi" + +/ { + model = "WardenOS 86-Panel (RV1106)"; + compatible = "rockchip,rv1106-warden", "rockchip,rv1106"; + + chosen { + stdout-path = "serial2:115200n8"; + bootargs = "earlycon=uart8250,mmio32,0xff4c0000 console=ttyS2,115200n8 earlyprintk rootwait"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x10000000>; /* 256 MiB */ + }; +}; + +/* --- console --- */ +&uart2 { + status = "okay"; +}; + +/* --- eMMC rootfs (M3) --- */ +&emmc { + bus-width = <8>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + non-removable; + status = "okay"; +}; + +/* --- batch 1: mainline peripherals (wire DT + config) --- */ +&uart1 { + status = "okay"; +}; + +&uart4 { + status = "okay"; +}; + +&i2c3 { + status = "okay"; +}; + +&saradc { + status = "okay"; +}; + +&wdt { + status = "okay"; +};