Skip to content
Permalink
Browse files
platform/mellanox: mlxreg-lc: Add initial support for Mellanox line c…
…ard devices

Provide support for the Mellanox MSN4800-XX line cards for MSN4800
Ethernet modular switch system, providing a high performance switching
solution for Enterprise Data Centers (EDC) for building Ethernet based
clusters, High-Performance Computing (HPC) and embedded environments.
Initial version provides support for line card type MSN4800-C16. This
type of line card is equipped with:
- Lattice CPLD device, used for system and ports control.
- four Nvidia gearbox devices, used for port splitting.
- FPGA device, used for gearboxes management.
- 16x100G QSFP28 ports.
- hotpswap controllers, voltage regulators, analog-to-digital
  convertors, nvram devices.
- status LED.

During initialization driver creates:
- line card's I2C tree through "i2c-mux-mlxcpd" driver.
- line card's LED objects through "leds-mlxreg" driver.
- line card's CPLD register space input / output "hwmon" attributes for
  line control and monitoring through "mlxreg-io" driver. These
  attributes provide CPLD and FPAG versioning, control for upgradable
  components burning, NVRAM devices write protection, line card
  revision, line card power consuming, line card reset cause
  indication, etcetera.

During initialization driver sets callback function for:
- handling line card related I2C adapters completion. When all the
  adapters are created this callback updates line card I2C topology.
- handling line card related hotplug events. When an event is received
  it performs the relevant action, like power on/off line card,
  enable/disable line card, power off line card in case of thermal
  shutdown event.

Lattice CPLD device and nvram devices are feeding from auxiliary power
domain and accessible, when line card is powered off. These devices
are connected by line card driver probing routine, invoked after line
card security verification is done by hardware and event lc#n_verified
is received for line card located in slot #n.

Gearboxes, FPGA, hotpswap controllers, voltage regulators,
analog-to-digital convertors are feeding from main power domain. These
devices are connected after power good event "lc#n_powered" is received
for line card located in slot #n.

Hardware holds the line card after powering on in the disabled state.
Line card driver is responsible to move it to enabled state after
receiving lc#n_synced and lc#n_ready events. Order in which these two
events are rasised could be vary.

The driver 'mlxreg-lc' is driven by 'mlxreg-hotplug' driver following
relevant "hotplug" events.

Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
  • Loading branch information
vadimp-nvidia authored and Jiri Pirko committed May 12, 2021
1 parent 70c7739 commit 272ecb7cd19b08c0961aba0e6e5f0e54e13110fd
Show file tree
Hide file tree
Showing 3 changed files with 826 additions and 0 deletions.
@@ -34,6 +34,18 @@ config MLXREG_IO
to system resets operation, system reset causes monitoring and some
kinds of mux selection.

config MLXREG_LC
tristate "Mellanox line card platform driver support"
depends on REGMAP
depends on HWMON
depends on I2C
help
This driver provides support for the Mellanox MSN4800-XX line cards,
which are the part of MSN4800 Ethernet modular switch systems
providing a high performance switching solution for Enterprise Data
Centers (EDC) for building Ethernet based clusters, High-Performance
Computing (HPC) and embedded environments.

config MLXBF_TMFIFO
tristate "Mellanox BlueField SoC TmFifo platform driver"
depends on ARM64
@@ -8,3 +8,4 @@ obj-$(CONFIG_MLXBF_PMC) += mlxbf-pmc.o
obj-$(CONFIG_MLXBF_TMFIFO) += mlxbf-tmfifo.o
obj-$(CONFIG_MLXREG_HOTPLUG) += mlxreg-hotplug.o
obj-$(CONFIG_MLXREG_IO) += mlxreg-io.o
obj-$(CONFIG_MLXREG_LC) += mlxreg-lc.o

0 comments on commit 272ecb7

Please sign in to comment.