Hi all,
I was playing around with latest version of U-Boot 2025.01. I’ve noticed that the PCIe 3.0 driver is already in U-Boot but DTS for PCIe is not yet there.
So I took the DTS PCIe part from 202410 from Frank-W and I’ve ported to the new U-Boot version.
Then, success!
## Starting application at 0x41E00000 ...
U-Boot 2025.01-rc3-EasyOS+ (Dec 03 2024 - 02:11:51 +0100)
CPU: MediaTek MT7988
Model: mt7988-rfb
DRAM: 4 GiB
Core: 54 devices, 22 uclasses, devicetree: separate
MMC: mmc@11230000: 0
Loading Environment from nowhere... OK
In: serial@11000000
Out: serial@11000000
Err: serial@11000000
Net:
Warning: ethernet@15100000 (eth0) using random MAC address - aa:88:d9:66:02:88
eth0: ethernet@15100000
LED 'blue:status' not found (err=-19)
LED 'green:status' not found (err=-19)
Starting EasyOS ..
EEEEEEEEEEEEEEEEEEEEEE OOOOOOOOO SSSSSSSSSSSSSSS
E::::::::::::::::::::E OO:::::::::OO SS:::::::::::::::S
E::::::::::::::::::::E OO:::::::::::::OO S:::::SSSSSS::::::S
EE::::::EEEEEEEEE::::E O:::::::OOO:::::::OS:::::S SSSSSSS
E:::::E EEEEEE aaaaaaaaaaaaa ssssssssssyyyyyyy yyyyyyyO::::::O O::::::OS:::::S
E:::::E a::::::::::::a ss::::::::::sy:::::y y:::::y O:::::O O:::::OS:::::S
E::::::EEEEEEEEEE aaaaaaaaa:::::ass:::::::::::::sy:::::y y:::::y O:::::O O:::::O S::::SSSS
E:::::::::::::::E a::::as::::::ssss:::::sy:::::y y:::::y O:::::O O:::::O SS::::::SSSSS
E:::::::::::::::E aaaaaaa:::::a s:::::s ssssss y:::::y y:::::y O:::::O O:::::O SSS::::::::SS
E::::::EEEEEEEEEE aa::::::::::::a s::::::s y:::::y y:::::y O:::::O O:::::O SSSSSS::::S
E:::::E a::::aaaa::::::a s::::::s y:::::y:::::y O:::::O O:::::O S:::::S
E:::::E EEEEEEa::::a a:::::assssss s:::::s y:::::::::y O::::::O O::::::O S:::::S
EE::::::EEEEEEEE:::::Ea::::a a:::::as:::::ssss::::::s y:::::::y O:::::::OOO:::::::OSSSSSSS S:::::S
E::::::::::::::::::::Ea:::::aaaa::::::as::::::::::::::s y:::::y OO:::::::::::::OO S::::::SSSSSS:::::S
E::::::::::::::::::::E a::::::::::aa:::as:::::::::::ss y:::::y OO:::::::::OO S:::::::::::::::SS
EEEEEEEEEEEEEEEEEEEEEE aaaaaaaaaa aaaa sssssssssss y:::::y OOOOOOOOO SSSSSSSSSSSSSSS
y:::::y
y:::::y
y:::::y
y:::::y
yyyyyyy
Scanning NVME..
Scanning USB..
starting USB...
Bus xhci@11200000: xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:1, u3p:1
Register 200010f NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus xhci@11200000 for devices... 4 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
EasyOS(BPi-R4)> pci
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.00.00 0x14c3 0x7988 Bridge device 0x04
01.00.00 0x1ed0 0x2283 Mass storage controller 0x08
EasyOS(BPi-R4)> nvme info
Device 0: Vendor: 0x1ed0 Rev: APF1M3R1 Prod: 702172310010561
Type: Hard Disk
Capacity: 244198.3 MB = 238.4 GB (500118192 x 512)
EasyOS(BPi-R4)> ls nvme 0:1
./
../
lost+found/
0 file(s), 3 dir(s)
To implement PCIe 3.0 DTS I’ve created 2 additional .dtsi files:
mt7988-pcie-enable.dtsi
and mt7988-pcie.dtsi
. Then I’ve just included in mt7988.dtsi
mt7988-pcie.dtsi
like this:
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/mt7988-clk.h>
#include <dt-bindings/reset/mt7988-reset.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/mt65xx.h>
#include <dt-bindings/phy/phy.h>
#include "mt7988-pcie.dtsi"
/ {
..
And in mt7988-rfb.dts
mt7988-sd-rfb.dts
like this:
/dts-v1/;
#include "mt7988.dtsi"
#include "mt7988-pcie-enable.dtsi"
#include <dt-bindings/gpio/gpio.h>
I’m attaching the files in case somebody wants to try it.
mt7988-pcie.dtsi (4.8 KB)
mt7988-pcie-enable.dtsi (216 Bytes)
mt7988.dtsi.patch (337 Bytes)
mt7988-rfb.dts.patch (272 Bytes)
mt7988-sd-rfb.dts.patch (278 Bytes)
Files mt7988-pcie-enable.dtsi
and mt7988-pcie.dtsi
just copy them to arch/arm/dts
.
The other 3 patches you can use them with patch -p1 -i ..
. I’ve preferred to keep them in a non-patch format to be able to modify fast.
Or you can use my U-boot 202501 fork in my git hub where I’ve applied these patches: GitHub - EasyNetDev/u-boot at mt7988