U-boot not loading NVMe driver on Pi CM4

Ignatius Rivaldi minecraft2048 at gmail.com
Fri Feb 10 01:29:23 CET 2023


Added more debug logging and for some reason the nvme driver tries to bind
to pcie root bridge instead of the SSD
drivers/pinctrl/pinctrl-uclass.c:300-pinctrl_select_state_simple()
pcie_brcm pcie at 7d500000: set_state_simple op missing
PCIe BRCM: link up, 5.0 Gbps x1 (SSC)
drivers/core/device.c:184-  device_bind_common() Bound device pci_0:0.0 to
pcie at 7d500000
drivers/core/uclass.c:338-uclass_find_device_by_seq() 0
drivers/core/uclass.c:346-uclass_find_device_by_seq()    - 0 'gpio at 7e200000'

drivers/core/uclass.c:349-uclass_find_device_by_seq()    - found
drivers/pinctrl/pinctrl-uclass.c:300-pinctrl_select_state_simple()
pci_bridge_drv pci_0:0.0: set_state_simple op missing
drivers/core/device.c:184-  device_bind_common() Bound device nvme#0 to
pci_0:0.0
U-Boot> pci
DEBUG.driver-model,drivers/core/uclass.c:338-uclass_find_device_by_seq() 0
DEBUG.driver-model,drivers/core/uclass.c:346-uclass_find_device_by_seq()
   - 0 'pcie at 7d500000'
DEBUG.driver-model,drivers/core/uclass.c:349-uclass_find_device_by_seq()
   - found
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x14e4     0x2711     Bridge device           0x04
DEBUG.driver-model,drivers/core/uclass.c:338-uclass_find_device_by_seq() 1
DEBUG.driver-model,drivers/core/uclass.c:346-uclass_find_device_by_seq()
   - 0 'pcie at 7d500000'
DEBUG.driver-model,drivers/core/uclass.c:346-uclass_find_device_by_seq()
   - 1 'pci_0:0.0'
DEBUG.driver-model,drivers/core/uclass.c:349-uclass_find_device_by_seq()
   - found
01.00.00   0x1e0f     0x0001     Mass storage controller 0x08
DEBUG.driver-model,drivers/core/uclass.c:338-uclass_find_device_by_seq() 2
DEBUG.driver-model,drivers/core/uclass.c:346-uclass_find_device_by_seq()
   - 0 'pcie at 7d500000'
DEBUG.driver-model,drivers/core/uclass.c:346-uclass_find_device_by_seq()
   - 1 'pci_0:0.0'
DEBUG.driver-model,drivers/core/uclass.c:353-uclass_find_device_by_seq()
   - not found

It should be pci_1:0.0 I think

On Thu, Feb 9, 2023 at 11:22 AM Ignatius Rivaldi <minecraft2048 at gmail.com>
wrote:

> Hi all,
>
> I'm using U-boot 2022.07 from Yocto Langdale distribution, with the
> following NVMe related kconfigs manually enabled through menuconfig:
>
> CONFIG_NVME
> CONFIG_NVME_PCI
> CONFIG_CMD_NVME
>
> and logging turned into max
>
> The SSD is Kioxia SSD, and it works with Pi 4 bootloader as I can boot
> Raspberry Pi OS from the NVMe drive.
>
> U boot is installed in the fat32 partition in the NVMe SSD for this Yocto
> poky build.
>
> When I boot to U boot prompt, I can see that the SSD is detected by pci
> U-Boot> pci long
> 0
>   - 0 'pcie at 7d500000'
>   - found
>
> Found PCI device 00.00.00:
>  vendor ID =                   0x14e4
>  device ID =                   0x2711
>  command register ID =         0x0006
>  status register =             0x0010
>  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
> 1
>   - 0 'pcie at 7d500000'
>   - 1 'pci_0:0.0'
>   - found
>
> Found PCI device 01.00.00:
>  vendor ID =                   0x1e0f
>  device ID =                   0x0001
>  command register ID =         0x0006
>  status register =             0x0010
>  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 =        0x1e0f
>  sub system ID =               0x0001
>  expansion ROM base address =  0x00000000
>  interrupt line =              0x00
>  interrupt pin =               0x01
>  min Grant =                   0x00
>  max Latency =                 0x00
> 2
>   - 0 'pcie at 7d500000'
>   - 1 'pci_0:0.0'
>   - not found
>
> but it doesn't show up in nvme scan or nvme info
> U-Boot> nvme info
> U-Boot> nvme scan
>
> I know that U boot can boot from NVMe, as I can run Home Assistant OS that's
> based on U boot on NVMe drive. I just don't know if I missed a kconfig
> somewhere, or this U boot version haven't implement it
>
> Can anyone help me with this?
>
> Thanks
> Ignatius
>


More information about the U-Boot mailing list