All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz via U-Boot <u-boot@lists.u-boot-project.org>
To: Johan Jonker <jbx6244@gmail.com>
Cc: kever.yang@rock-chips.com, sjg@chromium.org, trini@konsulko.com,
	u-boot@lists.u-boot-project.org, eddie.cai.linux@gmail.com
Subject: Re: [PATCH v5 2/9] rockchip: doc: add mask ROM mode text
Date: Wed, 12 Aug 2026 15:32:11 +0200	[thread overview]
Message-ID: <166efc6c-b659-41bb-a8d0-bec6d03df740@0leil.net> (raw)
In-Reply-To: <dfe95538-0b08-4378-ad46-bbe0ef554cab@gmail.com>

Hi Johan,

On 8/6/26 1:10 PM, Johan Jonker wrote:
> Add text that explains how to get into mask ROM mode.
> 
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> 
> Changed V5:
> reword
> ---
>   doc/board/rockchip/rockchip.rst | 25 +++++++++++++++++++++++--
>   1 file changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
> index de2df3046e28..af6c08c46636 100644
> --- a/doc/board/rockchip/rockchip.rst
> +++ b/doc/board/rockchip/rockchip.rst
> @@ -325,6 +325,27 @@ To build rk3588 boards:
>           make evb-rk3588_defconfig
>           make CROSS_COMPILE=aarch64-linux-gnu-
>   
> +Mask ROM mode
> +-------------
> +
> +Mask ROM mode is the fallback mode of the boot ROM,
> +in which it listens for USB commands 0x471/0x472.
> +
> +Options to get your board into Mask ROM mode:
> +
> +* Hold the recovery button, depending on firmware support or wiring,
> +  while booting the board.
> +* Remove any SD cards, removable eMMC or removable UFS modules.
> +* Erase any storage media containing boot firmware.
> +
> +Methods of last resort (USE AT YOUR OWN RISK):
> +
> +Short the following pins briefly while powering the board, so the boot ROM
> +cannot locate any boot firmware and falls back into Mask ROM mode:
> +
> +* NAND: connect pin 8 and 9 of the NAND flash with a needle.
> +* eMMC: connect the clock line to ground.

I see that in the NAND section below pins 8 and 9 need to be connected 
and that's where you got the information but is there a standard that 
makes sure all NANDs are pin-to-pin compatible? I'm wondering if it 
wouldn't make more sense to specify which pin(s) (its function for 
example) need to be connected.

On RK3588, RK3576, possibly RK3562 and other RK35xx SoCs (but not 
RK356x, likely not RK3528, ...) it's also possible to enter Mask ROM 
mode by forcing channel 0 of the SARADC to be 0V. Can always be improved 
in a later patch.

For SPI NOR, on RK3399 Puma we make sure HOLD# is below the threshold 
and thus the SoC cannot communicate with it. Can always be improved in a 
later patch.

> +
>   Flashing
>   --------
>   
> @@ -485,9 +506,9 @@ To write a U-Boot image to the SD card (assumed to be /dev/sda):
>   NAND
>   """"
>   
> -Bring device in BootROM mode:
> +Bring device in Mask ROM mode:
>   
> -If bricked and no BootROM mode shows up then connect pin 8 and 9 of the NAND flash
> +If bricked and no Mask ROM mode shows up then connect pin 8 and 9 of the NAND flash
>   with a needle while reconnecting to the USB OTG port to a PC.
>   

There's another BootROM/Mask ROM swap that's missing. For RK3066:

"""
If all other boot options fail then it enters into a BootROM mode on the 
USB OTG port.
"""

Cheers,
Quentin

  reply	other threads:[~2026-08-12 13:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 11:08 [PATCH v5 0/9] doc: clean up README.rockchip Johan Jonker
2026-08-06 11:10 ` [PATCH v5 1/9] rockchip: scripts: remove rkmux.py Johan Jonker
2026-08-06 11:10 ` [PATCH v5 2/9] rockchip: doc: add mask ROM mode text Johan Jonker
2026-08-12 13:32   ` Quentin Schulz via U-Boot [this message]
2026-08-06 11:11 ` [PATCH v5 3/9] rockchip: doc: remove TODO Johan Jonker
2026-08-12 13:34   ` Quentin Schulz
2026-08-06 11:11 ` [PATCH v5 4/9] rockchip: doc: add more building instructions Johan Jonker
2026-08-12 13:44   ` Quentin Schulz via U-Boot
2026-08-12 14:48     ` Quentin Schulz via U-Boot
2026-08-06 11:11 ` [PATCH v5 5/9] rockchip: tools: rksd: remove reference to README.rockchip Johan Jonker
2026-08-06 11:11 ` [PATCH v5 6/9] rockchip: tools: rkspi: " Johan Jonker
2026-08-06 11:12 ` [PATCH v5 7/9] rockchip: tools: add comment section to rkimage.c Johan Jonker
2026-08-12 14:06   ` Quentin Schulz via U-Boot
2026-08-06 11:12 ` [PATCH v5 8/9] rockchip: doc: rockusb: remove reference to README.rockchip Johan Jonker
2026-08-06 11:12 ` [PATCH v5 9/9] rockchip: doc: remove README.rockchip Johan Jonker
2026-08-12 14:45   ` Quentin Schulz via U-Boot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166efc6c-b659-41bb-a8d0-bec6d03df740@0leil.net \
    --to=u-boot@lists.u-boot-project.org \
    --cc=eddie.cai.linux@gmail.com \
    --cc=jbx6244@gmail.com \
    --cc=kever.yang@rock-chips.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@0leil.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.