From 74797ba6e00d01bec6c4318426f77defb5d8e044 Mon Sep 17 00:00:00 2001 From: mcc45tr Date: Wed, 2 Sep 2026 00:07:19 +0300 Subject: [PATCH] senemos: add staged 7.2.2 HIL validation plan --- senemos/6.17-to-7.2.2-port-status.md | 33 +++++++++ senemos/7.2.2-hil-plan.md | 59 ++++++++++++++++ senemos/hil/nabu-hil-collect.sh | 102 +++++++++++++++++++++++++++ 3 files changed, 194 insertions(+) create mode 100644 senemos/6.17-to-7.2.2-port-status.md create mode 100644 senemos/7.2.2-hil-plan.md create mode 100755 senemos/hil/nabu-hil-collect.sh diff --git a/senemos/6.17-to-7.2.2-port-status.md b/senemos/6.17-to-7.2.2-port-status.md new file mode 100644 index 000000000000..34dc89ad4243 --- /dev/null +++ b/senemos/6.17-to-7.2.2-port-status.md @@ -0,0 +1,33 @@ +# Nabu 6.17 to 7.2.2-test port status + +This table is the source and HIL status ledger for the `7.2.2-test` branch. +"Built" means that the merged Fedora/Nabu configuration completed `Image`, +Nabu DTB and module compilation. It never means that physical hardware has +passed. HIL results must be recorded against the gates in +`7.2.2-hil-plan.md`. + +| Area | 6.17 behaviour carried forward | 7.2.2-test implementation | Source/build status | Required HIL gate | +|---|---|---|---|---| +| Sensor foundation | SLPI/SSC firmware, SDSP FastRPC and mount matrices expose accelerometer, gyro, magnetometer, ALS and proximity data | Fail-closed FastRPC memory ownership, validated VMIDs, deduplicated ranges and explicit SDSP DT requirements; standard IIO and SensorProxy contract retained | Built; physical samples not yet collected | G3, then G4 and G5 | +| Automatic rotation, brightness and compass | The three user-visible sensor functions are the first milestone | GNOME is the first reference, while raw IIO and SensorProxy D-Bus remain desktop/distribution neutral | Plan and collector ready; HIL pending | G3-G5; all three must pass together | +| PM8150 RTC and diagnostics | PMIC RTC plus suspend/crash evidence | PM8150 RTC is built in as `rtc0`; EFI RTC is disabled; ramoops, pstore ftrace, PM debug and DPM watchdog are enabled | Built | G2 and G7 | +| GENI SPI and NT36523 | DMA-only transfer recovery, bounded cancel/abort and gesture recovery | Explicit bounded recovery state including `FAULTED`; NT36523 retry/recovery is bounded and suspend gestures are gated | Built | G6 and G7 | +| Touch/DT2W/display lifecycle | NT36523 DT2W and display lifecycle integration | Existing 7.2.2 display/touch integration retained; new bounded SPI recovery and suspend-preparation gate added | Built | G6-G7 | +| Keyboard, HID, tablet and pen | Explicit computer mode, HID filtering and tablet/pen policy | Explicit keyboard mode and tablet-mode driver carried forward; keyboard wake is armed only during system suspend | Built | G6-G7 | +| Wi-Fi and Bluetooth | SNOC wake, local crash teardown, channel-less survey filtering and conservative HCI framing | SNOC wake already present in the 7.2 base; crash teardown/filtering and complete WCN3990 supplies carried forward | Built | G8 | +| CS35L41 and Slimbus | Real supplies, bounded power-down recovery, missing PDN_DONE policy and duplicate-UP tolerance | All four amplifiers have real supplies; recovery/logging and Slimbus idempotency carried forward and adapted to the 7.2 property API | Built | G8 | +| FastRPC ownership | Memory/refcount fixes and VMID validation, with an experimental retained-ownership exception | Fail-closed SCM handling is the default; retained ownership is accepted only for explicit DT opt-in and only for `-EINVAL`; reserved ranges are tracked and released | Built | G3 and G7 | +| Charging policy | PM8150B telemetry, JEITA, OEM limits, connector thermistor and thermal cutoff | 1.95 A/4.45 V conservative limits, cooling tables, connector overheat cutoff, hysteresis and fail-safe sensor handling | Built; high-power HIL deliberately blocked | G10 | +| LN8000 protected charge pump | Optional protected direct-charging path and unwired NTC handling | Driver, binding, protection thresholds and unwired input-NTC policy carried forward; normal DTB omits `lionsemi,allow-direct-charging` | Built but direct 2:1 disabled | G11 on a separate opt-in DTB | +| Iris/Venus | SM8150 Iris firmware boot, Venus coordination, cached capture and 10-bit decode | Current 7.2.2 Iris architecture retained; only legacy Venus coexistence/API fields and suspend guard restored where the full build proved they were required | Both Iris and Venus directories plus full kernel built | G7 and G9 | +| Camera | Camera/CCI integration changed independently after 6.17 | Current camera overlay retained; no old camera patch was copied over the newer implementation | Built only; no camera pass claimed | G9 requires probe, graph, pattern and captured frame | +| USB-C OTG/VBUS | 6.17 used dual-role DWC3 with built-in PMIC Type-C/VBUS path | Fixed 7.2 host-only config; DWC3 DRD/gadget/role switch, PMIC Type-C, VBUS regulator, FSA4480 and SM8150 SNPS FEMTO PHY are built in; connector owns `vbus-supply` | Built and DTB-inspected; reported 7.2/7.2.2 physical failure remains unverified on this fix | G2 blocks all later HIL until ESP32S3 powers and enumerates | + +## Current release boundary + +The branch has passed source hygiene, changed-object compilation, full +`Image`/DTB/modules compilation and the changed binding/DTB schema checks. +It has not passed Nabu cold boot, GNOME sensor UX, USB-C electrical behaviour, +camera capture, suspend endurance or charging qualification. Keep Android and +the known-good 6.17 boot entry available and install this line only as a +separate alpha/test boot choice. diff --git a/senemos/7.2.2-hil-plan.md b/senemos/7.2.2-hil-plan.md new file mode 100644 index 000000000000..7ab119019d94 --- /dev/null +++ b/senemos/7.2.2-hil-plan.md @@ -0,0 +1,59 @@ +# Nabu Linux 7.2.2-test validation plan + +## Release rule + +This branch is an alpha test line. Source review, a successful build, RPM/COPR +publication and a boot are separate gates. None of them promotes the kernel to +stable. Keep Android and the known-good Linux 6.17 entry bootable throughout +the campaign. A failed gate stops the next destructive or high-power step. + +GNOME on Fedora Rawhide is the first reference environment. The hardware +contract is nevertheless desktop- and distribution-neutral: kernel IIO/input, +power-supply, V4L2/media, ALSA and rfkill interfaces plus the standard +SensorProxy D-Bus API. GNOME-specific observations are acceptance tests, not +kernel dependencies. + +## Gate table + +| Gate | Work and automated checks | Physical HIL acceptance | Stop/rollback condition | +|---|---|---|---| +| G0: bench safety | Record current kernel, EFI entries, DTB and RPM hashes; verify 6.17 and Android fallbacks; capture battery temperature/voltage; run `nabu-hil-collect.sh preflight` | Tablet boots the unchanged fallback and charger can be disconnected | Missing fallback, battery outside 15-40 C, swollen/hot pack, or incomplete backup | +| G1: source/config | `git diff --check`; merged config; DTB build; schema checks; changed-object and full Image/modules build; confirm RTC/ramoops/charge invariants | None; no target installation | Compiler, modpost, DT, schema, config or invariant failure | +| G2: cold boot | Install as a new same-name test EVR/UKI without deleting 6.17; collect boot/pstore/remoteproc/IOMMU logs | Three cold boots; display, touch, UFS and battery telemetry work; USB-C enters host and device roles, sources VBUS to an ESP32S3 and enumerates it; no reboot loop | Panic, storage error, missing input/display, failed OTG/VBUS, uncontrolled charging, repeated probe storm | +| G3: sensor foundation | Verify SLPI remoteproc, SDSP FastRPC, firmware registry, `iio:device*`, SensorProxy D-Bus and changing raw samples | Accelerometer and gyro react on all axes; magnetometer heading changes; front/rear ALS change under cover/light; proximity changes | SLPI crash, all-zero/stuck data, invalid mount matrix, repeated reconnect loop | +| G4: GNOME sensor UX | Run `monitor-sensor`; enable GNOME automatic orientation and automatic brightness; log D-Bus properties | Rotate through normal/left/right/bottom-up twice; screen follows without oscillation; brightness rises/falls smoothly; compass completes a 360-degree turn | Wrong axis, rapid orientation flapping, brightness jump/flicker, sensor loss after lock/unlock | +| G5: portable userspace | Repeat raw IIO and SensorProxy checks without GNOME; test one non-GNOME session and one non-Fedora rootfs/container package set | KDE/Plasma or wlroots consumer receives orientation; Debian/Arch-family userspace sees the same D-Bus/IIO contract | Any requirement on GNOME settings, Fedora paths, or private KDE code | +| G6: input/accessories | Exercise NT36523 touch, DT2W, suspend gesture gate, pen, explicit keyboard computer/tablet modes and hot detach/attach | 500 touch/pen events, 25 keyboard mode transitions, 20 DT2W cycles; no stuck key/touch; mouse alone never forces laptop mode | GENI FAULTED loop, stale touch after resume, keyboard wake storm, false tablet-mode switch | +| G7: suspend/resume | Capture wakeup sources and ramoops; run idle, sensor-active, keyboard-attached and post-Iris-decode cycles | 25 s2idle cycles per case; sensors resubscribe; touch/keyboard/Wi-Fi/audio return; Iris does not abort suspend | Any failed suspend, SLPI crash, wake loop, lost device, pstore oops or growing error count | +| G8: connectivity/audio | Test ath10k association/traffic/recovery, Bluetooth reconnect and four CS35L41 channels; exercise service restart and transport loss | 30 minutes Wi-Fi load plus one AP roam; BT reconnects; all speakers work without PDN timeout storm | Kernel crash, firmware recovery loop, missing supply, speaker overheat/distortion | +| G9: media | Run media graph and V4L2 compliance; decode H.264/VP9 and P010; test cameras separately by probe, graph, pattern and frame capture | Repeated stream-on/off and decode; suspend after decode; real captured frame for each camera sensor | Firmware boot loop, buffer leak, corrupt frame, CCI timeout, failed suspend | +| G10: charging safety | Start at USB SDP/5 V with current-limited lab supply; verify PM8150B telemetry, JEITA, cooling states and connector thermistor; only then test 9 V PD | Current/voltage never exceed 1.95 A/4.45 V policy; hot/cold JEITA and connector overheat stop charging and recover with hysteresis | Missing/implausible thermistor, current overshoot, overvoltage, thermal latch failure; disconnect power immediately | +| G11: LN8000 qualification | Keep `lionsemi,allow-direct-charging` absent for the release candidate; qualify direct 2:1 only on a separate opt-in DTB with instrumented supply and thermal probes | Protection IRQs, input OVP/OCP, battery OVP and recovery are proven before any sustained load | Any protection uncertainty. Never merge opt-in into the normal DTB from source/build evidence alone | +| G12: soak/release | Run 8-hour mixed idle/video/network/suspend soak; compare warnings, wakeups, battery drain and memory against 6.17 | No new oops/hang; acceptable idle drain; all prior gates remain green | Regression or missing evidence; boot 6.17 and retain 7.2.2-test as alpha | + +## Sensor-first acceptance record + +The first milestone is complete only when automatic rotation, automatic +brightness and compass are all functional together. Record for every run: +kernel build ID and DTB hash, firmware package versions, distribution/desktop, +orientation sequence, raw accelerometer/gyro/magnetometer/ALS samples, +SensorProxy output, suspend count and attached accessories. Passing rotation +alone does not close the sensor milestone. + +Expected Nabu SSC devices are LSM6DSO accelerometer/gyroscope, AK0991x +magnetometer, TCS3701 ambient-light/color/proximity, ADUX1050 proximity/SAR and +BU27030 rear ambient light. Device publication must be discovered at runtime; +tests must not depend on a fixed `iio:deviceN` number. + +## Evidence handling + +Run `senemos/hil/nabu-hil-collect.sh ` before and +after every HIL gate. Preserve the resulting text files with the installed RPM +NEVRA, UKI hash and pass/fail record. After a crash, collect `/sys/fs/pstore` +before another test boot. Do not mark camera, charging or suspend as validated +from a successful source build. + +The collector does not require an ESP32 or a working USB link. While USB-C is +under repair, run it locally on Nabu with an output directory on the root +filesystem and retrieve the report later over the already-authorized network +path. This fallback is for diagnosis only; failed OTG/VBUS still blocks G2. diff --git a/senemos/hil/nabu-hil-collect.sh b/senemos/hil/nabu-hil-collect.sh new file mode 100755 index 000000000000..789d6fd00cac --- /dev/null +++ b/senemos/hil/nabu-hil-collect.sh @@ -0,0 +1,102 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only +# Read-only evidence collector for Nabu HIL gates. + +set -eu + +stage=${1:-unspecified} +output_dir=${2:-./nabu-hil-evidence} +timestamp=$(date -u +%Y%m%dT%H%M%SZ) +report="$output_dir/${timestamp}-${stage}.txt" + +mkdir -p "$output_dir" +umask 077 + +run() +{ + printf '\n$ %s\n' "$*" + "$@" 2>&1 || true +} + +read_files() +{ + pattern=$1 + for file in $pattern; do + [ -f "$file" ] || continue + printf '%s=' "$file" + dd if="$file" bs=4096 count=1 2>/dev/null || true + printf '\n' + done +} + +{ + printf 'stage=%s\nutc=%s\n' "$stage" "$timestamp" + run uname -a + run sh -c 'cat /proc/cmdline' + run sh -c 'cat /etc/os-release' + run systemd-detect-virt + run bootctl status + run systemctl --no-pager --full status iio-sensor-proxy.service + run systemctl --no-pager --full status hexagonrpcd-sdsp.service + run systemctl --no-pager --full status rmtfs.service + + printf '\n--- remote processors ---\n' + read_files '/sys/class/remoteproc/remoteproc*/name' + read_files '/sys/class/remoteproc/remoteproc*/state' + read_files '/sys/class/remoteproc/remoteproc*/firmware' + + printf '\n--- IIO discovery and samples ---\n' + read_files '/sys/bus/iio/devices/iio:device*/name' + read_files '/sys/bus/iio/devices/iio:device*/in_*_raw' + read_files '/sys/bus/iio/devices/iio:device*/in_*_input' + read_files '/sys/bus/iio/devices/iio:device*/in_*_scale' + read_files '/sys/bus/iio/devices/iio:device*/mount_matrix' + if command -v timeout >/dev/null 2>&1 && command -v monitor-sensor >/dev/null 2>&1; then + run timeout 15s monitor-sensor --all + fi + run busctl --system introspect net.hadess.SensorProxy /net/hadess/SensorProxy + + printf '\n--- input and wake ---\n' + run sh -c 'cat /proc/bus/input/devices' + read_files '/sys/class/wakeup/*/name' + read_files '/sys/class/wakeup/*/event_count' + read_files '/sys/class/wakeup/*/wakeup_count' + + printf '\n--- USB-C and role switch ---\n' + read_files '/sys/class/typec/port*/power_role' + read_files '/sys/class/typec/port*/data_role' + read_files '/sys/class/typec/port*/port_type' + read_files '/sys/class/typec/port*-partner/accessory_mode' + read_files '/sys/class/usb_role/*/role' + find /sys/bus/usb/devices -maxdepth 2 -type f \ + \( -name product -o -name manufacturer \) -print 2>/dev/null | + sort | while IFS= read -r file; do + printf '%s=' "$file" + sed -n '1p' "$file" || true + done + + printf '\n--- power and thermal ---\n' + read_files '/sys/class/power_supply/*/type' + read_files '/sys/class/power_supply/*/status' + read_files '/sys/class/power_supply/*/health' + read_files '/sys/class/power_supply/*/voltage_now' + read_files '/sys/class/power_supply/*/current_now' + read_files '/sys/class/power_supply/*/temp' + read_files '/sys/class/power_supply/*/charge_control_limit' + read_files '/sys/class/thermal/thermal_zone*/type' + read_files '/sys/class/thermal/thermal_zone*/temp' + + printf '\n--- media, sound and radio ---\n' + run media-ctl -p + run v4l2-ctl --list-devices + run aplay -l + run rfkill list + run iw dev + + printf '\n--- kernel evidence ---\n' + run sh -c 'dmesg | tail -n 1200' + run journalctl -b -k --no-pager -n 1200 + run sh -c 'find /sys/fs/pstore -maxdepth 1 -type f -print -exec sed -n "1,400p" {} \;' +} >"$report" + +printf '%s\n' "$report"