Skip to content
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

bootflow.md: please clarify how to disable boot modes via GPIO #793

Closed
rd235 opened this issue Jan 2, 2018 · 9 comments
Closed

bootflow.md: please clarify how to disable boot modes via GPIO #793

rd235 opened this issue Jan 2, 2018 · 9 comments

Comments

@rd235
Copy link

rd235 commented Jan 2, 2018

from bootflow.md:
Uses program_gpio_bootmode to disable some modes by reading GPIOs 22-26 or 39-43 to see if the default values do not equal the default pull to '0'. If it is low, it will disable that boot mode for each of SD1, SD2, NAND, SPI, USB. If the value read is a '1', then that boot mode is enabled (note this cannot enable boot modes that have not already been enabled in the OTP). The default pull resistance is around 50K ohm, so a smaller pull up of 5K should suffice to enable the boot mode but still allow the GPIO to be operational without consuming too much power.
This seems to mean that all boot mode are disabled by default: in fact, all the pins 22-26 or 39-41 are down at startup time.
(see pag 102 of https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf -- these values should be the same for BCM2837)
So, from your boot flow description at least one 5K resistor should be needed to enable the desired boot mode.
On the contrary there are on the net several videos showing how to boot a RPi3 from MSD or network, and no one mentions about the need of resistors.
Please rephrase the sentence above to clarify when pull up resistors are needed and which is the behavior with and without the pullup.
Thank you.

@JamesH65
Copy link
Contributor

Ping @ghollingworth Is this one for you?

@ghollingworth
Copy link
Contributor

The above is only valid when program_gpio_bootmode is set... Once this bit has been set then the boot modes will be disabled, you'll then require a pull up to re-enable your specific boot mode

Gordon

@JamesH65
Copy link
Contributor

Do we need to clarify the docs?

@ghollingworth
Copy link
Contributor

No I don't think so, it says this at the top of the document. Although James, maybe just have a read through and make sure you agree... Obviously being the person to write the data does tend to give one a different viewpoint!

@rd235
Copy link
Author

rd235 commented May 14, 2018

There are two OTP flags: program_usb_boot_mode and program_gpio_bootmode. Somewhere I would say that program_gpio_bootmode is not needed to boot a RPI from a MSD or from the network. (am i misundertanding the specifications?)
When program_gpio_bootmode is UNSET, are all the devices enabled (SD1, SD2, NAND, SPI, USB) or just SD1 and USB (provided program_usb_boot_mode is 1)?

@ghollingworth
Copy link
Contributor

There is a bootmode register enabling the other boot modes, program_gpio_bootmode cannot enable bootmodes, only disable them.

So you've only got SD1 and USB enabled

@ghost
Copy link

ghost commented Jun 11, 2019

There are two OTP flags: program_usb_boot_mode and program_gpio_bootmode. Somewhere I would say that program_gpio_bootmode is not needed to boot a RPI from a MSD or from the network.

Correct. GPIO boot mode is a special boot mode which checks certain GPIO pins to determine at boot time which boot modes should be attempted. If all you want to do is use MSD or net boot, then you don't need GPIO boot mode. program_usb_bootmode is the one you need to enable both MSD and ethernet boot, despite the name.

This is being dealt with in #1131 which adds a dedicated page which describes GPIO boot mode, along with suitable links in from other pages in the docs.

@ghost
Copy link

ghost commented Jun 11, 2019

There is a bootmode register enabling the other boot modes, program_gpio_bootmode cannot enable bootmodes, only disable them.

So you've only got SD1 and USB enabled

Most of the docs refer to SD0 and SD1 rather than SD1 and SD2. To be clear, it is the "first" SD/MMC interface that is used by the "official" Raspberry Pi version of Linux to talk to the SD card. This is the Broadcom SD/MMC interface. The second SD/MMC interface is from Arasan and is also capable of SDIO, hence it is used to talk to the Wifi chip on the various models of Pi which have built-in wifi. (The Arasan SD/MMC interface was originally used by Raspberry Pi to talk to the SD card).

@lurch
Copy link
Contributor

lurch commented Jul 3, 2019

Fixed by #1131

@lurch lurch closed this as completed Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants