Page MenuHomeFreeBSD

ar40xx_switch: add initial switch for the IPQ4018/IPQ4019.
ClosedPublic

Authored by adrian on Jan 30 2022, 9:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 21, 6:21 PM
Unknown Object (File)
Fri, Jun 21, 2:44 PM
Unknown Object (File)
Thu, Jun 20, 1:45 PM
Unknown Object (File)
Thu, Jun 20, 5:02 AM
Unknown Object (File)
Wed, Jun 19, 5:44 PM
Unknown Object (File)
Wed, Jun 19, 5:30 PM
Unknown Object (File)
Wed, Jun 19, 4:11 AM
Unknown Object (File)
Thu, Jun 13, 8:25 PM
Subscribers

Details

Summary

This switch is based off of the AR8327/AR8337 external switch/PHY.
However unlike the AR8327/AR8337 it itself doesn't have any PHYs;
instead an external PHY connects to it using the PSGMII port.

This code is inspired by the ar40xx code in openwrt, which itself
is based on the Qualcomm QCA-SSDK. Both of these sources are, amusingly,
BSD licenced - and thus I have included some of the comments in the
hardware workaround paths to document some of the magic numbers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44218
Build 41106: arc lint + arc unit

Event Timeline

sys/dev/etherswitch/ar40xx/ar40xx_hw.h
5

I guess that your copyrights should be 2021-2022

28

Not needed for new file since git doesn't expend this.

33

We usually don't put extern

sys/dev/etherswitch/ar40xx/ar40xx_main.c
303

Why not directly OF_finddevice("/soc/mdio") ?

sys/dev/etherswitch/ar40xx/ar40xx_var.h
86

That doesn't seems to be needed except in the attach function.

sys/dev/etherswitch/ar40xx/ar40xx_var.h
86

It's going to in some later commits, where I need to go reach into the mdio device tree entries to pull out the /phy/ config parameters. Yeah. Ugh.

adrian added inline comments.
sys/dev/etherswitch/ar40xx/ar40xx_hw.h
28

Ugh I'm going to have to go find all of these and delete them aren't i

This revision was not accepted when it landed; it landed in state Needs Review.Feb 4 2022, 5:30 AM
This revision was automatically updated to reflect the committed changes.