Jump to content

Firefly Station P2 (rk3568), no NVM on linux kernel 5.X, 6.X


sciram

Recommended Posts

Hello!

 

I have Firefly Station P2 (I use this images - https://users.armbian.com/balbes150/rk3568/)

And everything is OK except for one problem:

I can't see NVM disk when booting kernel 5.X, 6.X. Yet on kernel 4.X I can see nvm.

Please help, what should I do to use nvm with 5.X kernel?

 

Some output:

root@station-p2:~# uname -r
6.0.0-rc4-media

root@station-p2:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk0      179:0    0 14.8G  0 disk
 mmcblk0p1  179:1    0 14.7G  0 part /var/log.hdd
                                      /
mmcblk1      179:32   0 29.1G  0 disk
 mmcblk1p1  179:33   0 28.8G  0 part
mmcblk1boot0 179:64   0    4M  1 disk
mmcblk1boot1 179:96   0    4M  1 disk
zram0        252:0    0  1.9G  0 disk [SWAP]
zram1        252:1    0   50M  0 disk /var/log
zram2        252:2    0    0B  0 disk

root@station-p2:~# lspci
root@station-p2:~#

---
root@station-p2:~# uname -r
5.19.7-station-p2

root@station-p2:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
mmcblk0      179:0    0 14.8G  0 disk
 mmcblk0p1  179:1    0 14.7G  0 part /var/log.hdd
                                      /
mmcblk1      179:32   0 29.1G  0 disk
 mmcblk1p1  179:33   0 28.8G  0 part
mmcblk1boot0 179:64   0    4M  1 disk
mmcblk1boot1 179:96   0    4M  1 disk
zram0        252:0    0  1.9G  0 disk [SWAP]
zram1        252:1    0   50M  0 disk /var/log
zram2        252:2    0    0B  0 disk

root@station-p2:~# lspci
root@station-p2:~#

---
root@station-p2:~# uname -r
4.19.219-station-p2

root@station-p2:~# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mtdblock0     31:0    0    32M  0 disk
mmcblk0      179:0    0  29.1G  0 disk
 mmcblk0p1  179:1    0  28.8G  0 part
mmcblk0boot0 179:32   0     4M  1 disk
mmcblk0boot1 179:64   0     4M  1 disk
mmcblk1      179:96   0  14.8G  0 disk
 mmcblk1p1  179:97   0  14.7G  0 part /var/log.hdd
                                       /
zram0        254:0    0     0B  0 disk
nvme0n1      259:0    0 238.5G  0 disk
 nvme0n1p1  259:1    0     4M  0 part
 nvme0n1p2  259:2    0     4M  0 part
 nvme0n1p3  259:3    0    64M  0 part
 nvme0n1p4  259:4    0    64M  0 part
 nvme0n1p5  259:5    0    32M  0 part
 nvme0n1p6  259:6    0   2.7G  0 part
 nvme0n1p7  259:7    0 235.6G  0 part

root@station-p2:~# lspci
0002:20:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0002:21:00.0 Non-Volatile memory controller: Sandisk Corp PC SN520 NVMe SSD (rev 01)

 

Link to comment
Share on other sites

18.09.2022 в 22:19, balbes150 сказал:

Add the necessary changes to the kernel sources and build a new kernel.

 

Thank you for your response!

 

Unfortunately, it's not as easy as I suggested.

My steps:

1. got the kernel source for 5.19.7 from  cdn.kernel.org

2. copied /boot/config-5.19.7-station-p2 to .config

3. checked that nvm enabled

4. compiled kernel

5. installed kernel modules and kernel itself
There were no errors, but OS boot stops (look at output below). Please help, what i did wrong or what else can be done?

 

UART log:

...

[   3.901621] mmc1: new HS200 MMC card at address 0001
[    3.902880] mmcblk1: mmc1:0001 Y2P032 29.1 GiB
[    3.906828]  mmcblk1: p1
[    3.907960] mmcblk1boot0: mmc1:0001 Y2P032 4.00 MiB
[    3.910757] mmcblk1boot1: mmc1:0001 Y2P032 4.00 MiB
[    3.913173] mmcblk1rpmb: mmc1:0001 Y2P032 16.0 MiB, chardev (239:0)
[    3.919899] dwmmc_rockchip fe000000.mmc: IDMAC supports 32-bit address mode.
[    3.920725] dwmmc_rockchip fe000000.mmc: Using internal DMA controller.
[    3.921375] dwmmc_rockchip fe000000.mmc: Version ID is 270a
[    3.922050] dwmmc_rockchip fe000000.mmc: DW MMC controller at irq 48,32 bit host data width,256 deep fifo

Link to comment
Share on other sites

16 часов назад, sciram сказал:

1. got the kernel source for 5.19.7 from  cdn.kernel.org

To build the kernel, you must use the Armbian build system, only there are all the patches that are already used in it. Adding changes to the kernel configuration is not required, everything you need has been there for a long time. The main problem is to add the necessary components (patches) that include NVMe support for rk3568.

Link to comment
Share on other sites

3 часа назад, balbes150 сказал:

To build the kernel, you must use the Armbian build system, only there are all the patches that are already used in it. Adding changes to the kernel configuration is not required, everything you need has been there for a long time. The main problem is to add the necessary components (patches) that include NVMe support for rk3568.

Thank you! I will try.

Link to comment
Share on other sites

New version 20221111 of edge images with core 6.1.

Added support for NVMe and WiFi. I checked the installation of the system on NVMe - everything works, the system starts with NVMe, while the SATA SSD disk is also visible and accessible. This will allow you to have both a small NVMe (expensive and fast) to accommodate the system and frequently used directories and a large SATA SSD (large and cheap) to accommodate large archives\data).

