Hikey 970 - NVMe driver for SSD access over the pcie port?

Board based on the Kirin 970 - HI3670 Application Processor
More info: http://www.96boards.org/product/hikey970/ (Website coming soon…)
Buy now: https://www.seeedstudio.com/HiKey-970-Development-Board-p-3046.html


I’ve connected a Kingston A1000 SSD to the M.2 port of the Hikey 970. I see the pci device being detected, but no drivers are installed. The Linux version is 4.9.x (default build of the Hikey 970). Anyone has had any experiences with installing drivers for the NVMe SSD?

hi,how you see the pci device being detected? i’m facing the same issue

You can install the lspci tools.
I have not been able to get the NVME SSD working either.
I have a Crucial SSD

Is anyone was able to get any NVME SSD working?

btw, what M.2 SSD sizes is compatible with available HiKey970 cases? Only 2242/2260?

I have a crucial NVME SSD.
I made a custom case otherwise it wont fit in the normal case.

The slot is M.2 Key M.
A shorter ssd might fit.
The one i have is P! M.2 2280 and it sticks out about an inch and a half.
I do not have it working yet.
Ive been working on the kernel and trying to fix the DRM display issues.

We need to use a custom kernel to run the ssd and what i found is that when you flash the custom kernel the DRM driver is broken and the display won’t work.

I tested this by loading LeUbuntu 16.04.
With no modification the Display works fine.
After building the kernel then replacing the original kernel and .dtb the display won’t work. So the issue is in the kernel DRM driver.

I have started patching the DRM.
At this point I have added many printk lines so we can trace the process and figure out where the problem is. You can find my kernel here.

Use Branch hikey970-v4.9-Debain.
You can look at my commits to see the changes.
This is a work in progress though, and if anyone wants to help that’s great.


After I get the display working I will work on turning on the NVME Drivers and we might need to enable some of the PCIE Drivers too.

At any rate were at a total loss at this time unless you don’t plan on using a display.

I really wish Lemaker or Hisilicon would compile and release the X11 driver or the wayland drive or fix the DRM.
I can’t believe the display drivers don’t work. It’s very frustrating and makes working on things like the NVME SSD pointless until the display works.

The diff for the debugging changes is here.

If you run dmesg you will see the output for debugging the driver.

If anyone have any luck getting NVME SSD working, then this board could be usable as multi-purpose server. As I understand, there is working Linux 4.19 builds and if display is not needed, work with 4.19 is better approach. However, for my particular use-case I need at least 1 TB (or better 2 TB) of storage, and it’s seems like there is no 2242 or 2260 NVME SSD with such capacity. By the way, for which size this board is designed for, 2242 or 2260?

For desktop or HTPC use-case, it’s seems like Panfrost is our only hope.

Panfrost is an idea.
But since Lemaker LeUbuntu 16.04 the display works it is obviously possible to get the DRM working. I’m close very close but not there 100 percent yet.

I also found this kernel for Galaxy s9 that has the same Mali GPU.
The Mali drivers are in the kernel but the s9 runs android. Maybe we can use the driver?

Here is 2 TB ssd EXPENSIVE !!

Here is 1TB sdd. SAME AS I HAVE.

Also can use expansion Board to run 2 ssd.
I also have one of theese.

But we need to enable everything in the Kernel and im not sure exactly where to start.
For the 4.19 kernel do you have a link?
Maybe i can look at the commits and see where they added the ssd support.

I have a 2280 in mine.
I built my own case.
I could probably make you one.

Here is thread. You also could try to apply three patches from this thread to mainline kernel, and check if this is enough to get board running.

I’m interested in SSD that could be mounted into original case, like this one, but I guess there is no such thing as 1/2 TB NVME M.2 2242 SSD. However, if Panfrost can work on this board, there is still hope for desktop use-case with 256-512 GB NVME SSD. I wonder if board come necessary screws that would allow to attach 2242 SSD to board?

The 4.9.78 Kernel has those patches already.
But the NVME pcie is not working correctly.
I have not worked on it much yet, I have been working on the display driver.

I’m not sure why you think the Mainline kernel would be better to use.
From wht i believe anyway the 4.9.78 kernel has the mainline patches in it.

What i am saying is if you can point me to a kernel tree that has the commits for the NVME implementation I can follow those commits and implement them into the 4.9.78 kernel.

Just guessing. It could contain other fixes for ARM hardware, that could be useful for HiKey970 too. After all, there was many changes between 4.9 and 4.19.

I wish I knew. As I understand, it doesn’t work on Lebuntu 16.04 too, right? Then maybe you could try contact LeMaker via support@lemaker.org or ask on their forum?

I have my NVME Working Now.
It only took turning on a few configs in the kernel.
I have a updated kernel tree. Even the Display is working.

https://github.com/Bigcountry907/linux.git -b hikey970-v4.9-Debain-Working.
Make sure to use the branch. -->>>> hikey970-v4.9-Debain-Working

need on a macro in hikey970_defconfig and compile the kernel.

Not sure what you are asking for.
What do we need a macro for?
The nvme drivers are enabled in the previously mentioned kernel tree.
If you add a entry to the fstab for the nvme then it will auto mount at boot.


add this at the end of hikey970_defconfig and compile the kernel again, then the SSD will be fine for the new boot.img

在 2019-06-14 19:09:08,“Rich via 96Boards Forum” noreply@discuss.96boards.org 写道:

Is yours working reliably? Mine works for a while and then I am getting IO errors. I thought its maybe because of overheating, but not so sure. Its quite random. Speed is acceptable at about 450MB/sec. Did anyone get the nvme m.2 slot working in parallel to the mini PCI slot? Could be just a driver (or mem map issue). If I use both, my desktop boots but then resets and typically the nvme disappears after; minipci still shows up. Btw these adapters work quite nice to place the drive nicely next to the board.

I have complie this kernel, and the lebian can find the nvme driver, but when I mount the driver, OS show the driver is read only. Is there any wrong?

Anything new to report here?
I’m looking into mSATA or other adapters.
Even video cards for the mini PCIe. The latter could allow the use of recent kernels.

I haven’t done much but I am still interested. I could not get any GPU working (GF710 or some Radeon I have here). I have a mini PCI to 3x PCIe x1 adapter. The GPUs are found, but once a GPU is on the bus, all other devices switch off. I have played with a 5.x kernel but got stuck and lost interest for a while. Might start picking it up. I think the PCI controller has some problems when more than 1 device is attached, this includes the onboard ethernet. The eth0, nvme m.2 and mPCI all share one PCI bus and IRQs seem to create the problem. One moment all devices are found, another none is. There is another thread here somewhere with some comments about running more than 1 device on the PCI bus. I use a USB-C hub + ethernet to free up PCI resources (which makes at least the eth run stable), but did not get any further. USB3 + nvme + SATA all on the mPCI lane with the 3x adapter work - as long as I don’t exceed the 480MB/s bandwidth. But once a SATA or nvme saturates the bus a 5Gb/s its all over and the PCI controller simply shuts down.

qualcomm same hw in snapdragons so it will be nice to check if dragonboard’s PCIe are working.

I also want to use PCI-e on 970 (DVB-T tunner) and ethernet device and tuner are disconnected when I want want to tune some broadcasting on tv tuner :frowning:

I am testing 970 with latest linux kernel.