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)
Tue, Nov 26, 11:37 PM
Unknown Object (File)
Mon, Nov 25, 7:30 PM
Unknown Object (File)
Wed, Nov 20, 9:04 AM
Unknown Object (File)
Tue, Nov 19, 4:42 PM
Unknown Object (File)
Oct 23 2024, 11:25 PM
Unknown Object (File)
Oct 7 2024, 1:08 PM
Unknown Object (File)
Oct 3 2024, 9:50 AM
Unknown Object (File)
Oct 1 2024, 11:40 AM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.