I’m new to the forum and wasn’t really sure where to post this. I’ve been trying to get nixos working on the BPI-R4 pro 8x and have it booting on 7.1-main. Along the way I found a few things that may be the cause of other issues.
All patches I’ve created are located on my gitlab
7.1 boot stuck: pcie hogs lost output-high
A hog without a direction parses as -EINVAL and gpiolib now fails the whole gpiochip registration on hog errors:
gpiochip_add_data_with_key: GPIOs 512..595 (pinctrl_moore) failed to register, -22
mt7988-pinctrl 1001f000.pinctrl: error -EINVAL: Failed to add gpio_chip
Everything downstream defers, the board isn’t hung, root just never mounts. This is visible with: earlycon=uart8250,mmio32,0x11000000 keep_bootcon
Patch Here
With no serial aliases in the pro dtsi the numbering follows probe order. On 7.1 UART1 grabs the ttyS0 and console=ttyS0 lands on the pinless UART which makes the kernel look dead.
Patch Here
With the hogs fixed @frank-w 's disabled 8x eth description works, however ds_mux0 still had reg=<12> from before the AS21 port moved to 13. With that fixed lan1-4, lan5, and lan6 all forward.
Patch here
Lan1 intermittently missing
The driver waits for the management fw, but each internal GPHY boots up its own fw for ~3s more. The one shot of_mdiobus_register() scan hits address 0 first and intermittently drops lan1 for good. The 7.1 soft reset is what opened the window; the reset itself is right as it fixes the warm-reboot flap, this just gates the scan. Fix polls each DT-declared PHY for a sane PHYSID1 before registering the bus. Patch Here
The CMD 1802 returned error -19 boot storm is the same un-gated window, but cosmetic.
Random MACs on gmac1/gmac2
the pro dtsi only aliases ethernet0 while the plain R4 has all three, so u-boot’s MAC fixup has nowhere to put eth1addr/eth2addr and gmac1/gmac2 come up with random MACs every boot.
Patch Here
Back USB dead(now fixed upstream) I also carried a fix for the back USB being dead, but it looks like upstream fixed it on the 7.1-main as of July 30th, so I’ll just adopt that change.
I’m happy to answer any questions, provide full logs, my notes, or provide PR’s if desired.
Full disclosure: I am a devops/k8s person, I utilized Fable to assist with finding these issues and implementing appropriate fixes, however I would appreciate advice refining anything here if there are better ways. My collaborator in this understands it better than I do, but I am unsure if they have an account here, if anyone has any questions I can’t answer I’ll drag them over to come and answer!