- LBC supervisor v1..v4 (linux/patches/b10b3-lbc-supervisor-v3.patch + b10/b10b3/lbc-v3-to-v4-fault-clamp.diff): CHARGING 4.20 V/450 mA -> HOLD 4.05 V after 60 min CV -> battery -> new cycle on USB insert; FAULT = VDD_MAX 4.00 V clamp - RAM tests C/B/D/D2/D3/D4 (safety timer only ends fast charge), B10B-4 actuator audit (VDD_MAX works, USB_SUSP does not), B10B-5 FAULT clamp regression, production run, warm reboot via PON reboot reason - cache = B10B-5 c3732515 (HW EDL write, readback + full partition verify), class-A persistent validation - test-only hooks/images are not part of the production kernel; images with the AP PSK are not published
14 lines
1.4 KiB
Bash
Executable file
14 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
# B10B-5 board side: arm ONE TEST OVP FAULT injection ("ovp") or "none" and log fast: 1 s x 12, then 5 s x 10 (≈ 62 s). Reads only, except the single hook write.
|
|
# usage: b10b4-act.sh TAG "susp 1"|"vdd 0"|"ibat 0"|none -> /tmp/b4-TAG.log
|
|
T=$1; CMD=$2; L=/tmp/b5-$T.log; R=/sys/kernel/debug/regmap/0-00/registers; D=/sys/bus/iio/devices/iio:device0; H=/sys/kernel/debug/pm8916_lbc/b10b5_fault
|
|
grep -q " /sys/kernel/debug " /proc/mounts || mount -t debugfs debugfs /sys/kernel/debug
|
|
rd() { dd if=$R bs=9 skip=$(($1)) count=1 2>/dev/null | cut -d' ' -f2; }
|
|
s() { echo "S $1 up=$(cut -d' ' -f1 /proc/uptime) vbat=$(cat $D/in_voltage6_input) vph=$(cat $D/in_voltage7_input) usbin=$(cat $D/in_voltage0_input) pmt=$(cat $D/in_temp8_input) chgst=$(rd 0x1009) crt=$(rd 0x1010) urt=$(rd 0x1310) path=$(rd 0x1308) susp=$(rd 0x1347) vdd=$(rd 0x1040) ibat=$(rd 0x1044) ctrl=$(rd 0x1049) failed=$(rd 0x104a) st=$(head -1 /sys/kernel/debug/pm8916_lbc/state | cut -d' ' -f2)" >> $L; }
|
|
trap '' HUP
|
|
echo "BEGIN $T cmd='$CMD' $(date -u +%T)" >> $L
|
|
s pre; s pre
|
|
if [ "$CMD" != none ]; then echo "$CMD" > $H; echo "WRITE rc=$? '$CMD' up=$(cut -d' ' -f1 /proc/uptime)" >> $L; sleep 1; dmesg | grep -E "FAULT safe clamp|B10B-5 TEST|-> FAULT" | tail -3 >> $L; fi
|
|
i=0; while [ $i -lt 12 ]; do s "+${i}s"; sleep 1; i=$((i+1)); done
|
|
i=0; while [ $i -lt 22 ]; do sleep 5; s "+$((12+5*i+5))s"; i=$((i+1)); done
|
|
echo "END $T $(date -u +%T)" >> $L
|