Link to comment
Share on other sites

Quote

New version 20221111 of edge images with core 6.1.

 

Great!  Compiling now. 

 

Pardon the dumb question - I assume this work is available via the typical build process as documented here, selecting the edge kernel?

 

Or only available in the repository referenced here?

Edited by bobjones58
Link to comment
Share on other sites

12 часов назад, bobjones58 сказал:

Pardon the dumb question - I assume this work is available via the typical build process as documented here, selecting the edge kernel?

What are you going to compile ? Are you trying to use these developments for other devices\systems?

Link to comment
Share on other sites

Werner explained it - use your private images until when/if it gets rolled up into Armbian.  I was ready to try the changes but I forgot about the private repository so I went current and started compiling my own armbian build, hoping that your changes were there.  

 

Using StationP2 device only but using a converter for the M.2 slot so I can use other, newer, 802.11 Wifi chipsets that need more recent kernels for updated drivers.  I can't test the built-in broadcom wifi chip as it left this world some time ago - does not get detected by any OS anymore.

 

As Igor says, thank you for supporting my addiction to low-cost ARM hardware.

 

admin@station-p2:~/software/scripts$ uname -a
Linux station-p2 6.1.0-rc4-media-6 #trunk SMP PREEMPT Fri Nov 11 14:46:18 MSK 2022 aarch64 aarch64 aarch64 GNU/Linux
admin@station-p2:~/software/scripts$ lspci
0002:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3568 Remote Signal Processor (rev 01)
0002:01:00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)

 

Link to comment
Share on other sites

2 часа назад, bobjones58 сказал:

 I can't test the built-in broadcom wifi chip as it left this world some time ago - does not get detected by any OS anymore.

The Wi-Fi chip built into P2 now works with the latest versions on core 6.1 (I can see the WiFi network and can connect to it on P2).

Link to comment
Share on other sites

Quote

Wi-Fi chip built into P2 now works

 

I have a hardware failure so sadly I can't benefit from your software work.  As I note here, it used to work but as I experimented with ever newer kernels and other distributions such as slackware in an attempt to get pci working, it has decided to no longer be functional at all, on any old or new kernel.

 

