As mentioned I have a Yocto based 4.1.44 kernel built for imx7d on a custom board. The only real difference to that of the evk is we're using an AT8031 on our board. The device tree has had a few adjustments but nothing too serious, the AT8031 bolted straight up. However when booted the debug will stop at the probing/loading of the phy in fec_main.c.
Around the area of fec_get_mac and/or fec_set_mac_address is the fist time the writel and readl address functions are used, and at that point the system locks/dies whatever - debug ends.
/* fec_set_mac_address */
writel(ndev->dev_addr | (ndev->dev_addr << 8) |
(ndev->dev_addr << 16) | (ndev->dev_addr << 24),
fep->hwp + FEC_ADDR_LOW);
writel((ndev->dev_addr << 16) | (ndev->dev_addr << 24),
fep->hwp + FEC_ADDR_HIGH);
/* fec_get_mac */
*((__be32 *) &tmpaddr) = cpu_to_be32(readl(fep->hwp + FEC_ADDR_LOW));
As soon as either writel or readl tries to use the address point to by fep->hwp+ofset then it's game over.
In the device tree the fec is as per the documentation => fec1: ethernet@30be0000 and the correct address. Printing out fep->hwp I get f5be0000, which I'm not sure if it's been remapped / virtual or just incorrect. Any case my system dies at this point. Please help as I'm out of ideas here!
I've tried Rocko andKrogoth builds - no difference.