[BUG] Raxda Rock Pi 4A serial console output stops prematurely

Anand Moon linux.amoon at gmail.com
Sun Nov 30 13:12:36 CET 2025


Hi FUKAUMI,

On Sun, 30 Nov 2025 at 13:24, FUKAUMI Naoki <naoki at radxa.com> wrote:
>
> Hi Anand,
>
> On 11/30/25 16:27, Anand Moon wrote:
> > Hi FUKAUMI
> >
> > On Sat, 29 Nov 2025 at 15:22, FUKAUMI Naoki <naoki at radxa.com> wrote:
> >>
> >> Hi Anand,
> >>
> >> On 11/29/25 16:25, Anand Moon wrote:
> >>> Hi FUKAUMI,
> >>>
> >>> On Sat, 29 Nov 2025 at 10:09, FUKAUMI Naoki <naoki at radxa.com> wrote:
> >>>>
> >>>> Hi Anand,
> >>>>
> >>>> On 11/28/25 14:50, Anand Moon wrote:
> >>>>> Hi Heinrich,
> >>>>>
> >>>>>>> Thanks. I am having the same issue with my Radxa Rock Pi 4 B Plus.
> >>>>>>>
> >>>>>>> But I am booting from SPI flash, so I cannot stop this board in the
> >>>>>>> U-Boot prompt.
> >>>>>>>
> >>>>>>> Is there any other way to flash the SPI flash u-boot-rockchip-spi.bin image
> >>>>>>> in the user space to spi flash? using dd coammnd
> >>>>>>>
> >>>>>>>     From the schematics, it has W25Q64FWZPIG
> >>>>>>>
> >>>>>>> [1] https://dl.radxa.com/rockpi4/docs/hw/rockpi4/rockpi4_v13_sch_20181112.pdf
> >>>>>>>
> >>>>>>> I have tried to enable SPI flash, but it is not getting detected on
> >>>>>>> the board in userspace.
> >>>>>>
> >>>>>>
> >>>>>> https://wiki2.radxa.com/Rockpi4/dev/usb-install
> >>>>>> has some guidance how to avoid booting from SPI NOR flash.
> >>>>>>
> >>>>> Thanks for your tip.
> >>>>>
> >>>>> I've attempted this method, but it hasn't worked for me.
> >>>>> Could you provide the SPI details for this board so I can map it in driver code
> >>>>> and from userspace and then attempt to erase or reflash the image?
> >>>>>
> >>>>> on my board
> >>>>> [    1.282609] mmcblk0boot0: mmc0:0001 SLD64G 4.00 MiB
> >>>>> [    1.285862] spi-nor spi1.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
> >>>>
> >>>> Are you using dts with "audio-supply = <&vcc_3v0>;"? It should fix SPI too.
> >>>>
> >>> Thanks for your tip.
> >>>
> >>> I have applied the patch from FUKAUMI, and now my console output has
> >>> started working
>
> How did you use patched dts? And what does "my console output has
> started working" mean?
>
> >>>> 1. Make u-boot-rockchip.bin with "audio-supply = <&vcc_3v0>;"
> >>>> 2. Write it to microSD card
> >>>> 3. Insert it
> >>>> 4. Kill SPI flash
> >>>> 5. Boot U-Boot from SD card
> >>>> 6. Revert 4.
> >>>> 7. Try "sf probe" "sf erase"
> >>>>
> >>> Yes, I have tried these steps (4 Kill SPI flash) ->
> >>> I have shortened the SPI1_CLK and GNG in the GPIO header
> >>> But this board first boots from SPI flash, I don't know the reason.
> >>>
> >>> I noticed your patch references the W25Q128.
> >>> Did you get this device detection in userspace?
> >>>
> >>> This output is from your patch.
> >>> => led blue:status off
> >>> => sf probe
> >>> SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
> >>> => led blue:status on
> >>> => sf probe
> >>> jedec_spi_nor flash at 0: unrecognized JEDEC id bytes: ff, ff, ff
> >>> Failed to initialize SPI flash at 1:0 (error -2)
> >>>
> >>> Could this explain why I’m unable to detect the device from userspace?
> >>
> >> What happens if you lower the SPI clock?
> >> e.g.
> >>    spi-max-frequency = <10000000>;
> >>
> > Thanks for your input, but I have a bad old U-Boot in my SPI chip,
> > which blocks the UART. I need to erase the SPI chip externally
> > or erase the chip from user space.
>
> If you can use patched dts on Linux, please try lower frequency and see
> spi-nor found or not on Linux. W25Q64FW max frequency is 104MHz, not 108MHz.
>
Thanks,  I have tried all the things you suggested

