Skip to content

Pmolloy/rockchip boot modes #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[PSI Spec Introduction](intro.md)
[Mask ROMs and Loaders](mask-roms-loaders.md)
[Platform Initialization](platform-initialization.md)
[Boot Environments](boot-environments.md)
[Platform Security](platform-security.md)
- [PSI Spec Introduction](intro.md)
- [Mask ROMs and Loaders](mask-roms-loaders.md)
- [Rockchip](rockchip.md)
- [Platform Initialization](platform-initialization.md)
- [Boot Environments](boot-environments.md)
- [Platform Security](platform-security.md)
24 changes: 24 additions & 0 deletions src/rockchip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Rockchip

## RK3588

The boot ROM uses the internal 12-bit 1MS/s SARADC to read `SARADC_IN0_BOOT` on
power. It selects a boot mode based on the following table:

| ADC value | Voltage | Mode |
|-----------|---------|------|
| 0 | 0 | USB |
| 682 | 0.3 | SD card, USB |
| 1365 | 0.6 | eMMC, USB |
| 2047 | 0.9 | FSPI M0, USB |
| 2730 | 1.2 | FSPI M1, USB |
| 3412 | 1.5 | FSPI M2, USB |
| 4095 | 1.8 | FSPI M2, FSPI M1, FSPI M0, eMMC, SD card, USB |

It will search each device in the order listed above for a valid image.

`SARADC_IN0_BOOT` is often routed to a button, which when pressed is connected
to ground (i.e. 0 V) and otherwise is 1.8V.

Additional channels of the ADC may be routed to jumper headers to be used by
later boot loader stages.