Btw, where did you select which gmac to use? Is a second mac supported in uboot? Did you try other port?
Imho this is done by this property in the eth node:
mediatek,gmac-id = <0>;
Does not look like i can use both gmacs together. I can only try to set it to 1,but then imho i will need to use the other phy.
Would this have anything to do with env_get("ethrotate")
?
Is it set to 'no'
?
It’s just really strange, first attempt it works…
Where have you seen this? I do not see it in driver
https://github.com/u-boot/u-boot/blob/master/net/eth-uclass.c#L286
/*
* If ethrotate is enabled, this will change "current",
* otherwise we will drop out of this while loop immediately
*/
both times ethrotate is null (but called both times)
@dangowrt i tried to use your version of phy driver and added the old way with builtin firmware
looks like one option is using boot1 from emmc…how have you written it for testing?
i guess something like this:
cat files/bpi-r3mini/{EthMD32.dm.bin,EthMD32.DSP.bin} > en8811h.bin
tried to flash this file to emmc boot1, but failed
BPI-R3M> fatload usb 0:1 $loadaddr r3mini/en8811h.bin
147456 bytes read in 16 ms (8.8 MiB/s)
BPI-R3M> mmc partconf 0 1 1 2
BPI-R3M> mmc write $loadaddr 0x0 $filesize
MMC write: dev # 0, block # 0, count 147456 ... mmc write failed
0 blocks written: ERROR
BPI-R3M>
edit: got first problem (loading firmware from header) solved…missed CONFIG_PHY_ETHERNET_ID=y
edit: @ericwoud tried adding your host_restart way…but it does not solve the issue ;(
any idea?
Maybe this should only be done when firmware_version not set
Maybe i should move resets and firmware-load to probe,which is only called once. Edit: this results in crash :(, tried moving phy-reset in the condition (firmware not loaded yet), but same issue…only working once
made also some cleanup like replacing magic numbers for firmware-load with constants like in erics code and fixed indentation.
Nvme seems my fault,had to put missing constant in different block (with higher value).
I would not put too much effort into this driver. Once Eric’s driver got merged in upstream Linux, the best would be to port that to U-Boot (and just keep the firmware loading from {MMC,UBI/SNAND,MTD/NOR} options added, so firmware can always be loaded even if runtime firmware or filesystems are damaged).
I tried to write firmware to mmc (the easiest way i think to do manually because ubi needs to create ubifs first and nor is not available on r3mini),but got write error…any idea on this?
written firmware successful to boot1…also found a nice guide from daniel here just used usb to transfer the files and used original files without concatenating before
usb start
mmc partconf 0 1 2 2
mmc erase 0x0 0x120
load usb 0:1 $loadaddr EthMD32.dm.bin
mmc write $loadaddr 0x0 0x20
load usb 0:1 $loadaddr EthMD32.DSP.bin
mmc write $loadaddr 0x20 0x100
mmc partconf 0 1 1 0
but have not tested it as i need to patch out my builtin-firmware before
Any news regarding the nvme support?
My uboot has nvme support for r3(mini) and r4 and sent patch to uboot mailinglist…no comment yet
Only got info that mt7981 was not yet working
Wish I had the time for it… So I won’t be doing that.
@frank-w did some work on that, but I do not know the state of it.
I used the openwrt driver,cleaned it a bit and “fixed” the working-once-issue and added the builtin-firmware (which cannot be added upstream). So basicly working,but no time for upstreaming yet. We need to switch to of_upstream (let uboot use linux dts) to upstream the filogic pci driver port from john.
this is what i currently work on…
Lucien posted phy driver officially
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Does this mean that failsafe functionality is possible via the web UI in uboot? I have used it on other routers before. This should make the unbrick process easier.
I do not know webui in uboot…but this patch is making network-support in uboot mainline once accepted and merged, so you do not need additional patches like in my repo or in openwrt.
Thanks. After some digging, the image I linked shows the failsafe feature provided by the OEM via modded uboot. It is not available in vanilla uboot.
Basicly it depends on working uboot and structure of the remaining image how this is done in uboot…not sure how to get a minimal webserver in uboot running. Easies way imho is a initrd which also must not be bricked