Booting RPI CM4 from Samsung NVMEs

Alexandru-Dorian Costache alexandru at balena.io
Mon Mar 7 17:59:19 CET 2022


Hi,

I'm seeing this problem where booting from Samsung EVO 970 / 980 NVMEs
isn't possible with the latest version of u-boot master branch on the  RPI
CM4 IO-Board, at:

    commit 6d3c46ed0e230d999c3f20f7fd4f3a88c03b14ca (origin/master,
origin/WIP/05Mar2022, origin/HEAD)
    Merge: 0444cbbe77 cfcf1952c1
    Author: Tom Rini
    Date:   Sat Mar 5 20:46:55 2022 -0500

Unfortunately older revisions don't work with these NVMEs either.

This is what I'm seeing in the logs:

    RPi: BOOTLOADER release VERSION:d8b208d3 DATE: 2022/02/22 TIME:
09:33:50 BOOTMODE: 0x00000006 part: 0 BUILD_TIMESTAMP=1645522430 0xf3f44c15
0f
    PM_RSTS: 0x00001000
    part 00000000 reset_info 00000000
    uSD voltage 3.3V
    Initialising SDRAM 'Samsung' 16Gb x2 total-size: 32 Gbit 3200

    Boot mode: NVME (06) order f2541
    VID 0x144d MN Samsung SSD 980 500GB
    NVME on
    MBR: 0x00002000,   81920 type: 0x0c
    MBR: 0x00016000,  655360 type: 0x83
    MBR: 0x000b6000,  655360 type: 0x83
    MBR: 0x00156000,  458752 type: 0x0f
    Trying partition: 0
    type: 32 lba: 8192 oem: 'mkfs.fat' volume: ' resin-boot '
    rsc 32 fat-sectors 630 c-count 80628 c-size 1
    root dir cluster 2 sectors 0 entries 0
    FAT32 clusters 80628
    Trying partition: 0
    type: 32 lba: 8192 oem: 'mkfs.fat' volume: ' resin-boot '
    rsc 32 fat-sectors 630 c-count 80628 c-size 1
    root dir cluster 2 sectors 0 entries 0
    FAT32 clusters 80628
    Read config.txt bytes    36328 hnd 0x00000000
    Read start4cd.elf bytes   800028 hnd 0x00000000
    Read fixup4cd.dat bytes     3145 hnd 0x00000000
    Firmware: bd88f66f8952d34e4e0613a85c7a6d3da49e13e2 Jan 20 2022 13:57:04
    0x00c03140 0x00000000 0x00000fff
    MEM GPU: 16 ARM: 998 TOTAL: 1014
    Starting start4cd.elf @ 0xff000200 partition 0
    +


    U-Boot 2022.04-rc3 (Mar 06 2022 - 01:46:55 +0000)

    DRAM:  3.9 GiB
    RPI Compute Module 4 (0xc03140)
    Core:  203 devices, 14 uclasses, devicetree: board
    MMC:   mmcnr at 7e300000: 1, mmc at 7e340000: 0
    Loading Environment from FAT... Card did not respond to voltage select!
: -110
    In:    serial
    Out:   serial
    Err:   serial
    Net:   eth0: ethernet at 7d580000
    pci_uclass_pre_probe, bus=0/pcie at 7d500000, parent=scb
    decode_regions: len=7, cells_per_record=7
    decode_regions: region 0, pci_addr=c0000000, addr=600000000,
size=40000000, space_code=2
     - type=0, pos=0
    pci_get_dma_regions: len=7, cells_per_record=7
    PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
    pci_uclass_post_probe: probing bus 0
    pci_bind_bus_devices: bus 0/pcie at 7d500000: found device 0, function 0:
find ret=-19
    pci_find_and_bind_driver: Searching for driver: vendor=14e4, device=2711
    pci_find_and_bind_driver: No match found: bound generic driver instead
    pci_auto_config_devices: start
    pci_auto_config_devices: device pci_0:0.0
    dm_pci_hose_probe_bus
    pci_get_bus_max: ret=0
    dm_pci_hose_probe_bus: bus = 1/pci_0:0.0
    pci_uclass_pre_probe, bus=-1/pci_0:0.0, parent=pcie at 7d500000
    pci_uclass_post_probe: probing bus 1
    pci_bind_bus_devices: bus 1/pci_0:0.0: found device 0, function 0: find
ret=-19
    pci_find_and_bind_driver: Searching for driver: vendor=144d, device=a809
    nvme_bind
    pci_find_and_bind_driver: Match found: nvme
    pci_auto_config_devices: start
    pci_auto_config_devices: device nvme#0
    pci_auto_config_devices: done
    pci_get_bus_max: ret=1
    pci_auto_config_devices: done
    starting USB...
    Bus usb at 7e980000: USB DWC2
    scanning bus usb at 7e980000 for devices... 2 USB Device(s) found
           scanning usb for storage devices... 0 Storage Device(s) found
    Hit any key to stop autoboot:  0

    U-Boot> nvme scan
    nvme_probe 0x144d # Added log here
    U-Boot> nvme dev

    no nvme devices available

    U-Boot> pci list

    Found PCI device 00.00.00:
      vendor ID =                   0x14e4
      device ID =                   0x2711
      command register ID =         0x0006
      status register =             0x1010
      revision ID =                 0x20
      class code =                  0x06 (Bridge device)
      sub class code =              0x04
      programming interface =       0x00
      cache line =                  0x08
      latency time =                0x00
      header type =                 0x01
      BIST =                        0x00
      base address 0 =              0x00000000
      base address 1 =              0x00000000
      primary bus number =          0x00
      secondary bus number =        0x01
      subordinate bus number =      0x01
      secondary latency timer =     0x00
      IO base =                     0x00
      IO limit =                    0x00
      secondary status =            0x0000
      memory base =                 0xc000
      memory limit =                0xc000
      prefetch memory base =        0xfff1
      prefetch memory limit =       0x0001
      prefetch memory base upper =  0x00000000
      prefetch memory limit upper = 0x00000000
      IO base upper 16 bits =       0x0000
      IO limit upper 16 bits =      0x0000
      expansion ROM base address =  0x00000000
      interrupt line =              0x00
      interrupt pin =               0x01
      bridge control =              0x0000

    Found PCI device 01.00.00:
      vendor ID =                   0x144d
      device ID =                   0xa809
      command register ID =         0x0006
      status register =             0x1010
      revision ID =                 0x00
      class code =                  0x01 (Mass storage controller)
      sub class code =              0x08
      programming interface =       0x02
      cache line =                  0x08
      latency time =                0x00
      header type =                 0x00
      BIST =                        0x00
      base address 0 =              0xc0000004
      base address 1 =              0x00000000
      base address 2 =              0x00000000
      base address 3 =              0x00000000
      base address 4 =              0x00000000
      base address 5 =              0x00000000
      cardBus CIS pointer =         0x00000000
      sub system vendor ID =        0x144d
      sub system ID =               0xa801
      expansion ROM base address =  0x00000000
      interrupt line =              0xff
      interrupt pin =               0x01
      min Grant =                   0x00
      max Latency =                 0x00

Nvme scan takes about 6-7 seconds to complete and returns 1, without any
error logs. Any idea what could be causing this problem? Are there some
logs that I could add to help in debugging this?

Thank you


More information about the U-Boot mailing list