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
@@ -44,6 +44,15 @@ reset_assert_level = 0
|
||||
reset_idle_level = 1
|
||||
# Keep the verified internal-panel clock on the shared bus.
|
||||
spi_speed_hz = 25000000
|
||||
# The KaiOS downstream DTS labels gpio21 "TE" and Qualcomm MDSS SPI sends
|
||||
# D/C as the ninth bit, so the cover panel may be 8-bit (D/C on gpio21) or
|
||||
# 9-bit MIPI DBI (D/C in bit 8, no DC GPIO). 8 keeps the current wiring;
|
||||
# 9 releases gpio21 and sends every byte as a 9-bit word. Until the physical
|
||||
# sign-off is done, use "bananarchy-coverctl PROBE" repeatedly while the flip
|
||||
# is closed: it draws TEST bars and walks the polarity/word-bit/speed cases,
|
||||
# reporting the active one in STATUS as probe=case N/12. 9-bit is the default
|
||||
# because the vendor DTS has no external D/C GPIO; set 8 for the old wiring.
|
||||
spi_word_bits = 9
|
||||
|
||||
# Privacy defaults: no caller name, no notification body, no text in logs.
|
||||
enabled = 1
|
||||
|
||||
@@ -61,7 +61,7 @@ if [ -r /sys/kernel/debug/gpio ]; then
|
||||
fi
|
||||
if [ -r "$CONF" ]; then
|
||||
printf 'backend config :\n'
|
||||
grep -E '^(backend|spi_device|spi_mux_gpio|spi_dc_gpio|spi_reset_gpio|mux_open_level|mux_closed_level|dc_command_level|dc_data_level|reset_assert_level|reset_idle_level|spi_speed_hz) ' "$CONF" | sed 's/^/ /'
|
||||
grep -E '^(backend|spi_device|spi_mux_gpio|spi_dc_gpio|spi_reset_gpio|mux_open_level|mux_closed_level|dc_command_level|dc_data_level|reset_assert_level|reset_idle_level|spi_speed_hz|spi_word_bits) ' "$CONF" | sed 's/^/ /'
|
||||
fi
|
||||
if [ -x "$COVERCTL" ]; then
|
||||
printf 'daemon : %s\n' "$("$COVERCTL" STATUS 2>/dev/null || printf 'not answering')"
|
||||
@@ -71,7 +71,8 @@ fi
|
||||
if command -v rc-service >/dev/null 2>&1; then
|
||||
rc-service bananarchy-cover-display status 2>&1 | sed 's/^/service : /'
|
||||
fi
|
||||
printf 'sign-off : LID CLOSED; TEST bars, then LID OPEN\n'
|
||||
printf 'sign-off : bananarchy-cover-probe.sh (12 cases)\n'
|
||||
printf ' watch the cover, note STATUS probe=case N/12\n'
|
||||
printf ' bananarchy-coverctl SET mux_closed_level 0|1\n'
|
||||
printf ' bananarchy-coverctl SET reset_assert_level 0|1\n'
|
||||
printf ' bananarchy-coverctl SET dc_command_level 0|1\n'
|
||||
|
||||
Binary file not shown.
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# Walk the 2720 Flip external panel hardware sign-off cases.
|
||||
#
|
||||
# With the flip closed, each PROBE case re-inits the GC9305 with a different
|
||||
# SPI word width (8-bit D/C GPIO vs 9-bit MIPI DBI), mux level, reset polarity,
|
||||
# D/C polarity and clock, then draws TEST bars on the cover. Watch the outer
|
||||
# screen, note the case that lights it from STATUS, then set the matching keys
|
||||
# in /etc/bananarchy/cover-display.conf and restart the service.
|
||||
set -u
|
||||
|
||||
COVERCTL="${BANANARCHY_COVERCTL:-/usr/bin/bananarchy-coverctl}"
|
||||
HOLD="${BANANARCHY_COVER_PROBE_HOLD:-3}"
|
||||
CASES=12
|
||||
|
||||
printf 'Close the flip, then watch the outer panel for %s seconds per case.\n' "$HOLD"
|
||||
printf 'The active combination is printed as probe=case N/%s.\n' "$CASES"
|
||||
|
||||
i=1
|
||||
while [ "$i" -le "$CASES" ]; do
|
||||
"$COVERCTL" PROBE >/dev/null 2>&1 || true
|
||||
printf '--- case %d/%d ---\n' "$i" "$CASES"
|
||||
"$COVERCTL" STATUS 2>/dev/null || printf 'cover daemon is not answering\n'
|
||||
sleep "$HOLD"
|
||||
i=$((i + 1))
|
||||
done
|
||||
|
||||
printf 'Done. Set the working keys in /etc/bananarchy/cover-display.conf and\n'
|
||||
printf 'run: rc-service bananarchy-cover-display restart\n'
|
||||
exit 0
|
||||
Binary file not shown.
Reference in new issue
Block a user