[RESEND PATCH 0/2] Add retimer interfaces support for Intel MAX 10 BMC

From: Xu Yilun
Date: Thu Jan 07 2021 - 01:12:44 EST


I resend this patchset to loop in networking developers for comments. This
is the previous thread. I'll fix other comments when I have a v2.

https://lore.kernel.org/lkml/X%2FV9hvXYlUOT9U2n@xxxxxxxxx/


The patchset is for the retimers connected to Intel MAX 10 BMC on Intel
PAC (Programmable Acceleration Card) N3000 Card. The network part of the
N3000 card is like the following:

+----------------------------------------+
| FPGA |
+----+ +-------+ +-----------+ +----------+ +-----------+ +----------+
|QSFP|---|retimer|---|Line Side |--|User logic|--|Host Side |---|XL710 |
+----+ +-------+ |Ether Group| | | |Ether Group| |Ethernet |
|(PHY + MAC)| |wiring & | |(MAC + PHY)| |Controller|
+-----------+ |offloading| +-----------+ +----------+
| +----------+ |
| |
+----------------------------------------+

I had sent some RFC patches to expose the Line Side Ether Group + retimer +
QSFP as a netdev, and got some comments from netdev Maintainers.

https://lore.kernel.org/netdev/1603442745-13085-2-git-send-email-yilun.xu@xxxxxxxxx/

The blocking issues I have is that physically the QSFP & retimer is
managed by the BMC and host could only get the retimer link states. This
is not enough to support some necessary netdev ops. E.g. host cannot
realize the type/speed of the SFP by "ethtool -m", then users could not
configure the various layers accordingly.

This means the existing net tool can not work with it, so this patch just
expose the link states as custom sysfs attrs.


This patchset supports the ethernet retimers (C827) for the Intel PAC
(Programmable Acceleration Card) N3000, which is a FPGA based Smart NIC.

The 2 retimer chips connect to the Intel MAX 10 BMC on the card. They are
managed by the BMC firmware. Host could query their link states and
firmware version information via retimer interfaces (Shared registers) on
the BMC. The driver creates sysfs interfaces for users to query these
information.

The Intel OPAE (Open Programmable Acceleration Engine) lib provides tools
to read these attributes.

This is the source of the OPAE lib.

https://github.com/OPAE/opae-sdk/

Generally it facilitate the development on all the DFL (Device Feature
List) based FPGA Cards, including the management of static region &
dynamic region reprogramming, accelerators accessing and the board
specific peripherals.


Xu Yilun (2):
mfd: intel-m10-bmc: specify the retimer sub devices
misc: add support for retimers interfaces on Intel MAX 10 BMC

.../ABI/testing/sysfs-driver-intel-m10-bmc-retimer | 32 +++++
drivers/mfd/intel-m10-bmc.c | 19 ++-
drivers/misc/Kconfig | 10 ++
drivers/misc/Makefile | 1 +
drivers/misc/intel-m10-bmc-retimer.c | 158 +++++++++++++++++++++
include/linux/mfd/intel-m10-bmc.h | 7 +
6 files changed, 226 insertions(+), 1 deletion(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-intel-m10-bmc-retimer
create mode 100644 drivers/misc/intel-m10-bmc-retimer.c

--
2.7.4