ipq40xx: add DSA switch driver
authorRobert Marko <robert.marko@sartura.hr>
Mon, 27 Dec 2021 14:11:18 +0000 (15:11 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sun, 2 Oct 2022 21:04:38 +0000 (23:04 +0200)
commitb1f21329d4358e74864f17eedd0f887e5ad2a816
treeb2927367ab3494128b68637cc874cf307bf6c003
parent28b13bb15766aa6d888718ad83fe3aebcdfd512a
ipq40xx: add DSA switch driver

Qualcomm IPQ40xx SoC-s have a variant of QCA8337N switch built-in.

It shares most of the stuff with its external counterpart, however it is
modified for the SoC.
Namely, it doesn't have second CPU port (Port 6), so it has 6 ports
instead of 7.
It also has no built-in PHY-s but rather requires external PSGMII based
companion PHY-s (QCA8072 and QCA8075) for which it first needs to carry
out calibration before using them.
PSGMII has a SoC built-in PHY that is used to connect to the PHY-s which
unfortunately requires some magic values as the datasheet doesnt document
the bits that are being set or the register at all.

Since its built-in it is MMIO like other peripherals and doesn't have its
own MDIO bus but depends on the SoC provided one.

CPU connection is at Port 0 and it uses some kind of a internal connection
and no traditional RGMII/SGMII.
It also doesn't use in-band tagging like other qca8k switches so a shinfo
based tagger is used.

This is based on the current OpenWrt qca8k version that has been imported
from generic target.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
18 files changed:
target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.c
target/linux/ipq40xx/files/drivers/net/dsa/qca/qca8k-ipq4019.h
target/linux/ipq40xx/patches-5.10/705-net-dsa-add-Qualcomm-IPQ4019-built-in-switch-support.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.10/706-arm-dts-ipq4019-add-switch-node.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.10/706-dt-bindings-net-add-QCA807x-PHY.patch [deleted file]
target/linux/ipq40xx/patches-5.10/707-dt-bindings-net-add-QCA807x-PHY.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.10/707-net-phy-Add-Qualcom-QCA807x-driver.patch [deleted file]
target/linux/ipq40xx/patches-5.10/708-arm-dts-ipq4019-QCA807x-properties.patch [deleted file]
target/linux/ipq40xx/patches-5.10/708-net-phy-Add-Qualcom-QCA807x-driver.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.10/709-arm-dts-ipq4019-QCA807x-properties.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.15/705-net-dsa-add-Qualcomm-IPQ4019-built-in-switch-support.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.15/706-arm-dts-ipq4019-add-switch-node.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.15/706-dt-bindings-net-add-QCA807x-PHY.patch [deleted file]
target/linux/ipq40xx/patches-5.15/707-dt-bindings-net-add-QCA807x-PHY.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.15/707-net-phy-Add-Qualcom-QCA807x-driver.patch [deleted file]
target/linux/ipq40xx/patches-5.15/708-arm-dts-ipq4019-QCA807x-properties.patch [deleted file]
target/linux/ipq40xx/patches-5.15/708-net-phy-Add-Qualcom-QCA807x-driver.patch [new file with mode: 0644]
target/linux/ipq40xx/patches-5.15/709-arm-dts-ipq4019-QCA807x-properties.patch [new file with mode: 0644]