alarm at rockpi4b:~$ dmesg | grep spi
[    0.000000] Kernel command line: console=ttyS2,1500000
root=LABEL=ROOT_MNJRO rw rootwait audit=0 splash
plymouth.ignore-serial-consoles dyndbg="file
drivers/mtd/spi-nor/spi-nor.c +p"
[    0.000000] Unknown kernel command line parameters "splash
dyndbg=file drivers/mtd/spi-nor/spi-nor.c +p", will be passed to user
space.
[    1.293692] spi-nor spi1.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    1.435572]     dyndbg=file drivers/mtd/spi-nor/spi-nor.c +p
alarm at rockpi4b:~$ cat /proc/mtd
dev:    size   erasesize  name
alarm at rockpi4b:~$

Yes, I have applied your suggestion and built the kernel
Still, I am not able to detect the SPI flash in user space.

Here is the bootlogs [1] https://pastebin.com/25fCqwRT
My console works after I apply your patch to the kernel.

U-Boot TPL 2025.10-1 (Oct 31 2025 - 11:12:15)
lpddr4_set_rate: change freq to 400MHz 0, 1
Channel 0: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 400MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
lpddr4_set_rate: change freq to 800MHz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2025.10-1 (Oct 31 2025 - 11:12:15 +0000)
Trying to boot from MMC1
## Checking hash(es) for config config-1 ... OK
## Checking hash(es) for Image atf-1 ... sha256+ OK
## Checking hash(es) for Image u-boot ... sha256+ OK
## Checking hash(es) for Image fdt-1 ... sha256+ OK
## Checking hash(es) for Image atf-2 ... sha256+ OK
## Checking hash(es) for Image atf-3 ... sha256+ OK
## Checking hash(es) for Image atf-4 ... sha256+ OK
load_simple_fit: Skip load 'atf-5': image size is 0!


U-Boot 2025.10-1 (Oct 31 2025 - 11:12:15 +0000)

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4A
DRAM:  4 GiB (total 3.9 GiB)
PMIC:  RK808

You see, I could not control the UART with the key pressed.
Here are my local Linux DTS changes
-------
 git diff arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts
arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts
b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts
index 9c741d1a3047..adbd14d7bd9b 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b-plus.dts
@@ -42,6 +42,17 @@ &sound {
        hp-det-gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
 };

+&spi1 {
+       status = "okay";
+
+       flash at 0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <104000000>;
+               vcc-supply = <&vcc3v3_sys>;
+       };
+};
+
 &uart0 {
        status = "okay";

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
index 55285c7c6e54..484bab2fea9d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts
@@ -37,7 +37,8 @@ &spi1 {
        flash at 0 {
                compatible = "jedec,spi-nor";
                reg = <0>;
-               spi-max-frequency = <108000000>;
+               spi-max-frequency = <104000000>;
+               vcc-supply = <&vcc3v3_sys>;
        };
 };

Winbord nor patch as per U-Boot configuration

$ git diff drivers/mtd/spi-nor/winbond.c
diff --git a/drivers/mtd/spi-nor/winbond.c b/drivers/mtd/spi-nor/winbond.c
index 63a93c9eb917..38449464b67b 100644
--- a/drivers/mtd/spi-nor/winbond.c
+++ b/drivers/mtd/spi-nor/winbond.c
@@ -295,7 +295,14 @@ static const struct flash_info winbond_nor_parts[] = {
                .id = SNOR_ID(0xef, 0x70, 0x17),
                .name = "w25q64jvm",
                .size = SZ_8M,
-               .no_sfdp_flags = SECT_4K,
+               .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
+               .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ |
SPI_NOR_QUAD_READ,
+       }, {
+               .id = SNOR_ID(0xef, 0x60, 0x17),
+               .name = "w25q64dw",
+               .size = SZ_8M,
+               .flags = SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB,
+               .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ |
SPI_NOR_QUAD_READ,
        }, {
                .id = SNOR_ID(0xef, 0x70, 0x18),
                .name = "w25q128jv",
@@ -322,6 +329,7 @@ static const struct flash_info winbond_nor_parts[] = {
                .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ |
SPI_NOR_QUAD_READ,
                .otp = SNOR_OTP(256, 3, 0x1000, 0x1000),
        }, {
+
                .id = SNOR_ID(0xef, 0x80, 0x17),
                .name = "w25q64jwm",
                .size = SZ_8M,
amoon at amoon-t440s:~/mainline/linux-stable-6.y-devel$

> Are you sure your board has W25Q64FW? What is the board ver. do you have?

I have my Radxa Rock Pi 4b Plus with eMMC soldered to the board as
shown link below.

[2] https://jumpshare.com/share/1GYCqbrd3GC1Z1tpHMMf (BOARD)
> I'm not asking about schematic, but actual chip soldered on *your board*.
>
> Please check Component Placement Map for location:
>   https://radxa.com/products/rock4/4bp#downloads
>
Sorry, I could not read the SPI chip info. My mobile camera cannot
detect the chip id
Here is the PCB image of the board.

[3] https://jumpshare.com/share/fUUSVTKPIqwlbWyrIP7g (SPI CHIP)

> Best regards,
>
> --
> FUKAUMI Naoki
> Radxa Computer (Shenzhen) Co., Ltd.
>
Thanks
-Anand


More information about the U-Boot mailing list