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.
81 lines
3.3 KiB
Bash
Executable File
81 lines
3.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# Report the live state of the 2720 Flip external panel (closed-flip backend).
|
|
# Intended for the physical gpio13/reset/DC sign-off: it never changes state.
|
|
set -u
|
|
|
|
FB=/dev/fb1
|
|
SYSFS=/sys/class/graphics/fb1
|
|
SPI=/dev/spidev0.1
|
|
GPIOCHIP=/dev/gpiochip0
|
|
FW=/lib/firmware/nokia,beatles-gc9305-ext-panel.bin
|
|
CONF=/etc/bananarchy/cover-display.conf
|
|
COVERCTL=/usr/bin/bananarchy-coverctl
|
|
|
|
printf '=== Bananarchy cover display diagnostics ===\n'
|
|
if [ -r /usr/share/bananarchy/lid-profile ]; then
|
|
printf 'lid-profile : %s\n' "$(cat /usr/share/bananarchy/lid-profile)"
|
|
else
|
|
printf 'lid-profile : missing (not a flip build?)\n'
|
|
fi
|
|
if [ -e "$FB" ]; then
|
|
printf 'framebuffer : %s present\n' "$FB"
|
|
for attr in virtual_size bits_per_pixel stride; do
|
|
if [ -r "$SYSFS/$attr" ]; then
|
|
printf ' %-20s: %s\n' "$attr" "$(cat "$SYSFS/$attr")"
|
|
else
|
|
printf ' %-20s: missing\n' "$attr"
|
|
fi
|
|
done
|
|
else
|
|
printf 'framebuffer : %s absent (single-panel shipping DTB)\n' "$FB"
|
|
fi
|
|
if [ -e "$SPI" ]; then
|
|
printf 'spidev : %s present\n' "$SPI"
|
|
else
|
|
printf 'spidev : %s MISSING\n' "$SPI"
|
|
fi
|
|
if [ -e "$GPIOCHIP" ]; then
|
|
printf 'gpiochip : %s present\n' "$GPIOCHIP"
|
|
else
|
|
printf 'gpiochip : %s MISSING\n' "$GPIOCHIP"
|
|
fi
|
|
printf 'DRM cards : %s\n' "$(ls /dev/dri/card* 2>/dev/null | tr '\n' ' ')"
|
|
printf 'main panel dpms : %s\n' "$(cat /sys/class/drm/card0-SPI-1/dpms 2>/dev/null || printf 'unknown')"
|
|
printf 'fbdev nodes : %s\n' "$(ls /dev/fb* 2>/dev/null | tr '\n' ' ')"
|
|
for mod in mux_core mux_gpio spi_mux panel_mipi_dbi spidev; do
|
|
if grep -q "^$mod " /proc/modules 2>/dev/null; then
|
|
printf 'module %-20s: loaded\n' "$mod"
|
|
else
|
|
printf 'module %-20s: not loaded\n' "$mod"
|
|
fi
|
|
done
|
|
if [ -r "$FW" ]; then
|
|
printf 'panel firmware : %s (%s bytes)\n' "$FW" "$(wc -c < "$FW")"
|
|
else
|
|
printf 'panel firmware : %s MISSING\n' "$FW"
|
|
fi
|
|
printf 'mux select (lid-state): %s\n' "$(cat /run/bananarchy/lid-state 2>/dev/null || printf 'unknown')"
|
|
if [ -r /sys/kernel/debug/gpio ]; then
|
|
printf 'TLMM lines :\n'
|
|
grep -E '^ gpio(13|21|23|25|110) ' /sys/kernel/debug/gpio | sed 's/^/ /'
|
|
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|spi_word_bits) ' "$CONF" | sed 's/^/ /'
|
|
fi
|
|
if [ -x "$COVERCTL" ]; then
|
|
printf 'daemon : %s\n' "$("$COVERCTL" STATUS 2>/dev/null || printf 'not answering')"
|
|
else
|
|
printf 'daemon : %s missing\n' "$COVERCTL"
|
|
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 : 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'
|
|
printf ' rollback: bananarchy-coverctl SET backend none\n'
|
|
exit 0
|