B23: faster charging — LBC fast-charge current 450 -> 720 mA (DTB only), persistent cache B23
This commit is contained in:
parent
4983fe2f76
commit
cf24356a83
15 changed files with 247 additions and 1 deletions
6
NOTES.md
6
NOTES.md
|
|
@ -1353,3 +1353,9 @@ fast MSS restart re-attach needs investigation; single unreproduced cases (pc1 n
|
|||
class-A cold1/cold2 PASS. Public commit 58dcb3d.
|
||||
- Limitations: clamp is no hard-off below 4.00 V; timer is no charge stop; no thermal derating; battery contact unreliable.
|
||||
- Next: router stack; optional charger follow-ups (derating, hard-stop test, CV tuning) by separate GO.
|
||||
|
||||
# Session B23 — faster charging, 720 mA (2026-10-07) — **PASS, persistent** — logs/b23/B23-RESULT.md
|
||||
- DTB b23 = B18 DTB + `qcom,fast-charge-safe-current = <720000>` → IBAT_MAX/IBAT_SAFE 0x04 → 0x07; kernel b18, initramfs B12Q, cmdline unchanged.
|
||||
- RAM ram2 (b23/b23-boot.sh, observer b23/b23-mon.sh): laptop USB meter 0.724 A, USBIN 4.67–4.78 V, CC 55+ min, PMIC max 55.7 °C, CV from ≈4.10 V.
|
||||
- Cache **01bfe522** B23_CACHE_WRITE_VERIFIED (backup B18 ac82811a, rollback b23/B23-rollback.sh); cold boot: IBAT_MAX 07, CHARGING.
|
||||
- Open: worst-case thermal run (CC from ≈3.7 V with CPU load); still no thermal derating. B11–B22 not yet published.
|
||||
|
|
|
|||
14
README.md
14
README.md
|
|
@ -9,7 +9,7 @@
|
|||
> (см. [docs/QUICKSTART.md](docs/QUICKSTART.md)). Никогда не прошивайте NV/EFS-разделы (`modemst1`, `modemst2`, `fsg`, `fsc`, `persist`)
|
||||
> с другого устройства — там калибровки RF и идентификаторы конкретного модема.
|
||||
|
||||
## Статус (2026-10-04)
|
||||
## Статус (2026-10-07)
|
||||
|
||||
| Подсистема | Статус |
|
||||
|---|---|
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
| Router stack (NAT/firewall/VPN) | TODO (следующий этап) |
|
||||
| Дисплей ST7735S 128×128 (SPI): DRM/fbcon tty1, подсветка, автозапуск из flash — B9 | **PASS / CLOSED** (см. ниже) |
|
||||
| Батарея / зарядка: супервизор CHARGE → HOLD → батарея, FAULT safe clamp, автозапуск из flash — B10 | **PASS / CLOSED** (см. ниже) |
|
||||
| Ускоренная зарядка: ток CC 450 → 720 mA (только DTB) — B23 | **PASS / persistent** (см. ниже) |
|
||||
|
||||
## Рабочая цепочка загрузки (baseline B5)
|
||||
|
||||
|
|
@ -55,6 +56,16 @@ Fallback: extlinux не найден / не парсится / не грузит
|
|||
Golden mm1 (Android boot image, для `fastboot boot`): `aurora-mm1.img` sha256 `38c960ef…`, ядро `7.2.7-aurora-bam1 #5`.
|
||||
Все хэши целиком: `b5a/SHA256SUMS`, `b5b/SHA256SUMS`, `bootchain-migration/SHA256SUMS`, `linux/*/SHA256SUMS`, [docs/BLOBS.md](docs/BLOBS.md).
|
||||
|
||||
## B23 status — ускоренная зарядка 720 mA: PASS, persistent (2026-10-07)
|
||||
|
||||
Отчёт: [`logs/b23/B23-RESULT.md`](logs/b23/B23-RESULT.md), DTS: [`linux/dts/msm8916-jz08-aurora-b23.dts`](linux/dts/msm8916-jz08-aurora-b23.dts).
|
||||
|
||||
- Изменено одно свойство DT: `qcom,fast-charge-safe-current` 500000 → 720000 → супервизор B10 пишет IBAT_MAX/IBAT_SAFE `0x04` (450 mA) → `0x07` (720 mA). Ядро и initramfs не менялись.
|
||||
- RAM-тест на USB-порту ноутбука: USB-тестер 0.724 A, без просадки VBUS, CC 55+ мин без срывов, PMIC максимум 55.7 °C.
|
||||
- Записано в cache (`b23/B23-write.sh`, HW EDL, readback + сверка разделов, `01bfe522`), холодная загрузка с eMMC: `IBAT_MAX 07`. Откат: `b23/B23-rollback.sh`.
|
||||
- Фаза CC (до ≈4.1 V) примерно в 1.6 раза быстрее; хвост CV не меняется. Нагрузка платы (CPU, подсветка) идёт из того же входного тока.
|
||||
- Базовый образ B23 — B18 (ядро `7.2.7-aurora-b18`, initramfs B12Q с Alpine); промежуточные этапы B11–B22 (Alpine-root, роутер, VPN, UI, USB host) в этом репозитории пока не опубликованы.
|
||||
|
||||
## B10 status — батарея и зарядка: CLOSED, persistent validated (2026-10-04)
|
||||
|
||||
Production-профиль (Li-ion 3.8 V / 3000 mAh): потолок заряда **4.20 V**, ток **450 mA**, HOLD **4.05 V**, full-min **4.15 V**,
|
||||
|
|
@ -160,6 +171,7 @@ Safety:
|
|||
| `b8/` | B8: Wi-Fi — аудит, WCNSS/NV, wcn36xx, hostapd, сервис aurora-wifi, cache B8F (запись/откат/эмулятор) |
|
||||
| `b9/` | B9: дисплей — аудит stock LK/DT, panel-mipi-dbi firmware, fbcon/сервис aurora-display, cache B9C, патч lk2nd (SPI-панель в LK) |
|
||||
| `b10/` | B10: батарея/зарядка — аудит, супервизор v1–v4 (патчи/diff), тестовые DTB/сборки/скрипты, хуки B10B-4/5 (только тест), cache B10B-5 (запись/откат/эмулятор) |
|
||||
| `b23/` | B23: ток зарядки 720 mA — сборка RAM-образа, монитор, cache B23 (сборка/эмулятор/запись/откат) |
|
||||
| `tools/` | утилиты: UART-логгер, Sahara probe, распаковка boot.img, sanitizer публикации |
|
||||
| `logs/` | sanitized логи: UART, QMI, ModemManager, EDL, результаты тестов |
|
||||
| `android/` | снимок стокового Android (getprop, gpio, input, leds, …), sanitized |
|
||||
|
|
|
|||
11
b23/B23-rollback.sh
Normal file
11
b23/B23-rollback.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
# B23 rollback - restore the B18 cache (ac82811a: kernel b18 + DTB b18, LBC 450 mA). Needs 9008 via HW EDL. Deeper: b18/B18-rollback.sh (B15).
|
||||
cd ~/doc/modem/jz08-aurora || exit 1
|
||||
L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin ; O=logs/b23/rollback ; mkdir -p $O
|
||||
B=b18/cache/cache-extlinux-b18.img
|
||||
[ "$(sha256sum $B | cut -d' ' -f1)" = ac82811ad88d111c673bd3e14ff9cd635e16b87869ce0d0e0070b28b35947e01 ] || { echo "STOP: rollback image hash"; exit 1; }
|
||||
lsusb | grep -q 05c6:9008 || { echo "STOP: no 9008"; exit 1; }
|
||||
edl --loader=$L printgpt > $O/00-printgpt.log 2>&1
|
||||
edl --loader=$L w cache $B > $O/cache-w.log 2>&1
|
||||
edl --loader=$L r cache $O/cache-rb.bin > /dev/null 2>&1 ; cmp $B $O/cache-rb.bin && echo CACHE_RESTORED_B18
|
||||
sha256sum $B $O/cache-rb.bin
|
||||
52
b23/B23-write.sh
Normal file
52
b23/B23-write.sh
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# B23 — the ONLY write: cache := B23 candidate 01bfe522 (= B18 ac82811a with DTB b23: LBC fast-charge current 450 -> 720 mA; kernel b18, initramfs, cmdline unchanged).
|
||||
# Run on 480s ONLY after explicit GO (GO 2026-10-07; RAM ram2 PASS: IBAT_MAX 07, 0.724 A on USB meter, CC 55+ min, PMIC <= 55.7 C). Derived 1:1 from b18/B18-write.sh;
|
||||
# changed: image/hashes, rollback refs, log dir. The pre-write readback of the live cache (must be B18 ac82811a) is kept as backup.
|
||||
# Entry: HW EDL (battery on, D+->GND, plug USB, release). Never `edl reset`. Stops at first failed gate.
|
||||
cd ~/doc/modem/jz08-aurora || exit 1
|
||||
L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin
|
||||
O=logs/b23/W ; A3=logs/b5a/A3 ; P=logs/b5a/A4pre ; mkdir -p $O
|
||||
NEW=b23/cache/cache-extlinux-b23.img ; NEW_SHA=01bfe5228ae25b79b181551ca4361f011f91df2d594d2cd8909ac5a6b98fb96a
|
||||
OLD_SHA=ac82811ad88d111c673bd3e14ff9cd635e16b87869ce0d0e0070b28b35947e01 # current cache = B18 extlinux
|
||||
BOOT_SHA=e9579f33c7304cd47f487f2b61cd9226dc04fd3a63775d62b4b95fc15bd3ebff
|
||||
ABOOT_SHA=15208dbb4feafccd72d2b06db5714cd746c216701f0ef8822c58bb47105d37c4 # aboot = lk1st-b9l (B9L-PERSIST)
|
||||
die(){ echo "STOP: $*"; exit 1; }
|
||||
sha(){ sha256sum "$1" | cut -d" " -f1; }
|
||||
E(){ edl --loader=$L "$@"; }
|
||||
echo "== G0 inputs"
|
||||
[ "$(sha $L)" = 53f193500c03248f0d671ab57bfe9ca8a42967e97f28403294b4b3f854075aca ] || die loader
|
||||
[ "$(sha $NEW)" = $NEW_SHA ] && [ $(stat -c %s $NEW) = 134217728 ] || die candidate
|
||||
[ "$(sha b18/cache/cache-extlinux-b18.img)" = $OLD_SHA ] || die rollback-image
|
||||
[ "$(sha logs/b18/W/11-cache-readback.bin)" = $OLD_SHA ] || die b18-readback-backup
|
||||
lsusb | grep -q 05c6:9008 || die "no 9008"
|
||||
echo "== G1 identity + geometry + baseline"
|
||||
E printgpt > $O/00-printgpt.log 2>&1 || die printgpt
|
||||
grep -aq "Serial: *0x<SAHARA_SERIAL>" $O/00-printgpt.log || grep -aq "Mode detected: firehose" $O/00-printgpt.log || die serial
|
||||
grep -a "^cache:" $O/00-printgpt.log | grep -q "Offset 0x000000004118c000, Length 0x0000000008000000" || die cache-geometry
|
||||
E rs 0 34 $O/pre-gptp.bin >/dev/null 2>&1; cmp $O/pre-gptp.bin $A3/gpt-primary-34.bin || die gpt-changed
|
||||
E r boot $O/pre-boot.bin >/dev/null 2>&1; [ "$(sha $O/pre-boot.bin)" = $BOOT_SHA ] || die boot-not-emmc1
|
||||
E r aboot $O/pre-aboot.bin >/dev/null 2>&1; [ "$(sha $O/pre-aboot.bin)" = $ABOOT_SHA ] || die aboot-not-b9l
|
||||
E r cache $O/pre-cache.bin >/dev/null 2>&1; [ "$(sha $O/pre-cache.bin)" = $OLD_SHA ] || die cache-not-backup
|
||||
echo "== W cache := candidate (LBA 2133088, 262144 sectors)"
|
||||
E w cache $NEW > $O/10-cache-write.log 2>&1; echo "rc=$?"; grep -a "Wrote" $O/10-cache-write.log
|
||||
E r cache $O/11-cache-readback.bin > $O/11-cache-readback.log 2>&1 || die readback-rc
|
||||
sha256sum $NEW $O/11-cache-readback.bin
|
||||
cmp $NEW $O/11-cache-readback.bin || die "CACHE READBACK MISMATCH — do NOT reboot; run b23/B23-rollback.sh"
|
||||
echo CACHE_MATCH
|
||||
echo "== V everything else unchanged"
|
||||
E rs 0 34 $O/post-gptp.bin >/dev/null 2>&1; cmp $O/post-gptp.bin $A3/gpt-primary-34.bin || die gptp
|
||||
E rs 7634911 33 $O/post-gptb.bin >/dev/null 2>&1; cmp $O/post-gptb.bin $A3/gpt-backup-33.bin || die gptb
|
||||
E rs 305184 1024 $O/post-tzbak.bin >/dev/null 2>&1; cmp $O/post-tzbak.bin $A3/tzbak-305184.bin || die tzbak
|
||||
E r boot $O/post-boot.bin >/dev/null 2>&1; [ "$(sha $O/post-boot.bin)" = $BOOT_SHA ] || die boot
|
||||
E r aboot $O/post-aboot.bin >/dev/null 2>&1; [ "$(sha $O/post-aboot.bin)" = $ABOOT_SHA ] || die aboot
|
||||
for p in sbl1 rpm tz hyp recovery modemst1 modemst2 fsg fsc persist; do
|
||||
E r $p $O/post-$p.bin >/dev/null 2>&1; cmp $O/post-$p.bin $A3/$p.bin || die "$p changed"; echo "$p == A3"
|
||||
done
|
||||
for p in modem system; do
|
||||
E r $p $O/post-$p.bin >/dev/null 2>&1; cmp $O/post-$p.bin $P/$p.bin || die "$p changed"; echo "$p == A4pre"; rm -f $O/post-$p.bin
|
||||
done
|
||||
E rs 2428000 8 $O/post-userdata-sb.bin >/dev/null 2>&1
|
||||
[ "$(dd if=$O/post-userdata-sb.bin bs=1 skip=1080 count=2 2>/dev/null | od -An -tx1 | tr -d ' \n')" = 53ef ] && [ "$(dd if=$O/post-userdata-sb.bin bs=1 skip=1144 count=16 2>/dev/null | tr -d '\000')" = aurora-alpine ] || die "userdata superblock is not ext4 aurora-alpine"
|
||||
echo "userdata = ext4 aurora-alpine (superblock)"
|
||||
(cd $O && sha256sum *.bin > SHA256SUMS)
|
||||
echo "B23_CACHE_WRITE_VERIFIED — power off fully (USB, then battery) before first boot"
|
||||
17
b23/b23-boot.sh
Normal file
17
b23/b23-boot.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
# 480s: B23 RAM test (charge 720 mA). Waits for lk1st fastboot (RESET held at power-on, USB to 480s), `fastboot boot` the b23 image,
|
||||
# waits for NCM, checks kernel + LBC state (IBAT_MAX must be 07), pushes (telnet) and starts the read-only observer b23-mon.sh on the board
|
||||
# (/tmp/b23-mon.log, every 30 s; ALERT-TEMP > 60 C). Nothing flashed; a power cycle returns to the eMMC cache (B18).
|
||||
# Then: move USB from 480s to the 2 A adapter (board stays on battery), watch with b23-view.sh over Wi-Fi.
|
||||
cd ~/doc/modem/jz08-aurora; O=logs/b23/ram${1:-1}; mkdir -p $O; IMG=b23/out/aurora-b23.img
|
||||
A=$O/host-actions.txt; act() { echo "$(date -u +%H:%M:%S) $*" | tee -a $A; }
|
||||
grep " aurora-b23.img\$" b23/out/SHA256SUMS | sed "s| | b23/out/|" | sha256sum -c || exit 1
|
||||
act "B23 ram: waiting for fastboot <EMMC_SERIAL> (RESET held at power-on)"
|
||||
i=0; until fastboot devices 2>/dev/null | grep -q <EMMC_SERIAL>; do i=$((i+1)); [ $i -ge 900 ] && { act ABORT; exit 1; }; sleep 2; done
|
||||
act "fastboot present"; { fastboot boot $IMG 2>&1; echo rc=$?; } | tee -a $A
|
||||
i=0; until ping -c1 -W1 172.16.42.1 >/dev/null 2>&1; do i=$((i+1)); [ $i -ge 240 ] && { act "ABORT NCM"; exit 1; }; sleep 1; done; act "NCM up"
|
||||
sleep 20; tn() { { sleep 1; sed "s/\$/\r/" "$1"; sleep $2; } | ncat -i 30 172.16.42.1 23 | tr -d "\000\r"; }
|
||||
{ echo "cat > /tmp/b23-mon.sh <<'EOFX'"; cat b23/b23-mon.sh; echo EOFX
|
||||
echo 'uname -r; cat /proc/device-tree/model; echo; grep -q " /sys/kernel/debug " /proc/mounts || mount -t debugfs debugfs /sys/kernel/debug; cat /sys/kernel/debug/pm8916_lbc/state; (nohup sh /tmp/b23-mon.sh 30 >/dev/null 2>&1 &); sleep 4; echo ST=; tail -1 /tmp/b23-mon.log'; } > $O/.w
|
||||
tn $O/.w 10 | sed -n '/^[0-9]\.[0-9]*\.[0-9]*-aurora/,$p' | grep -av "^/ #\|^~ #" | tee -a $A
|
||||
act "READY"
|
||||
18
b23/b23-mon.sh
Normal file
18
b23/b23-mon.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
# B23 (720 mA) board-side observer, from b10b3-mon.sh (env VMAX = ALERT VBAT uV, EVDD = expected VDD_MAX hex): every P s append one line to /tmp/b23-mon.log (survives NCM/USB loss). Reads only.
|
||||
P=${1:-30}
|
||||
grep -q " /sys/kernel/debug " /proc/mounts || mount -t debugfs debugfs /sys/kernel/debug
|
||||
R=/sys/kernel/debug/regmap/0-00/registers; S=/sys/kernel/debug/pm8916_lbc/state
|
||||
rd() { dd if=$R bs=9 skip=$(($1)) count=$2 2>/dev/null | cut -d' ' -f2 | tr '\n' ' '; }
|
||||
D=/sys/bus/iio/devices/iio:device0; C=/sys/class/power_supply/pm8916-lbc-chgr
|
||||
trap '' HUP
|
||||
i=0
|
||||
while [ ! -e /tmp/b23-mon.stop ]; do
|
||||
i=$((i + 1)); vb=$(cat $D/in_voltage6_input); pt=$(cat $D/in_temp8_input)
|
||||
a=""; [ "$vb" -gt ${VMAX:-4220000} ] && a="$a ALERT-VBAT"; [ "$pt" -gt ${TMAX:-60000} ] && a="$a ALERT-TEMP"; [ "$(rd 0x1060 1)" != "80 " ] && a="$a ALERT-TIMER"; case "$(rd 0x1040 1)" in ${EVDD:-08}" "|${EVDD2:-xx}" ") ;; *) a="$a ALERT-VDDMAX";; esac; [ "$(rd 0x1044 1)" != "07 " ] && a="$a ALERT-IBAT"
|
||||
st=$(head -1 $S | tr ' ' '='); cv=$(sed -n 2p $S | sed 's/.*cv_s \([-0-9]*\) nocv \([0-9]*\).*/cv_s=\1 nocv=\2/'); cnt=$(sed -n 3p $S | tr ' ' '='); vdd=$(rd 0x1040 1)
|
||||
ld=$(pgrep -c yes 2>/dev/null || ps | grep -c "[y]es$")
|
||||
echo "M $i $(date -u +%T) up=$(cut -d' ' -f1 /proc/uptime) $st $cv $cnt vbat6=$vb vph=$(cat $D/in_voltage7_input) usbin=$(cat $D/in_voltage0_input) fifo=$(rd 0x40c0 4) chgst=$(rd 0x1009 1) crt=$(rd 0x1010 1) brt=$(rd 0x1210 1) urt=$(rd 0x1310 1) usbp=$(rd 0x1308 2) ctrl=$(rd 0x1049 1) vdd=$vdd ibat=$(rd 0x1044 1) tchg=$(rd 0x1060 2) failed=$(rd 0x104a 1) bd=$(rd 0x1642 1) online=$(cat $C/online) psy=$(cat $C/status) pmt=$pt cpu=$(cat /sys/class/thermal/thermal_zone4/temp) load=$ld$a" >> /tmp/b23-mon.log
|
||||
sleep $P
|
||||
done
|
||||
echo "MON-END $(date -u +%T)" >> /tmp/b23-mon.log
|
||||
3
b23/b23-view.sh
Normal file
3
b23/b23-view.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
# Show the last N observer lines (short form) from the board; works over NCM or Wi-Fi: b23-view.sh [N] [host]
|
||||
ssh -o ConnectTimeout=10 root@${2:-192.168.77.1} "tail -${1:-10} /tmp/b23-mon.log" | sed -E 's/ (fifo|crt|brt|urt|ctrl|tchg|failed|bd|online|load)=[^ ]*( [0-9a-f]{2})*//g'
|
||||
14
b23/build-b23.sh
Normal file
14
b23/build-b23.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# B23 RAM image (charge 720 mA): kernel 7.2.7-aurora-b18 (= b15 + USB host: CONFIG_USB/EHCI/CHIPIDEA_HOST, usb-storage/UAS, HID, exFAT/NLS) + DTB b23 = b18 + qcom,fast-charge-safe-current 720000
|
||||
# (production b10b3 e47762d1 + &usb dr_mode "otg" + usb-role-switch) + B9C cmdline + B12Q initramfs (stage0 -> Alpine on p27) unchanged.
|
||||
# fastboot boot only; nothing flashed.
|
||||
set -e; cd "$(dirname "$0")"; O=out; KB=/home/q/aurora-kbuild/out-b18; Q=../b12/b12q/out; DT=../linux/dts/msm8916-jz08-aurora-b23.dtb; mkdir -p $O
|
||||
echo "9ade7cffb1f3f19e86acc8869565a88b960abba543385a2fddcebd27bd529e79 $Q/initramfs-b12q.cpio.gz" | sha256sum -c
|
||||
for s in WIREGUARD=y IP_MULTIPLE_TABLES=y NF_TABLES=y CHARGER_PM8916_LBC=y USB=y USB_CHIPIDEA_HOST=y USB_CHIPIDEA_UDC=y USB_STORAGE=y USB_HID=y 'LOCALVERSION="-aurora-b18"'; do
|
||||
grep -q "^CONFIG_$s\$" $KB/.config || { echo "STOP $s"; exit 1; }; done
|
||||
[ "$(fdtget $DT /soc@0/usb@78d9000 dr_mode)" = otg ] && fdtget -p $DT /soc@0/usb@78d9000 | grep -qx usb-role-switch || { echo "STOP dtb usb"; exit 1; }
|
||||
[ "$(fdtget $DT /soc@0/spmi@200f000/pmic@0/charger@1000 qcom,fast-charge-safe-current)" = 720000 ] || { echo "STOP dtb ibat"; exit 1; }
|
||||
cp $KB/arch/arm64/boot/Image.gz $O/Image-b18.gz; cp $KB/.config $O/config-b18; cp $DT $O/aurora-b23.dtb; cp $Q/initramfs-b12q.cpio.gz $Q/cmdline.txt $O/
|
||||
cat $O/Image-b18.gz $O/aurora-b23.dtb > $O/Image.gz-dtb
|
||||
python3 ../b6p/mkbootimg.py $O/Image.gz-dtb $O/initramfs-b12q.cpio.gz $O/cmdline.txt $O/aurora-b23.img
|
||||
(cd $O && sha256sum Image-b18.gz config-b18 aurora-b23.dtb Image.gz-dtb initramfs-b12q.cpio.gz cmdline.txt aurora-b23.img > SHA256SUMS; grep -E "aurora-b23.img|Image-b18|b23.dtb" SHA256SUMS)
|
||||
11
b23/cache/emu/run-emu-b23.sh
vendored
Normal file
11
b23/cache/emu/run-emu-b23.sh
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
# lk2nd-23.1 extlinux emulator (b5b/emu): S18 current flash (B18 ac82811a) regression + S23 B23 candidate + fault variants. Offline, 480s.
|
||||
cd ~/doc/modem/jz08-aurora/b23/cache/emu; E=../../../b5b/emu; GPT=../../../logs/b5a/A3/gpt-primary-34.bin; C=/home/q/doc/modem/jz08-aurora/b23/cache/cache-extlinux-b23.img
|
||||
run() { python3 $E/mkmap.py $2 > map-$1.txt; $E/lk2nd-scan-emu map-$1.txt $GPT $3 > $1.out 2>&1; echo "== $1 rc=$? :: $(grep -E "Trying to boot|Reverting|boot_linux reached|ramdisk sha256|Could not" $1.out | tr '\n' ' ' | cut -c1-260)"; }
|
||||
run S18-b18-current /home/q/doc/modem/jz08-aurora/b18/cache/cache-extlinux-b18.img 26032136
|
||||
cmp <(grep HARNESS S18-b18-current.out) <(grep HARNESS ../../../b18/cache/emu/S18-b18-candidate.out) && echo " S18 HARNESS lines == b18 emu S18"
|
||||
run S23-b23-candidate $C 26032136; grep HARNESS S23-b23-candidate.out
|
||||
D=$(mktemp -d); v(){ cp $C $D/$1.img; chmod u+w $D/$1.img; }
|
||||
v F3-no-initrd; /sbin/debugfs -w -R "rm /initramfs-b12q.cpio.gz" $D/F3-no-initrd.img >/dev/null 2>&1
|
||||
v F1-no-conf; /sbin/debugfs -w -R "rm /extlinux/extlinux.conf" $D/F1-no-conf.img >/dev/null 2>&1
|
||||
for f in $D/F*.img; do run $(basename $f .img) $f; done; rm -rf $D
|
||||
6
b23/cache/extlinux-b23.conf
vendored
Normal file
6
b23/cache/extlinux-b23.conf
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
default b23
|
||||
label b23
|
||||
linux /Image.gz-dtb
|
||||
fdt /aurora-b23.dtb
|
||||
initrd /initramfs-b12q.cpio.gz
|
||||
append earlycon console=tty0 console=ttyMSM0,115200n8 ignore_loglevel loglevel=8 rdinit=/init fbcon=font:6x8 consoleblank=0
|
||||
27
b23/cache/mkfs-cache-b23.sh
vendored
Normal file
27
b23/cache/mkfs-cache-b23.sh
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
# B23 cache CANDIDATE (= B18 c. ac82811a with DTB b23 = b18 + LBC fast-charge current 720 mA; kernel b18 unchanged; derived 1:1 from b18/cache/mkfs-cache-b18.sh) (NOT for writing without a separate GO): exact recipe of b10/b10b3/cache-v4/mkfs-cache-b10b5.sh (c3732515);
|
||||
# differs only in the initrd (B9C initramfs + B12P overlay: aurora-alpine autostart, modem safety gate, e2fsck bundle), file names,
|
||||
# extlinux label, fs label and UUIDs. Kernel/DTB/append = B10 production unchanged. Runs on 480s (mke2fs 1.47.2). Offline only.
|
||||
# The image contains the AP PSK (in the initramfs) - never publish it.
|
||||
set -e
|
||||
cd ~/doc/modem/jz08-aurora/b23/cache
|
||||
OUT=${1:-cache-extlinux-b23.img}; F=../out
|
||||
echo "0fef41b262917c8ae308fa222da0017e2b3cb3ec5da1ca8ba18d0318476761a3 $F/cmdline.txt" | sha256sum -c
|
||||
echo "771ecadcd5fbf05e8962dcf2092741fac88217f62938f6ea13f9eea09da5a419 $F/Image.gz-dtb" | sha256sum -c
|
||||
echo "89eade0f41a7b2f4fb4acc030cf6b30889438ed77a2047c7a7728405c10c3db1 $F/aurora-b23.dtb" | sha256sum -c
|
||||
echo "9ade7cffb1f3f19e86acc8869565a88b960abba543385a2fddcebd27bd529e79 $F/initramfs-b12q.cpio.gz" | sha256sum -c
|
||||
ST=$(mktemp -d); mkdir -p $ST/extlinux
|
||||
cp $F/Image.gz-dtb $F/aurora-b23.dtb $F/initramfs-b12q.cpio.gz $ST/
|
||||
printf "default b23\nlabel b23\n\tlinux /Image.gz-dtb\n\tfdt /aurora-b23.dtb\n\tinitrd /initramfs-b12q.cpio.gz\n\tappend %s\n" "$(cat $F/cmdline.txt)" > $ST/extlinux/extlinux.conf
|
||||
cp $ST/extlinux/extlinux.conf extlinux-b23.conf
|
||||
chmod 0644 $ST/*.* $ST/extlinux/extlinux.conf; chmod 0755 $ST $ST/extlinux
|
||||
find $ST -exec touch -h -d @1790726400 {} +
|
||||
rm -f $OUT; truncate -s 134217728 $OUT
|
||||
E2FSPROGS_FAKE_TIME=1790726400 /sbin/mke2fs -F -q -t ext2 -O none,filetype,sparse_super \
|
||||
-b 4096 -I 128 -N 64 -m 0 -L aurora-b23 -U 4a5a3038-b6f0-4000-8000-00000b231800 \
|
||||
-E root_owner=0:0,hash_seed=4a5a3038-b6f0-4000-8000-00000b231801 -d $ST $OUT 32768
|
||||
rm -rf $ST
|
||||
for f in / /lost+found /extlinux /extlinux/extlinux.conf /Image.gz-dtb /aurora-b23.dtb /initramfs-b12q.cpio.gz; do for t in atime ctime mtime; do echo "sif $f $t @1790726400"; done; done > /tmp/b23-sif.$$
|
||||
/sbin/debugfs -w -f /tmp/b23-sif.$$ $OUT >/dev/null 2>&1; rm -f /tmp/b23-sif.$$
|
||||
/sbin/e2fsck -fn $OUT >/dev/null 2>&1 && echo "e2fsck -fn clean"
|
||||
stat -c "%n %s" $OUT; sha256sum $OUT
|
||||
7
b23/out/SHA256SUMS
Normal file
7
b23/out/SHA256SUMS
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
9e0ff9ec817364aab3a1796e44052509e5fea5d0f6d593992433a761bb5bf0fd Image-b18.gz
|
||||
8531a00f5f348bf939e96872b84dfcec278a28626e1d5daa30dbd8198e3033f0 config-b18
|
||||
89eade0f41a7b2f4fb4acc030cf6b30889438ed77a2047c7a7728405c10c3db1 aurora-b23.dtb
|
||||
771ecadcd5fbf05e8962dcf2092741fac88217f62938f6ea13f9eea09da5a419 Image.gz-dtb
|
||||
9ade7cffb1f3f19e86acc8869565a88b960abba543385a2fddcebd27bd529e79 initramfs-b12q.cpio.gz
|
||||
0fef41b262917c8ae308fa222da0017e2b3cb3ec5da1ca8ba18d0318476761a3 cmdline.txt
|
||||
8877170aef0bf2e928dd4d1cd8abb7df2daef2be19c79506a7572e2abbab5e63 aurora-b23.img
|
||||
17
linux/dts/msm8916-jz08-aurora-b18.dts
Normal file
17
linux/dts/msm8916-jz08-aurora-b18.dts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Project Aurora - B18 = production B10B-3 DTB + USB OTG with a userspace role switch:
|
||||
* dr_mode "otg" (initial role from the PHY ID state = device -> NCM as before), usb-role-switch ->
|
||||
* /sys/class/usb_role/<ci>/role "host" | "device". No VBUS output on this board (PM8916 LBC has no boost):
|
||||
* devices need a powered hub / power-injecting OTG adapter.
|
||||
*/
|
||||
#include "msm8916-jz08-aurora-b10b3.dts"
|
||||
|
||||
/ {
|
||||
model = "JZ08AU Aurora (RAM boot B18 USB OTG)";
|
||||
};
|
||||
|
||||
&usb {
|
||||
dr_mode = "otg";
|
||||
usb-role-switch;
|
||||
};
|
||||
14
linux/dts/msm8916-jz08-aurora-b23.dts
Normal file
14
linux/dts/msm8916-jz08-aurora-b23.dts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Project Aurora - B23 = B18 DTB + faster charging: LBC fast-charge current 450 -> 720 mA
|
||||
* (qcom,fast-charge-safe-current 500000 -> 720000 => IBAT_MAX/IBAT_SAFE code 4 -> 7). Everything else unchanged.
|
||||
*/
|
||||
#include "msm8916-jz08-aurora-b18.dts"
|
||||
|
||||
/ {
|
||||
model = "JZ08AU Aurora (B23 charge 720 mA)";
|
||||
};
|
||||
|
||||
&pm8916_charger {
|
||||
qcom,fast-charge-safe-current = <720000>;
|
||||
};
|
||||
31
logs/b23/B23-RESULT.md
Normal file
31
logs/b23/B23-RESULT.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# B23 — faster battery charging: LBC fast-charge current 450 → 720 mA (2026-10-07) — **PASS, persistent**
|
||||
|
||||
## Change
|
||||
One device-tree property only: `&pm8916_charger { qcom,fast-charge-safe-current = <720000>; }`
|
||||
(`linux/dts/msm8916-jz08-aurora-b23.dts`, includes the B18 DTB). The pm8916_lbc supervisor (v4, B10B-5) programs
|
||||
IBAT_SAFE and IBAT_MAX from it: code = current / 90 mA − 1 → **0x04 (450 mA) → 0x07 (720 mA)**. The simple-battery node
|
||||
has no constant-charge-current property, so the safe current is also the charge current. Kernel (7.2.7-aurora-b18),
|
||||
initramfs (B12Q) and cmdline are unchanged; the DTB differs from B18 only in this property and the model string.
|
||||
|
||||
Why not more: the LBC is a linear charger — PMIC dissipation is (VBUS − VBAT) · I; it has no input current limit,
|
||||
so a weak source sags below VIN_MIN (4.308 V) instead of limiting. 720 mA was the first step (hardware max 1440 mA).
|
||||
|
||||
## RAM test (ram2, `b23/b23-boot.sh`, observer `b23/b23-mon.sh` every 30 s; nothing flashed)
|
||||
- Probe: `IBAT_MAX 07`, supervisor INIT → CHARGING, CHG_STATUS 05 (CC), FAST_CHG_ON + USB path 02, VDD_MAX 08 (4.20 V).
|
||||
- Source = laptop USB port: USB meter **0.724 A**; USBIN 4.67–4.78 V, no sag.
|
||||
- CC held for 55+ min without restart/latch/FAULT (VADC VBAT under charge 3.98 → 4.10 V).
|
||||
- PMIC temperature: max **55.7 °C** in the first 5 min, then 43–47 °C (part of the drop is the known ~7 °C
|
||||
backlight-off artefact of the PMIC sensor). Alert threshold 60 °C never reached.
|
||||
- CV (CHG_STATUS 03) from VADC ≈ 4.10 V; current then tapers (0.4 A on the meter) — normal, current does not speed up CV.
|
||||
|
||||
## Persistent
|
||||
- Cache candidate `b23/cache/mkfs-cache-b23.sh` (B18 recipe, DTB b23) **01bfe522**; lk2nd extlinux emulator
|
||||
(`b23/cache/emu/run-emu-b23.sh`): B18 regression identical, B23 boots label `b23` with DTB 89eade0f, fault variants revert.
|
||||
- Written by `b23/B23-write.sh` (HW EDL): **B23_CACHE_WRITE_VERIFIED** — readback == image, all other partitions unchanged,
|
||||
pre-write cache readback == B18 ac82811a kept. Rollback: `b23/B23-rollback.sh` → B18 `ac82811a`.
|
||||
- Cold boot from eMMC (full power-off, no RESET): model "JZ08AU Aurora (B23 charge 720 mA)", `IBAT_MAX 07`, CHARGING.
|
||||
|
||||
## Effect / limits
|
||||
CC phase (empty → ≈ 4.1 V) ≈ 1.6× faster; the CV tail is unchanged. Board load (CPU, backlight) comes out of the same
|
||||
input current (no power path). Worst case (long CC from ≈ 3.7 V with CPU load) not yet measured thermally; still no
|
||||
thermal derating in the supervisor.
|
||||
Loading…
Reference in a new issue