I wrote two drivers for W5500 Wiznet SPI Ethernet Controller with integrated TCP/IP stack. The first driver is implementing "plain" ethernet using hal_mac_lld and therefore needs LWIP to work; the second one is based on IoLibrary from Wiznet. I'm going to contact folks from Chibios-Contrib and commit both drivers and bindings for IoLibrary in there.
The thing with the first "plain" ethernet driver is that W5500 is a SPI based Ethernet Controller and I can't clear interrupt registers in the ISR just by using SPISend()/SPIReceive(). So I need a function in the MAC HAL to clear interrupts in the LwIP task. Furthermore, hal_mac_lld needs to know about SPIDriver and SPIConfig. That is why I need to bind them somehow to MACConfig and feed that MACConfig to lwipInit().
To shorten it all up, I have attached a patch.

One little thing about low_level_output(), though. I mean it's odd using macWaitTransmitDescriptor() once, call macWriteTransmitDescriptor() with the same descriptor multiple times and release it only after that, just like this: wait/use/use/use.../release. Shouldn't it be more "symmetrical": wait/use/release, wait/use/release? I ran into it because I have been experimenting with mbedtls and DTLS (which is UDP based), where DTLS wants UDP packets being sent in one piece rather than divided in multiple small packets. So I've changed the code to wait/use/release and used pbuf_clone() in order to rebuild a full packet from pieces. It will consume more RAM, but it's worth it.
Speaking of mbedtls, where would you prefer to have it? In ChibiOS/ext or better in ChibiOS-Contrib/ext?
What do you think all about?
Thanks in advance for taking time!