Page MenuHomeFreeBSD

cgem: add support for ethernet on RP1 chip found on Raspberry Pi 5
Needs ReviewPublic

Authored by mmel on Wed, Jul 8, 11:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 6, 3:25 AM
Unknown Object (File)
Mon, Aug 3, 5:04 AM
Unknown Object (File)
Sun, Aug 2, 12:59 AM
Unknown Object (File)
Sat, Aug 1, 5:08 AM
Unknown Object (File)
Wed, Jul 29, 11:39 PM
Unknown Object (File)
Wed, Jul 29, 10:21 AM
Unknown Object (File)
Mon, Jul 27, 5:14 PM
Unknown Object (File)
Mon, Jul 20, 10:31 AM

Details

Reviewers
None
Group Reviewers
arm64
Summary

Add compatible string "raspberrypi,rp1-gem" with a new hardware quirk
HWQUIRK_HWCLK to indicate that the IP block provides its own clock
management and we should not override the pclk frequency.

Do other improvement:

  • Switch MAC address retrieval to the new fdt_ether_get_macaddr() helper (which respects "mac-address"/"local-mac-address" properties and falls back gracefully).
  • Convert some flags to bool for clarity (neednullqs, rxhangwar, have_hwclk).
  • Significantly improve clock retrieval and enabling code with better error handling and proper cleanup paths.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74618
Build 71501: arc lint + arc unit

Event Timeline

mmel requested review of this revision.Wed, Jul 8, 11:47 AM

Switching to bool and cgem_get_mac rework LGTM and could be committed independently if you like. I haven't looked at the rest yet.

sys/dev/cadence/if_cgem.c
136

perhaps reorder the struct to put the bools together