babbleberry / rpi4-osdev

Tutorial: Writing a "bare metal" operating system for Raspberry Pi 4
https://www.rpi4os.com
Creative Commons Zero v1.0 Universal
3.37k stars 246 forks source link

External vs internal ethernet controller #41

Closed rfradkin closed 10 months ago

rfradkin commented 11 months ago

For part 14, is there a reason you choose to use the ENC28J60 Ethernet LAN as compared with the built in ethernet or wifi? Are you theoretically able to do the same things usings the builtin parts of the raspberry pi?

babbleberry commented 10 months ago

Hi,

In theory it is possible, yes. It would require a lot more code because, as I recall, the BCM ethernet module has a USB interface. So you'd need to bring up a full USB stack to even begin to make it work. Also Broadcom aren't great at documenting their firmware, and so I suspect you'd need to reverse engineer from a BCM Linux driver. Just not my idea of fun!! SPI is a much easier interface and so I just wanted to get something simple going quickly.

Thanks, Adam