If you have ideas on any functional troubleshooting I can do to look at the built-in wifi to diagnose, I would give it a try.  But frankly for $255, its cheaper just to buy a new unit and pick up from there with working hardware.  The shipped BCM adapter is only WiFi 6, not 6E, so really is not all that interesting (for my use).  

Link to comment
Share on other sites

15 часов назад, bobjones58 сказал:

I have a hardware failure so sadly I can't benefit from your software work.  As I note here, it used to work but as I experimented with ever newer kernels and other distributions such as slackware in an attempt to get pci working, it has decided to no longer be functional at all, on any old or new kernel.

The built-in Wi-Fi has nothing to do with M2\PCIe, this is a separate chip that uses SDIO. You may have damaged some of the components that are responsible for power \ control.

 

15 часов назад, bobjones58 сказал:

If you have ideas on any functional troubleshooting I can do to look at the built-in wifi to diagnose, I would give it a try. 

What the command shows "ip a" ? Is there an interface in the system ?

Link to comment
Share on other sites

admin@station-p2:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether d6:e9:5d:4f:8f:67 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether d2:e9:5d:4f:8f:67 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.227/24 brd 192.168.1.255 scope global dynamic noprefixroute eth1
       valid_lft 34646sec preferred_lft 34646sec
4: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 18:1d:ea:34:f3:45 brd ff:ff:ff:ff:ff:ff
    altname wlP2p1s0
    inet 192.168.30.151/24 brd 192.168.30.255 scope global dynamic noprefixroute wlan1
       valid_lft 34295sec preferred_lft 34295sec
5: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ieee802.11/radiotap 00:c0:ca:a6:73:70 brd ff:ff:ff:ff:ff:ff
6: mon1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ieee802.11/radiotap 18:1d:ea:34:f3:45 brd ff:ff:ff:ff:ff:ff

admin@station-p2:~$ sudo airmon-ng

PHY     Interface       Driver          Chipset

phy1    mon1            iwlwifi         00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
phy1    wlan1           iwlwifi         00.0 Network controller: Intel Corporation Wireless-AC 9260 (rev 29)
phy2    wlan2           mt76x2u         MediaTek Inc. MT7612U 802.11a/b/g/n/ac

 

Two wlan adapters show, but one is M.2 and the other is USB based.  So the BCM is not detected here.

 

In older dmesg logs I used to see this type of entry in both 4.19 and 5.18 kernels:

 

[    2.249588] mmc3: new ultra high speed SDR104 SDIO card at address 0001

 

and then  either the wl (4.x kernels) or brcmfmac (5.x kernels) driver would load.  I no longer see this entry in dmesg so

 

Quote

Is there an interface in the system ?

 

I would have to say it is not detected any longer.

 

Edited by bobjones58
Link to comment
Share on other sites

As requested, fresh sd card with your image Armbian_22.11.0-trunk_Station-p2_sid_edge_6.1.0_xfce_desktop.img.xz:

 

root@station-p2:~# uname -a
Linux station-p2 6.1.0-rc4-media-6 #trunk SMP PREEMPT Fri Nov 11 14:46:18 MSK 2022 aarch64 GNU/Linux

root@station-p2:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether d6:e9:5d:4f:8f:67 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.228/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 43070sec preferred_lft 43070sec
    inet6 fe80::3251:e133:4887:84aa/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether d2:e9:5d:4f:8f:67 brd ff:ff:ff:ff:ff:ff

 

Console boot log attached.

minicom.log

Link to comment
Share on other sites

10 часов назад, bobjones58 сказал:

Console boot log attached.

judging by the logs, it is not defined at all. You can try to completely disconnect the device from all connections (HDMi\LAN\power\UART putc) and turn it off for a couple of days. It's not a fact that this will help, but there is a chance that during the experiments you "drove" your device into a "contradictory mode" and its "rest" from power will reset to its original state.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines