U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Better smartphone support (Qualcomm)
@ 2025-03-31 12:23 Caleb Connolly
  2025-03-31 12:23 ` [PATCH v4 1/6] board/qualcomm: introduce phone config Caleb Connolly
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Caleb Connolly @ 2025-03-31 12:23 UTC (permalink / raw)
  To: Caleb Connolly, Neil Armstrong, Tom Rini, Sumit Garg, Ramon Fried,
	Jorge Ramirez-Ortiz, Sumit Garg
  Cc: u-boot-qcom, u-boot, Simon Glass, Danila Tikhonov, Jens Reidel

Improve support for running U-Boot on [Qualcomm] smartphones, with:

* A boot menu which can be entered by holding volume down during boot
* Hang on panic (so errors can be read on the display)
* Serial gadget which can be enabled by holding volume down or via
  boot menu

In its current form, U-Boot's boot menu is perfectly adequate, however
once an option is picked U-Boot will never return to the menu, always to
the CLI.

On a phone (with no keyboard), dropping to the CLI effectively makes the
device unusable until manually rebooted, since there is no way to run
any commands...

To rectify this, let's revive CONFIG_BOOT_RETRY for the hush parser and
add an option CONFIG_RETRY_BOOTCMD to run the contents of "bootcmd".
This provides for a flexible menu system which we can enter and exit.
See qcom-phone.env in patch 1 for more details.

Finally, provide some rough-ish documentation to describe how Qualcomm
phone support works and outline some debugging steps for when UART and
the framebuffer are unavailable.

---
Changes in v4
- Enable console recording and "fastboot oem console" support
- Clean up boot menu
- Simplify button_cmds usage, and use Volume Down instead of power
- Make button_get_by_label() case insensitive
- Use better button labels in the qcom-pmic button driver
- Enable the MMC fastboot backend by default since it can be used on
  older devices, or those with an sdcard slot.
- Document fastboot mode and log retrieval
- Link to v3: https://lore.kernel.org/u-boot/20250311-qcom-phones-v2-0-83dcd88a6a87@linaro.org
[v3 was accidentally sent as "v2" a second time]

Changes in v3:
- Minor wording/clarification improvements in docs
- Introduce CONFIG_RETRY_BOOTCMD rather than changing the default
  behaviour.
- Enable some more gadgets in the phone config fragment.
- Link to v2: https://lore.kernel.org/u-boot/20241004-qcom-phones-v2-0-c7ab67ac3043@linaro.org

Changes in v2:
- Fix CONFIG_BUTTON_REMAP_PHONE_KEYS name in qcom-phone.config
- Add Tom and Simon to CC
- Link to v1: https://lore.kernel.org/r/20240831-qcom-phones-v1-0-08614edd8e35@linaro.org

---
Caleb Connolly (6):
      board/qualcomm: introduce phone config
      cli_hush: support running bootcmd on boot retry
      bootretry: check for bootretry variable changes
      doc: board/qualcomm: describe phone support and bringup
      button: qcom-pmic: prettify and standardise button labels
      button: make button_get_by_label() case insensitive

 board/qualcomm/dragonboard410c/dragonboard410c.c |   2 +-
 board/qualcomm/dragonboard820c/dragonboard820c.c |   2 +-
 board/qualcomm/qcom-phone.config                 |  29 +++++
 board/qualcomm/qcom-phone.env                    |  47 ++++++++
 boot/Kconfig                                     |   7 ++
 boot/bootretry.c                                 |   2 +
 common/cli_hush.c                                |   6 +-
 common/cli_hush_upstream.c                       |   6 +-
 doc/board/qualcomm/board.rst                     |   5 +
 doc/board/qualcomm/index.rst                     |   1 +
 doc/board/qualcomm/phones.rst                    | 144 +++++++++++++++++++++++
 drivers/button/button-qcom-pmic.c                |   8 +-
 drivers/button/button-uclass.c                   |   2 +-
 13 files changed, 250 insertions(+), 11 deletions(-)
---
base-commit: 96f6ab64e1bc897d26649d15365f6d9970ccb1c0

Caleb Connolly <caleb.connolly@linaro.org>


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-04-11 13:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-31 12:23 [PATCH v4 0/6] Better smartphone support (Qualcomm) Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 1/6] board/qualcomm: introduce phone config Caleb Connolly
2025-04-03  6:59   ` Sam Day
2025-03-31 12:23 ` [PATCH v4 2/6] cli_hush: support running bootcmd on boot retry Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 3/6] bootretry: check for bootretry variable changes Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 4/6] doc: board/qualcomm: describe phone support and bringup Caleb Connolly
2025-03-31 12:23 ` [PATCH v4 5/6] button: qcom-pmic: prettify and standardise button labels Caleb Connolly
2025-04-01  8:40   ` Neil Armstrong
2025-03-31 12:23 ` [PATCH v4 6/6] button: make button_get_by_label() case insensitive Caleb Connolly
2025-04-01  8:41   ` Neil Armstrong
2025-04-11 13:36 ` [PATCH v4 0/6] Better smartphone support (Qualcomm) Caleb Connolly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox