Issue with eMMC + NVMe

Hello,

Devices: RockPi 4b v1.5 + remotable eMMC + NVMe KingSpec M.2 NMVe SSD NE 2280 512 GB

I am using instructions to erase SPI https://wiki.radxa.com/Rockpi4/dev/spi-install

$ sudo rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=103 Maskrom

$ sudo rkdeveloptool db ./rk3399_loader_spinor_v1.20.126.bin
Downloading bootloader succeeded.

$ dd if=/dev/zero of=./zero.img bs=1M count=4
4+0 records in
4+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.0160027 s, 262 MB/s

$ sudo rkdeveloptool wl 0 ./zero.img
Write LBA from file (100%)

$ sudo rkdeveloptool td
Test Device OK.

$ sudo rkdeveloptool rd
Reset Device OK.

After that, insert eMMC and use instruction to write image to eMMC https://wiki.radxa.com/Rockpi4/dev/usb-install

$ sudo rkdeveloptool ld
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=103 Maskrom

$ sudo rkdeveloptool db ./rk3399_loader_v1.20.119.bin
Downloading bootloader succeeded.

$ sudo rkdeveloptool wl 0 ./Armbian_22.08.8_Rockpi-4b_bullseye_current_5.15.76.img
Write LBA from file (100%)

$ sudo rkdeveloptool rd
Reset Device OK.

After reboot device work fine.

But if I insert NVMe the system not booting, blue led just blinking and that all.

I tryed several images:

  • Armbian_22.11.0-trunk_Rockpi-4b_bullseye_current_5.15.76_minimal.img
  • Armbian_22.08.8_Rockpi-4b_bullseye_current_5.15.76.img
  • rockpi-4b-debian-bullseye-xfce4-arm64-20221101-0519-gpt.img
  • rockpi-4b-debian-buster-xfce4-arm64-20220401-0335-gpt.img

The main goal is system on eMMC and stored data on NVMe (like mini NAS)
Any help with it ?

Additional information:
I continue trying different images and Manjaro-ARM-minimal-rockpi4b-22.06.img work fine in that configurations.
But I want to use Debian…

Can some provide what I do wrong with debian install?

can you access serial console?

For now unforchantly no, waiting serial cable

So I got serial console cable and what I figured out:

For next kernel 4.4

From https://wiki.radxa.com/Rock4/downloads
Image: rockpi-4b-ubuntu-focal-server-arm64-20220401-0346-gpt.img
uname -a: Linux rockpi-4b 4.4.154-116-rockchip-g86a614bc15b3 #1 SMP Mon Jan 10 12:03:08 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

From https://github.com/radxa/debos-radxa/releases
Image: rockpi-4b-ubuntu-focal-server-arm64-20221201-1056-gpt.img
uname -a: Linux rockpi-4b 4.4.194-11-rk3399-rockchip-g1bb08d49cc40 #1 SMP Fri Nov 4 21:33:40 CST 2022 aarch64 aarch64 aarch64 GNU/Linux

Image: rockpi-4b-ubuntu-focal-server-arm64-20221101-0358-gpt.img
uname -a: Linux rockpi-4b 4.4.194-11-rk3399-rockchip-g1bb08d49cc40 #1 SMP Fri Nov 4 21:33:40 CST 2022 aarch64 aarch64 aarch64 GNU/Linux

When I insert NVMe, the system stuck on next:

U-Boot 2017.09-00026-g2431fa34678 (Feb 14 2022 - 21:41:40 +0800)

Model: Radxa ROCK Pi 4B
PreSerial: 2
DRAM: 3.9 GiB
Relocation Offset is: f5bdd000
Sysmem: init
I2c speed: 400000Hz
PMIC: RK808
vdd_center 900000 uV
vdd_cpu_l 900000 uV
MMC: dwmmc@fe320000: 1, sdhci@fe330000: 0
Using default environment

Model: Radxa ROCK Pi 4B
Bootdev(atags): mmc 1
PartType: EFI
get part misc fail -1
boot mode: None
init_resource_list: failed to get resource part, ret=-1
Can’t find file:logo.bmp
failed to display uboot logo
CLK: (uboot. arml: enter 816000 KHz, init 816000 KHz, kernel 0N/A)
CLK: (uboot. armb: enter 24000 KHz, init 24000 KHz, kernel 0N/A)
aplll 816000 KHz
apllb 24000 KHz
dpll 800000 KHz
cpll 24000 KHz
gpll 800000 KHz
npll 600000 KHz
vpll 24000 KHz
aclk_perihp 133333 KHz
hclk_perihp 66666 KHz
pclk_perihp 33333 KHz
aclk_perilp0 266666 KHz
hclk_perilp0 88888 KHz
pclk_perilp0 44444 KHz
hclk_perilp1 100000 KHz
pclk_perilp1 50000 KHz
Net: eth0: ethernet@fe300000
Hit key to stop autoboot(‘CTRL+C’): 0
Here trying to boot from nvme
dcache off

without NVMe work normal
$ sudo fdisk -l
Disk /dev/mmcblk1: 57.63 GiB, 61865984000 bytes, 120832000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B34D5DAC-BF62-4BEF-BB4A-249DB1658222

Device Start End Sectors Size Type
/dev/mmcblk1p1 64 8063 8000 3.9M Microsoft basic data
/dev/mmcblk1p2 16384 24575 8192 4M Microsoft basic data
/dev/mmcblk1p3 24576 32767 8192 4M Microsoft basic data
/dev/mmcblk1p4 32768 1081343 1048576 512M EFI System
/dev/mmcblk1p5 1081344 120830047 119748704 57.1G Linux filesystem

Additional testing on Armbian

From https://github.com/radxa-build/rock-pi-4b/releases/tag/20221201-0200
Image: Armbian_22.11.0-trunk_Rockpi-4b_bullseye_current_5.15.80_minimal.img
uname -a: Linux rockpi-4b 5.15.80-rockchip64 #trunk SMP PREEMPT Thu Dec 1 07:25:43 UTC 2022 aarch64 GNU/Linux

Works witout NVMe, but when I insert NVMe, the system stuck on next:

[ 2.469987] CPU: 1 PID: 223 Comm: kworker/u12:4 Not tainted 5.15.80-rockchip64 #trunk
[ 2.470703] Hardware name: Radxa ROCK Pi 4B (DT)
[ 2.471127] Workqueue: events_unbound deferred_probe_work_func
[ 2.471676] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=–)
[ 2.472312] pc : rockchip_pcie_rd_conf+0xb0/0x230
[ 2.472756] lr : rockchip_pcie_rd_conf+0xec/0x230
[ 2.473194] sp : ffff80000afeb830
[ 2.473500] x29: ffff80000afeb830 x28: 0000000000000000 x27: 0000000000000000
[ 2.474162] x26: 0000000000000000 x25: 0000000000000000 x24: ffff80000afeb974
[ 2.474823] x23: ffff000005bac000 x22: 0000000000000000 x21: 0000000000000004
[ 2.475485] x20: ffff80000afeb8b4 x19: ffff80000c100000 x18: 0000000000000000
[ 2.476147] x17: 6572202c295d3030 x16: 2d3030207375625b x15: ffffffffffffffff
[ 2.476809] x14: ffff80000954e228 x13: ffff000005ba2a1c x12: ffff000005ba2290
[ 2.477470] x11: 0000000000000028 x10: 0000000000000001 x9 : 0000000001001d87
[ 2.478132] x8 : 000000000000ea60 x7 : ffff80000afeb800 x6 : 0000000000000001
[ 2.478792] x5 : 0000000000000003 x4 : 0000000000000000 x3 : 0000000000c00008
[ 2.479452] x2 : 000000000080000a x1 : ffff80000fc00008 x0 : ffff80000fc0000c
[ 2.480115] Call trace:
[ 2.480345] rockchip_pcie_rd_conf+0xb0/0x230
[ 2.480755] pci_bus_read_config_dword+0x84/0xd8
[ 2.481188] pci_bus_generic_read_dev_vendor_id+0x34/0x1b0
[ 2.481699] pci_bus_read_dev_vendor_id+0x4c/0x70
[ 2.482139] pci_scan_single_device+0x84/0xd8
[ 2.482547] pci_scan_slot+0x38/0x120
[ 2.482895] pci_scan_child_bus_extend+0x58/0x330
[ 2.483335] pci_scan_bridge_extend+0x340/0x5a0
[ 2.483759] pci_scan_child_bus_extend+0x1fc/0x330
[ 2.484207] pci_scan_root_bus_bridge+0xd4/0xf0
[ 2.484632] pci_host_probe+0x18/0xb0
[ 2.484980] rockchip_pcie_probe+0x4a8/0x4c0
[ 2.485380] platform_probe+0x68/0xd8
[ 2.485727] really_probe+0xbc/0x428
[ 2.486064] __driver_probe_device+0x114/0x188
[ 2.486476] driver_probe_device+0xb0/0x110
[ 2.486866] __device_attach_driver+0xbc/0x158
[ 2.487280] bus_for_each_drv+0x7c/0xd0
[ 2.487645] __device_attach+0xec/0x1a8
[ 2.488004] device_initial_probe+0x14/0x20
[ 2.488394] bus_probe_device+0x9c/0xa8
[ 2.488754] deferred_probe_work_func+0x9c/0xf0
[ 2.489174] process_one_work+0x20c/0x4c8
[ 2.489554] worker_thread+0x208/0x478
[ 2.489909] kthread+0x138/0x150
[ 2.490217] ret_from_fork+0x10/0x20
[ 2.490563] Code: f94013f5 a8c37bfd d50323bf d65f03c0 (b9400273)
[ 2.491120] —[ end trace 1fff7218faa3688b ]—
[ 2.491544] note: kworker/u12:4[223] exited with preempt_count 1

