Drive the 2720 Flip cover panel from userspace while closed
The shipping single-panel DTB left the external GC9305 unused because bananarchy-cover-idle only knew /dev/fb1. The compiled daemon now owns the shared QUP5 bus while the flip is closed: it claims gpio13/21/23 through the gpiochip ABI, replays the external firmware over /dev/spidev0.1 at the verified 25 MHz and pushes 240x240 RGB565 frames. LID OPEN restores the mux and releases the panel lines; activation also requires the main panel to be DPMS-off. Polarities are config keys and live SET knobs, with SET backend none as a rollback. /dev/fb1 keeps precedence and the two-panel spi-mux DT stays opt-in. Rebuilt the a1108/dejavu nokia-beatles image and pinned the verified hash ccc8c44517a6a3b78e16e45e9dddbf89f6f04a35ee4c52246d38d89970bd13ac in check-rebuild.sh. e2fsck -fn passes on both partitions, debugfs confirms the four updated rootfs files byte-for-byte, and the bootfs sync, boot image check, artifact sync, host tests and rebuild preflight all pass. This is an intermediate checkpoint: eyes-on confirmation that the cover lights up and several more polarity/CS fixes are still required.
This commit is contained in:
1 parent
d402a53221
commit
40a840b49b
12 files changed
+1085
-72
No files matched your search
@@ -373,7 +373,7 @@ fi
|
||||
echo "[check] Known-good flashable image set..."
|
||||
for pair in \
|
||||
"69a44f60eb123ebddf600be927155dc4a599ec35b7a0cf80060f4ba01f599f08 images/bananarchy-nokia-argon.img" \
|
||||
"16cc68cbfa9908dd42a36e1e4dd18149f9d8e43f7c5af30839695a89a5e60783 images/bananarchy-nokia-beatles.img" \
|
||||
"ccc8c44517a6a3b78e16e45e9dddbf89f6f04a35ee4c52246d38d89970bd13ac images/bananarchy-nokia-beatles.img" \
|
||||
"2b5c61aba307dbbda61f3b19a2ad5770f9854f41cba4e2c97e24efb7e20879f3 images/boot-bananarchy-nokia-beatles.img" \
|
||||
"b5549698c20f4de7603fc746d32bb5baa96ec377e41e74407823c98506fc185d images/boot-lk2nd-nokia-beatles-display.img"; do
|
||||
set -- $pair
|
||||
@@ -1442,6 +1442,45 @@ if command -v gcc >/dev/null 2>&1 && \
|
||||
fail "host cover display behaviour test failed"
|
||||
fi
|
||||
|
||||
echo "[check] Closed-flip external panel backend..."
|
||||
for token in 'cover_hw_release' 'cover_spi_draw' 'hw_init_panel' \
|
||||
'mux_closed_level' 'reset_assert_level' 'spi_speed_hz' \
|
||||
'BANANARCHY_COVER_SPI_SIM' 'BA_GPIO_GET_LINEHANDLE' \
|
||||
'BA_SPI_IOC_MESSAGE' 'MIPI DBI' \
|
||||
'cover_main_panel_is_off'; do
|
||||
if ! grep -qF -- "$token" "$COVER_SRC"; then
|
||||
fail "bananarchy-cover-idle.c lost the closed-flip spidev backend: $token"
|
||||
fi
|
||||
done
|
||||
for token in 'backend = auto' 'spi_device = /dev/spidev0.1' \
|
||||
'spi_mux_gpio = 13' 'spi_dc_gpio = 21' 'spi_reset_gpio = 23' \
|
||||
'mux_closed_level = 1' 'mux_open_level = 0' \
|
||||
'dc_command_level = 0' 'dc_data_level = 1' \
|
||||
'reset_assert_level = 0' 'reset_idle_level = 1' \
|
||||
'spi_speed_hz = 25000000'; do
|
||||
if ! grep -qF -- "$token" "$COVER_CONF"; then
|
||||
fail "cover display config lost the spidev polarity key: $token"
|
||||
fi
|
||||
done
|
||||
if ! grep -qF 'flip_open' "$COVER_SRC" || \
|
||||
! grep -qF 'cover_hw_release(hw)' "$COVER_SRC" || \
|
||||
! grep -qF 'cover_draw(&hw, fb_path, &state)' "$COVER_SRC"; then
|
||||
fail "the cover daemon no longer gates the shared bus on the flip state"
|
||||
fi
|
||||
if [ ! -x "$BASE_DIR/scripts/test-cover-spidev.py" ]; then
|
||||
fail "missing host test scripts/test-cover-spidev.py"
|
||||
fi
|
||||
if command -v gcc >/dev/null 2>&1 && \
|
||||
! "$BASE_DIR/scripts/test-cover-spidev.py" >/dev/null 2>&1; then
|
||||
fail "host closed-flip external panel backend test failed"
|
||||
fi
|
||||
for f in "$BASE_DIR/prebuilt/bananarchy-daemons/usr/bin/bananarchy-cover-idle" \
|
||||
"$BASE_DIR/overlay/rootfs/usr/bin/bananarchy-cover-idle"; do
|
||||
if ! strings "$f" 2>/dev/null | grep -qF 'frame lit=%d size=%zu'; then
|
||||
fail "${f#"$BASE_DIR/"} is stale: rebuild with scripts/build-bananarchy-daemons.sh"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[check] 2720 Flip external panel (opt-in DT)..."
|
||||
if [ ! -f "$BASE_DIR/devices/nokia-beatles/qcom-msm8905-nokia-beatles-cover.dts" ] || \
|
||||
[ ! -x "$BASE_DIR/scripts/build-beatles-cover-panel.py" ] || \
|
||||
@@ -1464,8 +1503,10 @@ if [ ! -x "$COVER_DIAG" ] || ! sh -n "$COVER_DIAG" 2>/dev/null; then
|
||||
fi
|
||||
if ! grep -qF '/dev/fb1' "$COVER_DIAG" || \
|
||||
! grep -qF '/sys/class/graphics/fb1' "$COVER_DIAG" || \
|
||||
! grep -qF '/dev/spidev0.1' "$COVER_DIAG" || \
|
||||
! grep -qF 'spi_mux_gpio' "$COVER_DIAG" || \
|
||||
! grep -qF 'bananarchy-coverctl' "$COVER_DIAG"; then
|
||||
fail "cover diagnostics no longer inspect fb1 and the daemon"
|
||||
fail "cover diagnostics no longer inspect fb1, spidev and the daemon"
|
||||
fi
|
||||
if ! grep -qF 'bananarchy-cover-diagnose.sh' \
|
||||
"$BASE_DIR/scripts/apply-bananarchy-overlay.sh"; then
|
||||
|
||||
Reference in new issue
Block a user