Repository navigation
Alpaca EDL support and per-board EDL matching - #103
EmbeddedAndroid wants to merge 3 commits into
Conversation
|
I tested the changes on lanai and kailua. I can't review this PR it seems but I say: LGTM |
|
|
||
| dev->has_power_key = true; | ||
|
|
||
| /* firehose powers the device off after a power key press under 2.5 s */ |
There was a problem hiding this comment.
The QRD's EDL programmer powers off if the press was under 2.5 s. Reworded; log in the commit message.
There was a problem hiding this comment.
If I'm reading the code right, we're trying to enter EDL at that point, so the fh programmer isn't in the picture yet
There was a problem hiding this comment.
Right, the press happens before EDL. The programmer qdl uploads later
checks how long that press was, 3.5 s after power-on and long after
the key was released (kailua-qrd, BOOT.MXF.2.1.1-00043, QTAC's 1.3 s):
B - 3236172 - Entering DeviceProg DDR
B - 3265086 - PM: PON by PWR key DEB
B - 3481544 - PM: Boot up PwrKey press 1310 ms detected is less than expected 2500 ms duration. Shutting down device.
With 3 s it goes on and qdl flashes. Reworded the comment:
the QRD firehose programmer, uploaded later in EDL, checks the press
that powered the board on and powers it off if it was shorter than 2.5 s.
| press_ms = device->power_key_press_ms; | ||
| if (device_edl_mode(device) && device->edl_power_key_press_ms) | ||
| press_ms = device->edl_power_key_press_ms; | ||
| watch_timer_add(press_ms ? press_ms : 100, device_tick, device); |
edl_open is passed the fastboot serial and never checks it, so every session takes every EDL device on the host for its own board. One board entering EDL ends the other sessions: device entered EDL unexpectedly, do we have a ramdump? or starts their qdl run before their own board is in EDL. Pass qdl_serial and match it against the "_SN:" token of the USB product string, as qdl --serial does. Also skip devices without a device node. Boards without qdl_serial still match any EDL device, so document that boards sharing a host need it. Tested-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
The alpaca driver ignores DEVICE_KEY_EDL, so an EDL power-on boots normally. Drive it on TTL output bit 4, and release it on open in case a previous server exited holding it. Tested-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
fba8669 to
d927913
Compare
|
v2: review addressed, cdba-server patch dropped. Same Alpaca sequence brgl tested. |
The generic EDL power-on does not get an SM8550 QRD on an Alpaca into
EDL; it boots normally. QTAC's bootToEDL for these boards does: assert
EDL, power on 500 ms later, connect USB 900 ms after that, then press
the power key for 1.3 s. That press is too short. The firehose
programmer qdl uploads into EDL checks the press that powered the board
on and powers it off if it was under 2.5 s, 3.5 s after power-on and
long after the key was released, so qdl fails its first request:
B - 3236172 - Entering DeviceProg DDR
B - 3265086 - PM: PON by PWR key DEB
B - 3481544 - PM: Boot up PwrKey press 1310 ms detected is less
than expected 2500 ms duration. Shutting down device.
Let the control driver set the EDL key to power delay, the power to USB
delay and the power key press used for EDL, and release EDL with the
power key when a press time is set. Alpaca sets 500, 900 and 3000 ms.
Other controllers and the normal and fastboot power-on are unchanged.
Signed-off-by: Tyler Baker <tyler.baker@oss.qualcomm.com>
85a28fd to
397d707
Compare
EDL flashing does not work on Alpaca boards, and on a host shared by
several boards one board entering EDL ends the other boards' sessions.
(500/900/3000 ms)
Boards sharing a host need qdl_serial; without it any EDL device on the
host is still taken as the board's, which keeps the ramdump notice for
unconfigured boards.
Tested on hardware by brgl (SM8550 QRD on an Alpaca enters EDL and takes
QDL writes; Lanai) on the previous version. This version sends the same
Alpaca command sequence with the same delays (off-board harness:
alpaca.c on a pty driven by device.c's state machine), builds per commit
with gcc and clang --werror, and parses no EDL timing keys.