[U-Boot] [RFC PATCH 0/2] Add a driver for the Felix Ethernet switch on NXP LS1028A
Alex Marginean
alexandru.marginean at nxp.com
Thu Aug 8 16:07:47 UTC 2019
The driver sets up the switch during probe making external and internal ports
available to use. It does not support direct I/O through these switch ports
in this version and I'm not sure that is a feature useful in U-Boot. Instead
ENETC ethernet interfaces that are internally linked to the switch can be used
after the switch is set up.
This is where the RFC part comes in. Both the switch as a device and its ports
are probed as ethernet devices. That's handy as accessors to connect to the PHY
can be used but otherwise they are useful as the user can't ping to these
interfaces. I'd like to get some feedback on whether this is acceptable or
instead I should use some other structure for describing the switch and its
ports, maybe have a new DM uclass. Other switch devices are registered as PHYs
but that's not too useful if the external ports of the switch have PHYs of their
own and they need to be driven too.
Using a complete DTS the switch looks like this:
=> dm tree
Class Index Probed Driver Name
-----------------------------------------------------------
....
pci 2 [ + ] pci_generic_ecam |-- pcie at 1f0000000
eth 1 [ + ] enetc_eth | |-- enetc-0
eth 2 [ + ] enetc_eth | |-- enetc-1
eth 3 [ + ] enetc_eth | |-- enetc-2
mdio 5 [ + ] enetc_mdio | |-- emdio-3
pci_generi 0 [ ] pci_generic_drv | |-- pci_3:0.4
eth 4 [ + ] felix_ethsw | |-- felix_ethsw
eth 6 [ + ] felix-port | | |-- port at 0
eth 7 [ + ] felix-port | | |-- port at 1
eth 8 [ + ] felix-port | | |-- port at 2
eth 9 [ + ] felix-port | | |-- port at 3
eth 10 [ + ] felix-port | | |-- port at 4
eth 11 [ + ] felix-port | | `-- port at 5
eth 5 [ + ] enetc_eth | |-- enetc-6
pci_generi 1 [ ] pci_generic_drv | `-- pci_3:1f.0
=> mdio list
felix_ethsw:
emdio-3:
mdio at 50:
0 - Aquantia AQR412 <--> port at 0
1 - Aquantia AQR412 <--> port at 1
2 - Aquantia AQR412 <--> port at 2
3 - Aquantia AQR412 <--> port at 3
mdio at 00:
5 - AR8035 <--> enetc-1
mdio at 40:
2 - Aquantia AQR112 <--> enetc-0
mdio at 60:
mdio at 70:
Any feedback is welcome, of course :)
Thank you!
Alex
Depends on https://patchwork.ozlabs.org/project/uboot/list/?series=123813
Alex Marginean (2):
drivers: net: Add a driver for the Felix Ethernet switch on NXP
LS1028A
arm: dts: ls1028a: add node for the integrated Ethernet switch
arch/arm/dts/fsl-ls1028a.dtsi | 31 +++
drivers/net/Kconfig | 7 +
drivers/net/Makefile | 1 +
drivers/net/fsl_enetc.h | 5 +
drivers/net/fsl_felix.c | 414 ++++++++++++++++++++++++++++++++++
5 files changed, 458 insertions(+)
create mode 100644 drivers/net/fsl_felix.c
--
2.17.1
More information about the U-Boot
mailing list