Skip to content

NanoPi R5S | M.2 NVMe SSD randomly not detected #7517

@eggcllnt

Description

@eggcllnt

Issue Description

After installing DietPi on my NanoPi R5S, the M.2 SSD that was previously detected and working properly under FriendlyWRT is no longer visible. The device doesn't appear in lsblk output, despite being physically installed and previously functional.

System Information

Device: NanoPi R5S
Original OS: FriendlyWRT (SSD was detected)
Current OS: DietPi
Kernel version: 6.6.56-current-rockchip64

Steps Taken

Verified SSD isn't showing up in basic disk utilities:

dietpi@DietPi:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk1      179:0    0 28.9G  0 disk 
|-mmcblk1p1  179:1    0  1.1G  0 part 
`-mmcblk1p2  179:2    0    1M  0 part 
mmcblk1boot0 179:32   0    4M  1 disk 
mmcblk1boot1 179:64   0    4M  1 disk 
mmcblk0      179:96   0 59.6G  0 disk 
`-mmcblk0p1  179:97   0 59.6G  0 part /

Checked if NVMe kernel modules are available:

dietpi@DietPi:~$ find /lib/modules/$(uname -r) -name "*nvme*"
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/target/nvmet.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/target/nvmet-tcp.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/target/nvme-fcloop.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/target/nvme-loop.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/target/nvmet-fc.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/host/nvme-fabrics.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/host/nvme-tcp.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvme/host/nvme-fc.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvmem
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvmem/nvmem-rmem.ko
/lib/modules/6.6.56-current-rockchip64/kernel/drivers/nvmem/nvmem_qcom-spmi-sdam.ko

Checked if NVMe modules are loaded:

dietpi@DietPi:~$ lsmod | grep -E 'nvme|ahci|sata|scsi'
[No output]

Tried manually loading NVMe modules:

dietpi@DietPi:~$ sudo modprobe nvme
dietpi@DietPi:~$ sudo modprobe nvme-core
dietpi@DietPi:~$ lsblk
[SSD still not detected]

Examined PCIe status in dmesg:

dietpi@DietPi:~$ sudo dmesg | grep -i -E 'pcie|nvme'
[    0.847519] rockchip-dw-pcie 3c0000000.pcie: host bridge /pcie@fe260000 ranges:
[    0.847617] rockchip-dw-pcie 3c0000000.pcie:       IO 0x00f4100000..0x00f41fffff -> 0x00f4100000
[    0.847669] rockchip-dw-pcie 3c0000000.pcie:      MEM 0x00f4200000..0x00f5ffffff -> 0x00f4200000
[    0.847709] rockchip-dw-pcie 3c0000000.pcie:      MEM 0x0300000000..0x033fffffff -> 0x0040000000
[    0.847994] rockchip-dw-pcie 3c0000000.pcie: iATU: unroll T, 8 ob, 8 ib, align 64K, limit 8G
[    1.055022] rockchip-dw-pcie 3c0000000.pcie: PCIe Gen.2 x1 link up
[    1.055776] rockchip-dw-pcie 3c0000000.pcie: PCI host bridge to bus 0000:00
[    1.082499] pcieport 0000:00:00.0: PME: Signaling with IRQ 22
[    1.083143] pcieport 0000:00:00.0: AER: enabled with IRQ 22
[    2.191280] rockchip-dw-pcie 3c0400000.pcie: host bridge /pcie@fe270000 ranges:
[    2.191359] rockchip-dw-pcie 3c0400000.pcie:       IO 0x00f2100000..0x00f21fffff -> 0x00f2100000
[    2.191429] rockchip-dw-pcie 3c0400000.pcie:      MEM 0x00f2200000..0x00f3ffffff -> 0x00f2200000
[    2.191469] rockchip-dw-pcie 3c0400000.pcie:      MEM 0x0340000000..0x037fffffff -> 0x0040000000
[    2.203145] rockchip-dw-pcie 3c0400000.pcie: iATU: unroll T, 8 ob, 8 ib, align 64K, limit 8G
[    2.410930] rockchip-dw-pcie 3c0400000.pcie: PCIe Gen.2 x1 link up
[    2.411180] rockchip-dw-pcie 3c0400000.pcie: PCI host bridge to bus 0001:00
[    2.434544] pcieport 0001:00:00.0: PME: Signaling with IRQ 73
[    2.435110] pcieport 0001:00:00.0: AER: enabled with IRQ 73
[    2.436425] rockchip-dw-pcie 3c0800000.pcie: host bridge /pcie@fe280000 ranges:
[    2.436498] rockchip-dw-pcie 3c0800000.pcie:       IO 0x00f0100000..0x00f01fffff -> 0x00f0100000
[    2.436550] rockchip-dw-pcie 3c0800000.pcie:      MEM 0x00f0200000..0x00f1ffffff -> 0x00f0200000
[    2.436590] rockchip-dw-pcie 3c0800000.pcie:      MEM 0x0380000000..0x03bfffffff -> 0x0040000000
[    2.446555] rockchip-dw-pcie 3c0800000.pcie: iATU: unroll T, 8 ob, 8 ib, align 64K, limit 8G
[    3.551144] rockchip-dw-pcie 3c0800000.pcie: Phy link never came up
[    3.551360] rockchip-dw-pcie 3c0800000.pcie: PCI host bridge to bus 0002:00
[    3.564057] pcieport 0002:00:00.0: PME: Signaling with IRQ 75
[    3.564570] pcieport 0002:00:00.0: AER: enabled with IRQ 75

Checked available PCI devices:

dietpi@DietPi:~$ sudo lspci
0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0000:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
0001:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
0002:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)

Checked available PCIe and NVMe-related device tree overlays:

dietpi@DietPi:~$ find /boot/ -name "*nvme*.dtbo" -o -name "*m2*.dtbo" -o -name "*pcie*.dtbo"
/boot/dtb-6.6.56-current-rockchip64/rockchip/overlay/rockchip-rk3568-hk-pwm2.dtbo
/boot/dtb-6.6.56-current-rockchip64/rockchip/overlay/rockchip-rk3399-pcie-gen2.dtbo

Modified kernel parameters in DietPi configuration to try enabling PCIe:

extraargs=net.ifnames=0 pcie_aspm=off pci=nomsi

After reboot, the issue persists with the same error message:

[    3.539542] rockchip-dw-pcie 3c0800000.pcie: Phy link never came up

Observations

The M.2 SSD worked properly under FriendlyWRT on the same hardware
NVMe kernel modules are available in DietPi but not automatically loaded
Manually loading NVMe modules does not resolve the issue
PCIe port 3c0800000.pcie reports "Phy link never came up" which appears to be the port connected to the M.2 slot
Two RTL8125 Ethernet controllers are properly detected on PCIe buses 0000:00 and 0001:00
No device appears to be detected on PCIe bus 0002:00, which is likely the one connected to the M.2 slot

Questions

Are there specific device tree configurations needed for NanoPi R5S M.2 slot in DietPi?
Is there a known issue with DietPi's PCIe initialization for the NanoPi R5S M.2 slot?
Are there specific boot parameters or overlays that need to be enabled for M.2 NVMe support?

Any assistance would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions