1. 19 Oct, 2021 4 commits
    • Vadim Pasternak's avatar
      platform/x86: mlx-platform: Configure notifier callbacks for modular system · 67eb006c
      Vadim Pasternak authored
      Add event notifier callbacks for modular system line cards. These
      callbacks are to be passed to "mlxreg-hotplug" driver by line card
      driver during probing. Then, when any line card related hotplug event
      is received (insertion ,power, synch, ready), hotplug driver will
      invoke callback for the relevant line card.
      Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Reviewed-by: default avatarMichael Shych <michaelsh@nvidia.com>
      Link: https://lore.kernel.org/r/20211002093238.3771419-5-vadimp@nvidia.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      67eb006c
    • Vadim Pasternak's avatar
      platform/mellanox: mlxreg-hotplug: Extend logic for hotplug devices operations · bb1023b6
      Vadim Pasternak authored
      Extend the structure 'mlxreg_hotplug_device" with platform device field
      to allow transition of the register map and system interrupt line number
      to underlying hotplug devices, sharing the same register map and
      same interrupt line with 'mlxreg-hotplug' driver.
      
      Extend logic for hotplug devices creation and removing according to
      the action associated with the hotplug device description. Previously
      hotplug driver was capable to attach / de-attach upon hotplug events
      only I2C devices handled by simple I2C drivers. Now it should be able
      to attach also devices handled by the platform drivers.
      
      The motivation is to allow transition of platform data like:
      - system interrupt line number, sharing with 'mlxreg-hotplug' to
        underlying hotplug devices.
      - shared register map of programmable devices on main board to
        underlying hotplug devices.
      
      Additioanlly the number of 'sysfs' attributes is increased, since
      modular system defines more 'sysfs' attributes.
      Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Reviewed-by: default avatarMichael Shych <michaelsh@nvidia.com>
      Link: https://lore.kernel.org/r/20211002093238.3771419-4-vadimp@nvidia.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      bb1023b6
    • Vadim Pasternak's avatar
      platform/x86: mlx-platform: Add initial support for new modular system · a5d8f57e
      Vadim Pasternak authored
      Add initial chassis management support for Nvidia modular Ethernet
      switch systems MSN4800, providing a high performance switching solution
      for Enterprise Data Centers (EDC) for building Ethernet based clusters,
      High-Performance Computing (HPC) and embedded environments.
      
      This system could be equipped with the different types of replaceable
      line cards and management board. The first system flavor will support
      the line card type MSN4800-C16 equipped with Lattice CPLD devices aimed
      for system and ASIC control, one Nvidia FPGA for gearboxes (PHYs)
      management, and four Nvidia gearboxes for the port control and with
      16x100GbE QSFP28 ports and also with various devices for electrical
      control.
      
      The system is equipped with eight slots for line cards, four slots for
      power supplies and six slots for fans. It could be configured as fully
      populated or with even only one line card. The line cards are
      hot-pluggable.
      In the future when more line card flavors are to be available (for
      example line cards with 8x200Gb Eth port, with 4x400 Eth ports, or with
      some kind of smart cards for offloading purpose), any type of line card
      could be inserted at any slot.
      
      The system is based on Nvidia Spectrum-3 ASIC. The switch height is
      4U and it fits standard rack size.
      
      System could be configured as fully populated or with even only one
      line card. The line cards are hot-pluggable.
      
      Line cards are connected to the chassis through I2C interface for the
      chassis management operations and through PCIe for the networking
      operations. Future line cards could be connected to the chassis through
      InfiniBand fabric, instead of PCIe.
      
      The first type of line card supports 16x100GbE QSFP28 Ethernet ports.
      Those line cards equipped with the programmable devices aimed for
      system control of Nvidia Ethernet switch ASIC control, Nvidia FPGA,
      Nvidia gearboxes (PHYs).
      The next coming  card generations are supposed to support:
      - Line cards with 8x200Gbe QSFP28 Ethernet ports.
      - Line cards with 4x400Gbe QSFP-DD Ethernet ports.
      - Smart cards equipped with Nvidia ARM CPU for offloading and for fast
        access to the storage (EBoF).
      - Fabric cards for inter-connection.
      
      The basic system initialization flow with input signals from the
      programmable device to kernel hotplug driver and with OS response
      to some of these signals is depicted below.
      
      lc#n_prsnt	*-> Input: line card presence in/out events.
      		    Informational event. Required action - 'udev' event
      		    generation for logging.
      lc#n_verified	*-> Input: line card verification status events coming
      		    after line card security signature validation by
      		    hardware. Required action - connect line card
      		    driver and initialized line card devices feeding
      		    from system auxiliary power domain.
      lc#n_pwr	<-* Output: line card power on / off from OS. Action
      		    should be performed by platform power management
      		    driver.
      lc#n_powered	*-> Input: line card power on/off events coming after
      		    line card "power good" on/off events, mean that
      		    line card power up sequence has been successfully
      		    completed or line card "power good" status has been
      		    dropped. Required action - connect line card
      		    devices feeding from system main power domain.
      lc#n_synced	*-> Input: line card synchronization events, coming
      		    after hardware-firmware synchronization handshake.
      		    Required action - to enable line card, in case
      		    lc#n_ready has been received before.
      lc#n_ready	*-> Input: line card ready events, indicating line card
      		    PHYs ready / unready states. Required action -
      		    enable line card, in case lc#n_synced has been
      		    received before.
      lc#n_enable	<-* Output: line card enable from OS - release FPGA and
      		    PHYs line card devices from reset state. Action
      		    should be performed by platform power management
      		    driver.
      lc#n_active	*-> Input: when line card "active event" is received
      		    for particular line card, its network, hardware
      		    monitoring and thermal interfaces should be
      		    configured according to the configuration obtained
      		    from the firmware. When opposite "inactive event"
      		    is received all the above interfaces should be
      		    teared down. Required action - connect / disconnect
      		    the above line card interfaces through ASIC I2C
      		    chassis management driver.
      
      For initial support:
      - Define new system type 'VMOD0011' to support new modular system.
      - Provide initial platform configuration for new system type.
      - Extend the registers definitions.
      - Add support for modular system registers related to line card
        specific events - insertion/removal, power on/off, verification
        and activation.
      - Add hotplug configuration for the above events.
      - Add configurations for hotplug actions for the modular system.
      Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Reviewed-by: default avatarMichael Shych <michaelsh@nvidia.com>
      Link: https://lore.kernel.org/r/20211002093238.3771419-3-vadimp@nvidia.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      a5d8f57e
    • Vadim Pasternak's avatar
      platform_data/mlxreg: Add new type to support modular systems · aafa1caf
      Vadim Pasternak authored
      Add new types for the Nvidia modular systems MSN4800 which could
      be equipped with the different types of replaceable line cards.
      
      Add new type to specify the kind of hotplug events for the line cards.
      The line card events are generated by the programmable device located
      on the main board. This device implements interrupt controller logic.
      Line card interrupts are associated with different line cards states
      during its initialization: insertion, security signature validation,
      power good state, security validation, hardware-firmware
      synchronization state, line card PHYs readiness state, firmware
      availability for line card ports. Also under some circumstances
      hardware can generate thermal shutdown for particular line card.
      
      Add new type specifying the action, which should be performed when
      particular hotplug event is received. This action defines in which way
      hotplug event should be handled by hotplug driver. There are the next
      actions types:
      - Connect I2C device with empty 'platform_data' field according to the
        platform topology, if device is configured (for example, power unit
        micro-controller driver, when power unit is connected to power source
        (this is what is currently supported).
      - Connect device with 'platform_data' field set according to the
        platform topology. The purpose is to pass 'platform_data' through
        hotplug driver to underlying device (for example line card driver).
      - No device is associated with hotplug event - just send "udev" event
       (this is what is currently supported).
      
      Extend structure 'mlxreg_hotplug_device' with hotplug action field.
      
      Extend structure 'mlxreg_core_data' with:
      - Registers for line card power and enabling control.
      - Slot number field, to indicate at which physical slot replaceable
        line card device is located.
      Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Reviewed-by: default avatarMichael Shych <michaelsh@nvidia.com>
      Link: https://lore.kernel.org/r/20211002093238.3771419-2-vadimp@nvidia.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      aafa1caf
  2. 11 Oct, 2021 14 commits
  3. 28 Sep, 2021 6 commits
  4. 21 Sep, 2021 5 commits
  5. 16 Sep, 2021 3 commits
  6. 14 Sep, 2021 8 commits