Full logs: Armbian_22.11.0-trunk_Rockpi-4b_bullseye_5.15.80.zip (12.1 KB)

this may be a problem.

can you check console output with Manjaro?

Can you provide link to image? Please…

well,

I want to know what kind of u-boot is used in this Manjaro image.
I guess it doesn’t support NVMe.

Yeah, maybe it’s was my fall, because I try several images and variants for boot like SPI write, etc.
So now I re-download Manjaro image wrote it to uSD and it’s not booting ((( Just stick on:

U-Boot TPL 2022.04-1 (Apr 21 2022 - 18:07:16)
Channel 0: LPDDR4, 50MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: LPDDR4, 50MHz
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 400000000 mhz 0, 1
lpddr4_set_rate: change freq to 800000000 mhz 1, 0
Trying to boot from BOOTROM
Returning to boot ROM…

U-Boot SPL 2022.04-1 (Apr 21 2022 - 18:07:16 +0000)
Trying to boot from MMC1

U-Boot 2022.04-1 (Apr 21 2022 - 18:07:16 +0000) Manjaro Linux ARM

SoC: Rockchip rk3399
Reset cause: POR
Model: Radxa ROCK Pi 4B
DRAM: 3.9 GiB
PMIC: RK808
Core: 273 devices, 26 uclasses, devicetree: separate
MMC: mmc@fe310000: 2, mmc@fe320000: 1, mmc@fe330000: 0
Loading Environment from MMC… *** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Model: Radxa ROCK Pi 4B
Net: eth0: ethernet@fe300000
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1…
Found /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
1: Manjaro ARM
Retrieving file: /initramfs-linux.img
Retrieving file: /Image
append: initrd=/initramfs-linux.img console=ttyS2,1500000 root=PARTUUID=4e0d273f-b41c-437a-b377-5c9c43ba684d rw rootwait audit=0 splash plymouth.ignore-serial-consoles
Retrieving file: /dtbs/rockchip/rk3399-rock-pi-4b.dtb
Moving Image from 0x2080000 to 0x2200000, end=39e0000

Flattened Device Tree blob at 01f00000

Booting using the fdt blob at 0x1f00000
Loading Ramdisk to f16e6000, end f1f0e139 … OK
Loading Device Tree to 00000000f16d0000, end 00000000f16e5e0a … OK

Starting kernel …

sorry for the late reply.

can you try this u-boot? (N = eMMC device number)

./setup.sh update_bootloader /dev/mmcblkN rockchip

u-boot-rock-pi-4b.zip (2.6 MB)