-
Notifications
You must be signed in to change notification settings - Fork 2k
Document GPIO boot mode on its own page #1131
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
239be14
Document GPIO boot mode it its own page
3a7e16e
add content to new page
589ae4c
explain GPIO boot mode disables all boot modes by default
83ec883
add all docs from bootflow.md
c0015bb
address review comments
933626e
Update gpio.md
6c7366b
SD0 = Broadcom, SD1 = Arasan with SDIO
5502987
fix wording
ed9fe20
SD0 also does MMC, remove duplicate "permanently"
6d55871
fix wording
e3c7085
expand on boot order explanation
4ebaa7a
fix typo
e3323fe
Update gpio.md
8328e77
Update gpio.md
06b1354
add link to config.txt docs page
93c7989
fix relative links
18e6fa6
fix relative links (take 2)
5c7d7f3
Update gpio.md
0bd96d7
SPI and NAND - no Linux support at present
40cbc74
backout last change
d921755
SPI and NAND - no Linux support at present (take 2)
334f765
fix typo
ea88d4c
GPIO bank selection - revert to base of 1
95098b1
fix typo
f3c21b8
fix typo
906acbf
revert GPIO bank selection to base 1 (take 2)
f7ebd20
Cater for CM Lite - SD0 availability at boot to be confirmed
0687e99
Add details of SD0 on CM Lite per lurch
b012955
SD -> microSD
4b815b5
Update per Gordon's comments
783f32f
Add 3A+ and CM3 and 3+
d670aa6
Update gpio.md
27fc56a
Make sure all Pi models are covered by tables of GPIOs
cbd4ed3
GPIO lines -> GPIO pins, since they are not in the same order
c470484
remove unnecessary sentence
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# GPIO boot mode | ||
|
||
The Raspberry Pi can be configured to allow the boot mode to be selected at power on using hardware attached to the GPIO connector: this is GPIO boot mode. This is done by setting bits in the OTP memory of the SoC. Once the bits are set, they permanently allocates 5 GPIOs to allow this selection to be made. Once the OTP bits are set they cannot be unset so you should think carefully about enabling this, since those 5 GPIO lines will then be permanently unavailable for any other use. | ||
|
||
To enable GPIO boot mode, add the following line to the config.txt file: | ||
|
||
``` | ||
program_gpio_bootmode=n | ||
``` | ||
|
||
Where n is the bank of GPIOs which you wish to use. Then reboot the Pi once to program the OTP with this setting. Bank 1 is GPIOs 22-26, bank 2 is GPIOs 39-43. Unless you have a Compute Module, you must use bank 1: the GPIOs in bank 2 are only available on the Compute Module. Because of the way the OTP bits are arranged, if you first program GPIO boot mode for bank 1, you then have the option of selecting bank 2 later. The reverse is not true: once bank 2 has been selected for GPIO boot mode, you cannot select bank 1. | ||
|
||
Once GPIO boot mode is enabled, the Raspberry Pi will no longer boot. You must pull up at least one boot mode GPIO pin in order for the Pi to boot. | ||
This conversation was marked as resolved.
Show resolved
Hide resolved
|
||
|
||
Once enabled, the GPIOs are polled in numerical order as follows: | ||
|
||
|Bank 1|Bank2|boot type| | ||
|:----:|:---:|:-------:| | ||
|22 |39 |SD1 | | ||
|23 |40 |SD2 | | ||
|24 |41 |NAND | | ||
|25 |42 |SPI | | ||
|26 |43 |USB | | ||
|
||
This conversation was marked as resolved.
Show resolved
Hide resolved
|
||
SD1 is the <xxx> SD card interface. SD2 is the <yyy> SD card interface. USB enables both USB device mode and USB host mode boot. | ||
|
||
The default pull resistance on the GPIO lines is 50K ohm, as documented on page 102 of the [BCM2835 ARM peripherals datasheet](hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf). A pull resistance of 5K ohm is recommended to pull a GPIO line up or down: this will allow the GPIO to function but not consume too much power. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.