Skip to content
  1. Oct 22, 2021
  2. Oct 20, 2021
  3. Oct 19, 2021
    • Hans de Goede's avatar
      Input: axp20x-pek - Use new soc_intel_is_cht() helper · 5ecc1e94
      Hans de Goede authored
      
      
      Use the new soc_intel_is_cht() helper to find out if we are running
      on a CHT device rather then checking the ACPI _HRV field.
      
      This is more reliable (some CHT devices have been found where the _HRV
      for the PMIC is 2 rather then 3) and leads to a nice cleanup.
      
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Acked-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20211018143324.296961-4-hdegoede@redhat.com
      5ecc1e94
    • Hans de Goede's avatar
      platform/x86: intel_int0002_vgpio: Use the new soc_intel_is_byt()/_cht() helpers · 693841b7
      Hans de Goede authored
      
      
      Use the new soc_intel_is_byt()/_cht() helpers to clean things up a bit.
      
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20211018143324.296961-3-hdegoede@redhat.com
      693841b7
    • Hans de Goede's avatar
      ASoC: Intel: Move soc_intel_is_foo() helpers to a generic header · cd45c9bf
      Hans de Goede authored
      
      
      The soc_intel_is_foo() helpers from
      sound/soc/intel/common/soc-intel-quirks.h are useful outside of the
      sound subsystem too.
      
      Move these to include/linux/platform_data/x86/soc.h, so that
      other code can use them too.
      
      Suggested-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://lore.kernel.org/r/20211018143324.296961-2-hdegoede@redhat.com
      cd45c9bf
    • Nathan Chancellor's avatar
      platform/x86: thinkpad_acpi: Fix bitwise vs. logical warning · fd96e35e
      Nathan Chancellor authored
      A new warning in clang points out a use of bitwise OR with boolean
      expressions in this driver:
      
      drivers/platform/x86/thinkpad_acpi.c:9061:11: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical]
              else if ((strlencmp(cmd, "level disengaged") == 0) |
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                 ||
      drivers/platform/x86/thinkpad_acpi.c:9061:11: note: cast one or both operands to int to silence this warning
      1 error generated.
      
      This should clearly be a logical OR so change it to fix the warning.
      
      Fixes: fe98a52c
      
       ("ACPI: thinkpad-acpi: add sysfs support to fan subdriver")
      Link: https://github.com/ClangBuiltLinux/linux/issues/1476
      Reported-by: default avatarTor Vic <torvic9@mailbox.org>
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Link: https://lore.kernel.org/r/20211018182537.2316800-1-nathan@kernel.org
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      fd96e35e
    • Ye Guojin's avatar
      platform/x86: thinkpad_acpi: Fix coccinelle warnings · 33ce79be
      Ye Guojin authored
      
      
      coccicheck complains about the use of snprintf() in sysfs show
      functions:
      
      WARNING  use scnprintf or sprintf
      
      Use sysfs_emit instead of scnprintf or sprintf makes more sense.
      
      Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
      Signed-off-by: default avatarYe Guojin <ye.guojin@zte.com.cn>
      Link: https://lore.kernel.org/r/20211018091750.858826-1-ye.guojin@zte.com.cn
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      33ce79be
    • Qing Wang's avatar
      platform/x86: panasonic-laptop: Replace snprintf in show functions with sysfs_emit · 2d5b0755
      Qing Wang authored
      
      
      show() must not use snprintf() when formatting the value to be
      returned to user space.
      
      Fix the coccicheck warnings:
      WARNING: use scnprintf or sprintf.
      
      Use sysfs_emit instead of scnprintf or sprintf makes more sense.
      
      Signed-off-by: default avatarQing Wang <wangqing@vivo.com>
      Link: https://lore.kernel.org/r/1634280641-4862-1-git-send-email-wangqing@vivo.com
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      2d5b0755
    • Rafael J. Wysocki's avatar
      platform: x86: ideapad-laptop: Use ACPI_COMPANION() directly · 043449e7
      Rafael J. Wysocki authored
      
      
      The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION()
      macro and the ACPI handle produced by the former comes from the
      ACPI device object produced by the latter, so it is way more
      straightforward to evaluate the latter directly instead of passing
      the handle produced by the former to acpi_bus_get_device().
      
      Modify ideapad_acpi_add() accordingly (no intentional functional
      impact).
      
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Link: https://lore.kernel.org/r/8000884.T7Z3S40VBb@kreacher
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      043449e7
    • Rafael J. Wysocki's avatar
      surface: surface3_power: Drop redundant acpi_bus_get_device() call · 7c7ba5de
      Rafael J. Wysocki authored
      
      
      If the ACPI companion of a given device is not present, the result
      of the ACPI_HANDLE() evaluation for it will be NULL, so calling
      acpi_bus_get_device() on ACPI_HANDLE() result in order to validate
      it is redundant.
      
      Drop the redundant acpi_bus_get_device() call from mshw0011_notify()
      along with a local variable related to it.
      
      No intentional functional impact.
      
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
      Link: https://lore.kernel.org/r/3160001.aeNJFYEL58@kreacher
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      7c7ba5de
    • Rafael J. Wysocki's avatar
      surface: surface3-wmi: Use ACPI_COMPANION() directly · 55588713
      Rafael J. Wysocki authored
      
      
      The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION()
      macro and the ACPI handle produced by the former comes from the
      ACPI device object produced by the latter, so it is way more
      straightforward to evaluate the latter directly instead of passing
      the handle produced by the former to acpi_bus_get_device().
      
      Modify s3_wmi_check_platform_device() accordingly (no intentional
      functional impact).
      
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
      Link: https://lore.kernel.org/r/12896717.uLZWGnKmhe@kreacher
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      55588713
    • Tim Crawford's avatar
      platform/x86: system76_acpi: Add attribute group for kb_led_color · 603a7dd0
      Tim Crawford authored
      
      
      Create the attribute groups for kb_led_color and set the `groups` field
      in kb_led. While touching it, also change its show method to use
      sysfs_emit() instead of sprintf().
      
      Signed-off-by: default avatarTim Crawford <tcrawford@system76.com>
      Link: https://lore.kernel.org/r/20211006202202.7479-5-tcrawford@system76.com
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      603a7dd0
    • Tim Crawford's avatar
      platform/x86: system76_acpi: Add battery charging thresholds · 76f7eba3
      Tim Crawford authored
      
      
      System76 laptops running open source EC firmware support configuring
      charging thresholds through ACPI methods. Expose this functionality
      through the standard sysfs entries charge_control_{start,end}_threshold.
      
      Signed-off-by: default avatarTim Crawford <tcrawford@system76.com>
      Link: https://lore.kernel.org/r/20211006202202.7479-4-tcrawford@system76.com
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      76f7eba3
    • Jeremy Soller's avatar
      platform/x86: system76_acpi: Replace Fn+F2 function for OLED models · 0de30fc6
      Jeremy Soller authored
      
      
      System76 laptops models with OLED displays do not support the default
      Fn+F2 behavior of turning the embedded display on and off. Some models
      instead introduce a new notify event that is used to lock the screen so
      the OS will put the display in a low power state.
      
      Signed-off-by: default avatarJeremy Soller <jeremy@system76.com>
      Signed-off-by: default avatarTim Crawford <tcrawford@system76.com>
      Link: https://lore.kernel.org/r/20211006202202.7479-3-tcrawford@system76.com
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      0de30fc6
    • Jeremy Soller's avatar
      platform/x86: system76_acpi: Report temperature and fan speed · 95563d45
      Jeremy Soller authored
      
      
      Add a hwmon interface to report CPU/GPU temperature and fan speed.
      sensors now reports an ACPI interface with the entries:
      
      system76_acpi-acpi-0
      Adapter: ACPI interface
      CPU fan:        0 RPM
      GPU fan:        0 RPM
      CPU temp:     +47.0°C
      GPU temp:      +0.0°C
      
      Signed-off-by: default avatarJeremy Soller <jeremy@system76.com>
      Signed-off-by: default avatarTim Crawford <tcrawford@system76.com>
      Link: https://lore.kernel.org/r/20211006202202.7479-2-tcrawford@system76.com
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      95563d45
    • Vadim Pasternak's avatar
      platform/x86: mlx-platform: Add support for multiply cooling devices · 249606d3
      Vadim Pasternak authored
      
      
      Add new registers to support systems with multiply cooling devices.
      Modular systems support up-to four cooling devices. This capability
      is detected according to the registers initial setting.
      
      Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Reviewed-by: default avatarMichael <michaelsh@nvidia.com>
      Link: https://lore.kernel.org/r/20211002093609.3771576-1-vadimp@nvidia.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      249606d3
    • Vadim Pasternak's avatar
      Documentation/ABI: Add new line card attributes for mlxreg-io sysfs interfaces · 5b0a315c
      Vadim Pasternak authored
      
      
      Add documentation for the new attributes for line cards:
      - CPLDs versioning.
      - Write protection control for 'nvram' devices.
      - Line card reset reasons.
      - Enabling burning of FPGA and CPLDs.
      - Enabling burning of FPGA and gearbox SPI flashes,
      - Enabling power of whole line card.
      - Enabling power of QSFP ports equipped on line card.
      - The maximum powered required for line card feeding.
      - Line card configuration Id.
      
      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-10-vadimp@nvidia.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      5b0a315c
    • Vadim Pasternak's avatar
      Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces · 527cd54d
      Vadim Pasternak authored
      
      
      Add documentation for the new attributes:
      - "bios_active_image"; "bios_auth_fail"; "bios_upgrade_fail";
        "bios_safe_mode" to represent various BIOS statuses.
      - "lc{n}_enable" - for put/release the line card to/from enable state.
      - "lc{n}_pwr" - for power on/off the line card.
      - "lc{n}_rst_mask" - for line card reset state enforced by ASIC, when
        it sets it due to some abnormal ASIC behavior.
      - "psu3_on"; "psu4_on" - for connection/disconnection power supply unit
        to/from the power source.
      - "pm_mgmt_en" - for setting power management control ownership. When
        power management control is provided by hardware, it means that
        hardware will automatically power off one or more line cards in case
        system power budget is under power required for feeding all powered
        on line cards. It could be a case, when some of power units lost
        power good state.
      - "shutdown_unlock" - for unlocking system after hardware or firmware
        thermal shutdown, which causes locking of the all interfaces to ASIC.
      
      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-9-vadimp@nvidia.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      527cd54d
    • Vadim Pasternak's avatar
      platform/mellanox: mlxreg-lc: Add initial support for Nvidia line card devices · 62f9529b
      Vadim Pasternak authored
      
      
      Provide support for the Nvidia 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.
      
      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.
      
      The driver 'mlxreg-lc' is driven by 'mlxreg-hotplug' driver following
      relevant "hotplug" events.
      
      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-8-vadimp@nvidia.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      62f9529b
    • Vadim Pasternak's avatar
      platform_data/mlxreg: Add new field for secured access · 9d93d787
      Vadim Pasternak authored
      
      
      Extend structure 'mlxreg_core_data' with the field "secured". The
      purpose of this field is to restrict access to some attributes, if
      kernel is configured with security options, like:
      LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY.
      Access to some attributes, which for example, allow burning of some
      hardware components, like FPGA, CPLD, SPI, etcetera can break the
      system. In case user does not want to allow such access, it can disable
      it by setting security options.
      
      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-7-vadimp@nvidia.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      9d93d787
    • Vadim Pasternak's avatar
      platform/mellanox: mlxreg-io: Extend number of hwmon attributes · bbfd79c6
      Vadim Pasternak authored
      
      
      Extend maximum number of the attributes, exposed to 'sysfs'.
      It is requires in order to support modular systems, which
      provide more attributes for system control, statuses and info.
      
      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-6-vadimp@nvidia.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      bbfd79c6
    • 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.com
      Signed-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.com
      Signed-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.com
      Signed-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.com
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      aafa1caf
  4. Oct 11, 2021