Fix the missing cover-panel reaction with a 9-bit panel path and sign-off probe
Live diagnosis with the flip physically closed showed the wake chain is intact: bananarchy-coverctl BUTTON/WAKE, the lid gate and sxmo_state.sh set unlock all reached backend=spidev visible=1 mux=closed, with the daemon holding /dev/spidev0.1, the gpiochip and its line handles. The outer panel itself never reacted. Register reads over SPI return zeros (write-only panels), gpio21 stays static, and a reversible panel-mipi-dbi-spi/spidev rebind on spi0.0 showed the shared gpio110 D/C path is also unreadable, so the missing piece is the panel framing: the KaiOS downstream DTS labels gpio21 TE, not D/C, and Qualcomm MDSS SPI carries D/C as the ninth bit. bananarchy-cover-idle now defaults to 9-bit MIPI DBI: it releases gpio21, claims only the reset line, and frames every command and pixel as a little-endian 9-bit word with D/C in bit 8. spi_word_bits = 8 keeps the old D/C-GPIO path. A PROBE command walks twelve combinations of word width, gpio13 mux level, reset/D-C polarity and 25 MHz / 5 MHz clock, re-initialising the panel and drawing TEST bars; STATUS reports bits= and probe=case N/12. bananarchy-cover-probe.sh drives all twelve cases with a three-second hold so the working wiring can be written back to cover-display.conf. wanted_device() in common.h now also matches KEY_POWER, so the pm8941_pwrkey device (KEY_POWER only) is no longer invisible to bananarchy-volume-keys and all three outer buttons can produce a cover wake. Rebuilt the a1108/dejavu nokia-beatles image and pinned the verified hash 57d140e9cdf05631a6620b639d143350b9984b2170592fb927c93bfb18f67a2b in check-rebuild.sh. e2fsck -fn passed on both partitions, debugfs confirms seven updated rootfs files byte-for-byte, and the bootfs sync, boot image check, artifact sync, host tests and rebuild preflight all pass. Eyes-on confirmation of which case lights the cover, and the cover backlight source, are still required; this is an intermediate checkpoint.
This commit is contained in:
1 parent
2857ef4374
commit
5f8b7c88ac
15 files changed
+252
-28
No files matched your search
@@ -139,7 +139,8 @@ def main():
|
||||
for token in ("cover_hw_release", "cover_spi_draw", "hw_init_panel",
|
||||
"mux_closed_level", "spi_speed_hz", "FBIOBLANK",
|
||||
"BANANARCHY_COVER_SPI_SIM", "cover_main_panel_is_off",
|
||||
"cover_wake", "pending_until",
|
||||
"cover_wake", "pending_until", "probe_cases",
|
||||
"spi_word_bits",
|
||||
"0x28", "0x29"):
|
||||
if token not in source:
|
||||
sys.stderr.write("FAIL: cover daemon lost %s\n" % token)
|
||||
@@ -182,7 +183,7 @@ def main():
|
||||
daemon.send("LID CLOSED")
|
||||
if not daemon.wait_event("claim"):
|
||||
return not check(False, "closing the flip did not claim the mux")
|
||||
if not daemon.wait_event("cmd fe 0") or not daemon.wait_event("cmd 29 0"):
|
||||
if not daemon.wait_event("cmd fe 0 ") or not daemon.wait_event("cmd 29 0 "):
|
||||
return not check(False, "external panel firmware was not replayed")
|
||||
if not daemon.wait_event("frame lit=0 size=115200"):
|
||||
return not check(False, "no dark frame after closing")
|
||||
@@ -200,7 +201,7 @@ def main():
|
||||
daemon.send("BUTTON")
|
||||
if not daemon.wait_event("frame lit=1 size=115200"):
|
||||
return not check(False, "BUTTON did not light the external panel")
|
||||
if "cmd 29 0" not in daemon.events():
|
||||
if not any(e.startswith("cmd 29 0 ") for e in daemon.events()):
|
||||
return not check(False, "display-on command missing")
|
||||
print("[ok] external button: lit RGB565 frame on the cover")
|
||||
|
||||
@@ -313,6 +314,24 @@ def main():
|
||||
finally:
|
||||
pend.close()
|
||||
|
||||
# PROBE walks the hardware sign-off cases and 9-bit words are framed.
|
||||
probe, _ = run_case(root, exe, {})
|
||||
try:
|
||||
probe.send("LID CLOSED")
|
||||
for i in range(12):
|
||||
probe.send("PROBE")
|
||||
if "probe=case %d/12" % (i + 1) not in probe.send("STATUS"):
|
||||
return not check(False, "PROBE case %d was not reported" % (i + 1))
|
||||
events = probe.events()
|
||||
if not any(e.startswith("cmd fe 0 bits=9") for e in events):
|
||||
return not check(False, "PROBE never exercised 9-bit MIPI DBI")
|
||||
if not any(e.startswith("frame lit=1 size=230400") for e in events) and \
|
||||
not any(e.startswith("frame lit=1") for e in events):
|
||||
return not check(False, "PROBE did not draw the test bars")
|
||||
print("[ok] PROBE cycles polarity/word-bit/speed cases with test bars")
|
||||
finally:
|
||||
probe.close()
|
||||
|
||||
# A transient lid flap must never steal the bus from a live main panel.
|
||||
live, _ = run_case(root, exe, {}, dpms="On")
|
||||
try:
|
||||
@@ -331,16 +350,16 @@ def main():
|
||||
knobs, _ = run_case(root, exe, {})
|
||||
try:
|
||||
knobs.send("LID CLOSED")
|
||||
if not knobs.wait_event("cmd fe 0"):
|
||||
if not knobs.wait_event("cmd fe 0 "):
|
||||
return not check(False, "runtime-knob daemon did not init the panel")
|
||||
before = len([e for e in knobs.events() if e == "cmd fe 0"])
|
||||
before = len([e for e in knobs.events() if e.startswith("cmd fe 0 ")])
|
||||
knobs.send("SET mux_closed_level 0")
|
||||
if not knobs.wait_event("release"):
|
||||
return not check(False, "SET polarity did not release the panel lines")
|
||||
if not check(any(e == "gpio 0" for e in knobs.events()),
|
||||
"SET mux_closed_level was ignored"):
|
||||
return 1
|
||||
after = len([e for e in knobs.events() if e == "cmd fe 0"])
|
||||
after = len([e for e in knobs.events() if e.startswith("cmd fe 0 ")])
|
||||
if after <= before:
|
||||
return not check(False, "SET polarity did not re-init the panel")
|
||||
knobs.send("SET backend none")
|
||||
|
||||
Reference in new issue
Block a user