Power & Source of Big Ideas

NanoPC-T4 PCIe: fails to detect M.2 PCIe-SATA card

Moderators: chensy, FATechsupport

NanoPC-T4 not detecting M.2 PCIe-SATA card at all.

Card:
M.2 B+M Key 22x42 PCIe To 2 Port SATA III RAID Adapter Card - SI-ADA40126
https://www.sybausa.com/index.php?route ... ata&page=2

Chipset ASMedia 106x
https://www.asmedia.com.tw/eng/e_show_p ... _index=166

Code: Select all

]$ dmesg | grep -i pcie
[    0.885388] rockchip-pcie f8000000.pcie: GPIO lookup for consumer ep
[    0.885404] rockchip-pcie f8000000.pcie: using device tree for GPIO lookup
[    0.885433] of_get_named_gpiod_flags: parsed 'ep-gpios' property of node '/pcie@f8000000[0]' - status (0)
[    0.885667] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[    0.886251] rockchip-pcie f8000000.pcie: no vpcie1v8 regulator found
[    0.886819] rockchip-pcie f8000000.pcie: no vpcie0v9 regulator found
[    0.887391] rockchip-pcie f8000000.pcie: missing "memory-region" property
[    0.888003] PCI host bridge /pcie@f8000000 ranges:
[    1.409942] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    1.410557] rockchip-pcie f8000000.pcie: deferred probe failed
[    1.411327] rockchip-pcie: probe of f8000000.pcie failed with error -110


Same error with and without card inserted.

Same with 4.4.179, 4.4.143, tried with 4.4 shipped with Lubuntu image. Built from friendlyarm repo on github, tried kernel-rockchip repo from Rockchip. Same behavior. Did not edit device tree.

Relevant threads:
http://www.friendlyarm.com/Forum/viewto ... o+t4#p8884
http://bbs.t-firefly.com/forum.php?mod= ... &pid=11887
Update: This PCIe M.2 to SATA board works in mainline kernel 5.8.5.

Code: Select all

$ uname -a
Linux hume 5.8.5-g9ece50d8a470-dirty #5 SMP Sat Aug 29 12:18:03 EDT 2020 aarch64 GNU/Linux
$ lspci
00:00.0 PCI bridge: Fuzhou Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port
01:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)


Code: Select all

$ dmesg | grep -i pcie       
[    2.320413] rockchip-pcie f8000000.pcie: GPIO lookup for consumer ep
[    2.320484] rockchip-pcie f8000000.pcie: using device tree for GPIO lookup
[    2.320539] of_get_named_gpiod_flags: parsed 'ep-gpios' property of node '/pcie@f8000000[0]' - status (0)
[    2.321036] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[    2.942771] rockchip-pcie f8000000.pcie: GPIO lookup for consumer ep
[    2.942775] rockchip-pcie f8000000.pcie: using device tree for GPIO lookup
[    2.942792] of_get_named_gpiod_flags: parsed 'ep-gpios' property of node '/pcie@f8000000[0]' - status (0)
[    2.942932] rockchip-pcie f8000000.pcie: no vpcie12v regulator found
[    3.050086] rockchip-pcie f8000000.pcie: host bridge /pcie@f8000000 ranges:
[    3.051078] rockchip-pcie f8000000.pcie:      MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
[    3.051820] rockchip-pcie f8000000.pcie:       IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
[    3.052733] rockchip-pcie f8000000.pcie: PCI host bridge to bus 0000:00
[    3.078088] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    3.078755] pcieport 0000:00:00.0: PME: Signaling with IRQ 240
[    3.079405] pcieport 0000:00:00.0: AER: enabled with IRQ 240


For completely unrelated reason (mmc partitions), I had to add a patch to the mainline kernel. Attaching here. Also, copied tools to pack .img image from kernel-rockchip repo from FriendlyARM.

Device tree from mainline, but rename the binary, because bootloader looks for a particular name in the resource.img image.

Tag: v5.8.5 commit 9ece50d8a470ca7235ffd6ac0f9c5f0f201fe2c8

Code: Select all

  git clone -b nanopi4-linux-v4.4.y https://github.com/friendlyarm/kernel-rockchip kernel-rockchip
  git clone -b v5.8.5 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git mainline
 cd mainline
 tar xvf nanopc-t4-patch-and-config-for-mainline-5.8.5.tar.gz
 patch -p1 < 0001-block-add-Nano-PC4-Rockchip-partition-scheme.patch
 cp ../kernel-rockchip/{logo.bmp,logo_kernel.bmp,scripts/mkkrnlimg,scripts/resource_tool}
mkkrnlimg ./arch/arm64/boot/Image ./kernel.img
cp arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dtb arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev00.dtb
resource_tool --dtbname ./arch/arm64/boot/dts/rockchip/rk33*-nanopi*-rev*.dtb logo.bmp logo_kernel.bmp

Attachments

Redfish thanks for your hard work. Im running the T4 with a 500G NVME. It's not recognized whatsoever. Using FriendlyCore 18.04. Fully apt-get update/upgraded

uname -a
Linux NanoPC-T4 4.4.179 #1 SMP Tue Sep 15 15:56:24 CST 2020 aarch64 aarch64 aarch64 GNU/Linux

Will your patch also work for .179?

Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 31 guests