Skip to content

Commit

Permalink
Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces
Browse files Browse the repository at this point in the history
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: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/20211002093238.3771419-9-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  • Loading branch information
vadimp-nvidia authored and jwrdegoede committed Oct 19, 2021
1 parent 62f9529 commit 527cd54
Showing 1 changed file with 138 additions and 0 deletions.
138 changes: 138 additions & 0 deletions Documentation/ABI/stable/sysfs-driver-mlxreg-io
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,141 @@ Description: These files show with which CPLD part numbers and minor
system.

The files are read only.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/bios_active_image
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/bios_auth_fail
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/bios_upgrade_fail
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: The files represent BIOS statuses:
- bios_active_image: location of current active BIOS image:
0: Top, 1: Bottom.
The reported value should correspond to value expected by OS
in case of BIOS safe mode is 0. This bit is related to Intel
top-swap feature of DualBios on the same flash.
- bios_auth_fail: BIOS upgrade is failed because provided BIOS
image is not signed correctly.
- bios_upgrade_fail: BIOS upgrade is failed by some other
reason not because authentication. For example due to
physical SPI flash problem.

The files are read only.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc1_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc2_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc3_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc4_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc5_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc6_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc7_enable
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc8_enable
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: These files allow line cards enable state control.
Expected behavior:
When lc{n}_enable is written 1, related line card is released
from the reset state, when 0 - is hold in reset state.

The files are read/write.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc1_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc2_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc3_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc4_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc5_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc6_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc7_pwr
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc8_pwr
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: These files switching line cards power on and off.
Expected behavior:
When lc{n}_pwr is written 1, related line card is powered
on, when written 0 - powered off.

The files are read/write.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc1_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc2_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc3_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc4_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc5_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc6_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc7_rst_mask
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/lc8_rst_mask
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: These files clear line card reset bit enforced by ASIC, when it
sets it due to some abnormal ASIC behavior.
Expected behavior:
When lc{n}_rst_mask is written 1, related line card reset bit
is cleared, when written 0 - no effect.

The files are write only.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/os_started
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: This file, when written 1, indicates to programmable devices
that OS is taking control over it.

The file is read/write.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pm_mgmt_en
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: This file assigns power management control ownership.
When power management control is provided by hardware, hardware
will automatically power off one or more line previously
powered line cards in case system power budget is getting
insufficient. It could be in case when some of power units lost
power good state.
When pm_mgmt_en is written 1, power management control by
software is enabled, 0 - power management control by hardware.
Note that for any setting of pm_mgmt_en attribute hardware will
not allow to power on any new line card in case system power
budget is insufficient.
Same in case software will try to power on several line cards
at once - hardware will power line cards while system has
enough power budget.
Default is 0.

The file is read/write.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu3_on
What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/psu4_on
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: These files switching power supply units on and off.
Expected behavior:
When psu3_on or psu4_on is written 1, related unit will be
disconnected from the power source, when written 0 - connected.

The files are write only.

What: /sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/shutdown_unlock
Date: October 2021
KernelVersion: 5.16
Contact: Vadim Pasternak <vadimp@nvidia.com>
Description: This file allows to unlock ASIC after thermal shutdown event.
When system thermal shutdown is enforced by ASIC, ASIC is
getting locked and after system boot it will not be available.
Software can decide to unlock it by setting this attribute to
1 and then perform system power cycle by setting pwr_cycle
attribute to 1 (power cycle of main power domain).
Before setting shutdown_unlock to 1 it is recommended to
validate that system reboot cause is reset_asic_thermal or
reset_thermal_spc_or_pciesw.
In case shutdown_unlock is not set 1, the only way to release
ASIC from locking - is full system power cycle through the
external power distribution unit.
Default is 1.

The file is read/write.

0 comments on commit 527cd54

Please sign in to comment.