I have created a script to Do this. Mayby we can Put Together a serier of them and create a RocKpiConfig(A want to be raspiconfig) Please feel free to Improve the script. It Need Some Love.
#!/bin/bash
#By default, the nvme is running at gen1 mode for compatibility, so the speed is limited.
#You can enabled gen2 mode by decompile and recompile the device tree:
sudo cp -p /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb.bak
sudo fdtdump /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb > /tmp/rockpi4.dts
sudo sed -i ‘s/max-link-speed = <0x00000001>;/max-link-speed = <0x00000002>;/g’ /tmp/rockpi4.dts
#Find pcie@f8000000 section
#change from
#max-link-speed = <0x00000001>;
#to
#max-link-speed = <0x00000002>;
#Now recompile the dtb:
sudo dtc -I dts -O dtb /tmp/rockpi4.dts -o /tmp/rockpi4.dtb
sudo mv /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb.tmp
sudo cp /tmp/rockpi4.dtb /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb
ls -l /boot/dtbs/4.4.154-59-rockchip-g5e70f14/rockchip/rockpi-4b-linux.dtb
#Replace the original rockpi-4b-linux.dtb(backup it first), reboot.