162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright 2017-2023 Broadcom Inc. All rights reserved. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci#ifndef MPI30_CNFG_H 662306a36Sopenharmony_ci#define MPI30_CNFG_H 1 762306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_IO_UNIT (0x00) 862306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_MANUFACTURING (0x01) 962306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_IOC (0x02) 1062306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_DRIVER (0x03) 1162306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_SECURITY (0x04) 1262306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_ENCLOSURE (0x11) 1362306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_DEVICE (0x12) 1462306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_SAS_IO_UNIT (0x20) 1562306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_SAS_EXPANDER (0x21) 1662306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_SAS_PHY (0x23) 1762306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_SAS_PORT (0x24) 1862306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_PCIE_IO_UNIT (0x30) 1962306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_PCIE_SWITCH (0x31) 2062306a36Sopenharmony_ci#define MPI3_CONFIG_PAGETYPE_PCIE_LINK (0x33) 2162306a36Sopenharmony_ci#define MPI3_CONFIG_PAGEATTR_MASK (0xf0) 2262306a36Sopenharmony_ci#define MPI3_CONFIG_PAGEATTR_READ_ONLY (0x00) 2362306a36Sopenharmony_ci#define MPI3_CONFIG_PAGEATTR_CHANGEABLE (0x10) 2462306a36Sopenharmony_ci#define MPI3_CONFIG_PAGEATTR_PERSISTENT (0x20) 2562306a36Sopenharmony_ci#define MPI3_CONFIG_ACTION_PAGE_HEADER (0x00) 2662306a36Sopenharmony_ci#define MPI3_CONFIG_ACTION_READ_DEFAULT (0x01) 2762306a36Sopenharmony_ci#define MPI3_CONFIG_ACTION_READ_CURRENT (0x02) 2862306a36Sopenharmony_ci#define MPI3_CONFIG_ACTION_WRITE_CURRENT (0x03) 2962306a36Sopenharmony_ci#define MPI3_CONFIG_ACTION_READ_PERSISTENT (0x04) 3062306a36Sopenharmony_ci#define MPI3_CONFIG_ACTION_WRITE_PERSISTENT (0x05) 3162306a36Sopenharmony_ci#define MPI3_DEVICE_PGAD_FORM_MASK (0xf0000000) 3262306a36Sopenharmony_ci#define MPI3_DEVICE_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) 3362306a36Sopenharmony_ci#define MPI3_DEVICE_PGAD_FORM_HANDLE (0x20000000) 3462306a36Sopenharmony_ci#define MPI3_DEVICE_PGAD_HANDLE_MASK (0x0000ffff) 3562306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_FORM_MASK (0xf0000000) 3662306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) 3762306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_FORM_HANDLE_PHY_NUM (0x10000000) 3862306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_FORM_HANDLE (0x20000000) 3962306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_PHYNUM_MASK (0x00ff0000) 4062306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_PHYNUM_SHIFT (16) 4162306a36Sopenharmony_ci#define MPI3_SAS_EXPAND_PGAD_HANDLE_MASK (0x0000ffff) 4262306a36Sopenharmony_ci#define MPI3_SAS_PHY_PGAD_FORM_MASK (0xf0000000) 4362306a36Sopenharmony_ci#define MPI3_SAS_PHY_PGAD_FORM_PHY_NUMBER (0x00000000) 4462306a36Sopenharmony_ci#define MPI3_SAS_PHY_PGAD_PHY_NUMBER_MASK (0x000000ff) 4562306a36Sopenharmony_ci#define MPI3_SASPORT_PGAD_FORM_MASK (0xf0000000) 4662306a36Sopenharmony_ci#define MPI3_SASPORT_PGAD_FORM_GET_NEXT_PORT (0x00000000) 4762306a36Sopenharmony_ci#define MPI3_SASPORT_PGAD_FORM_PORT_NUM (0x10000000) 4862306a36Sopenharmony_ci#define MPI3_SASPORT_PGAD_PORT_NUMBER_MASK (0x000000ff) 4962306a36Sopenharmony_ci#define MPI3_ENCLOS_PGAD_FORM_MASK (0xf0000000) 5062306a36Sopenharmony_ci#define MPI3_ENCLOS_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) 5162306a36Sopenharmony_ci#define MPI3_ENCLOS_PGAD_FORM_HANDLE (0x10000000) 5262306a36Sopenharmony_ci#define MPI3_ENCLOS_PGAD_HANDLE_MASK (0x0000ffff) 5362306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_FORM_MASK (0xf0000000) 5462306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_FORM_GET_NEXT_HANDLE (0x00000000) 5562306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_FORM_HANDLE_PORT_NUM (0x10000000) 5662306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_FORM_HANDLE (0x20000000) 5762306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_PORTNUM_MASK (0x00ff0000) 5862306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_PORTNUM_SHIFT (16) 5962306a36Sopenharmony_ci#define MPI3_PCIE_SWITCH_PGAD_HANDLE_MASK (0x0000ffff) 6062306a36Sopenharmony_ci#define MPI3_PCIE_LINK_PGAD_FORM_MASK (0xf0000000) 6162306a36Sopenharmony_ci#define MPI3_PCIE_LINK_PGAD_FORM_GET_NEXT_LINK (0x00000000) 6262306a36Sopenharmony_ci#define MPI3_PCIE_LINK_PGAD_FORM_LINK_NUM (0x10000000) 6362306a36Sopenharmony_ci#define MPI3_PCIE_LINK_PGAD_LINKNUM_MASK (0x000000ff) 6462306a36Sopenharmony_ci#define MPI3_SECURITY_PGAD_FORM_MASK (0xf0000000) 6562306a36Sopenharmony_ci#define MPI3_SECURITY_PGAD_FORM_GET_NEXT_SLOT (0x00000000) 6662306a36Sopenharmony_ci#define MPI3_SECURITY_PGAD_FORM_SLOT_NUM (0x10000000) 6762306a36Sopenharmony_ci#define MPI3_SECURITY_PGAD_SLOT_GROUP_MASK (0x0000ff00) 6862306a36Sopenharmony_ci#define MPI3_SECURITY_PGAD_SLOT_GROUP_SHIFT (8) 6962306a36Sopenharmony_ci#define MPI3_SECURITY_PGAD_SLOT_MASK (0x000000ff) 7062306a36Sopenharmony_cistruct mpi3_config_request { 7162306a36Sopenharmony_ci __le16 host_tag; 7262306a36Sopenharmony_ci u8 ioc_use_only02; 7362306a36Sopenharmony_ci u8 function; 7462306a36Sopenharmony_ci __le16 ioc_use_only04; 7562306a36Sopenharmony_ci u8 ioc_use_only06; 7662306a36Sopenharmony_ci u8 msg_flags; 7762306a36Sopenharmony_ci __le16 change_count; 7862306a36Sopenharmony_ci __le16 reserved0a; 7962306a36Sopenharmony_ci u8 page_version; 8062306a36Sopenharmony_ci u8 page_number; 8162306a36Sopenharmony_ci u8 page_type; 8262306a36Sopenharmony_ci u8 action; 8362306a36Sopenharmony_ci __le32 page_address; 8462306a36Sopenharmony_ci __le16 page_length; 8562306a36Sopenharmony_ci __le16 reserved16; 8662306a36Sopenharmony_ci __le32 reserved18[2]; 8762306a36Sopenharmony_ci union mpi3_sge_union sgl; 8862306a36Sopenharmony_ci}; 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_cistruct mpi3_config_page_header { 9162306a36Sopenharmony_ci u8 page_version; 9262306a36Sopenharmony_ci u8 reserved01; 9362306a36Sopenharmony_ci u8 page_number; 9462306a36Sopenharmony_ci u8 page_attribute; 9562306a36Sopenharmony_ci __le16 page_length; 9662306a36Sopenharmony_ci u8 page_type; 9762306a36Sopenharmony_ci u8 reserved07; 9862306a36Sopenharmony_ci}; 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_LOGICAL_MASK (0xf0) 10162306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_LOGICAL_SHIFT (4) 10262306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_PHYSICAL_MASK (0x0f) 10362306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_PHYSICAL_SHIFT (0) 10462306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_UNKNOWN_LINK_RATE (0x00) 10562306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_PHY_DISABLED (0x01) 10662306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_NEGOTIATION_FAILED (0x02) 10762306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_SATA_OOB_COMPLETE (0x03) 10862306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_PORT_SELECTOR (0x04) 10962306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_SMP_RESET_IN_PROGRESS (0x05) 11062306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_UNSUPPORTED_PHY (0x06) 11162306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_1_5 (0x08) 11262306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_3_0 (0x09) 11362306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_6_0 (0x0a) 11462306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_12_0 (0x0b) 11562306a36Sopenharmony_ci#define MPI3_SAS_NEG_LINK_RATE_22_5 (0x0c) 11662306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_INSIDE_ZPSDS_PERSISTENT (0x00000040) 11762306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REQUESTED_INSIDE_ZPSDS (0x00000020) 11862306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_BREAK_REPLY_CAPABLE (0x00000010) 11962306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_MASK (0x0000000f) 12062306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_UNKNOWN (0x00000000) 12162306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_POWER_ON (0x00000001) 12262306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_HARD_RESET (0x00000002) 12362306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_SMP_PHY_CONTROL (0x00000003) 12462306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_LOSS_OF_SYNC (0x00000004) 12562306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_MULTIPLEXING_SEQ (0x00000005) 12662306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_IT_NEXUS_LOSS_TIMER (0x00000006) 12762306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_BREAK_TIMEOUT (0x00000007) 12862306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_PHY_TEST_STOPPED (0x00000008) 12962306a36Sopenharmony_ci#define MPI3_SAS_APHYINFO_REASON_EXP_REDUCED_FUNC (0x00000009) 13062306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_STATUS_MASK (0xc0000000) 13162306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_STATUS_SHIFT (30) 13262306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_STATUS_ACCESSIBLE (0x00000000) 13362306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_STATUS_NOT_EXIST (0x40000000) 13462306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_STATUS_VACANT (0x80000000) 13562306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_PHY_POWER_CONDITION_MASK (0x18000000) 13662306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_PHY_POWER_CONDITION_ACTIVE (0x00000000) 13762306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_PHY_POWER_CONDITION_PARTIAL (0x08000000) 13862306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_PHY_POWER_CONDITION_SLUMBER (0x10000000) 13962306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REQUESTED_INSIDE_ZPSDS_CHANGED_MASK (0x04000000) 14062306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REQUESTED_INSIDE_ZPSDS_CHANGED_SHIFT (26) 14162306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_INSIDE_ZPSDS_PERSISTENT_MASK (0x02000000) 14262306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_INSIDE_ZPSDS_PERSISTENT_SHIFT (25) 14362306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REQUESTED_INSIDE_ZPSDS_MASK (0x01000000) 14462306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REQUESTED_INSIDE_ZPSDS_SHIFT (24) 14562306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_ZONE_GROUP_PERSISTENT (0x00400000) 14662306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_INSIDE_ZPSDS_WITHIN (0x00200000) 14762306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_ZONING_ENABLED (0x00100000) 14862306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_MASK (0x000f0000) 14962306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_UNKNOWN (0x00000000) 15062306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_POWER_ON (0x00010000) 15162306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_HARD_RESET (0x00020000) 15262306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_SMP_PHY_CONTROL (0x00030000) 15362306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_LOSS_OF_SYNC (0x00040000) 15462306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_MULTIPLEXING_SEQ (0x00050000) 15562306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_IT_NEXUS_LOSS_TIMER (0x00060000) 15662306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_BREAK_TIMEOUT (0x00070000) 15762306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_PHY_TEST_STOPPED (0x00080000) 15862306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_REASON_EXP_REDUCED_FUNC (0x00090000) 15962306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_SATA_PORT_ACTIVE (0x00004000) 16062306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_SATA_PORT_SELECTOR_PRESENT (0x00002000) 16162306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_VIRTUAL_PHY (0x00001000) 16262306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_PARTIAL_PATHWAY_TIME_MASK (0x00000f00) 16362306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_PARTIAL_PATHWAY_TIME_SHIFT (8) 16462306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_ROUTING_ATTRIBUTE_MASK (0x000000f0) 16562306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_ROUTING_ATTRIBUTE_DIRECT (0x00000000) 16662306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_ROUTING_ATTRIBUTE_SUBTRACTIVE (0x00000010) 16762306a36Sopenharmony_ci#define MPI3_SAS_PHYINFO_ROUTING_ATTRIBUTE_TABLE (0x00000020) 16862306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_MASK (0xf0) 16962306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_NOT_PROGRAMMABLE (0x00) 17062306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_1_5 (0x80) 17162306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_3_0 (0x90) 17262306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_6_0 (0xa0) 17362306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_12_0 (0xb0) 17462306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MAX_RATE_22_5 (0xc0) 17562306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_MASK (0x0f) 17662306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_NOT_PROGRAMMABLE (0x00) 17762306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_1_5 (0x08) 17862306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_3_0 (0x09) 17962306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_6_0 (0x0a) 18062306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_12_0 (0x0b) 18162306a36Sopenharmony_ci#define MPI3_SAS_PRATE_MIN_RATE_22_5 (0x0c) 18262306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MAX_RATE_MASK (0xf0) 18362306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MAX_RATE_1_5 (0x80) 18462306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MAX_RATE_3_0 (0x90) 18562306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MAX_RATE_6_0 (0xa0) 18662306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MAX_RATE_12_0 (0xb0) 18762306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MAX_RATE_22_5 (0xc0) 18862306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MIN_RATE_MASK (0x0f) 18962306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MIN_RATE_1_5 (0x08) 19062306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MIN_RATE_3_0 (0x09) 19162306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MIN_RATE_6_0 (0x0a) 19262306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MIN_RATE_12_0 (0x0b) 19362306a36Sopenharmony_ci#define MPI3_SAS_HWRATE_MIN_RATE_22_5 (0x0c) 19462306a36Sopenharmony_ci#define MPI3_SLOT_INVALID (0xffff) 19562306a36Sopenharmony_ci#define MPI3_SLOT_INDEX_INVALID (0xffff) 19662306a36Sopenharmony_ci#define MPI3_LINK_CHANGE_COUNT_INVALID (0xffff) 19762306a36Sopenharmony_ci#define MPI3_RATE_CHANGE_COUNT_INVALID (0xffff) 19862306a36Sopenharmony_ci#define MPI3_TEMP_SENSOR_LOCATION_INTERNAL (0x0) 19962306a36Sopenharmony_ci#define MPI3_TEMP_SENSOR_LOCATION_INLET (0x1) 20062306a36Sopenharmony_ci#define MPI3_TEMP_SENSOR_LOCATION_OUTLET (0x2) 20162306a36Sopenharmony_ci#define MPI3_TEMP_SENSOR_LOCATION_DRAM (0x3) 20262306a36Sopenharmony_ci#define MPI3_MFGPAGE_VENDORID_BROADCOM (0x1000) 20362306a36Sopenharmony_ci#define MPI3_MFGPAGE_DEVID_SAS4116 (0x00a5) 20462306a36Sopenharmony_ci#define MPI3_MFGPAGE_DEVID_SAS5116_MPI (0x00b3) 20562306a36Sopenharmony_ci#define MPI3_MFGPAGE_DEVID_SAS5116_NVME (0x00b4) 20662306a36Sopenharmony_ci#define MPI3_MFGPAGE_DEVID_SAS5116_MPI_MGMT (0x00b5) 20762306a36Sopenharmony_ci#define MPI3_MFGPAGE_DEVID_SAS5116_NVME_MGMT (0x00b6) 20862306a36Sopenharmony_ci#define MPI3_MFGPAGE_DEVID_SAS5116_PCIE_SWITCH (0x00b8) 20962306a36Sopenharmony_cistruct mpi3_man_page0 { 21062306a36Sopenharmony_ci struct mpi3_config_page_header header; 21162306a36Sopenharmony_ci u8 chip_revision[8]; 21262306a36Sopenharmony_ci u8 chip_name[32]; 21362306a36Sopenharmony_ci u8 board_name[32]; 21462306a36Sopenharmony_ci u8 board_assembly[32]; 21562306a36Sopenharmony_ci u8 board_tracer_number[32]; 21662306a36Sopenharmony_ci __le32 board_power; 21762306a36Sopenharmony_ci __le32 reserved94; 21862306a36Sopenharmony_ci __le32 reserved98; 21962306a36Sopenharmony_ci u8 oem; 22062306a36Sopenharmony_ci u8 profile_identifier; 22162306a36Sopenharmony_ci __le16 flags; 22262306a36Sopenharmony_ci u8 board_mfg_day; 22362306a36Sopenharmony_ci u8 board_mfg_month; 22462306a36Sopenharmony_ci __le16 board_mfg_year; 22562306a36Sopenharmony_ci u8 board_rework_day; 22662306a36Sopenharmony_ci u8 board_rework_month; 22762306a36Sopenharmony_ci __le16 board_rework_year; 22862306a36Sopenharmony_ci u8 board_revision[8]; 22962306a36Sopenharmony_ci u8 e_pack_fru[16]; 23062306a36Sopenharmony_ci u8 product_name[256]; 23162306a36Sopenharmony_ci}; 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci#define MPI3_MAN0_PAGEVERSION (0x00) 23462306a36Sopenharmony_ci#define MPI3_MAN0_FLAGS_SWITCH_PRESENT (0x0002) 23562306a36Sopenharmony_ci#define MPI3_MAN0_FLAGS_EXPANDER_PRESENT (0x0001) 23662306a36Sopenharmony_ci#define MPI3_MAN1_VPD_SIZE (512) 23762306a36Sopenharmony_cistruct mpi3_man_page1 { 23862306a36Sopenharmony_ci struct mpi3_config_page_header header; 23962306a36Sopenharmony_ci __le32 reserved08[2]; 24062306a36Sopenharmony_ci u8 vpd[MPI3_MAN1_VPD_SIZE]; 24162306a36Sopenharmony_ci}; 24262306a36Sopenharmony_ci 24362306a36Sopenharmony_ci#define MPI3_MAN1_PAGEVERSION (0x00) 24462306a36Sopenharmony_cistruct mpi3_man_page2 { 24562306a36Sopenharmony_ci struct mpi3_config_page_header header; 24662306a36Sopenharmony_ci u8 flags; 24762306a36Sopenharmony_ci u8 reserved09[3]; 24862306a36Sopenharmony_ci __le32 reserved0c[3]; 24962306a36Sopenharmony_ci u8 oem_board_tracer_number[32]; 25062306a36Sopenharmony_ci}; 25162306a36Sopenharmony_ci#define MPI3_MAN2_PAGEVERSION (0x00) 25262306a36Sopenharmony_ci#define MPI3_MAN2_FLAGS_TRACER_PRESENT (0x01) 25362306a36Sopenharmony_cistruct mpi3_man5_phy_entry { 25462306a36Sopenharmony_ci __le64 ioc_wwid; 25562306a36Sopenharmony_ci __le64 device_name; 25662306a36Sopenharmony_ci __le64 sata_wwid; 25762306a36Sopenharmony_ci}; 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ci#ifndef MPI3_MAN5_PHY_MAX 26062306a36Sopenharmony_ci#define MPI3_MAN5_PHY_MAX (1) 26162306a36Sopenharmony_ci#endif 26262306a36Sopenharmony_cistruct mpi3_man_page5 { 26362306a36Sopenharmony_ci struct mpi3_config_page_header header; 26462306a36Sopenharmony_ci u8 num_phys; 26562306a36Sopenharmony_ci u8 reserved09[3]; 26662306a36Sopenharmony_ci __le32 reserved0c; 26762306a36Sopenharmony_ci struct mpi3_man5_phy_entry phy[MPI3_MAN5_PHY_MAX]; 26862306a36Sopenharmony_ci}; 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_ci#define MPI3_MAN5_PAGEVERSION (0x00) 27162306a36Sopenharmony_cistruct mpi3_man6_gpio_entry { 27262306a36Sopenharmony_ci u8 function_code; 27362306a36Sopenharmony_ci u8 function_flags; 27462306a36Sopenharmony_ci __le16 flags; 27562306a36Sopenharmony_ci u8 param1; 27662306a36Sopenharmony_ci u8 param2; 27762306a36Sopenharmony_ci __le16 reserved06; 27862306a36Sopenharmony_ci __le32 param3; 27962306a36Sopenharmony_ci}; 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_GENERIC (0x00) 28262306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_ALTERNATE (0x01) 28362306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_EXT_INTERRUPT (0x02) 28462306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_GLOBAL_ACTIVITY (0x03) 28562306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_OVER_TEMPERATURE (0x04) 28662306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_PORT_STATUS_GREEN (0x05) 28762306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_PORT_STATUS_YELLOW (0x06) 28862306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_CABLE_MANAGEMENT (0x07) 28962306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_BKPLANE_MGMT_TYPE (0x08) 29062306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_ISTWI_RESET (0x0a) 29162306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_BACKEND_PCIE_RESET (0x0b) 29262306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_GLOBAL_FAULT (0x0c) 29362306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_PBLP_STATUS_CHANGE (0x0d) 29462306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_EPACK_ONLINE (0x0e) 29562306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_EPACK_FAULT (0x0f) 29662306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_CTRL_TYPE (0x10) 29762306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_LICENSE (0x11) 29862306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_REFCLK_CONTROL (0x12) 29962306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_BACKEND_PCIE_RESET_CLAMP (0x13) 30062306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_AUXILIARY_POWER (0x14) 30162306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_RAID_DATA_CACHE_DIRTY (0x15) 30262306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_BOARD_FAN_CONTROL (0x16) 30362306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_BOARD_FAN_FAULT (0x17) 30462306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FUNCTION_POWER_BRAKE (0x18) 30562306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_ISTWI_RESET_FUNCTIONFLAGS_DEVSELECT_MASK (0x01) 30662306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_ISTWI_RESET_FUNCTIONFLAGS_DEVSELECT_ISTWI (0x00) 30762306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_ISTWI_RESET_FUNCTIONFLAGS_DEVSELECT_RECEPTACLEID (0x01) 30862306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_SOURCE_MASK (0xf0) 30962306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_SOURCE_GENERIC (0x00) 31062306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_SOURCE_CABLE_MGMT (0x10) 31162306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_SOURCE_ACTIVE_CABLE_OVERCURRENT (0x20) 31262306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_TRIGGER_MASK (0x01) 31362306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_TRIGGER_EDGE (0x00) 31462306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_EXTINT_PARAM1_FLAGS_TRIGGER_LEVEL (0x01) 31562306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_PORT_GREEN_PARAM1_PHY_STATUS_ALL_UP (0x00) 31662306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_PORT_GREEN_PARAM1_PHY_STATUS_ONE_OR_MORE_UP (0x01) 31762306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_CABLE_MGMT_PARAM1_INTERFACE_MODULE_PRESENT (0x00) 31862306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_CABLE_MGMT_PARAM1_INTERFACE_ACTIVE_CABLE_ENABLE (0x01) 31962306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_CABLE_MGMT_PARAM1_INTERFACE_CABLE_MGMT_ENABLE (0x02) 32062306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_LICENSE_PARAM1_TYPE_IBUTTON (0x00) 32162306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_SLEW_RATE_MASK (0x0100) 32262306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_SLEW_RATE_FAST_EDGE (0x0100) 32362306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_SLEW_RATE_SLOW_EDGE (0x0000) 32462306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DRIVE_STRENGTH_MASK (0x00c0) 32562306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DRIVE_STRENGTH_100OHM (0x0000) 32662306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DRIVE_STRENGTH_66OHM (0x0040) 32762306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DRIVE_STRENGTH_50OHM (0x0080) 32862306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DRIVE_STRENGTH_33OHM (0x00c0) 32962306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_ALT_DATA_SEL_MASK (0x0030) 33062306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_ALT_DATA_SEL_SHIFT (4) 33162306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_ACTIVE_HIGH (0x0008) 33262306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_BI_DIR_ENABLED (0x0004) 33362306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DIRECTION_MASK (0x0003) 33462306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DIRECTION_INPUT (0x0000) 33562306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DIRECTION_OPEN_DRAIN_OUTPUT (0x0001) 33662306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DIRECTION_OPEN_SOURCE_OUTPUT (0x0002) 33762306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_FLAGS_DIRECTION_PUSH_PULL_OUTPUT (0x0003) 33862306a36Sopenharmony_ci#ifndef MPI3_MAN6_GPIO_MAX 33962306a36Sopenharmony_ci#define MPI3_MAN6_GPIO_MAX (1) 34062306a36Sopenharmony_ci#endif 34162306a36Sopenharmony_cistruct mpi3_man_page6 { 34262306a36Sopenharmony_ci struct mpi3_config_page_header header; 34362306a36Sopenharmony_ci __le16 flags; 34462306a36Sopenharmony_ci __le16 reserved0a; 34562306a36Sopenharmony_ci u8 num_gpio; 34662306a36Sopenharmony_ci u8 reserved0d[3]; 34762306a36Sopenharmony_ci struct mpi3_man6_gpio_entry gpio[MPI3_MAN6_GPIO_MAX]; 34862306a36Sopenharmony_ci}; 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci#define MPI3_MAN6_PAGEVERSION (0x00) 35162306a36Sopenharmony_ci#define MPI3_MAN6_FLAGS_HEARTBEAT_LED_DISABLED (0x0001) 35262306a36Sopenharmony_cistruct mpi3_man7_receptacle_info { 35362306a36Sopenharmony_ci __le32 name[4]; 35462306a36Sopenharmony_ci u8 location; 35562306a36Sopenharmony_ci u8 connector_type; 35662306a36Sopenharmony_ci u8 ped_clk; 35762306a36Sopenharmony_ci u8 connector_id; 35862306a36Sopenharmony_ci __le32 reserved14; 35962306a36Sopenharmony_ci}; 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci#define MPI3_MAN7_LOCATION_UNKNOWN (0x00) 36262306a36Sopenharmony_ci#define MPI3_MAN7_LOCATION_INTERNAL (0x01) 36362306a36Sopenharmony_ci#define MPI3_MAN7_LOCATION_EXTERNAL (0x02) 36462306a36Sopenharmony_ci#define MPI3_MAN7_LOCATION_VIRTUAL (0x03) 36562306a36Sopenharmony_ci#define MPI3_MAN7_LOCATION_HOST (0x04) 36662306a36Sopenharmony_ci#define MPI3_MAN7_CONNECTOR_TYPE_NO_INFO (0x00) 36762306a36Sopenharmony_ci#define MPI3_MAN7_PEDCLK_ROUTING_MASK (0x10) 36862306a36Sopenharmony_ci#define MPI3_MAN7_PEDCLK_ROUTING_DIRECT (0x00) 36962306a36Sopenharmony_ci#define MPI3_MAN7_PEDCLK_ROUTING_CLOCK_BUFFER (0x10) 37062306a36Sopenharmony_ci#define MPI3_MAN7_PEDCLK_ID_MASK (0x0f) 37162306a36Sopenharmony_ci#ifndef MPI3_MAN7_RECEPTACLE_INFO_MAX 37262306a36Sopenharmony_ci#define MPI3_MAN7_RECEPTACLE_INFO_MAX (1) 37362306a36Sopenharmony_ci#endif 37462306a36Sopenharmony_cistruct mpi3_man_page7 { 37562306a36Sopenharmony_ci struct mpi3_config_page_header header; 37662306a36Sopenharmony_ci __le32 flags; 37762306a36Sopenharmony_ci u8 num_receptacles; 37862306a36Sopenharmony_ci u8 reserved0d[3]; 37962306a36Sopenharmony_ci __le32 enclosure_name[4]; 38062306a36Sopenharmony_ci struct mpi3_man7_receptacle_info receptacle_info[MPI3_MAN7_RECEPTACLE_INFO_MAX]; 38162306a36Sopenharmony_ci}; 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_ci#define MPI3_MAN7_PAGEVERSION (0x00) 38462306a36Sopenharmony_ci#define MPI3_MAN7_FLAGS_BASE_ENCLOSURE_LEVEL_MASK (0x01) 38562306a36Sopenharmony_ci#define MPI3_MAN7_FLAGS_BASE_ENCLOSURE_LEVEL_0 (0x00) 38662306a36Sopenharmony_ci#define MPI3_MAN7_FLAGS_BASE_ENCLOSURE_LEVEL_1 (0x01) 38762306a36Sopenharmony_cistruct mpi3_man8_phy_info { 38862306a36Sopenharmony_ci u8 receptacle_id; 38962306a36Sopenharmony_ci u8 connector_lane; 39062306a36Sopenharmony_ci __le16 reserved02; 39162306a36Sopenharmony_ci __le16 slotx1; 39262306a36Sopenharmony_ci __le16 slotx2; 39362306a36Sopenharmony_ci __le16 slotx4; 39462306a36Sopenharmony_ci __le16 reserved0a; 39562306a36Sopenharmony_ci __le32 reserved0c; 39662306a36Sopenharmony_ci}; 39762306a36Sopenharmony_ci 39862306a36Sopenharmony_ci#define MPI3_MAN8_PHY_INFO_RECEPTACLE_ID_NOT_ASSOCIATED (0xff) 39962306a36Sopenharmony_ci#define MPI3_MAN8_PHY_INFO_CONNECTOR_LANE_NOT_ASSOCIATED (0xff) 40062306a36Sopenharmony_ci#ifndef MPI3_MAN8_PHY_INFO_MAX 40162306a36Sopenharmony_ci#define MPI3_MAN8_PHY_INFO_MAX (1) 40262306a36Sopenharmony_ci#endif 40362306a36Sopenharmony_cistruct mpi3_man_page8 { 40462306a36Sopenharmony_ci struct mpi3_config_page_header header; 40562306a36Sopenharmony_ci __le32 reserved08; 40662306a36Sopenharmony_ci u8 num_phys; 40762306a36Sopenharmony_ci u8 reserved0d[3]; 40862306a36Sopenharmony_ci struct mpi3_man8_phy_info phy_info[MPI3_MAN8_PHY_INFO_MAX]; 40962306a36Sopenharmony_ci}; 41062306a36Sopenharmony_ci 41162306a36Sopenharmony_ci#define MPI3_MAN8_PAGEVERSION (0x00) 41262306a36Sopenharmony_cistruct mpi3_man9_rsrc_entry { 41362306a36Sopenharmony_ci __le32 maximum; 41462306a36Sopenharmony_ci __le32 decrement; 41562306a36Sopenharmony_ci __le32 minimum; 41662306a36Sopenharmony_ci __le32 actual; 41762306a36Sopenharmony_ci}; 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_cienum mpi3_man9_resources { 42062306a36Sopenharmony_ci MPI3_MAN9_RSRC_OUTSTANDING_REQS = 0, 42162306a36Sopenharmony_ci MPI3_MAN9_RSRC_TARGET_CMDS = 1, 42262306a36Sopenharmony_ci MPI3_MAN9_RSRC_RESERVED02 = 2, 42362306a36Sopenharmony_ci MPI3_MAN9_RSRC_NVME = 3, 42462306a36Sopenharmony_ci MPI3_MAN9_RSRC_INITIATORS = 4, 42562306a36Sopenharmony_ci MPI3_MAN9_RSRC_VDS = 5, 42662306a36Sopenharmony_ci MPI3_MAN9_RSRC_ENCLOSURES = 6, 42762306a36Sopenharmony_ci MPI3_MAN9_RSRC_ENCLOSURE_PHYS = 7, 42862306a36Sopenharmony_ci MPI3_MAN9_RSRC_EXPANDERS = 8, 42962306a36Sopenharmony_ci MPI3_MAN9_RSRC_PCIE_SWITCHES = 9, 43062306a36Sopenharmony_ci MPI3_MAN9_RSRC_RESERVED10 = 10, 43162306a36Sopenharmony_ci MPI3_MAN9_RSRC_HOST_PD_DRIVES = 11, 43262306a36Sopenharmony_ci MPI3_MAN9_RSRC_ADV_HOST_PD_DRIVES = 12, 43362306a36Sopenharmony_ci MPI3_MAN9_RSRC_RAID_PD_DRIVES = 13, 43462306a36Sopenharmony_ci MPI3_MAN9_RSRC_DRV_DIAG_BUF = 14, 43562306a36Sopenharmony_ci MPI3_MAN9_RSRC_NAMESPACE_COUNT = 15, 43662306a36Sopenharmony_ci MPI3_MAN9_RSRC_NUM_RESOURCES 43762306a36Sopenharmony_ci}; 43862306a36Sopenharmony_ci 43962306a36Sopenharmony_ci#define MPI3_MAN9_MIN_OUTSTANDING_REQS (1) 44062306a36Sopenharmony_ci#define MPI3_MAN9_MAX_OUTSTANDING_REQS (65000) 44162306a36Sopenharmony_ci#define MPI3_MAN9_MIN_TARGET_CMDS (0) 44262306a36Sopenharmony_ci#define MPI3_MAN9_MAX_TARGET_CMDS (65535) 44362306a36Sopenharmony_ci#define MPI3_MAN9_MIN_NVME_TARGETS (0) 44462306a36Sopenharmony_ci#define MPI3_MAN9_MIN_INITIATORS (0) 44562306a36Sopenharmony_ci#define MPI3_MAN9_MIN_VDS (0) 44662306a36Sopenharmony_ci#define MPI3_MAN9_MIN_ENCLOSURES (1) 44762306a36Sopenharmony_ci#define MPI3_MAN9_MAX_ENCLOSURES (65535) 44862306a36Sopenharmony_ci#define MPI3_MAN9_MIN_ENCLOSURE_PHYS (0) 44962306a36Sopenharmony_ci#define MPI3_MAN9_MIN_EXPANDERS (0) 45062306a36Sopenharmony_ci#define MPI3_MAN9_MAX_EXPANDERS (65535) 45162306a36Sopenharmony_ci#define MPI3_MAN9_MIN_PCIE_SWITCHES (0) 45262306a36Sopenharmony_ci#define MPI3_MAN9_MIN_HOST_PD_DRIVES (0) 45362306a36Sopenharmony_ci#define MPI3_MAN9_ADV_HOST_PD_DRIVES (0) 45462306a36Sopenharmony_ci#define MPI3_MAN9_RAID_PD_DRIVES (0) 45562306a36Sopenharmony_ci#define MPI3_MAN9_DRIVER_DIAG_BUFFER (0) 45662306a36Sopenharmony_ci#define MPI3_MAN9_MIN_NAMESPACE_COUNT (1) 45762306a36Sopenharmony_ci#define MPI3_MAN9_MIN_EXPANDERS (0) 45862306a36Sopenharmony_ci#define MPI3_MAN9_MAX_EXPANDERS (65535) 45962306a36Sopenharmony_cistruct mpi3_man_page9 { 46062306a36Sopenharmony_ci struct mpi3_config_page_header header; 46162306a36Sopenharmony_ci u8 num_resources; 46262306a36Sopenharmony_ci u8 reserved09; 46362306a36Sopenharmony_ci __le16 reserved0a; 46462306a36Sopenharmony_ci __le32 reserved0c; 46562306a36Sopenharmony_ci __le32 reserved10; 46662306a36Sopenharmony_ci __le32 reserved14; 46762306a36Sopenharmony_ci __le32 reserved18; 46862306a36Sopenharmony_ci __le32 reserved1c; 46962306a36Sopenharmony_ci struct mpi3_man9_rsrc_entry resource[MPI3_MAN9_RSRC_NUM_RESOURCES]; 47062306a36Sopenharmony_ci}; 47162306a36Sopenharmony_ci 47262306a36Sopenharmony_ci#define MPI3_MAN9_PAGEVERSION (0x00) 47362306a36Sopenharmony_cistruct mpi3_man10_istwi_ctrlr_entry { 47462306a36Sopenharmony_ci __le16 target_address; 47562306a36Sopenharmony_ci __le16 flags; 47662306a36Sopenharmony_ci u8 scl_low_override; 47762306a36Sopenharmony_ci u8 scl_high_override; 47862306a36Sopenharmony_ci __le16 reserved06; 47962306a36Sopenharmony_ci}; 48062306a36Sopenharmony_ci 48162306a36Sopenharmony_ci#define MPI3_MAN10_ISTWI_CTRLR_FLAGS_BUS_SPEED_MASK (0x000c) 48262306a36Sopenharmony_ci#define MPI3_MAN10_ISTWI_CTRLR_FLAGS_BUS_SPEED_100K (0x0000) 48362306a36Sopenharmony_ci#define MPI3_MAN10_ISTWI_CTRLR_FLAGS_BUS_SPEED_400K (0x0004) 48462306a36Sopenharmony_ci#define MPI3_MAN10_ISTWI_CTRLR_FLAGS_TARGET_ENABLED (0x0002) 48562306a36Sopenharmony_ci#define MPI3_MAN10_ISTWI_CTRLR_FLAGS_INITIATOR_ENABLED (0x0001) 48662306a36Sopenharmony_ci#ifndef MPI3_MAN10_ISTWI_CTRLR_MAX 48762306a36Sopenharmony_ci#define MPI3_MAN10_ISTWI_CTRLR_MAX (1) 48862306a36Sopenharmony_ci#endif 48962306a36Sopenharmony_cistruct mpi3_man_page10 { 49062306a36Sopenharmony_ci struct mpi3_config_page_header header; 49162306a36Sopenharmony_ci __le32 reserved08; 49262306a36Sopenharmony_ci u8 num_istwi_ctrl; 49362306a36Sopenharmony_ci u8 reserved0d[3]; 49462306a36Sopenharmony_ci struct mpi3_man10_istwi_ctrlr_entry istwi_controller[MPI3_MAN10_ISTWI_CTRLR_MAX]; 49562306a36Sopenharmony_ci}; 49662306a36Sopenharmony_ci 49762306a36Sopenharmony_ci#define MPI3_MAN10_PAGEVERSION (0x00) 49862306a36Sopenharmony_cistruct mpi3_man11_mux_device_format { 49962306a36Sopenharmony_ci u8 max_channel; 50062306a36Sopenharmony_ci u8 reserved01[3]; 50162306a36Sopenharmony_ci __le32 reserved04; 50262306a36Sopenharmony_ci}; 50362306a36Sopenharmony_ci 50462306a36Sopenharmony_cistruct mpi3_man11_temp_sensor_device_format { 50562306a36Sopenharmony_ci u8 type; 50662306a36Sopenharmony_ci u8 reserved01[3]; 50762306a36Sopenharmony_ci u8 temp_channel[4]; 50862306a36Sopenharmony_ci}; 50962306a36Sopenharmony_ci 51062306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_TYPE_MAX6654 (0x00) 51162306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_TYPE_EMC1442 (0x01) 51262306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_TYPE_ADT7476 (0x02) 51362306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_TYPE_SE97B (0x03) 51462306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_CHANNEL_LOCATION_MASK (0xe0) 51562306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_CHANNEL_LOCATION_SHIFT (5) 51662306a36Sopenharmony_ci#define MPI3_MAN11_TEMP_SENSOR_CHANNEL_ENABLED (0x01) 51762306a36Sopenharmony_cistruct mpi3_man11_seeprom_device_format { 51862306a36Sopenharmony_ci u8 size; 51962306a36Sopenharmony_ci u8 page_write_size; 52062306a36Sopenharmony_ci __le16 reserved02; 52162306a36Sopenharmony_ci __le32 reserved04; 52262306a36Sopenharmony_ci}; 52362306a36Sopenharmony_ci 52462306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_1KBITS (0x01) 52562306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_2KBITS (0x02) 52662306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_4KBITS (0x03) 52762306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_8KBITS (0x04) 52862306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_16KBITS (0x05) 52962306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_32KBITS (0x06) 53062306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_64KBITS (0x07) 53162306a36Sopenharmony_ci#define MPI3_MAN11_SEEPROM_SIZE_128KBITS (0x08) 53262306a36Sopenharmony_cistruct mpi3_man11_ddr_spd_device_format { 53362306a36Sopenharmony_ci u8 channel; 53462306a36Sopenharmony_ci u8 reserved01[3]; 53562306a36Sopenharmony_ci __le32 reserved04; 53662306a36Sopenharmony_ci}; 53762306a36Sopenharmony_ci 53862306a36Sopenharmony_cistruct mpi3_man11_cable_mgmt_device_format { 53962306a36Sopenharmony_ci u8 type; 54062306a36Sopenharmony_ci u8 receptacle_id; 54162306a36Sopenharmony_ci __le16 reserved02; 54262306a36Sopenharmony_ci __le32 reserved04; 54362306a36Sopenharmony_ci}; 54462306a36Sopenharmony_ci 54562306a36Sopenharmony_ci#define MPI3_MAN11_CABLE_MGMT_TYPE_SFF_8636 (0x00) 54662306a36Sopenharmony_cistruct mpi3_man11_bkplane_spec_ubm_format { 54762306a36Sopenharmony_ci __le16 flags; 54862306a36Sopenharmony_ci __le16 reserved02; 54962306a36Sopenharmony_ci}; 55062306a36Sopenharmony_ci 55162306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_UBM_FLAGS_REFCLK_POLICY_ALWAYS_ENABLED (0x0200) 55262306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_UBM_FLAGS_FORCE_POLLING (0x0100) 55362306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_UBM_FLAGS_MAX_FRU_MASK (0x00f0) 55462306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_UBM_FLAGS_MAX_FRU_SHIFT (4) 55562306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_UBM_FLAGS_POLL_INTERVAL_MASK (0x000f) 55662306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_UBM_FLAGS_POLL_INTERVAL_SHIFT (0) 55762306a36Sopenharmony_cistruct mpi3_man11_bkplane_spec_non_ubm_format { 55862306a36Sopenharmony_ci __le16 flags; 55962306a36Sopenharmony_ci u8 reserved02; 56062306a36Sopenharmony_ci u8 type; 56162306a36Sopenharmony_ci}; 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_GROUP_MASK (0xf000) 56462306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_GROUP_SHIFT (12) 56562306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_REFCLK_POLICY_ALWAYS_ENABLED (0x0200) 56662306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_LINKWIDTH_MASK (0x00c0) 56762306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_LINKWIDTH_4 (0x0000) 56862306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_LINKWIDTH_2 (0x0040) 56962306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_LINKWIDTH_1 (0x0080) 57062306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_PRESENCE_DETECT_MASK (0x0030) 57162306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_PRESENCE_DETECT_GPIO (0x0000) 57262306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_PRESENCE_DETECT_REG (0x0010) 57362306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_POLL_INTERVAL_MASK (0x000f) 57462306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_FLAGS_POLL_INTERVAL_SHIFT (0) 57562306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_NON_UBM_TYPE_VPP (0x00) 57662306a36Sopenharmony_ciunion mpi3_man11_bkplane_spec_format { 57762306a36Sopenharmony_ci struct mpi3_man11_bkplane_spec_ubm_format ubm; 57862306a36Sopenharmony_ci struct mpi3_man11_bkplane_spec_non_ubm_format non_ubm; 57962306a36Sopenharmony_ci}; 58062306a36Sopenharmony_ci 58162306a36Sopenharmony_cistruct mpi3_man11_bkplane_mgmt_device_format { 58262306a36Sopenharmony_ci u8 type; 58362306a36Sopenharmony_ci u8 receptacle_id; 58462306a36Sopenharmony_ci u8 reset_info; 58562306a36Sopenharmony_ci u8 reserved03; 58662306a36Sopenharmony_ci union mpi3_man11_bkplane_spec_format backplane_mgmt_specific; 58762306a36Sopenharmony_ci}; 58862306a36Sopenharmony_ci 58962306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_MGMT_TYPE_UBM (0x00) 59062306a36Sopenharmony_ci#define MPI3_MAN11_BKPLANE_MGMT_TYPE_NON_UBM (0x01) 59162306a36Sopenharmony_ci#define MPI3_MAN11_BACKPLANE_RESETINFO_ASSERT_TIME_MASK (0xf0) 59262306a36Sopenharmony_ci#define MPI3_MAN11_BACKPLANE_RESETINFO_ASSERT_TIME_SHIFT (4) 59362306a36Sopenharmony_ci#define MPI3_MAN11_BACKPLANE_RESETINFO_READY_TIME_MASK (0x0f) 59462306a36Sopenharmony_ci#define MPI3_MAN11_BACKPLANE_RESETINFO_READY_TIME_SHIFT (0) 59562306a36Sopenharmony_cistruct mpi3_man11_gas_gauge_device_format { 59662306a36Sopenharmony_ci u8 type; 59762306a36Sopenharmony_ci u8 reserved01[3]; 59862306a36Sopenharmony_ci __le32 reserved04; 59962306a36Sopenharmony_ci}; 60062306a36Sopenharmony_ci 60162306a36Sopenharmony_ci#define MPI3_MAN11_GAS_GAUGE_TYPE_STANDARD (0x00) 60262306a36Sopenharmony_cistruct mpi3_man11_mgmt_ctrlr_device_format { 60362306a36Sopenharmony_ci __le32 reserved00; 60462306a36Sopenharmony_ci __le32 reserved04; 60562306a36Sopenharmony_ci}; 60662306a36Sopenharmony_cistruct mpi3_man11_board_fan_device_format { 60762306a36Sopenharmony_ci u8 flags; 60862306a36Sopenharmony_ci u8 reserved01; 60962306a36Sopenharmony_ci u8 min_fan_speed; 61062306a36Sopenharmony_ci u8 max_fan_speed; 61162306a36Sopenharmony_ci __le32 reserved04; 61262306a36Sopenharmony_ci}; 61362306a36Sopenharmony_ci#define MPI3_MAN11_BOARD_FAN_FLAGS_FAN_CTRLR_TYPE_MASK (0x07) 61462306a36Sopenharmony_ci#define MPI3_MAN11_BOARD_FAN_FLAGS_FAN_CTRLR_TYPE_AMC6821 (0x00) 61562306a36Sopenharmony_ciunion mpi3_man11_device_specific_format { 61662306a36Sopenharmony_ci struct mpi3_man11_mux_device_format mux; 61762306a36Sopenharmony_ci struct mpi3_man11_temp_sensor_device_format temp_sensor; 61862306a36Sopenharmony_ci struct mpi3_man11_seeprom_device_format seeprom; 61962306a36Sopenharmony_ci struct mpi3_man11_ddr_spd_device_format ddr_spd; 62062306a36Sopenharmony_ci struct mpi3_man11_cable_mgmt_device_format cable_mgmt; 62162306a36Sopenharmony_ci struct mpi3_man11_bkplane_mgmt_device_format bkplane_mgmt; 62262306a36Sopenharmony_ci struct mpi3_man11_gas_gauge_device_format gas_gauge; 62362306a36Sopenharmony_ci struct mpi3_man11_mgmt_ctrlr_device_format mgmt_controller; 62462306a36Sopenharmony_ci struct mpi3_man11_board_fan_device_format board_fan; 62562306a36Sopenharmony_ci __le32 words[2]; 62662306a36Sopenharmony_ci}; 62762306a36Sopenharmony_cistruct mpi3_man11_istwi_device_format { 62862306a36Sopenharmony_ci u8 device_type; 62962306a36Sopenharmony_ci u8 controller; 63062306a36Sopenharmony_ci u8 reserved02; 63162306a36Sopenharmony_ci u8 flags; 63262306a36Sopenharmony_ci __le16 device_address; 63362306a36Sopenharmony_ci u8 mux_channel; 63462306a36Sopenharmony_ci u8 mux_index; 63562306a36Sopenharmony_ci union mpi3_man11_device_specific_format device_specific; 63662306a36Sopenharmony_ci}; 63762306a36Sopenharmony_ci 63862306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_MUX (0x00) 63962306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_TEMP_SENSOR (0x01) 64062306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_SEEPROM (0x02) 64162306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_DDR_SPD (0x03) 64262306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_CABLE_MGMT (0x04) 64362306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_BACKPLANE_MGMT (0x05) 64462306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_GAS_GAUGE (0x06) 64562306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_MGMT_CONTROLLER (0x07) 64662306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVTYPE_BOARD_FAN (0x08) 64762306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_FLAGS_MUX_PRESENT (0x01) 64862306a36Sopenharmony_ci#ifndef MPI3_MAN11_ISTWI_DEVICE_MAX 64962306a36Sopenharmony_ci#define MPI3_MAN11_ISTWI_DEVICE_MAX (1) 65062306a36Sopenharmony_ci#endif 65162306a36Sopenharmony_cistruct mpi3_man_page11 { 65262306a36Sopenharmony_ci struct mpi3_config_page_header header; 65362306a36Sopenharmony_ci __le32 reserved08; 65462306a36Sopenharmony_ci u8 num_istwi_dev; 65562306a36Sopenharmony_ci u8 reserved0d[3]; 65662306a36Sopenharmony_ci struct mpi3_man11_istwi_device_format istwi_device[MPI3_MAN11_ISTWI_DEVICE_MAX]; 65762306a36Sopenharmony_ci}; 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_ci#define MPI3_MAN11_PAGEVERSION (0x00) 66062306a36Sopenharmony_ci#ifndef MPI3_MAN12_NUM_SGPIO_MAX 66162306a36Sopenharmony_ci#define MPI3_MAN12_NUM_SGPIO_MAX (1) 66262306a36Sopenharmony_ci#endif 66362306a36Sopenharmony_cistruct mpi3_man12_sgpio_info { 66462306a36Sopenharmony_ci u8 slot_count; 66562306a36Sopenharmony_ci u8 reserved01[3]; 66662306a36Sopenharmony_ci __le32 reserved04; 66762306a36Sopenharmony_ci u8 phy_order[32]; 66862306a36Sopenharmony_ci}; 66962306a36Sopenharmony_ci 67062306a36Sopenharmony_cistruct mpi3_man_page12 { 67162306a36Sopenharmony_ci struct mpi3_config_page_header header; 67262306a36Sopenharmony_ci __le32 flags; 67362306a36Sopenharmony_ci __le32 s_clock_freq; 67462306a36Sopenharmony_ci __le32 activity_modulation; 67562306a36Sopenharmony_ci u8 num_sgpio; 67662306a36Sopenharmony_ci u8 reserved15[3]; 67762306a36Sopenharmony_ci __le32 reserved18; 67862306a36Sopenharmony_ci __le32 reserved1c; 67962306a36Sopenharmony_ci __le32 pattern[8]; 68062306a36Sopenharmony_ci struct mpi3_man12_sgpio_info sgpio_info[MPI3_MAN12_NUM_SGPIO_MAX]; 68162306a36Sopenharmony_ci}; 68262306a36Sopenharmony_ci 68362306a36Sopenharmony_ci#define MPI3_MAN12_PAGEVERSION (0x00) 68462306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_ERROR_PRESENCE_ENABLED (0x0400) 68562306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_ACTIVITY_INVERT_ENABLED (0x0200) 68662306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_GROUP_ID_DISABLED (0x0100) 68762306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SIO_CLK_FILTER_ENABLED (0x0004) 68862306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SCLOCK_SLOAD_TYPE_MASK (0x0002) 68962306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SCLOCK_SLOAD_TYPE_PUSH_PULL (0x0000) 69062306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SCLOCK_SLOAD_TYPE_OPEN_DRAIN (0x0002) 69162306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SDATAOUT_TYPE_MASK (0x0001) 69262306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SDATAOUT_TYPE_PUSH_PULL (0x0000) 69362306a36Sopenharmony_ci#define MPI3_MAN12_FLAGS_SDATAOUT_TYPE_OPEN_DRAIN (0x0001) 69462306a36Sopenharmony_ci#define MPI3_MAN12_SIO_CLK_FREQ_MIN (32) 69562306a36Sopenharmony_ci#define MPI3_MAN12_SIO_CLK_FREQ_MAX (100000) 69662306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_FORCE_OFF_MASK (0x0000f000) 69762306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_FORCE_OFF_SHIFT (12) 69862306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_MAX_ON_MASK (0x00000f00) 69962306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_MAX_ON_SHIFT (8) 70062306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_STRETCH_OFF_MASK (0x000000f0) 70162306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_STRETCH_OFF_SHIFT (4) 70262306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_STRETCH_ON_MASK (0x0000000f) 70362306a36Sopenharmony_ci#define MPI3_MAN12_ACTIVITY_MODULATION_STRETCH_ON_SHIFT (0) 70462306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_MASK (0xe0000000) 70562306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_2_HZ (0x00000000) 70662306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_4_HZ (0x20000000) 70762306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_8_HZ (0x40000000) 70862306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_16_HZ (0x60000000) 70962306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_10_HZ (0x80000000) 71062306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_20_HZ (0xa0000000) 71162306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_RATE_40_HZ (0xc0000000) 71262306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_LENGTH_MASK (0x1f000000) 71362306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_LENGTH_SHIFT (24) 71462306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_BIT_PATTERN_MASK (0x00ffffff) 71562306a36Sopenharmony_ci#define MPI3_MAN12_PATTERN_BIT_PATTERN_SHIFT (0) 71662306a36Sopenharmony_ci#ifndef MPI3_MAN13_NUM_TRANSLATION_MAX 71762306a36Sopenharmony_ci#define MPI3_MAN13_NUM_TRANSLATION_MAX (1) 71862306a36Sopenharmony_ci#endif 71962306a36Sopenharmony_cistruct mpi3_man13_translation_info { 72062306a36Sopenharmony_ci __le32 slot_status; 72162306a36Sopenharmony_ci __le32 mask; 72262306a36Sopenharmony_ci u8 activity; 72362306a36Sopenharmony_ci u8 locate; 72462306a36Sopenharmony_ci u8 error; 72562306a36Sopenharmony_ci u8 reserved0b; 72662306a36Sopenharmony_ci}; 72762306a36Sopenharmony_ci 72862306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_FAULT (0x20000000) 72962306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_DEVICE_OFF (0x10000000) 73062306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_DEVICE_ACTIVITY (0x00800000) 73162306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_DO_NOT_REMOVE (0x00400000) 73262306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_DEVICE_MISSING (0x00100000) 73362306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_INSERT (0x00080000) 73462306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_REMOVAL (0x00040000) 73562306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_IDENTIFY (0x00020000) 73662306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_OK (0x00008000) 73762306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_RESERVED_DEVICE (0x00004000) 73862306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_HOT_SPARE (0x00002000) 73962306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_CONSISTENCY_CHECK (0x00001000) 74062306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000800) 74162306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_IN_FAILED_ARRAY (0x00000400) 74262306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_REBUILD_REMAP (0x00000200) 74362306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_REBUILD_REMAP_ABORT (0x00000100) 74462306a36Sopenharmony_ci#define MPI3_MAN13_TRANSLATION_SLOTSTATUS_PREDICTED_FAILURE (0x00000040) 74562306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_FORCE_OFF (0x00) 74662306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_FORCE_ON (0x01) 74762306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_0 (0x02) 74862306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_1 (0x03) 74962306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_2 (0x04) 75062306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_3 (0x05) 75162306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_4 (0x06) 75262306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_5 (0x07) 75362306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_6 (0x08) 75462306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_PATTERN_7 (0x09) 75562306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_ACTIVITY (0x0a) 75662306a36Sopenharmony_ci#define MPI3_MAN13_BLINK_PATTERN_ACTIVITY_TRAIL (0x0b) 75762306a36Sopenharmony_cistruct mpi3_man_page13 { 75862306a36Sopenharmony_ci struct mpi3_config_page_header header; 75962306a36Sopenharmony_ci u8 num_trans; 76062306a36Sopenharmony_ci u8 reserved09[3]; 76162306a36Sopenharmony_ci __le32 reserved0c; 76262306a36Sopenharmony_ci struct mpi3_man13_translation_info translation[MPI3_MAN13_NUM_TRANSLATION_MAX]; 76362306a36Sopenharmony_ci}; 76462306a36Sopenharmony_ci 76562306a36Sopenharmony_ci#define MPI3_MAN13_PAGEVERSION (0x00) 76662306a36Sopenharmony_cistruct mpi3_man_page14 { 76762306a36Sopenharmony_ci struct mpi3_config_page_header header; 76862306a36Sopenharmony_ci __le32 reserved08; 76962306a36Sopenharmony_ci u8 num_slot_groups; 77062306a36Sopenharmony_ci u8 num_slots; 77162306a36Sopenharmony_ci __le16 max_cert_chain_length; 77262306a36Sopenharmony_ci __le32 sealed_slots; 77362306a36Sopenharmony_ci __le32 populated_slots; 77462306a36Sopenharmony_ci __le32 mgmt_pt_updatable_slots; 77562306a36Sopenharmony_ci}; 77662306a36Sopenharmony_ci#define MPI3_MAN14_PAGEVERSION (0x00) 77762306a36Sopenharmony_ci#define MPI3_MAN14_NUMSLOTS_MAX (32) 77862306a36Sopenharmony_ci#ifndef MPI3_MAN15_VERSION_RECORD_MAX 77962306a36Sopenharmony_ci#define MPI3_MAN15_VERSION_RECORD_MAX 1 78062306a36Sopenharmony_ci#endif 78162306a36Sopenharmony_cistruct mpi3_man15_version_record { 78262306a36Sopenharmony_ci __le16 spdm_version; 78362306a36Sopenharmony_ci __le16 reserved02; 78462306a36Sopenharmony_ci}; 78562306a36Sopenharmony_ci 78662306a36Sopenharmony_cistruct mpi3_man_page15 { 78762306a36Sopenharmony_ci struct mpi3_config_page_header header; 78862306a36Sopenharmony_ci u8 num_version_records; 78962306a36Sopenharmony_ci u8 reserved09[3]; 79062306a36Sopenharmony_ci __le32 reserved0c; 79162306a36Sopenharmony_ci struct mpi3_man15_version_record version_record[MPI3_MAN15_VERSION_RECORD_MAX]; 79262306a36Sopenharmony_ci}; 79362306a36Sopenharmony_ci 79462306a36Sopenharmony_ci#define MPI3_MAN15_PAGEVERSION (0x00) 79562306a36Sopenharmony_ci#ifndef MPI3_MAN16_CERT_ALGO_MAX 79662306a36Sopenharmony_ci#define MPI3_MAN16_CERT_ALGO_MAX 1 79762306a36Sopenharmony_ci#endif 79862306a36Sopenharmony_cistruct mpi3_man16_certificate_algorithm { 79962306a36Sopenharmony_ci u8 slot_group; 80062306a36Sopenharmony_ci u8 reserved01[3]; 80162306a36Sopenharmony_ci __le32 base_asym_algo; 80262306a36Sopenharmony_ci __le32 base_hash_algo; 80362306a36Sopenharmony_ci __le32 reserved0c[3]; 80462306a36Sopenharmony_ci}; 80562306a36Sopenharmony_ci 80662306a36Sopenharmony_cistruct mpi3_man_page16 { 80762306a36Sopenharmony_ci struct mpi3_config_page_header header; 80862306a36Sopenharmony_ci __le32 reserved08; 80962306a36Sopenharmony_ci u8 num_cert_algos; 81062306a36Sopenharmony_ci u8 reserved0d[3]; 81162306a36Sopenharmony_ci struct mpi3_man16_certificate_algorithm certificate_algorithm[MPI3_MAN16_CERT_ALGO_MAX]; 81262306a36Sopenharmony_ci}; 81362306a36Sopenharmony_ci 81462306a36Sopenharmony_ci#define MPI3_MAN16_PAGEVERSION (0x00) 81562306a36Sopenharmony_ci#ifndef MPI3_MAN17_HASH_ALGORITHM_MAX 81662306a36Sopenharmony_ci#define MPI3_MAN17_HASH_ALGORITHM_MAX 1 81762306a36Sopenharmony_ci#endif 81862306a36Sopenharmony_cistruct mpi3_man17_hash_algorithm { 81962306a36Sopenharmony_ci u8 meas_specification; 82062306a36Sopenharmony_ci u8 reserved01[3]; 82162306a36Sopenharmony_ci __le32 measurement_hash_algo; 82262306a36Sopenharmony_ci __le32 reserved08[2]; 82362306a36Sopenharmony_ci}; 82462306a36Sopenharmony_ci 82562306a36Sopenharmony_cistruct mpi3_man_page17 { 82662306a36Sopenharmony_ci struct mpi3_config_page_header header; 82762306a36Sopenharmony_ci __le32 reserved08; 82862306a36Sopenharmony_ci u8 num_hash_algos; 82962306a36Sopenharmony_ci u8 reserved0d[3]; 83062306a36Sopenharmony_ci struct mpi3_man17_hash_algorithm hash_algorithm[MPI3_MAN17_HASH_ALGORITHM_MAX]; 83162306a36Sopenharmony_ci}; 83262306a36Sopenharmony_ci 83362306a36Sopenharmony_ci#define MPI3_MAN17_PAGEVERSION (0x00) 83462306a36Sopenharmony_cistruct mpi3_man_page20 { 83562306a36Sopenharmony_ci struct mpi3_config_page_header header; 83662306a36Sopenharmony_ci __le32 reserved08; 83762306a36Sopenharmony_ci __le32 nonpremium_features; 83862306a36Sopenharmony_ci u8 allowed_personalities; 83962306a36Sopenharmony_ci u8 reserved11[3]; 84062306a36Sopenharmony_ci}; 84162306a36Sopenharmony_ci 84262306a36Sopenharmony_ci#define MPI3_MAN20_PAGEVERSION (0x00) 84362306a36Sopenharmony_ci#define MPI3_MAN20_ALLOWEDPERSON_RAID_MASK (0x02) 84462306a36Sopenharmony_ci#define MPI3_MAN20_ALLOWEDPERSON_RAID_ALLOWED (0x02) 84562306a36Sopenharmony_ci#define MPI3_MAN20_ALLOWEDPERSON_RAID_NOT_ALLOWED (0x00) 84662306a36Sopenharmony_ci#define MPI3_MAN20_ALLOWEDPERSON_EHBA_MASK (0x01) 84762306a36Sopenharmony_ci#define MPI3_MAN20_ALLOWEDPERSON_EHBA_ALLOWED (0x01) 84862306a36Sopenharmony_ci#define MPI3_MAN20_ALLOWEDPERSON_EHBA_NOT_ALLOWED (0x00) 84962306a36Sopenharmony_ci#define MPI3_MAN20_NONPREMUIM_DISABLE_PD_DEGRADED_MASK (0x01) 85062306a36Sopenharmony_ci#define MPI3_MAN20_NONPREMUIM_DISABLE_PD_DEGRADED_ENABLED (0x00) 85162306a36Sopenharmony_ci#define MPI3_MAN20_NONPREMUIM_DISABLE_PD_DEGRADED_DISABLED (0x01) 85262306a36Sopenharmony_cistruct mpi3_man_page21 { 85362306a36Sopenharmony_ci struct mpi3_config_page_header header; 85462306a36Sopenharmony_ci __le32 reserved08; 85562306a36Sopenharmony_ci __le32 flags; 85662306a36Sopenharmony_ci}; 85762306a36Sopenharmony_ci 85862306a36Sopenharmony_ci#define MPI3_MAN21_PAGEVERSION (0x00) 85962306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_UNCERTIFIED_DRIVES_MASK (0x00000060) 86062306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_UNCERTIFIED_DRIVES_BLOCK (0x00000000) 86162306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_UNCERTIFIED_DRIVES_ALLOW (0x00000020) 86262306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_UNCERTIFIED_DRIVES_WARN (0x00000040) 86362306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_BLOCK_SSD_WR_CACHE_CHANGE_MASK (0x00000008) 86462306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_BLOCK_SSD_WR_CACHE_CHANGE_ALLOW (0x00000000) 86562306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_BLOCK_SSD_WR_CACHE_CHANGE_PREVENT (0x00000008) 86662306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_SES_VPD_ASSOC_MASK (0x00000001) 86762306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_SES_VPD_ASSOC_DEFAULT (0x00000000) 86862306a36Sopenharmony_ci#define MPI3_MAN21_FLAGS_SES_VPD_ASSOC_OEM_SPECIFIC (0x00000001) 86962306a36Sopenharmony_ci#ifndef MPI3_MAN_PROD_SPECIFIC_MAX 87062306a36Sopenharmony_ci#define MPI3_MAN_PROD_SPECIFIC_MAX (1) 87162306a36Sopenharmony_ci#endif 87262306a36Sopenharmony_cistruct mpi3_man_page_product_specific { 87362306a36Sopenharmony_ci struct mpi3_config_page_header header; 87462306a36Sopenharmony_ci __le32 product_specific_info[MPI3_MAN_PROD_SPECIFIC_MAX]; 87562306a36Sopenharmony_ci}; 87662306a36Sopenharmony_ci 87762306a36Sopenharmony_cistruct mpi3_io_unit_page0 { 87862306a36Sopenharmony_ci struct mpi3_config_page_header header; 87962306a36Sopenharmony_ci __le64 unique_value; 88062306a36Sopenharmony_ci __le32 nvdata_version_default; 88162306a36Sopenharmony_ci __le32 nvdata_version_persistent; 88262306a36Sopenharmony_ci}; 88362306a36Sopenharmony_ci 88462306a36Sopenharmony_ci#define MPI3_IOUNIT0_PAGEVERSION (0x00) 88562306a36Sopenharmony_cistruct mpi3_io_unit_page1 { 88662306a36Sopenharmony_ci struct mpi3_config_page_header header; 88762306a36Sopenharmony_ci __le32 flags; 88862306a36Sopenharmony_ci u8 dmd_io_delay; 88962306a36Sopenharmony_ci u8 dmd_report_pcie; 89062306a36Sopenharmony_ci u8 dmd_report_sata; 89162306a36Sopenharmony_ci u8 dmd_report_sas; 89262306a36Sopenharmony_ci}; 89362306a36Sopenharmony_ci 89462306a36Sopenharmony_ci#define MPI3_IOUNIT1_PAGEVERSION (0x00) 89562306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_NVME_WRITE_CACHE_MASK (0x00000030) 89662306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_NVME_WRITE_CACHE_ENABLE (0x00000000) 89762306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_NVME_WRITE_CACHE_DISABLE (0x00000010) 89862306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_NVME_WRITE_CACHE_NO_MODIFY (0x00000020) 89962306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_ATA_SECURITY_FREEZE_LOCK (0x00000008) 90062306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_WRITE_SAME_BUFFER (0x00000004) 90162306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_SATA_WRITE_CACHE_MASK (0x00000003) 90262306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_SATA_WRITE_CACHE_ENABLE (0x00000000) 90362306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_SATA_WRITE_CACHE_DISABLE (0x00000001) 90462306a36Sopenharmony_ci#define MPI3_IOUNIT1_FLAGS_SATA_WRITE_CACHE_UNCHANGED (0x00000002) 90562306a36Sopenharmony_ci#define MPI3_IOUNIT1_DMD_REPORT_DELAY_TIME_MASK (0x7f) 90662306a36Sopenharmony_ci#define MPI3_IOUNIT1_DMD_REPORT_UNIT_16_SEC (0x80) 90762306a36Sopenharmony_ci#ifndef MPI3_IO_UNIT2_GPIO_VAL_MAX 90862306a36Sopenharmony_ci#define MPI3_IO_UNIT2_GPIO_VAL_MAX (1) 90962306a36Sopenharmony_ci#endif 91062306a36Sopenharmony_cistruct mpi3_io_unit_page2 { 91162306a36Sopenharmony_ci struct mpi3_config_page_header header; 91262306a36Sopenharmony_ci u8 gpio_count; 91362306a36Sopenharmony_ci u8 reserved09[3]; 91462306a36Sopenharmony_ci __le16 gpio_val[MPI3_IO_UNIT2_GPIO_VAL_MAX]; 91562306a36Sopenharmony_ci}; 91662306a36Sopenharmony_ci 91762306a36Sopenharmony_ci#define MPI3_IOUNIT2_PAGEVERSION (0x00) 91862306a36Sopenharmony_ci#define MPI3_IOUNIT2_GPIO_FUNCTION_MASK (0xfffc) 91962306a36Sopenharmony_ci#define MPI3_IOUNIT2_GPIO_FUNCTION_SHIFT (2) 92062306a36Sopenharmony_ci#define MPI3_IOUNIT2_GPIO_SETTING_MASK (0x0001) 92162306a36Sopenharmony_ci#define MPI3_IOUNIT2_GPIO_SETTING_OFF (0x0000) 92262306a36Sopenharmony_ci#define MPI3_IOUNIT2_GPIO_SETTING_ON (0x0001) 92362306a36Sopenharmony_cistruct mpi3_io_unit3_sensor { 92462306a36Sopenharmony_ci __le16 flags; 92562306a36Sopenharmony_ci u8 threshold_margin; 92662306a36Sopenharmony_ci u8 reserved03; 92762306a36Sopenharmony_ci __le16 threshold[3]; 92862306a36Sopenharmony_ci __le16 reserved0a; 92962306a36Sopenharmony_ci __le32 reserved0c; 93062306a36Sopenharmony_ci __le32 reserved10; 93162306a36Sopenharmony_ci __le32 reserved14; 93262306a36Sopenharmony_ci}; 93362306a36Sopenharmony_ci 93462306a36Sopenharmony_ci#define MPI3_IOUNIT3_SENSOR_FLAGS_FATAL_EVENT_ENABLED (0x0010) 93562306a36Sopenharmony_ci#define MPI3_IOUNIT3_SENSOR_FLAGS_FATAL_ACTION_ENABLED (0x0008) 93662306a36Sopenharmony_ci#define MPI3_IOUNIT3_SENSOR_FLAGS_CRITICAL_EVENT_ENABLED (0x0004) 93762306a36Sopenharmony_ci#define MPI3_IOUNIT3_SENSOR_FLAGS_CRITICAL_ACTION_ENABLED (0x0002) 93862306a36Sopenharmony_ci#define MPI3_IOUNIT3_SENSOR_FLAGS_WARNING_EVENT_ENABLED (0x0001) 93962306a36Sopenharmony_ci#ifndef MPI3_IO_UNIT3_SENSOR_MAX 94062306a36Sopenharmony_ci#define MPI3_IO_UNIT3_SENSOR_MAX (1) 94162306a36Sopenharmony_ci#endif 94262306a36Sopenharmony_cistruct mpi3_io_unit_page3 { 94362306a36Sopenharmony_ci struct mpi3_config_page_header header; 94462306a36Sopenharmony_ci __le32 reserved08; 94562306a36Sopenharmony_ci u8 num_sensors; 94662306a36Sopenharmony_ci u8 nominal_poll_interval; 94762306a36Sopenharmony_ci u8 warning_poll_interval; 94862306a36Sopenharmony_ci u8 reserved0f; 94962306a36Sopenharmony_ci struct mpi3_io_unit3_sensor sensor[MPI3_IO_UNIT3_SENSOR_MAX]; 95062306a36Sopenharmony_ci}; 95162306a36Sopenharmony_ci 95262306a36Sopenharmony_ci#define MPI3_IOUNIT3_PAGEVERSION (0x00) 95362306a36Sopenharmony_cistruct mpi3_io_unit4_sensor { 95462306a36Sopenharmony_ci __le16 current_temperature; 95562306a36Sopenharmony_ci __le16 reserved02; 95662306a36Sopenharmony_ci u8 flags; 95762306a36Sopenharmony_ci u8 reserved05[3]; 95862306a36Sopenharmony_ci __le16 istwi_index; 95962306a36Sopenharmony_ci u8 channel; 96062306a36Sopenharmony_ci u8 reserved0b; 96162306a36Sopenharmony_ci __le32 reserved0c; 96262306a36Sopenharmony_ci}; 96362306a36Sopenharmony_ci 96462306a36Sopenharmony_ci#define MPI3_IOUNIT4_SENSOR_FLAGS_LOC_MASK (0xe0) 96562306a36Sopenharmony_ci#define MPI3_IOUNIT4_SENSOR_FLAGS_LOC_SHIFT (5) 96662306a36Sopenharmony_ci#define MPI3_IOUNIT4_SENSOR_FLAGS_TEMP_VALID (0x01) 96762306a36Sopenharmony_ci#define MPI3_IOUNIT4_SENSOR_ISTWI_INDEX_INTERNAL (0xffff) 96862306a36Sopenharmony_ci#define MPI3_IOUNIT4_SENSOR_CHANNEL_RESERVED (0xff) 96962306a36Sopenharmony_ci#ifndef MPI3_IO_UNIT4_SENSOR_MAX 97062306a36Sopenharmony_ci#define MPI3_IO_UNIT4_SENSOR_MAX (1) 97162306a36Sopenharmony_ci#endif 97262306a36Sopenharmony_cistruct mpi3_io_unit_page4 { 97362306a36Sopenharmony_ci struct mpi3_config_page_header header; 97462306a36Sopenharmony_ci __le32 reserved08; 97562306a36Sopenharmony_ci u8 num_sensors; 97662306a36Sopenharmony_ci u8 reserved0d[3]; 97762306a36Sopenharmony_ci struct mpi3_io_unit4_sensor sensor[MPI3_IO_UNIT4_SENSOR_MAX]; 97862306a36Sopenharmony_ci}; 97962306a36Sopenharmony_ci 98062306a36Sopenharmony_ci#define MPI3_IOUNIT4_PAGEVERSION (0x00) 98162306a36Sopenharmony_cistruct mpi3_io_unit5_spinup_group { 98262306a36Sopenharmony_ci u8 max_target_spinup; 98362306a36Sopenharmony_ci u8 spinup_delay; 98462306a36Sopenharmony_ci u8 spinup_flags; 98562306a36Sopenharmony_ci u8 reserved03; 98662306a36Sopenharmony_ci}; 98762306a36Sopenharmony_ci 98862306a36Sopenharmony_ci#define MPI3_IOUNIT5_SPINUP_FLAGS_DISABLE (0x01) 98962306a36Sopenharmony_ci#ifndef MPI3_IO_UNIT5_PHY_MAX 99062306a36Sopenharmony_ci#define MPI3_IO_UNIT5_PHY_MAX (4) 99162306a36Sopenharmony_ci#endif 99262306a36Sopenharmony_cistruct mpi3_io_unit_page5 { 99362306a36Sopenharmony_ci struct mpi3_config_page_header header; 99462306a36Sopenharmony_ci struct mpi3_io_unit5_spinup_group spinup_group_parameters[4]; 99562306a36Sopenharmony_ci __le32 reserved18; 99662306a36Sopenharmony_ci __le32 reserved1c; 99762306a36Sopenharmony_ci __le16 device_shutdown; 99862306a36Sopenharmony_ci __le16 reserved22; 99962306a36Sopenharmony_ci u8 pcie_device_wait_time; 100062306a36Sopenharmony_ci u8 sata_device_wait_time; 100162306a36Sopenharmony_ci u8 spinup_encl_drive_count; 100262306a36Sopenharmony_ci u8 spinup_encl_delay; 100362306a36Sopenharmony_ci u8 num_phys; 100462306a36Sopenharmony_ci u8 pe_initial_spinup_delay; 100562306a36Sopenharmony_ci u8 topology_stable_time; 100662306a36Sopenharmony_ci u8 flags; 100762306a36Sopenharmony_ci u8 phy[MPI3_IO_UNIT5_PHY_MAX]; 100862306a36Sopenharmony_ci}; 100962306a36Sopenharmony_ci 101062306a36Sopenharmony_ci#define MPI3_IOUNIT5_PAGEVERSION (0x00) 101162306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_NO_ACTION (0x00) 101262306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_DIRECT_ATTACHED (0x01) 101362306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_EXPANDER_ATTACHED (0x02) 101462306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SWITCH_ATTACHED (0x02) 101562306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_DIRECT_AND_EXPANDER (0x03) 101662306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_DIRECT_AND_SWITCH (0x03) 101762306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SATA_HDD_MASK (0x0300) 101862306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SATA_HDD_SHIFT (8) 101962306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_HDD_MASK (0x00c0) 102062306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_HDD_SHIFT (6) 102162306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_NVME_SSD_MASK (0x0030) 102262306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_NVME_SSD_SHIFT (4) 102362306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SATA_SSD_MASK (0x000c) 102462306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SATA_SSD_SHIFT (2) 102562306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_SSD_MASK (0x0003) 102662306a36Sopenharmony_ci#define MPI3_IOUNIT5_DEVICE_SHUTDOWN_SAS_SSD_SHIFT (0) 102762306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_SATAPUIS_MASK (0x0c) 102862306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_SATAPUIS_NOT_SUPPORTED (0x00) 102962306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_SATAPUIS_OS_CONTROLLED (0x04) 103062306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_SATAPUIS_APP_CONTROLLED (0x08) 103162306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_SATAPUIS_BLOCKED (0x0c) 103262306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_POWER_CAPABLE_SPINUP (0x02) 103362306a36Sopenharmony_ci#define MPI3_IOUNIT5_FLAGS_AUTO_PORT_ENABLE (0x01) 103462306a36Sopenharmony_ci#define MPI3_IOUNIT5_PHY_SPINUP_GROUP_MASK (0x03) 103562306a36Sopenharmony_cistruct mpi3_io_unit_page6 { 103662306a36Sopenharmony_ci struct mpi3_config_page_header header; 103762306a36Sopenharmony_ci __le32 board_power_requirement; 103862306a36Sopenharmony_ci __le32 pci_slot_power_allocation; 103962306a36Sopenharmony_ci u8 flags; 104062306a36Sopenharmony_ci u8 reserved11[3]; 104162306a36Sopenharmony_ci}; 104262306a36Sopenharmony_ci 104362306a36Sopenharmony_ci#define MPI3_IOUNIT6_PAGEVERSION (0x00) 104462306a36Sopenharmony_ci#define MPI3_IOUNIT6_FLAGS_ACT_CABLE_PWR_EXC (0x01) 104562306a36Sopenharmony_ci#ifndef MPI3_IOUNIT8_DIGEST_MAX 104662306a36Sopenharmony_ci#define MPI3_IOUNIT8_DIGEST_MAX (1) 104762306a36Sopenharmony_ci#endif 104862306a36Sopenharmony_ciunion mpi3_iounit8_digest { 104962306a36Sopenharmony_ci __le32 dword[16]; 105062306a36Sopenharmony_ci __le16 word[32]; 105162306a36Sopenharmony_ci u8 byte[64]; 105262306a36Sopenharmony_ci}; 105362306a36Sopenharmony_ci 105462306a36Sopenharmony_cistruct mpi3_io_unit_page8 { 105562306a36Sopenharmony_ci struct mpi3_config_page_header header; 105662306a36Sopenharmony_ci u8 sb_mode; 105762306a36Sopenharmony_ci u8 sb_state; 105862306a36Sopenharmony_ci __le16 reserved0a; 105962306a36Sopenharmony_ci u8 num_slots; 106062306a36Sopenharmony_ci u8 slots_available; 106162306a36Sopenharmony_ci u8 current_key_encryption_algo; 106262306a36Sopenharmony_ci u8 key_digest_hash_algo; 106362306a36Sopenharmony_ci union mpi3_version_union current_svn; 106462306a36Sopenharmony_ci __le32 reserved14; 106562306a36Sopenharmony_ci __le32 current_key[128]; 106662306a36Sopenharmony_ci union mpi3_iounit8_digest digest[MPI3_IOUNIT8_DIGEST_MAX]; 106762306a36Sopenharmony_ci}; 106862306a36Sopenharmony_ci 106962306a36Sopenharmony_ci#define MPI3_IOUNIT8_PAGEVERSION (0x00) 107062306a36Sopenharmony_ci#define MPI3_IOUNIT8_SBMODE_SECURE_DEBUG (0x04) 107162306a36Sopenharmony_ci#define MPI3_IOUNIT8_SBMODE_HARD_SECURE (0x02) 107262306a36Sopenharmony_ci#define MPI3_IOUNIT8_SBMODE_CONFIG_SECURE (0x01) 107362306a36Sopenharmony_ci#define MPI3_IOUNIT8_SBSTATE_SVN_UPDATE_PENDING (0x04) 107462306a36Sopenharmony_ci#define MPI3_IOUNIT8_SBSTATE_KEY_UPDATE_PENDING (0x02) 107562306a36Sopenharmony_ci#define MPI3_IOUNIT8_SBSTATE_SECURE_BOOT_ENABLED (0x01) 107662306a36Sopenharmony_cistruct mpi3_io_unit_page9 { 107762306a36Sopenharmony_ci struct mpi3_config_page_header header; 107862306a36Sopenharmony_ci __le32 flags; 107962306a36Sopenharmony_ci __le16 first_device; 108062306a36Sopenharmony_ci __le16 reserved0e; 108162306a36Sopenharmony_ci}; 108262306a36Sopenharmony_ci 108362306a36Sopenharmony_ci#define MPI3_IOUNIT9_PAGEVERSION (0x00) 108462306a36Sopenharmony_ci#define MPI3_IOUNIT9_FLAGS_UBM_ENCLOSURE_ORDER_MASK (0x00000006) 108562306a36Sopenharmony_ci#define MPI3_IOUNIT9_FLAGS_UBM_ENCLOSURE_ORDER_SHIFT (1) 108662306a36Sopenharmony_ci#define MPI3_IOUNIT9_FLAGS_UBM_ENCLOSURE_ORDER_NONE (0x00000000) 108762306a36Sopenharmony_ci#define MPI3_IOUNIT9_FLAGS_UBM_ENCLOSURE_ORDER_RECEPTACLE (0x00000002) 108862306a36Sopenharmony_ci#define MPI3_IOUNIT9_FLAGS_UBM_ENCLOSURE_ORDER_BACKPLANE_TYPE (0x00000004) 108962306a36Sopenharmony_ci#define MPI3_IOUNIT9_FLAGS_VDFIRST_ENABLED (0x00000001) 109062306a36Sopenharmony_ci#define MPI3_IOUNIT9_FIRSTDEVICE_UNKNOWN (0xffff) 109162306a36Sopenharmony_cistruct mpi3_io_unit_page10 { 109262306a36Sopenharmony_ci struct mpi3_config_page_header header; 109362306a36Sopenharmony_ci u8 flags; 109462306a36Sopenharmony_ci u8 reserved09[3]; 109562306a36Sopenharmony_ci __le32 silicon_id; 109662306a36Sopenharmony_ci u8 fw_version_minor; 109762306a36Sopenharmony_ci u8 fw_version_major; 109862306a36Sopenharmony_ci u8 hw_version_minor; 109962306a36Sopenharmony_ci u8 hw_version_major; 110062306a36Sopenharmony_ci u8 part_number[16]; 110162306a36Sopenharmony_ci}; 110262306a36Sopenharmony_ci#define MPI3_IOUNIT10_PAGEVERSION (0x00) 110362306a36Sopenharmony_ci#define MPI3_IOUNIT10_FLAGS_VALID (0x01) 110462306a36Sopenharmony_ci#define MPI3_IOUNIT10_FLAGS_ACTIVEID_MASK (0x02) 110562306a36Sopenharmony_ci#define MPI3_IOUNIT10_FLAGS_ACTIVEID_FIRST_REGION (0x00) 110662306a36Sopenharmony_ci#define MPI3_IOUNIT10_FLAGS_ACTIVEID_SECOND_REGION (0x02) 110762306a36Sopenharmony_ci#define MPI3_IOUNIT10_FLAGS_PBLP_EXPECTED (0x80) 110862306a36Sopenharmony_ci#ifndef MPI3_IOUNIT11_PROFILE_MAX 110962306a36Sopenharmony_ci#define MPI3_IOUNIT11_PROFILE_MAX (1) 111062306a36Sopenharmony_ci#endif 111162306a36Sopenharmony_cistruct mpi3_iounit11_profile { 111262306a36Sopenharmony_ci u8 profile_identifier; 111362306a36Sopenharmony_ci u8 reserved01[3]; 111462306a36Sopenharmony_ci __le16 max_vds; 111562306a36Sopenharmony_ci __le16 max_host_pds; 111662306a36Sopenharmony_ci __le16 max_adv_host_pds; 111762306a36Sopenharmony_ci __le16 max_raid_pds; 111862306a36Sopenharmony_ci __le16 max_nvme; 111962306a36Sopenharmony_ci __le16 max_outstanding_requests; 112062306a36Sopenharmony_ci __le16 subsystem_id; 112162306a36Sopenharmony_ci __le16 reserved12; 112262306a36Sopenharmony_ci __le32 reserved14[2]; 112362306a36Sopenharmony_ci}; 112462306a36Sopenharmony_cistruct mpi3_io_unit_page11 { 112562306a36Sopenharmony_ci struct mpi3_config_page_header header; 112662306a36Sopenharmony_ci __le32 reserved08; 112762306a36Sopenharmony_ci u8 num_profiles; 112862306a36Sopenharmony_ci u8 current_profile_identifier; 112962306a36Sopenharmony_ci __le16 reserved0e; 113062306a36Sopenharmony_ci struct mpi3_iounit11_profile profile[MPI3_IOUNIT11_PROFILE_MAX]; 113162306a36Sopenharmony_ci}; 113262306a36Sopenharmony_ci#define MPI3_IOUNIT11_PAGEVERSION (0x00) 113362306a36Sopenharmony_ci#ifndef MPI3_IOUNIT12_BUCKET_MAX 113462306a36Sopenharmony_ci#define MPI3_IOUNIT12_BUCKET_MAX (1) 113562306a36Sopenharmony_ci#endif 113662306a36Sopenharmony_cistruct mpi3_iounit12_bucket { 113762306a36Sopenharmony_ci u8 coalescing_depth; 113862306a36Sopenharmony_ci u8 coalescing_timeout; 113962306a36Sopenharmony_ci __le16 io_count_low_boundary; 114062306a36Sopenharmony_ci __le32 reserved04; 114162306a36Sopenharmony_ci}; 114262306a36Sopenharmony_cistruct mpi3_io_unit_page12 { 114362306a36Sopenharmony_ci struct mpi3_config_page_header header; 114462306a36Sopenharmony_ci __le32 flags; 114562306a36Sopenharmony_ci __le32 reserved0c[4]; 114662306a36Sopenharmony_ci u8 num_buckets; 114762306a36Sopenharmony_ci u8 reserved1d[3]; 114862306a36Sopenharmony_ci struct mpi3_iounit12_bucket bucket[MPI3_IOUNIT12_BUCKET_MAX]; 114962306a36Sopenharmony_ci}; 115062306a36Sopenharmony_ci#define MPI3_IOUNIT12_PAGEVERSION (0x00) 115162306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_NUMPASSES_MASK (0x00000300) 115262306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_NUMPASSES_SHIFT (8) 115362306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_NUMPASSES_8 (0x00000000) 115462306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_NUMPASSES_16 (0x00000100) 115562306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_NUMPASSES_32 (0x00000200) 115662306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_NUMPASSES_64 (0x00000300) 115762306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_PASSPERIOD_MASK (0x00000003) 115862306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_PASSPERIOD_DISABLED (0x00000000) 115962306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_PASSPERIOD_500US (0x00000001) 116062306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_PASSPERIOD_1MS (0x00000002) 116162306a36Sopenharmony_ci#define MPI3_IOUNIT12_FLAGS_PASSPERIOD_2MS (0x00000003) 116262306a36Sopenharmony_ci#ifndef MPI3_IOUNIT13_FUNC_MAX 116362306a36Sopenharmony_ci#define MPI3_IOUNIT13_FUNC_MAX (1) 116462306a36Sopenharmony_ci#endif 116562306a36Sopenharmony_cistruct mpi3_iounit13_allowed_function { 116662306a36Sopenharmony_ci __le16 sub_function; 116762306a36Sopenharmony_ci u8 function_code; 116862306a36Sopenharmony_ci u8 function_flags; 116962306a36Sopenharmony_ci}; 117062306a36Sopenharmony_ci#define MPI3_IOUNIT13_FUNCTION_FLAGS_ADMIN_BLOCKED (0x04) 117162306a36Sopenharmony_ci#define MPI3_IOUNIT13_FUNCTION_FLAGS_OOB_BLOCKED (0x02) 117262306a36Sopenharmony_ci#define MPI3_IOUNIT13_FUNCTION_FLAGS_CHECK_SUBFUNCTION_ENABLED (0x01) 117362306a36Sopenharmony_cistruct mpi3_io_unit_page13 { 117462306a36Sopenharmony_ci struct mpi3_config_page_header header; 117562306a36Sopenharmony_ci __le16 flags; 117662306a36Sopenharmony_ci __le16 reserved0a; 117762306a36Sopenharmony_ci u8 num_allowed_functions; 117862306a36Sopenharmony_ci u8 reserved0d[3]; 117962306a36Sopenharmony_ci struct mpi3_iounit13_allowed_function allowed_function[MPI3_IOUNIT13_FUNC_MAX]; 118062306a36Sopenharmony_ci}; 118162306a36Sopenharmony_ci#define MPI3_IOUNIT13_PAGEVERSION (0x00) 118262306a36Sopenharmony_ci#define MPI3_IOUNIT13_FLAGS_ADMIN_BLOCKED (0x0002) 118362306a36Sopenharmony_ci#define MPI3_IOUNIT13_FLAGS_OOB_BLOCKED (0x0001) 118462306a36Sopenharmony_ci#ifndef MPI3_IOUNIT14_MD_MAX 118562306a36Sopenharmony_ci#define MPI3_IOUNIT14_MD_MAX (1) 118662306a36Sopenharmony_ci#endif 118762306a36Sopenharmony_cistruct mpi3_iounit14_pagemetadata { 118862306a36Sopenharmony_ci u8 page_type; 118962306a36Sopenharmony_ci u8 page_number; 119062306a36Sopenharmony_ci u8 reserved02; 119162306a36Sopenharmony_ci u8 page_flags; 119262306a36Sopenharmony_ci}; 119362306a36Sopenharmony_ci#define MPI3_IOUNIT14_PAGEMETADATA_PAGEFLAGS_OOBWRITE_ALLOWED (0x02) 119462306a36Sopenharmony_ci#define MPI3_IOUNIT14_PAGEMETADATA_PAGEFLAGS_HOSTWRITE_ALLOWED (0x01) 119562306a36Sopenharmony_cistruct mpi3_io_unit_page14 { 119662306a36Sopenharmony_ci struct mpi3_config_page_header header; 119762306a36Sopenharmony_ci u8 flags; 119862306a36Sopenharmony_ci u8 reserved09[3]; 119962306a36Sopenharmony_ci u8 num_pages; 120062306a36Sopenharmony_ci u8 reserved0d[3]; 120162306a36Sopenharmony_ci struct mpi3_iounit14_pagemetadata page_metadata[MPI3_IOUNIT14_MD_MAX]; 120262306a36Sopenharmony_ci}; 120362306a36Sopenharmony_ci#define MPI3_IOUNIT14_PAGEVERSION (0x00) 120462306a36Sopenharmony_ci#define MPI3_IOUNIT14_FLAGS_READONLY (0x01) 120562306a36Sopenharmony_ci#ifndef MPI3_IOUNIT15_PBD_MAX 120662306a36Sopenharmony_ci#define MPI3_IOUNIT15_PBD_MAX (1) 120762306a36Sopenharmony_ci#endif 120862306a36Sopenharmony_cistruct mpi3_io_unit_page15 { 120962306a36Sopenharmony_ci struct mpi3_config_page_header header; 121062306a36Sopenharmony_ci u8 flags; 121162306a36Sopenharmony_ci u8 reserved09[3]; 121262306a36Sopenharmony_ci __le32 reserved0c; 121362306a36Sopenharmony_ci u8 power_budgeting_capability; 121462306a36Sopenharmony_ci u8 reserved11[3]; 121562306a36Sopenharmony_ci u8 num_power_budget_data; 121662306a36Sopenharmony_ci u8 reserved15[3]; 121762306a36Sopenharmony_ci __le32 power_budget_data[MPI3_IOUNIT15_PBD_MAX]; 121862306a36Sopenharmony_ci}; 121962306a36Sopenharmony_ci#define MPI3_IOUNIT15_PAGEVERSION (0x00) 122062306a36Sopenharmony_ci#define MPI3_IOUNIT15_FLAGS_EPRINIT_INITREQUIRED (0x04) 122162306a36Sopenharmony_ci#define MPI3_IOUNIT15_FLAGS_EPRSUPPORT_MASK (0x03) 122262306a36Sopenharmony_ci#define MPI3_IOUNIT15_FLAGS_EPRSUPPORT_NOT_SUPPORTED (0x00) 122362306a36Sopenharmony_ci#define MPI3_IOUNIT15_FLAGS_EPRSUPPORT_WITHOUT_POWER_BRAKE_GPIO (0x01) 122462306a36Sopenharmony_ci#define MPI3_IOUNIT15_FLAGS_EPRSUPPORT_WITH_POWER_BRAKE_GPIO (0x02) 122562306a36Sopenharmony_ci#define MPI3_IOUNIT15_NUMPOWERBUDGETDATA_POWER_BUDGETING_DISABLED (0x00) 122662306a36Sopenharmony_cistruct mpi3_ioc_page0 { 122762306a36Sopenharmony_ci struct mpi3_config_page_header header; 122862306a36Sopenharmony_ci __le32 reserved08; 122962306a36Sopenharmony_ci __le16 vendor_id; 123062306a36Sopenharmony_ci __le16 device_id; 123162306a36Sopenharmony_ci u8 revision_id; 123262306a36Sopenharmony_ci u8 reserved11[3]; 123362306a36Sopenharmony_ci __le32 class_code; 123462306a36Sopenharmony_ci __le16 subsystem_vendor_id; 123562306a36Sopenharmony_ci __le16 subsystem_id; 123662306a36Sopenharmony_ci}; 123762306a36Sopenharmony_ci 123862306a36Sopenharmony_ci#define MPI3_IOC0_PAGEVERSION (0x00) 123962306a36Sopenharmony_cistruct mpi3_ioc_page1 { 124062306a36Sopenharmony_ci struct mpi3_config_page_header header; 124162306a36Sopenharmony_ci __le32 coalescing_timeout; 124262306a36Sopenharmony_ci u8 coalescing_depth; 124362306a36Sopenharmony_ci u8 obsolete; 124462306a36Sopenharmony_ci __le16 reserved0e; 124562306a36Sopenharmony_ci}; 124662306a36Sopenharmony_ci#define MPI3_IOC1_PAGEVERSION (0x00) 124762306a36Sopenharmony_ci#ifndef MPI3_IOC2_EVENTMASK_WORDS 124862306a36Sopenharmony_ci#define MPI3_IOC2_EVENTMASK_WORDS (4) 124962306a36Sopenharmony_ci#endif 125062306a36Sopenharmony_cistruct mpi3_ioc_page2 { 125162306a36Sopenharmony_ci struct mpi3_config_page_header header; 125262306a36Sopenharmony_ci __le32 reserved08; 125362306a36Sopenharmony_ci __le16 sas_broadcast_primitive_masks; 125462306a36Sopenharmony_ci __le16 sas_notify_primitive_masks; 125562306a36Sopenharmony_ci __le32 event_masks[MPI3_IOC2_EVENTMASK_WORDS]; 125662306a36Sopenharmony_ci}; 125762306a36Sopenharmony_ci 125862306a36Sopenharmony_ci#define MPI3_IOC2_PAGEVERSION (0x00) 125962306a36Sopenharmony_ci#define MPI3_DRIVER_FLAGS_ADMINRAIDPD_BLOCKED (0x0010) 126062306a36Sopenharmony_ci#define MPI3_DRIVER_FLAGS_OOBRAIDPD_BLOCKED (0x0008) 126162306a36Sopenharmony_ci#define MPI3_DRIVER_FLAGS_OOBRAIDVD_BLOCKED (0x0004) 126262306a36Sopenharmony_ci#define MPI3_DRIVER_FLAGS_OOBADVHOSTPD_BLOCKED (0x0002) 126362306a36Sopenharmony_ci#define MPI3_DRIVER_FLAGS_OOBHOSTPD_BLOCKED (0x0001) 126462306a36Sopenharmony_cistruct mpi3_allowed_cmd_scsi { 126562306a36Sopenharmony_ci __le16 service_action; 126662306a36Sopenharmony_ci u8 operation_code; 126762306a36Sopenharmony_ci u8 command_flags; 126862306a36Sopenharmony_ci}; 126962306a36Sopenharmony_ci 127062306a36Sopenharmony_cistruct mpi3_allowed_cmd_ata { 127162306a36Sopenharmony_ci u8 subcommand; 127262306a36Sopenharmony_ci u8 reserved01; 127362306a36Sopenharmony_ci u8 command; 127462306a36Sopenharmony_ci u8 command_flags; 127562306a36Sopenharmony_ci}; 127662306a36Sopenharmony_ci 127762306a36Sopenharmony_cistruct mpi3_allowed_cmd_nvme { 127862306a36Sopenharmony_ci u8 reserved00; 127962306a36Sopenharmony_ci u8 nvme_cmd_flags; 128062306a36Sopenharmony_ci u8 op_code; 128162306a36Sopenharmony_ci u8 command_flags; 128262306a36Sopenharmony_ci}; 128362306a36Sopenharmony_ci 128462306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_NVMECMDFLAGS_SUBQ_TYPE_MASK (0x80) 128562306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_NVMECMDFLAGS_SUBQ_TYPE_IO (0x00) 128662306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_NVMECMDFLAGS_SUBQ_TYPE_ADMIN (0x80) 128762306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_NVMECMDFLAGS_CMDSET_MASK (0x3f) 128862306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_NVMECMDFLAGS_CMDSET_NVM (0x00) 128962306a36Sopenharmony_ciunion mpi3_allowed_cmd { 129062306a36Sopenharmony_ci struct mpi3_allowed_cmd_scsi scsi; 129162306a36Sopenharmony_ci struct mpi3_allowed_cmd_ata ata; 129262306a36Sopenharmony_ci struct mpi3_allowed_cmd_nvme nvme; 129362306a36Sopenharmony_ci}; 129462306a36Sopenharmony_ci 129562306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_CMDFLAGS_ADMINRAIDPD_BLOCKED (0x20) 129662306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_CMDFLAGS_OOBRAIDPD_BLOCKED (0x10) 129762306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_CMDFLAGS_OOBRAIDVD_BLOCKED (0x08) 129862306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_CMDFLAGS_OOBADVHOSTPD_BLOCKED (0x04) 129962306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_CMDFLAGS_OOBHOSTPD_BLOCKED (0x02) 130062306a36Sopenharmony_ci#define MPI3_DRIVER_ALLOWEDCMD_CMDFLAGS_CHECKSUBCMD_ENABLED (0x01) 130162306a36Sopenharmony_ci#ifndef MPI3_ALLOWED_CMDS_MAX 130262306a36Sopenharmony_ci#define MPI3_ALLOWED_CMDS_MAX (1) 130362306a36Sopenharmony_ci#endif 130462306a36Sopenharmony_cistruct mpi3_driver_page0 { 130562306a36Sopenharmony_ci struct mpi3_config_page_header header; 130662306a36Sopenharmony_ci __le32 bsd_options; 130762306a36Sopenharmony_ci u8 ssu_timeout; 130862306a36Sopenharmony_ci u8 io_timeout; 130962306a36Sopenharmony_ci u8 tur_retries; 131062306a36Sopenharmony_ci u8 tur_interval; 131162306a36Sopenharmony_ci u8 reserved10; 131262306a36Sopenharmony_ci u8 security_key_timeout; 131362306a36Sopenharmony_ci __le16 reserved12; 131462306a36Sopenharmony_ci __le32 reserved14; 131562306a36Sopenharmony_ci __le32 reserved18; 131662306a36Sopenharmony_ci}; 131762306a36Sopenharmony_ci#define MPI3_DRIVER0_PAGEVERSION (0x00) 131862306a36Sopenharmony_ci#define MPI3_DRIVER0_BSDOPTS_HEADLESS_MODE_ENABLE (0x00000008) 131962306a36Sopenharmony_ci#define MPI3_DRIVER0_BSDOPTS_DIS_HII_CONFIG_UTIL (0x00000004) 132062306a36Sopenharmony_ci#define MPI3_DRIVER0_BSDOPTS_REGISTRATION_MASK (0x00000003) 132162306a36Sopenharmony_ci#define MPI3_DRIVER0_BSDOPTS_REGISTRATION_IOC_AND_DEVS (0x00000000) 132262306a36Sopenharmony_ci#define MPI3_DRIVER0_BSDOPTS_REGISTRATION_IOC_ONLY (0x00000001) 132362306a36Sopenharmony_ci#define MPI3_DRIVER0_BSDOPTS_REGISTRATION_IOC_AND_INTERNAL_DEVS (0x00000002) 132462306a36Sopenharmony_cistruct mpi3_driver_page1 { 132562306a36Sopenharmony_ci struct mpi3_config_page_header header; 132662306a36Sopenharmony_ci __le32 flags; 132762306a36Sopenharmony_ci __le32 reserved0c; 132862306a36Sopenharmony_ci __le16 host_diag_trace_max_size; 132962306a36Sopenharmony_ci __le16 host_diag_trace_min_size; 133062306a36Sopenharmony_ci __le16 host_diag_trace_decrement_size; 133162306a36Sopenharmony_ci __le16 reserved16; 133262306a36Sopenharmony_ci __le16 host_diag_fw_max_size; 133362306a36Sopenharmony_ci __le16 host_diag_fw_min_size; 133462306a36Sopenharmony_ci __le16 host_diag_fw_decrement_size; 133562306a36Sopenharmony_ci __le16 reserved1e; 133662306a36Sopenharmony_ci __le16 host_diag_driver_max_size; 133762306a36Sopenharmony_ci __le16 host_diag_driver_min_size; 133862306a36Sopenharmony_ci __le16 host_diag_driver_decrement_size; 133962306a36Sopenharmony_ci __le16 reserved26; 134062306a36Sopenharmony_ci}; 134162306a36Sopenharmony_ci 134262306a36Sopenharmony_ci#define MPI3_DRIVER1_PAGEVERSION (0x00) 134362306a36Sopenharmony_ci#ifndef MPI3_DRIVER2_TRIGGER_MAX 134462306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_MAX (1) 134562306a36Sopenharmony_ci#endif 134662306a36Sopenharmony_cistruct mpi3_driver2_trigger_event { 134762306a36Sopenharmony_ci u8 type; 134862306a36Sopenharmony_ci u8 flags; 134962306a36Sopenharmony_ci u8 reserved02; 135062306a36Sopenharmony_ci u8 event; 135162306a36Sopenharmony_ci __le32 reserved04[3]; 135262306a36Sopenharmony_ci}; 135362306a36Sopenharmony_ci 135462306a36Sopenharmony_cistruct mpi3_driver2_trigger_scsi_sense { 135562306a36Sopenharmony_ci u8 type; 135662306a36Sopenharmony_ci u8 flags; 135762306a36Sopenharmony_ci __le16 reserved02; 135862306a36Sopenharmony_ci u8 ascq; 135962306a36Sopenharmony_ci u8 asc; 136062306a36Sopenharmony_ci u8 sense_key; 136162306a36Sopenharmony_ci u8 reserved07; 136262306a36Sopenharmony_ci __le32 reserved08[2]; 136362306a36Sopenharmony_ci}; 136462306a36Sopenharmony_ci 136562306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_SCSI_SENSE_ASCQ_MATCH_ALL (0xff) 136662306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_SCSI_SENSE_ASC_MATCH_ALL (0xff) 136762306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_SCSI_SENSE_SENSE_KEY_MATCH_ALL (0xff) 136862306a36Sopenharmony_cistruct mpi3_driver2_trigger_reply { 136962306a36Sopenharmony_ci u8 type; 137062306a36Sopenharmony_ci u8 flags; 137162306a36Sopenharmony_ci __le16 ioc_status; 137262306a36Sopenharmony_ci __le32 ioc_log_info; 137362306a36Sopenharmony_ci __le32 ioc_log_info_mask; 137462306a36Sopenharmony_ci __le32 reserved0c; 137562306a36Sopenharmony_ci}; 137662306a36Sopenharmony_ci 137762306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_REPLY_IOCSTATUS_MATCH_ALL (0xffff) 137862306a36Sopenharmony_ciunion mpi3_driver2_trigger_element { 137962306a36Sopenharmony_ci struct mpi3_driver2_trigger_event event; 138062306a36Sopenharmony_ci struct mpi3_driver2_trigger_scsi_sense scsi_sense; 138162306a36Sopenharmony_ci struct mpi3_driver2_trigger_reply reply; 138262306a36Sopenharmony_ci}; 138362306a36Sopenharmony_ci 138462306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_TYPE_EVENT (0x00) 138562306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_TYPE_SCSI_SENSE (0x01) 138662306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_TYPE_REPLY (0x02) 138762306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_FLAGS_DIAG_TRACE_RELEASE (0x02) 138862306a36Sopenharmony_ci#define MPI3_DRIVER2_TRIGGER_FLAGS_DIAG_FW_RELEASE (0x01) 138962306a36Sopenharmony_cistruct mpi3_driver_page2 { 139062306a36Sopenharmony_ci struct mpi3_config_page_header header; 139162306a36Sopenharmony_ci __le64 global_trigger; 139262306a36Sopenharmony_ci __le32 reserved10[3]; 139362306a36Sopenharmony_ci u8 num_triggers; 139462306a36Sopenharmony_ci u8 reserved1d[3]; 139562306a36Sopenharmony_ci union mpi3_driver2_trigger_element trigger[MPI3_DRIVER2_TRIGGER_MAX]; 139662306a36Sopenharmony_ci}; 139762306a36Sopenharmony_ci 139862306a36Sopenharmony_ci#define MPI3_DRIVER2_PAGEVERSION (0x00) 139962306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_DIAG_TRACE_RELEASE (0x8000000000000000ULL) 140062306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_DIAG_FW_RELEASE (0x4000000000000000ULL) 140162306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_SNAPDUMP_ENABLED (0x2000000000000000ULL) 140262306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_POST_DIAG_TRACE_DISABLED (0x1000000000000000ULL) 140362306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_POST_DIAG_FW_DISABLED (0x0800000000000000ULL) 140462306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_DEVICE_REMOVAL_ENABLED (0x0000000000000004ULL) 140562306a36Sopenharmony_ci#define MPI3_DRIVER2_GLOBALTRIGGER_TASK_MANAGEMENT_ENABLED (0x0000000000000002ULL) 140662306a36Sopenharmony_cistruct mpi3_driver_page10 { 140762306a36Sopenharmony_ci struct mpi3_config_page_header header; 140862306a36Sopenharmony_ci __le16 flags; 140962306a36Sopenharmony_ci __le16 reserved0a; 141062306a36Sopenharmony_ci u8 num_allowed_commands; 141162306a36Sopenharmony_ci u8 reserved0d[3]; 141262306a36Sopenharmony_ci union mpi3_allowed_cmd allowed_command[MPI3_ALLOWED_CMDS_MAX]; 141362306a36Sopenharmony_ci}; 141462306a36Sopenharmony_ci 141562306a36Sopenharmony_ci#define MPI3_DRIVER10_PAGEVERSION (0x00) 141662306a36Sopenharmony_cistruct mpi3_driver_page20 { 141762306a36Sopenharmony_ci struct mpi3_config_page_header header; 141862306a36Sopenharmony_ci __le16 flags; 141962306a36Sopenharmony_ci __le16 reserved0a; 142062306a36Sopenharmony_ci u8 num_allowed_commands; 142162306a36Sopenharmony_ci u8 reserved0d[3]; 142262306a36Sopenharmony_ci union mpi3_allowed_cmd allowed_command[MPI3_ALLOWED_CMDS_MAX]; 142362306a36Sopenharmony_ci}; 142462306a36Sopenharmony_ci 142562306a36Sopenharmony_ci#define MPI3_DRIVER20_PAGEVERSION (0x00) 142662306a36Sopenharmony_cistruct mpi3_driver_page30 { 142762306a36Sopenharmony_ci struct mpi3_config_page_header header; 142862306a36Sopenharmony_ci __le16 flags; 142962306a36Sopenharmony_ci __le16 reserved0a; 143062306a36Sopenharmony_ci u8 num_allowed_commands; 143162306a36Sopenharmony_ci u8 reserved0d[3]; 143262306a36Sopenharmony_ci union mpi3_allowed_cmd allowed_command[MPI3_ALLOWED_CMDS_MAX]; 143362306a36Sopenharmony_ci}; 143462306a36Sopenharmony_ci 143562306a36Sopenharmony_ci#define MPI3_DRIVER30_PAGEVERSION (0x00) 143662306a36Sopenharmony_ciunion mpi3_security_mac { 143762306a36Sopenharmony_ci __le32 dword[16]; 143862306a36Sopenharmony_ci __le16 word[32]; 143962306a36Sopenharmony_ci u8 byte[64]; 144062306a36Sopenharmony_ci}; 144162306a36Sopenharmony_ci 144262306a36Sopenharmony_ciunion mpi3_security_nonce { 144362306a36Sopenharmony_ci __le32 dword[16]; 144462306a36Sopenharmony_ci __le16 word[32]; 144562306a36Sopenharmony_ci u8 byte[64]; 144662306a36Sopenharmony_ci}; 144762306a36Sopenharmony_ci 144862306a36Sopenharmony_ciunion mpi3_security_root_digest { 144962306a36Sopenharmony_ci __le32 dword[16]; 145062306a36Sopenharmony_ci __le16 word[32]; 145162306a36Sopenharmony_ci u8 byte[64]; 145262306a36Sopenharmony_ci}; 145362306a36Sopenharmony_ci 145462306a36Sopenharmony_ciunion mpi3_security0_cert_chain { 145562306a36Sopenharmony_ci __le32 dword[1024]; 145662306a36Sopenharmony_ci __le16 word[2048]; 145762306a36Sopenharmony_ci u8 byte[4096]; 145862306a36Sopenharmony_ci}; 145962306a36Sopenharmony_ci 146062306a36Sopenharmony_cistruct mpi3_security_page0 { 146162306a36Sopenharmony_ci struct mpi3_config_page_header header; 146262306a36Sopenharmony_ci u8 slot_num_group; 146362306a36Sopenharmony_ci u8 slot_num; 146462306a36Sopenharmony_ci __le16 cert_chain_length; 146562306a36Sopenharmony_ci u8 cert_chain_flags; 146662306a36Sopenharmony_ci u8 reserved0d[3]; 146762306a36Sopenharmony_ci __le32 base_asym_algo; 146862306a36Sopenharmony_ci __le32 base_hash_algo; 146962306a36Sopenharmony_ci __le32 reserved18[4]; 147062306a36Sopenharmony_ci union mpi3_security_mac mac; 147162306a36Sopenharmony_ci union mpi3_security_nonce nonce; 147262306a36Sopenharmony_ci union mpi3_security0_cert_chain certificate_chain; 147362306a36Sopenharmony_ci}; 147462306a36Sopenharmony_ci 147562306a36Sopenharmony_ci#define MPI3_SECURITY0_PAGEVERSION (0x00) 147662306a36Sopenharmony_ci#define MPI3_SECURITY0_CERTCHAIN_FLAGS_AUTH_API_MASK (0x0e) 147762306a36Sopenharmony_ci#define MPI3_SECURITY0_CERTCHAIN_FLAGS_AUTH_API_UNUSED (0x00) 147862306a36Sopenharmony_ci#define MPI3_SECURITY0_CERTCHAIN_FLAGS_AUTH_API_CERBERUS (0x02) 147962306a36Sopenharmony_ci#define MPI3_SECURITY0_CERTCHAIN_FLAGS_AUTH_API_SPDM (0x04) 148062306a36Sopenharmony_ci#define MPI3_SECURITY0_CERTCHAIN_FLAGS_SEALED (0x01) 148162306a36Sopenharmony_ci#ifndef MPI3_SECURITY1_KEY_RECORD_MAX 148262306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_MAX 1 148362306a36Sopenharmony_ci#endif 148462306a36Sopenharmony_ci#ifndef MPI3_SECURITY1_PAD_MAX 148562306a36Sopenharmony_ci#define MPI3_SECURITY1_PAD_MAX 4 148662306a36Sopenharmony_ci#endif 148762306a36Sopenharmony_ciunion mpi3_security1_key_data { 148862306a36Sopenharmony_ci __le32 dword[128]; 148962306a36Sopenharmony_ci __le16 word[256]; 149062306a36Sopenharmony_ci u8 byte[512]; 149162306a36Sopenharmony_ci}; 149262306a36Sopenharmony_ci 149362306a36Sopenharmony_cistruct mpi3_security1_key_record { 149462306a36Sopenharmony_ci u8 flags; 149562306a36Sopenharmony_ci u8 consumer; 149662306a36Sopenharmony_ci __le16 key_data_size; 149762306a36Sopenharmony_ci __le32 additional_key_data; 149862306a36Sopenharmony_ci __le32 reserved08[2]; 149962306a36Sopenharmony_ci union mpi3_security1_key_data key_data; 150062306a36Sopenharmony_ci}; 150162306a36Sopenharmony_ci 150262306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_FLAGS_TYPE_MASK (0x1f) 150362306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_FLAGS_TYPE_NOT_VALID (0x00) 150462306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_FLAGS_TYPE_HMAC (0x01) 150562306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_FLAGS_TYPE_AES (0x02) 150662306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_FLAGS_TYPE_ECDSA_PRIVATE (0x03) 150762306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_FLAGS_TYPE_ECDSA_PUBLIC (0x04) 150862306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_CONSUMER_NOT_VALID (0x00) 150962306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_CONSUMER_SAFESTORE (0x01) 151062306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_CONSUMER_CERT_CHAIN (0x02) 151162306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_CONSUMER_DEVICE_KEY (0x03) 151262306a36Sopenharmony_ci#define MPI3_SECURITY1_KEY_RECORD_CONSUMER_CACHE_OFFLOAD (0x04) 151362306a36Sopenharmony_cistruct mpi3_security_page1 { 151462306a36Sopenharmony_ci struct mpi3_config_page_header header; 151562306a36Sopenharmony_ci __le32 reserved08[2]; 151662306a36Sopenharmony_ci union mpi3_security_mac mac; 151762306a36Sopenharmony_ci union mpi3_security_nonce nonce; 151862306a36Sopenharmony_ci u8 num_keys; 151962306a36Sopenharmony_ci u8 reserved91[3]; 152062306a36Sopenharmony_ci __le32 reserved94[3]; 152162306a36Sopenharmony_ci struct mpi3_security1_key_record key_record[MPI3_SECURITY1_KEY_RECORD_MAX]; 152262306a36Sopenharmony_ci u8 pad[MPI3_SECURITY1_PAD_MAX]; 152362306a36Sopenharmony_ci}; 152462306a36Sopenharmony_ci 152562306a36Sopenharmony_ci#define MPI3_SECURITY1_PAGEVERSION (0x00) 152662306a36Sopenharmony_ci#ifndef MPI3_SECURITY2_TRUSTED_ROOT_MAX 152762306a36Sopenharmony_ci#define MPI3_SECURITY2_TRUSTED_ROOT_MAX 1 152862306a36Sopenharmony_ci#endif 152962306a36Sopenharmony_cistruct mpi3_security2_trusted_root { 153062306a36Sopenharmony_ci u8 level; 153162306a36Sopenharmony_ci u8 hash_algorithm; 153262306a36Sopenharmony_ci __le16 trusted_root_flags; 153362306a36Sopenharmony_ci __le32 reserved04[3]; 153462306a36Sopenharmony_ci union mpi3_security_root_digest root_digest; 153562306a36Sopenharmony_ci}; 153662306a36Sopenharmony_ci#define MPI3_SECURITY2_TRUSTEDROOT_TRUSTEDROOTFLAGS_HASHALGOSOURCE_MASK (0x0006) 153762306a36Sopenharmony_ci#define MPI3_SECURITY2_TRUSTEDROOT_TRUSTEDROOTFLAGS_HASHALGOSOURCE_SHIFT (1) 153862306a36Sopenharmony_ci#define MPI3_SECURITY2_TRUSTEDROOT_TRUSTEDROOTFLAGS_HASHALGOSOURCE_HA_FIELD (0x0000) 153962306a36Sopenharmony_ci#define MPI3_SECURITY2_TRUSTEDROOT_TRUSTEDROOTFLAGS_HASHALGOSOURCE_AKI (0x0002) 154062306a36Sopenharmony_ci#define MPI3_SECURITY2_TRUSTEDROOT_TRUSTEDROOTFLAGS_USERPROVISIONED_YES (0x0001) 154162306a36Sopenharmony_cistruct mpi3_security_page2 { 154262306a36Sopenharmony_ci struct mpi3_config_page_header header; 154362306a36Sopenharmony_ci __le32 reserved08[2]; 154462306a36Sopenharmony_ci union mpi3_security_mac mac; 154562306a36Sopenharmony_ci union mpi3_security_nonce nonce; 154662306a36Sopenharmony_ci __le32 reserved90[3]; 154762306a36Sopenharmony_ci u8 num_roots; 154862306a36Sopenharmony_ci u8 reserved9d[3]; 154962306a36Sopenharmony_ci struct mpi3_security2_trusted_root trusted_root[MPI3_SECURITY2_TRUSTED_ROOT_MAX]; 155062306a36Sopenharmony_ci}; 155162306a36Sopenharmony_ci#define MPI3_SECURITY2_PAGEVERSION (0x00) 155262306a36Sopenharmony_cistruct mpi3_sas_io_unit0_phy_data { 155362306a36Sopenharmony_ci u8 io_unit_port; 155462306a36Sopenharmony_ci u8 port_flags; 155562306a36Sopenharmony_ci u8 phy_flags; 155662306a36Sopenharmony_ci u8 negotiated_link_rate; 155762306a36Sopenharmony_ci __le16 controller_phy_device_info; 155862306a36Sopenharmony_ci __le16 reserved06; 155962306a36Sopenharmony_ci __le16 attached_dev_handle; 156062306a36Sopenharmony_ci __le16 controller_dev_handle; 156162306a36Sopenharmony_ci __le32 discovery_status; 156262306a36Sopenharmony_ci __le32 reserved10; 156362306a36Sopenharmony_ci}; 156462306a36Sopenharmony_ci 156562306a36Sopenharmony_ci#ifndef MPI3_SAS_IO_UNIT0_PHY_MAX 156662306a36Sopenharmony_ci#define MPI3_SAS_IO_UNIT0_PHY_MAX (1) 156762306a36Sopenharmony_ci#endif 156862306a36Sopenharmony_cistruct mpi3_sas_io_unit_page0 { 156962306a36Sopenharmony_ci struct mpi3_config_page_header header; 157062306a36Sopenharmony_ci __le32 reserved08; 157162306a36Sopenharmony_ci u8 num_phys; 157262306a36Sopenharmony_ci u8 init_status; 157362306a36Sopenharmony_ci __le16 reserved0e; 157462306a36Sopenharmony_ci struct mpi3_sas_io_unit0_phy_data phy_data[MPI3_SAS_IO_UNIT0_PHY_MAX]; 157562306a36Sopenharmony_ci}; 157662306a36Sopenharmony_ci 157762306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PAGEVERSION (0x00) 157862306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_NO_ERRORS (0x00) 157962306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_NEEDS_INITIALIZATION (0x01) 158062306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_NO_TARGETS_ALLOCATED (0x02) 158162306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_BAD_NUM_PHYS (0x04) 158262306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_UNSUPPORTED_CONFIG (0x05) 158362306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_HOST_PHYS_ENABLED (0x06) 158462306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_PRODUCT_SPECIFIC_MIN (0xf0) 158562306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_INITSTATUS_PRODUCT_SPECIFIC_MAX (0xff) 158662306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PORTFLAGS_DISC_IN_PROGRESS (0x08) 158762306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG_MASK (0x03) 158862306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG_IOUNIT1 (0x00) 158962306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG_DYNAMIC (0x01) 159062306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PORTFLAGS_AUTO_PORT_CONFIG_BACKPLANE (0x02) 159162306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PHYFLAGS_INIT_PERSIST_CONNECT (0x40) 159262306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PHYFLAGS_TARG_PERSIST_CONNECT (0x20) 159362306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08) 159462306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PHYFLAGS_VIRTUAL_PHY (0x02) 159562306a36Sopenharmony_ci#define MPI3_SASIOUNIT0_PHYFLAGS_HOST_PHY (0x01) 159662306a36Sopenharmony_cistruct mpi3_sas_io_unit1_phy_data { 159762306a36Sopenharmony_ci u8 io_unit_port; 159862306a36Sopenharmony_ci u8 port_flags; 159962306a36Sopenharmony_ci u8 phy_flags; 160062306a36Sopenharmony_ci u8 max_min_link_rate; 160162306a36Sopenharmony_ci __le16 controller_phy_device_info; 160262306a36Sopenharmony_ci __le16 max_target_port_connect_time; 160362306a36Sopenharmony_ci __le32 reserved08; 160462306a36Sopenharmony_ci}; 160562306a36Sopenharmony_ci 160662306a36Sopenharmony_ci#ifndef MPI3_SAS_IO_UNIT1_PHY_MAX 160762306a36Sopenharmony_ci#define MPI3_SAS_IO_UNIT1_PHY_MAX (1) 160862306a36Sopenharmony_ci#endif 160962306a36Sopenharmony_cistruct mpi3_sas_io_unit_page1 { 161062306a36Sopenharmony_ci struct mpi3_config_page_header header; 161162306a36Sopenharmony_ci __le16 control_flags; 161262306a36Sopenharmony_ci __le16 sas_narrow_max_queue_depth; 161362306a36Sopenharmony_ci __le16 additional_control_flags; 161462306a36Sopenharmony_ci __le16 sas_wide_max_queue_depth; 161562306a36Sopenharmony_ci u8 num_phys; 161662306a36Sopenharmony_ci u8 sata_max_q_depth; 161762306a36Sopenharmony_ci __le16 reserved12; 161862306a36Sopenharmony_ci struct mpi3_sas_io_unit1_phy_data phy_data[MPI3_SAS_IO_UNIT1_PHY_MAX]; 161962306a36Sopenharmony_ci}; 162062306a36Sopenharmony_ci 162162306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_PAGEVERSION (0x00) 162262306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_CONTROLLER_DEVICE_SELF_TEST (0x8000) 162362306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_SATA_SW_PRESERVE (0x1000) 162462306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_SATA_48BIT_LBA_REQUIRED (0x0080) 162562306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_SATA_SMART_REQUIRED (0x0040) 162662306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_SATA_NCQ_REQUIRED (0x0020) 162762306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_SATA_FUA_REQUIRED (0x0010) 162862306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_TABLE_SUBTRACTIVE_ILLEGAL (0x0008) 162962306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_SUBTRACTIVE_ILLEGAL (0x0004) 163062306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_FIRST_LVL_DISC_ONLY (0x0002) 163162306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_HARD_RESET_MASK (0x0001) 163262306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_HARD_RESET_DEVICE_NAME (0x0000) 163362306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_CONTROL_HARD_RESET_SAS_ADDRESS (0x0001) 163462306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_DA_PERSIST_CONNECT (0x0100) 163562306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_MULTI_PORT_DOMAIN_ILLEGAL (0x0080) 163662306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_SATA_ASYNCHROUNOUS_NOTIFICATION (0x0040) 163762306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_INVALID_TOPOLOGY_CORRECTION (0x0020) 163862306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_PORT_ENABLE_ONLY_SATA_LINK_RESET (0x0010) 163962306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_OTHER_AFFILIATION_SATA_LINK_RESET (0x0008) 164062306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_SELF_AFFILIATION_SATA_LINK_RESET (0x0004) 164162306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_NO_AFFILIATION_SATA_LINK_RESET (0x0002) 164262306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_ACONTROL_ALLOW_TABLE_TO_TABLE (0x0001) 164362306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_PORT_FLAGS_AUTO_PORT_CONFIG (0x01) 164462306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_PHYFLAGS_INIT_PERSIST_CONNECT (0x40) 164562306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_PHYFLAGS_TARG_PERSIST_CONNECT (0x20) 164662306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08) 164762306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MAX_RATE_MASK (0xf0) 164862306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MAX_RATE_SHIFT (4) 164962306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MAX_RATE_6_0 (0xa0) 165062306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MAX_RATE_12_0 (0xb0) 165162306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MAX_RATE_22_5 (0xc0) 165262306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MIN_RATE_MASK (0x0f) 165362306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MIN_RATE_6_0 (0x0a) 165462306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MIN_RATE_12_0 (0x0b) 165562306a36Sopenharmony_ci#define MPI3_SASIOUNIT1_MMLR_MIN_RATE_22_5 (0x0c) 165662306a36Sopenharmony_cistruct mpi3_sas_io_unit2_phy_pm_settings { 165762306a36Sopenharmony_ci u8 control_flags; 165862306a36Sopenharmony_ci u8 reserved01; 165962306a36Sopenharmony_ci __le16 inactivity_timer_exponent; 166062306a36Sopenharmony_ci u8 sata_partial_timeout; 166162306a36Sopenharmony_ci u8 reserved05; 166262306a36Sopenharmony_ci u8 sata_slumber_timeout; 166362306a36Sopenharmony_ci u8 reserved07; 166462306a36Sopenharmony_ci u8 sas_partial_timeout; 166562306a36Sopenharmony_ci u8 reserved09; 166662306a36Sopenharmony_ci u8 sas_slumber_timeout; 166762306a36Sopenharmony_ci u8 reserved0b; 166862306a36Sopenharmony_ci}; 166962306a36Sopenharmony_ci 167062306a36Sopenharmony_ci#ifndef MPI3_SAS_IO_UNIT2_PHY_MAX 167162306a36Sopenharmony_ci#define MPI3_SAS_IO_UNIT2_PHY_MAX (1) 167262306a36Sopenharmony_ci#endif 167362306a36Sopenharmony_cistruct mpi3_sas_io_unit_page2 { 167462306a36Sopenharmony_ci struct mpi3_config_page_header header; 167562306a36Sopenharmony_ci u8 num_phys; 167662306a36Sopenharmony_ci u8 reserved09[3]; 167762306a36Sopenharmony_ci __le32 reserved0c; 167862306a36Sopenharmony_ci struct mpi3_sas_io_unit2_phy_pm_settings sas_phy_power_management_settings[MPI3_SAS_IO_UNIT2_PHY_MAX]; 167962306a36Sopenharmony_ci}; 168062306a36Sopenharmony_ci 168162306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_PAGEVERSION (0x00) 168262306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_CONTROL_SAS_SLUMBER_ENABLE (0x08) 168362306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_CONTROL_SAS_PARTIAL_ENABLE (0x04) 168462306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_CONTROL_SATA_SLUMBER_ENABLE (0x02) 168562306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_CONTROL_SATA_PARTIAL_ENABLE (0x01) 168662306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SAS_SLUMBER_MASK (0x7000) 168762306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SAS_SLUMBER_SHIFT (12) 168862306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SAS_PARTIAL_MASK (0x0700) 168962306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SAS_PARTIAL_SHIFT (8) 169062306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SATA_SLUMBER_MASK (0x0070) 169162306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SATA_SLUMBER_SHIFT (4) 169262306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SATA_PARTIAL_MASK (0x0007) 169362306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_SATA_PARTIAL_SHIFT (0) 169462306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_TEN_SECONDS (7) 169562306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_ONE_SECOND (6) 169662306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_HUNDRED_MILLISECONDS (5) 169762306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_TEN_MILLISECONDS (4) 169862306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_ONE_MILLISECOND (3) 169962306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_HUNDRED_MICROSECONDS (2) 170062306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_TEN_MICROSECONDS (1) 170162306a36Sopenharmony_ci#define MPI3_SASIOUNIT2_ITE_EXP_ONE_MICROSECOND (0) 170262306a36Sopenharmony_cistruct mpi3_sas_io_unit_page3 { 170362306a36Sopenharmony_ci struct mpi3_config_page_header header; 170462306a36Sopenharmony_ci __le32 reserved08; 170562306a36Sopenharmony_ci __le32 power_management_capabilities; 170662306a36Sopenharmony_ci}; 170762306a36Sopenharmony_ci 170862306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PAGEVERSION (0x00) 170962306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_HOST_SAS_SLUMBER_MODE (0x00000800) 171062306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_HOST_SAS_PARTIAL_MODE (0x00000400) 171162306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_HOST_SATA_SLUMBER_MODE (0x00000200) 171262306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_HOST_SATA_PARTIAL_MODE (0x00000100) 171362306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_IOUNIT_SAS_SLUMBER_MODE (0x00000008) 171462306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_IOUNIT_SAS_PARTIAL_MODE (0x00000004) 171562306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_IOUNIT_SATA_SLUMBER_MODE (0x00000002) 171662306a36Sopenharmony_ci#define MPI3_SASIOUNIT3_PM_IOUNIT_SATA_PARTIAL_MODE (0x00000001) 171762306a36Sopenharmony_cistruct mpi3_sas_expander_page0 { 171862306a36Sopenharmony_ci struct mpi3_config_page_header header; 171962306a36Sopenharmony_ci u8 io_unit_port; 172062306a36Sopenharmony_ci u8 report_gen_length; 172162306a36Sopenharmony_ci __le16 enclosure_handle; 172262306a36Sopenharmony_ci __le32 reserved0c; 172362306a36Sopenharmony_ci __le64 sas_address; 172462306a36Sopenharmony_ci __le32 discovery_status; 172562306a36Sopenharmony_ci __le16 dev_handle; 172662306a36Sopenharmony_ci __le16 parent_dev_handle; 172762306a36Sopenharmony_ci __le16 expander_change_count; 172862306a36Sopenharmony_ci __le16 expander_route_indexes; 172962306a36Sopenharmony_ci u8 num_phys; 173062306a36Sopenharmony_ci u8 sas_level; 173162306a36Sopenharmony_ci __le16 flags; 173262306a36Sopenharmony_ci __le16 stp_bus_inactivity_time_limit; 173362306a36Sopenharmony_ci __le16 stp_max_connect_time_limit; 173462306a36Sopenharmony_ci __le16 stp_smp_nexus_loss_time; 173562306a36Sopenharmony_ci __le16 max_num_routed_sas_addresses; 173662306a36Sopenharmony_ci __le64 active_zone_manager_sas_address; 173762306a36Sopenharmony_ci __le16 zone_lock_inactivity_limit; 173862306a36Sopenharmony_ci __le16 reserved3a; 173962306a36Sopenharmony_ci u8 time_to_reduced_func; 174062306a36Sopenharmony_ci u8 initial_time_to_reduced_func; 174162306a36Sopenharmony_ci u8 max_reduced_func_time; 174262306a36Sopenharmony_ci u8 exp_status; 174362306a36Sopenharmony_ci}; 174462306a36Sopenharmony_ci 174562306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_PAGEVERSION (0x00) 174662306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_REDUCED_FUNCTIONALITY (0x2000) 174762306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_ZONE_LOCKED (0x1000) 174862306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_SUPPORTED_PHYSICAL_PRES (0x0800) 174962306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_ASSERTED_PHYSICAL_PRES (0x0400) 175062306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_ZONING_SUPPORT (0x0200) 175162306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_ENABLED_ZONING (0x0100) 175262306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_TABLE_TO_TABLE_SUPPORT (0x0080) 175362306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_CONNECTOR_END_DEVICE (0x0010) 175462306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_OTHERS_CONFIG (0x0004) 175562306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_CONFIG_IN_PROGRESS (0x0002) 175662306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_FLAGS_ROUTE_TABLE_CONFIG (0x0001) 175762306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_ES_NOT_RESPONDING (0x02) 175862306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_ES_RESPONDING (0x03) 175962306a36Sopenharmony_ci#define MPI3_SASEXPANDER0_ES_DELAY_NOT_RESPONDING (0x04) 176062306a36Sopenharmony_cistruct mpi3_sas_expander_page1 { 176162306a36Sopenharmony_ci struct mpi3_config_page_header header; 176262306a36Sopenharmony_ci u8 io_unit_port; 176362306a36Sopenharmony_ci u8 reserved09[3]; 176462306a36Sopenharmony_ci u8 num_phys; 176562306a36Sopenharmony_ci u8 phy; 176662306a36Sopenharmony_ci __le16 num_table_entries_programmed; 176762306a36Sopenharmony_ci u8 programmed_link_rate; 176862306a36Sopenharmony_ci u8 hw_link_rate; 176962306a36Sopenharmony_ci __le16 attached_dev_handle; 177062306a36Sopenharmony_ci __le32 phy_info; 177162306a36Sopenharmony_ci __le16 attached_device_info; 177262306a36Sopenharmony_ci __le16 reserved1a; 177362306a36Sopenharmony_ci __le16 expander_dev_handle; 177462306a36Sopenharmony_ci u8 change_count; 177562306a36Sopenharmony_ci u8 negotiated_link_rate; 177662306a36Sopenharmony_ci u8 phy_identifier; 177762306a36Sopenharmony_ci u8 attached_phy_identifier; 177862306a36Sopenharmony_ci u8 reserved22; 177962306a36Sopenharmony_ci u8 discovery_info; 178062306a36Sopenharmony_ci __le32 attached_phy_info; 178162306a36Sopenharmony_ci u8 zone_group; 178262306a36Sopenharmony_ci u8 self_config_status; 178362306a36Sopenharmony_ci __le16 reserved2a; 178462306a36Sopenharmony_ci __le16 slot; 178562306a36Sopenharmony_ci __le16 slot_index; 178662306a36Sopenharmony_ci}; 178762306a36Sopenharmony_ci 178862306a36Sopenharmony_ci#define MPI3_SASEXPANDER1_PAGEVERSION (0x00) 178962306a36Sopenharmony_ci#define MPI3_SASEXPANDER1_DISCINFO_BAD_PHY_DISABLED (0x04) 179062306a36Sopenharmony_ci#define MPI3_SASEXPANDER1_DISCINFO_LINK_STATUS_CHANGE (0x02) 179162306a36Sopenharmony_ci#define MPI3_SASEXPANDER1_DISCINFO_NO_ROUTING_ENTRIES (0x01) 179262306a36Sopenharmony_ci#ifndef MPI3_SASEXPANDER2_MAX_NUM_PHYS 179362306a36Sopenharmony_ci#define MPI3_SASEXPANDER2_MAX_NUM_PHYS (1) 179462306a36Sopenharmony_ci#endif 179562306a36Sopenharmony_cistruct mpi3_sasexpander2_phy_element { 179662306a36Sopenharmony_ci u8 link_change_count; 179762306a36Sopenharmony_ci u8 reserved01; 179862306a36Sopenharmony_ci __le16 rate_change_count; 179962306a36Sopenharmony_ci __le32 reserved04; 180062306a36Sopenharmony_ci}; 180162306a36Sopenharmony_ci 180262306a36Sopenharmony_cistruct mpi3_sas_expander_page2 { 180362306a36Sopenharmony_ci struct mpi3_config_page_header header; 180462306a36Sopenharmony_ci u8 num_phys; 180562306a36Sopenharmony_ci u8 reserved09; 180662306a36Sopenharmony_ci __le16 dev_handle; 180762306a36Sopenharmony_ci __le32 reserved0c; 180862306a36Sopenharmony_ci struct mpi3_sasexpander2_phy_element phy[MPI3_SASEXPANDER2_MAX_NUM_PHYS]; 180962306a36Sopenharmony_ci}; 181062306a36Sopenharmony_ci 181162306a36Sopenharmony_ci#define MPI3_SASEXPANDER2_PAGEVERSION (0x00) 181262306a36Sopenharmony_cistruct mpi3_sas_port_page0 { 181362306a36Sopenharmony_ci struct mpi3_config_page_header header; 181462306a36Sopenharmony_ci u8 port_number; 181562306a36Sopenharmony_ci u8 reserved09; 181662306a36Sopenharmony_ci u8 port_width; 181762306a36Sopenharmony_ci u8 reserved0b; 181862306a36Sopenharmony_ci u8 zone_group; 181962306a36Sopenharmony_ci u8 reserved0d[3]; 182062306a36Sopenharmony_ci __le64 sas_address; 182162306a36Sopenharmony_ci __le16 device_info; 182262306a36Sopenharmony_ci __le16 reserved1a; 182362306a36Sopenharmony_ci __le32 reserved1c; 182462306a36Sopenharmony_ci}; 182562306a36Sopenharmony_ci 182662306a36Sopenharmony_ci#define MPI3_SASPORT0_PAGEVERSION (0x00) 182762306a36Sopenharmony_cistruct mpi3_sas_phy_page0 { 182862306a36Sopenharmony_ci struct mpi3_config_page_header header; 182962306a36Sopenharmony_ci __le16 owner_dev_handle; 183062306a36Sopenharmony_ci __le16 reserved0a; 183162306a36Sopenharmony_ci __le16 attached_dev_handle; 183262306a36Sopenharmony_ci u8 attached_phy_identifier; 183362306a36Sopenharmony_ci u8 reserved0f; 183462306a36Sopenharmony_ci __le32 attached_phy_info; 183562306a36Sopenharmony_ci u8 programmed_link_rate; 183662306a36Sopenharmony_ci u8 hw_link_rate; 183762306a36Sopenharmony_ci u8 change_count; 183862306a36Sopenharmony_ci u8 flags; 183962306a36Sopenharmony_ci __le32 phy_info; 184062306a36Sopenharmony_ci u8 negotiated_link_rate; 184162306a36Sopenharmony_ci u8 reserved1d[3]; 184262306a36Sopenharmony_ci __le16 slot; 184362306a36Sopenharmony_ci __le16 slot_index; 184462306a36Sopenharmony_ci}; 184562306a36Sopenharmony_ci 184662306a36Sopenharmony_ci#define MPI3_SASPHY0_PAGEVERSION (0x00) 184762306a36Sopenharmony_ci#define MPI3_SASPHY0_FLAGS_SGPIO_DIRECT_ATTACH_ENC (0x01) 184862306a36Sopenharmony_cistruct mpi3_sas_phy_page1 { 184962306a36Sopenharmony_ci struct mpi3_config_page_header header; 185062306a36Sopenharmony_ci __le32 reserved08; 185162306a36Sopenharmony_ci __le32 invalid_dword_count; 185262306a36Sopenharmony_ci __le32 running_disparity_error_count; 185362306a36Sopenharmony_ci __le32 loss_dword_synch_count; 185462306a36Sopenharmony_ci __le32 phy_reset_problem_count; 185562306a36Sopenharmony_ci}; 185662306a36Sopenharmony_ci 185762306a36Sopenharmony_ci#define MPI3_SASPHY1_PAGEVERSION (0x00) 185862306a36Sopenharmony_cistruct mpi3_sas_phy2_phy_event { 185962306a36Sopenharmony_ci u8 phy_event_code; 186062306a36Sopenharmony_ci u8 reserved01[3]; 186162306a36Sopenharmony_ci __le32 phy_event_info; 186262306a36Sopenharmony_ci}; 186362306a36Sopenharmony_ci 186462306a36Sopenharmony_ci#ifndef MPI3_SAS_PHY2_PHY_EVENT_MAX 186562306a36Sopenharmony_ci#define MPI3_SAS_PHY2_PHY_EVENT_MAX (1) 186662306a36Sopenharmony_ci#endif 186762306a36Sopenharmony_cistruct mpi3_sas_phy_page2 { 186862306a36Sopenharmony_ci struct mpi3_config_page_header header; 186962306a36Sopenharmony_ci __le32 reserved08; 187062306a36Sopenharmony_ci u8 num_phy_events; 187162306a36Sopenharmony_ci u8 reserved0d[3]; 187262306a36Sopenharmony_ci struct mpi3_sas_phy2_phy_event phy_event[MPI3_SAS_PHY2_PHY_EVENT_MAX]; 187362306a36Sopenharmony_ci}; 187462306a36Sopenharmony_ci 187562306a36Sopenharmony_ci#define MPI3_SASPHY2_PAGEVERSION (0x00) 187662306a36Sopenharmony_cistruct mpi3_sas_phy3_phy_event_config { 187762306a36Sopenharmony_ci u8 phy_event_code; 187862306a36Sopenharmony_ci u8 reserved01[3]; 187962306a36Sopenharmony_ci u8 counter_type; 188062306a36Sopenharmony_ci u8 threshold_window; 188162306a36Sopenharmony_ci u8 time_units; 188262306a36Sopenharmony_ci u8 reserved07; 188362306a36Sopenharmony_ci __le32 event_threshold; 188462306a36Sopenharmony_ci __le16 threshold_flags; 188562306a36Sopenharmony_ci __le16 reserved0e; 188662306a36Sopenharmony_ci}; 188762306a36Sopenharmony_ci 188862306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_NO_EVENT (0x00) 188962306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_INVALID_DWORD (0x01) 189062306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RUNNING_DISPARITY_ERROR (0x02) 189162306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_LOSS_DWORD_SYNC (0x03) 189262306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_PHY_RESET_PROBLEM (0x04) 189362306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_ELASTICITY_BUF_OVERFLOW (0x05) 189462306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_ERROR (0x06) 189562306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_INV_SPL_PACKETS (0x07) 189662306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_LOSS_SPL_PACKET_SYNC (0x08) 189762306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_ADDR_FRAME_ERROR (0x20) 189862306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_AC_OPEN_REJECT (0x21) 189962306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_AC_OPEN_REJECT (0x22) 190062306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_RC_OPEN_REJECT (0x23) 190162306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_RC_OPEN_REJECT (0x24) 190262306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_AIP_PARTIAL_WAITING_ON (0x25) 190362306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_AIP_CONNECT_WAITING_ON (0x26) 190462306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_BREAK (0x27) 190562306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_BREAK (0x28) 190662306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_BREAK_TIMEOUT (0x29) 190762306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_CONNECTION (0x2a) 190862306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_PEAKTX_PATHWAY_BLOCKED (0x2b) 190962306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_PEAKTX_ARB_WAIT_TIME (0x2c) 191062306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_PEAK_ARB_WAIT_TIME (0x2d) 191162306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_PEAK_CONNECT_TIME (0x2e) 191262306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_PERSIST_CONN (0x2f) 191362306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_SSP_FRAMES (0x40) 191462306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_SSP_FRAMES (0x41) 191562306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_SSP_ERROR_FRAMES (0x42) 191662306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_SSP_ERROR_FRAMES (0x43) 191762306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_CREDIT_BLOCKED (0x44) 191862306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_CREDIT_BLOCKED (0x45) 191962306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_SATA_FRAMES (0x50) 192062306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_SATA_FRAMES (0x51) 192162306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SATA_OVERFLOW (0x52) 192262306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_SMP_FRAMES (0x60) 192362306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_SMP_FRAMES (0x61) 192462306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_SMP_ERROR_FRAMES (0x63) 192562306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_HOTPLUG_TIMEOUT (0xd0) 192662306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_MISALIGNED_MUX_PRIMITIVE (0xd1) 192762306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RX_AIP (0xd2) 192862306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_LCARB_WAIT_TIME (0xd3) 192962306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_RCVD_CONN_RESP_WAIT_TIME (0xd4) 193062306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_LCCONN_TIME (0xd5) 193162306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SSP_TX_START_TRANSMIT (0xd6) 193262306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SATA_TX_START (0xd7) 193362306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SMP_TX_START_TRANSMT (0xd8) 193462306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_TX_SMP_BREAK_CONN (0xd9) 193562306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SSP_RX_START_RECEIVE (0xda) 193662306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SATA_RX_START_RECEIVE (0xdb) 193762306a36Sopenharmony_ci#define MPI3_SASPHY3_EVENT_CODE_SMP_RX_START_RECEIVE (0xdc) 193862306a36Sopenharmony_ci#define MPI3_SASPHY3_COUNTER_TYPE_WRAPPING (0x00) 193962306a36Sopenharmony_ci#define MPI3_SASPHY3_COUNTER_TYPE_SATURATING (0x01) 194062306a36Sopenharmony_ci#define MPI3_SASPHY3_COUNTER_TYPE_PEAK_VALUE (0x02) 194162306a36Sopenharmony_ci#define MPI3_SASPHY3_TIME_UNITS_10_MICROSECONDS (0x00) 194262306a36Sopenharmony_ci#define MPI3_SASPHY3_TIME_UNITS_100_MICROSECONDS (0x01) 194362306a36Sopenharmony_ci#define MPI3_SASPHY3_TIME_UNITS_1_MILLISECOND (0x02) 194462306a36Sopenharmony_ci#define MPI3_SASPHY3_TIME_UNITS_10_MILLISECONDS (0x03) 194562306a36Sopenharmony_ci#define MPI3_SASPHY3_TFLAGS_PHY_RESET (0x0002) 194662306a36Sopenharmony_ci#define MPI3_SASPHY3_TFLAGS_EVENT_NOTIFY (0x0001) 194762306a36Sopenharmony_ci#ifndef MPI3_SAS_PHY3_PHY_EVENT_MAX 194862306a36Sopenharmony_ci#define MPI3_SAS_PHY3_PHY_EVENT_MAX (1) 194962306a36Sopenharmony_ci#endif 195062306a36Sopenharmony_cistruct mpi3_sas_phy_page3 { 195162306a36Sopenharmony_ci struct mpi3_config_page_header header; 195262306a36Sopenharmony_ci __le32 reserved08; 195362306a36Sopenharmony_ci u8 num_phy_events; 195462306a36Sopenharmony_ci u8 reserved0d[3]; 195562306a36Sopenharmony_ci struct mpi3_sas_phy3_phy_event_config phy_event_config[MPI3_SAS_PHY3_PHY_EVENT_MAX]; 195662306a36Sopenharmony_ci}; 195762306a36Sopenharmony_ci 195862306a36Sopenharmony_ci#define MPI3_SASPHY3_PAGEVERSION (0x00) 195962306a36Sopenharmony_cistruct mpi3_sas_phy_page4 { 196062306a36Sopenharmony_ci struct mpi3_config_page_header header; 196162306a36Sopenharmony_ci u8 reserved08[3]; 196262306a36Sopenharmony_ci u8 flags; 196362306a36Sopenharmony_ci u8 initial_frame[28]; 196462306a36Sopenharmony_ci}; 196562306a36Sopenharmony_ci 196662306a36Sopenharmony_ci#define MPI3_SASPHY4_PAGEVERSION (0x00) 196762306a36Sopenharmony_ci#define MPI3_SASPHY4_FLAGS_FRAME_VALID (0x02) 196862306a36Sopenharmony_ci#define MPI3_SASPHY4_FLAGS_SATA_FRAME (0x01) 196962306a36Sopenharmony_ci#define MPI3_PCIE_LINK_RETIMERS_MASK (0x30) 197062306a36Sopenharmony_ci#define MPI3_PCIE_LINK_RETIMERS_SHIFT (4) 197162306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_MASK (0x0f) 197262306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_UNKNOWN (0x00) 197362306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_PHY_DISABLED (0x01) 197462306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_2_5 (0x02) 197562306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_5_0 (0x03) 197662306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_8_0 (0x04) 197762306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_16_0 (0x05) 197862306a36Sopenharmony_ci#define MPI3_PCIE_NEG_LINK_RATE_32_0 (0x06) 197962306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_ENABLE_NONE (0x0) 198062306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_ENABLE_L0S (0x1) 198162306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_ENABLE_L1 (0x2) 198262306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_ENABLE_L0S_L1 (0x3) 198362306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_SUPPORT_NONE (0x0) 198462306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_SUPPORT_L0S (0x1) 198562306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_SUPPORT_L1 (0x2) 198662306a36Sopenharmony_ci#define MPI3_PCIE_ASPM_SUPPORT_L0S_L1 (0x3) 198762306a36Sopenharmony_cistruct mpi3_pcie_io_unit0_phy_data { 198862306a36Sopenharmony_ci u8 link; 198962306a36Sopenharmony_ci u8 link_flags; 199062306a36Sopenharmony_ci u8 phy_flags; 199162306a36Sopenharmony_ci u8 negotiated_link_rate; 199262306a36Sopenharmony_ci __le16 attached_dev_handle; 199362306a36Sopenharmony_ci __le16 controller_dev_handle; 199462306a36Sopenharmony_ci __le32 enumeration_status; 199562306a36Sopenharmony_ci u8 io_unit_port; 199662306a36Sopenharmony_ci u8 reserved0d[3]; 199762306a36Sopenharmony_ci}; 199862306a36Sopenharmony_ci 199962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_LINKFLAGS_CONFIG_SOURCE_MASK (0x10) 200062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_LINKFLAGS_CONFIG_SOURCE_IOUNIT1 (0x00) 200162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_LINKFLAGS_CONFIG_SOURCE_BKPLANE (0x10) 200262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_LINKFLAGS_ENUM_IN_PROGRESS (0x08) 200362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_PHYFLAGS_PHY_DISABLED (0x08) 200462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_PHYFLAGS_HOST_PHY (0x01) 200562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ES_MAX_SWITCH_DEPTH_EXCEEDED (0x80000000) 200662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ES_MAX_SWITCHES_EXCEEDED (0x40000000) 200762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ES_MAX_ENDPOINTS_EXCEEDED (0x20000000) 200862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ES_INSUFFICIENT_RESOURCES (0x10000000) 200962306a36Sopenharmony_ci#ifndef MPI3_PCIE_IO_UNIT0_PHY_MAX 201062306a36Sopenharmony_ci#define MPI3_PCIE_IO_UNIT0_PHY_MAX (1) 201162306a36Sopenharmony_ci#endif 201262306a36Sopenharmony_cistruct mpi3_pcie_io_unit_page0 { 201362306a36Sopenharmony_ci struct mpi3_config_page_header header; 201462306a36Sopenharmony_ci __le32 reserved08; 201562306a36Sopenharmony_ci u8 num_phys; 201662306a36Sopenharmony_ci u8 init_status; 201762306a36Sopenharmony_ci u8 aspm; 201862306a36Sopenharmony_ci u8 reserved0f; 201962306a36Sopenharmony_ci struct mpi3_pcie_io_unit0_phy_data phy_data[MPI3_PCIE_IO_UNIT0_PHY_MAX]; 202062306a36Sopenharmony_ci}; 202162306a36Sopenharmony_ci 202262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_PAGEVERSION (0x00) 202362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_NO_ERRORS (0x00) 202462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_NEEDS_INITIALIZATION (0x01) 202562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_NO_TARGETS_ALLOCATED (0x02) 202662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_RESOURCE_ALLOC_FAILED (0x03) 202762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_BAD_NUM_PHYS (0x04) 202862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_UNSUPPORTED_CONFIG (0x05) 202962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_HOST_PORT_MISMATCH (0x06) 203062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_PHYS_NOT_CONSECUTIVE (0x07) 203162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_BAD_CLOCKING_MODE (0x08) 203262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_PROD_SPEC_START (0xf0) 203362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_INITSTATUS_PROD_SPEC_END (0xff) 203462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_SWITCH_STATES_MASK (0xc0) 203562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_SWITCH_STATES_SHIFT (6) 203662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_DIRECT_STATES_MASK (0x30) 203762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_DIRECT_STATES_SHIFT (4) 203862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_SWITCH_SUPPORT_MASK (0x0c) 203962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_SWITCH_SUPPORT_SHIFT (2) 204062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_DIRECT_SUPPORT_MASK (0x03) 204162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT0_ASPM_DIRECT_SUPPORT_SHIFT (0) 204262306a36Sopenharmony_cistruct mpi3_pcie_io_unit1_phy_data { 204362306a36Sopenharmony_ci u8 link; 204462306a36Sopenharmony_ci u8 link_flags; 204562306a36Sopenharmony_ci u8 phy_flags; 204662306a36Sopenharmony_ci u8 max_min_link_rate; 204762306a36Sopenharmony_ci __le32 reserved04; 204862306a36Sopenharmony_ci __le32 reserved08; 204962306a36Sopenharmony_ci}; 205062306a36Sopenharmony_ci 205162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_LINKFLAGS_PCIE_CLK_MODE_MASK (0x03) 205262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_LINKFLAGS_PCIE_CLK_MODE_DIS_SEPARATE_REFCLK (0x00) 205362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_LINKFLAGS_PCIE_CLK_MODE_EN_SRIS (0x01) 205462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_LINKFLAGS_PCIE_CLK_MODE_EN_SRNS (0x02) 205562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_PHYFLAGS_PHY_DISABLE (0x08) 205662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_MASK (0xf0) 205762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_SHIFT (4) 205862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_2_5 (0x20) 205962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_5_0 (0x30) 206062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_8_0 (0x40) 206162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_16_0 (0x50) 206262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_MMLR_MAX_RATE_32_0 (0x60) 206362306a36Sopenharmony_ci#ifndef MPI3_PCIE_IO_UNIT1_PHY_MAX 206462306a36Sopenharmony_ci#define MPI3_PCIE_IO_UNIT1_PHY_MAX (1) 206562306a36Sopenharmony_ci#endif 206662306a36Sopenharmony_cistruct mpi3_pcie_io_unit_page1 { 206762306a36Sopenharmony_ci struct mpi3_config_page_header header; 206862306a36Sopenharmony_ci __le32 control_flags; 206962306a36Sopenharmony_ci __le32 reserved0c; 207062306a36Sopenharmony_ci u8 num_phys; 207162306a36Sopenharmony_ci u8 reserved11; 207262306a36Sopenharmony_ci u8 aspm; 207362306a36Sopenharmony_ci u8 reserved13; 207462306a36Sopenharmony_ci struct mpi3_pcie_io_unit1_phy_data phy_data[MPI3_PCIE_IO_UNIT1_PHY_MAX]; 207562306a36Sopenharmony_ci}; 207662306a36Sopenharmony_ci 207762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_PAGEVERSION (0x00) 207862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_PERST_OVERRIDE_MASK (0xe0000000) 207962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_PERST_OVERRIDE_NONE (0x00000000) 208062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_PERST_OVERRIDE_DEASSERT (0x20000000) 208162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_PERST_OVERRIDE_ASSERT (0x40000000) 208262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_PERST_OVERRIDE_BACKPLANE_ERROR (0x60000000) 208362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_REFCLK_OVERRIDE_MASK (0x1c000000) 208462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_REFCLK_OVERRIDE_NONE (0x00000000) 208562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_REFCLK_OVERRIDE_DEASSERT (0x04000000) 208662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_REFCLK_OVERRIDE_ASSERT (0x08000000) 208762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_REFCLK_OVERRIDE_BACKPLANE_ERROR (0x0c000000) 208862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_OVERRIDE_DISABLE (0x00000080) 208962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_CLOCK_OVERRIDE_DISABLE (0x00000040) 209062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_CLOCK_OVERRIDE_MODE_MASK (0x00000030) 209162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_CLOCK_OVERRIDE_MODE_SHIFT (4) 209262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_CLOCK_OVERRIDE_MODE_SRIS_SRNS_DISABLED (0x00000000) 209362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_CLOCK_OVERRIDE_MODE_SRIS_ENABLED (0x00000010) 209462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_CLOCK_OVERRIDE_MODE_SRNS_ENABLED (0x00000020) 209562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_MASK (0x0000000f) 209662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_USE_BACKPLANE (0x00000000) 209762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_MAX_2_5 (0x00000002) 209862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_MAX_5_0 (0x00000003) 209962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_MAX_8_0 (0x00000004) 210062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_MAX_16_0 (0x00000005) 210162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_CONTROL_FLAGS_LINK_RATE_OVERRIDE_MAX_32_0 (0x00000006) 210262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_ASPM_SWITCH_MASK (0x0c) 210362306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_ASPM_SWITCH_SHIFT (2) 210462306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_ASPM_DIRECT_MASK (0x03) 210562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT1_ASPM_DIRECT_SHIFT (0) 210662306a36Sopenharmony_cistruct mpi3_pcie_io_unit_page2 { 210762306a36Sopenharmony_ci struct mpi3_config_page_header header; 210862306a36Sopenharmony_ci __le16 nvme_max_q_dx1; 210962306a36Sopenharmony_ci __le16 nvme_max_q_dx2; 211062306a36Sopenharmony_ci u8 nvme_abort_to; 211162306a36Sopenharmony_ci u8 reserved0d; 211262306a36Sopenharmony_ci __le16 nvme_max_q_dx4; 211362306a36Sopenharmony_ci}; 211462306a36Sopenharmony_ci 211562306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT2_PAGEVERSION (0x00) 211662306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ERROR_RECEIVER_ERROR (0) 211762306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ERROR_RECOVERY (1) 211862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ERROR_CORRECTABLE_ERROR_MSG (2) 211962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ERROR_BAD_DLLP (3) 212062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ERROR_BAD_TLP (4) 212162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_NUM_ERROR_INDEX (5) 212262306a36Sopenharmony_cistruct mpi3_pcie_io_unit3_error { 212362306a36Sopenharmony_ci __le16 threshold_count; 212462306a36Sopenharmony_ci __le16 reserved02; 212562306a36Sopenharmony_ci}; 212662306a36Sopenharmony_ci 212762306a36Sopenharmony_cistruct mpi3_pcie_io_unit_page3 { 212862306a36Sopenharmony_ci struct mpi3_config_page_header header; 212962306a36Sopenharmony_ci u8 threshold_window; 213062306a36Sopenharmony_ci u8 threshold_action; 213162306a36Sopenharmony_ci u8 escalation_count; 213262306a36Sopenharmony_ci u8 escalation_action; 213362306a36Sopenharmony_ci u8 num_errors; 213462306a36Sopenharmony_ci u8 reserved0d[3]; 213562306a36Sopenharmony_ci struct mpi3_pcie_io_unit3_error error[MPI3_PCIEIOUNIT3_NUM_ERROR_INDEX]; 213662306a36Sopenharmony_ci}; 213762306a36Sopenharmony_ci 213862306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_PAGEVERSION (0x00) 213962306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ACTION_NO_ACTION (0x00) 214062306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ACTION_HOT_RESET (0x01) 214162306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ACTION_REDUCE_LINK_RATE_ONLY (0x02) 214262306a36Sopenharmony_ci#define MPI3_PCIEIOUNIT3_ACTION_REDUCE_LINK_RATE_NO_ACCESS (0x03) 214362306a36Sopenharmony_cistruct mpi3_pcie_switch_page0 { 214462306a36Sopenharmony_ci struct mpi3_config_page_header header; 214562306a36Sopenharmony_ci u8 io_unit_port; 214662306a36Sopenharmony_ci u8 switch_status; 214762306a36Sopenharmony_ci u8 reserved0a[2]; 214862306a36Sopenharmony_ci __le16 dev_handle; 214962306a36Sopenharmony_ci __le16 parent_dev_handle; 215062306a36Sopenharmony_ci u8 num_ports; 215162306a36Sopenharmony_ci u8 pcie_level; 215262306a36Sopenharmony_ci __le16 reserved12; 215362306a36Sopenharmony_ci __le32 reserved14; 215462306a36Sopenharmony_ci __le32 reserved18; 215562306a36Sopenharmony_ci __le32 reserved1c; 215662306a36Sopenharmony_ci}; 215762306a36Sopenharmony_ci 215862306a36Sopenharmony_ci#define MPI3_PCIESWITCH0_PAGEVERSION (0x00) 215962306a36Sopenharmony_ci#define MPI3_PCIESWITCH0_SS_NOT_RESPONDING (0x02) 216062306a36Sopenharmony_ci#define MPI3_PCIESWITCH0_SS_RESPONDING (0x03) 216162306a36Sopenharmony_ci#define MPI3_PCIESWITCH0_SS_DELAY_NOT_RESPONDING (0x04) 216262306a36Sopenharmony_cistruct mpi3_pcie_switch_page1 { 216362306a36Sopenharmony_ci struct mpi3_config_page_header header; 216462306a36Sopenharmony_ci u8 io_unit_port; 216562306a36Sopenharmony_ci u8 flags; 216662306a36Sopenharmony_ci __le16 reserved0a; 216762306a36Sopenharmony_ci u8 num_ports; 216862306a36Sopenharmony_ci u8 port_num; 216962306a36Sopenharmony_ci __le16 attached_dev_handle; 217062306a36Sopenharmony_ci __le16 switch_dev_handle; 217162306a36Sopenharmony_ci u8 negotiated_port_width; 217262306a36Sopenharmony_ci u8 negotiated_link_rate; 217362306a36Sopenharmony_ci __le16 slot; 217462306a36Sopenharmony_ci __le16 slot_index; 217562306a36Sopenharmony_ci __le32 reserved18; 217662306a36Sopenharmony_ci}; 217762306a36Sopenharmony_ci 217862306a36Sopenharmony_ci#define MPI3_PCIESWITCH1_PAGEVERSION (0x00) 217962306a36Sopenharmony_ci#define MPI3_PCIESWITCH1_FLAGS_ASPMSTATE_MASK (0x0c) 218062306a36Sopenharmony_ci#define MPI3_PCIESWITCH1_FLAGS_ASPMSTATE_SHIFT (2) 218162306a36Sopenharmony_ci#define MPI3_PCIESWITCH1_FLAGS_ASPMSUPPORT_MASK (0x03) 218262306a36Sopenharmony_ci#define MPI3_PCIESWITCH1_FLAGS_ASPMSUPPORT_SHIFT (0) 218362306a36Sopenharmony_ci#ifndef MPI3_PCIESWITCH2_MAX_NUM_PORTS 218462306a36Sopenharmony_ci#define MPI3_PCIESWITCH2_MAX_NUM_PORTS (1) 218562306a36Sopenharmony_ci#endif 218662306a36Sopenharmony_cistruct mpi3_pcieswitch2_port_element { 218762306a36Sopenharmony_ci __le16 link_change_count; 218862306a36Sopenharmony_ci __le16 rate_change_count; 218962306a36Sopenharmony_ci __le32 reserved04; 219062306a36Sopenharmony_ci}; 219162306a36Sopenharmony_ci 219262306a36Sopenharmony_cistruct mpi3_pcie_switch_page2 { 219362306a36Sopenharmony_ci struct mpi3_config_page_header header; 219462306a36Sopenharmony_ci u8 num_ports; 219562306a36Sopenharmony_ci u8 reserved09; 219662306a36Sopenharmony_ci __le16 dev_handle; 219762306a36Sopenharmony_ci __le32 reserved0c; 219862306a36Sopenharmony_ci struct mpi3_pcieswitch2_port_element port[MPI3_PCIESWITCH2_MAX_NUM_PORTS]; 219962306a36Sopenharmony_ci}; 220062306a36Sopenharmony_ci 220162306a36Sopenharmony_ci#define MPI3_PCIESWITCH2_PAGEVERSION (0x00) 220262306a36Sopenharmony_cistruct mpi3_pcie_link_page0 { 220362306a36Sopenharmony_ci struct mpi3_config_page_header header; 220462306a36Sopenharmony_ci u8 link; 220562306a36Sopenharmony_ci u8 reserved09[3]; 220662306a36Sopenharmony_ci __le32 reserved0c; 220762306a36Sopenharmony_ci __le32 receiver_error_count; 220862306a36Sopenharmony_ci __le32 recovery_count; 220962306a36Sopenharmony_ci __le32 corr_error_msg_count; 221062306a36Sopenharmony_ci __le32 non_fatal_error_msg_count; 221162306a36Sopenharmony_ci __le32 fatal_error_msg_count; 221262306a36Sopenharmony_ci __le32 non_fatal_error_count; 221362306a36Sopenharmony_ci __le32 fatal_error_count; 221462306a36Sopenharmony_ci __le32 bad_dllp_count; 221562306a36Sopenharmony_ci __le32 bad_tlp_count; 221662306a36Sopenharmony_ci}; 221762306a36Sopenharmony_ci 221862306a36Sopenharmony_ci#define MPI3_PCIELINK0_PAGEVERSION (0x00) 221962306a36Sopenharmony_cistruct mpi3_enclosure_page0 { 222062306a36Sopenharmony_ci struct mpi3_config_page_header header; 222162306a36Sopenharmony_ci __le64 enclosure_logical_id; 222262306a36Sopenharmony_ci __le16 flags; 222362306a36Sopenharmony_ci __le16 enclosure_handle; 222462306a36Sopenharmony_ci __le16 num_slots; 222562306a36Sopenharmony_ci __le16 reserved16; 222662306a36Sopenharmony_ci u8 io_unit_port; 222762306a36Sopenharmony_ci u8 enclosure_level; 222862306a36Sopenharmony_ci __le16 sep_dev_handle; 222962306a36Sopenharmony_ci u8 chassis_slot; 223062306a36Sopenharmony_ci u8 reserved1d[3]; 223162306a36Sopenharmony_ci}; 223262306a36Sopenharmony_ci 223362306a36Sopenharmony_ci#define MPI3_ENCLOSURE0_PAGEVERSION (0x00) 223462306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_TYPE_MASK (0xc000) 223562306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_TYPE_VIRTUAL (0x0000) 223662306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_TYPE_SAS (0x4000) 223762306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_TYPE_PCIE (0x8000) 223862306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_CHASSIS_SLOT_VALID (0x0020) 223962306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_DEV_PRESENT_MASK (0x0010) 224062306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_DEV_NOT_FOUND (0x0000) 224162306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_ENCL_DEV_PRESENT (0x0010) 224262306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_MNG_MASK (0x000f) 224362306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_MNG_UNKNOWN (0x0000) 224462306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_MNG_IOC_SES (0x0001) 224562306a36Sopenharmony_ci#define MPI3_ENCLS0_FLAGS_MNG_SES_ENCLOSURE (0x0002) 224662306a36Sopenharmony_ci#define MPI3_DEVICE_DEVFORM_SAS_SATA (0x00) 224762306a36Sopenharmony_ci#define MPI3_DEVICE_DEVFORM_PCIE (0x01) 224862306a36Sopenharmony_ci#define MPI3_DEVICE_DEVFORM_VD (0x02) 224962306a36Sopenharmony_cistruct mpi3_device0_sas_sata_format { 225062306a36Sopenharmony_ci __le64 sas_address; 225162306a36Sopenharmony_ci __le16 flags; 225262306a36Sopenharmony_ci __le16 device_info; 225362306a36Sopenharmony_ci u8 phy_num; 225462306a36Sopenharmony_ci u8 attached_phy_identifier; 225562306a36Sopenharmony_ci u8 max_port_connections; 225662306a36Sopenharmony_ci u8 zone_group; 225762306a36Sopenharmony_ci}; 225862306a36Sopenharmony_ci 225962306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_WRITE_SAME_UNMAP_NCQ (0x0400) 226062306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_SLUMBER_CAP (0x0200) 226162306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_PARTIAL_CAP (0x0100) 226262306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_ASYNC_NOTIFY (0x0080) 226362306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_SW_PRESERVE (0x0040) 226462306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_UNSUPP_DEV (0x0020) 226562306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_48BIT_LBA (0x0010) 226662306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_SMART_SUPP (0x0008) 226762306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_NCQ_SUPP (0x0004) 226862306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_FUA_SUPP (0x0002) 226962306a36Sopenharmony_ci#define MPI3_DEVICE0_SASSATA_FLAGS_PERSIST_CAP (0x0001) 227062306a36Sopenharmony_cistruct mpi3_device0_pcie_format { 227162306a36Sopenharmony_ci u8 supported_link_rates; 227262306a36Sopenharmony_ci u8 max_port_width; 227362306a36Sopenharmony_ci u8 negotiated_port_width; 227462306a36Sopenharmony_ci u8 negotiated_link_rate; 227562306a36Sopenharmony_ci u8 port_num; 227662306a36Sopenharmony_ci u8 controller_reset_to; 227762306a36Sopenharmony_ci __le16 device_info; 227862306a36Sopenharmony_ci __le32 maximum_data_transfer_size; 227962306a36Sopenharmony_ci __le32 capabilities; 228062306a36Sopenharmony_ci __le16 noiob; 228162306a36Sopenharmony_ci u8 nvme_abort_to; 228262306a36Sopenharmony_ci u8 page_size; 228362306a36Sopenharmony_ci __le16 shutdown_latency; 228462306a36Sopenharmony_ci u8 recovery_info; 228562306a36Sopenharmony_ci u8 reserved17; 228662306a36Sopenharmony_ci}; 228762306a36Sopenharmony_ci 228862306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_LINK_RATE_32_0_SUPP (0x10) 228962306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_LINK_RATE_16_0_SUPP (0x08) 229062306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_LINK_RATE_8_0_SUPP (0x04) 229162306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_LINK_RATE_5_0_SUPP (0x02) 229262306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_LINK_RATE_2_5_SUPP (0x01) 229362306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_MASK (0x0007) 229462306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_NO_DEVICE (0x0000) 229562306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_NVME_DEVICE (0x0001) 229662306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_SWITCH_DEVICE (0x0002) 229762306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_SCSI_DEVICE (0x0003) 229862306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_ASPM_MASK (0x0030) 229962306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_ASPM_SHIFT (4) 230062306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_MASK (0x00c0) 230162306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_SHIFT (6) 230262306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_0 (0x0000) 230362306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_1 (0x0040) 230462306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_2 (0x0080) 230562306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_DEVICE_INFO_PITYPE_3 (0x00c0) 230662306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_SGL_EXTRA_LENGTH_SUPPORTED (0x00000020) 230762306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_METADATA_SEPARATED (0x00000010) 230862306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_SGL_DWORD_ALIGN_REQUIRED (0x00000008) 230962306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_SGL_FORMAT_SGL (0x00000004) 231062306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_SGL_FORMAT_PRP (0x00000000) 231162306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_BIT_BUCKET_SGL_SUPP (0x00000002) 231262306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_SGL_SUPP (0x00000001) 231362306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_ASPM_MASK (0x000000c0) 231462306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_CAP_ASPM_SHIFT (6) 231562306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_METHOD_MASK (0xe0) 231662306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_METHOD_NS_MGMT (0x00) 231762306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_METHOD_FORMAT (0x20) 231862306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_MASK (0x1f) 231962306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_NO_NS (0x00) 232062306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_NO_NSID_1 (0x01) 232162306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_TOO_MANY_NS (0x02) 232262306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_PROTECTION (0x03) 232362306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_METADATA_SZ (0x04) 232462306a36Sopenharmony_ci#define MPI3_DEVICE0_PCIE_RECOVER_REASON_LBA_DATA_SZ (0x05) 232562306a36Sopenharmony_cistruct mpi3_device0_vd_format { 232662306a36Sopenharmony_ci u8 vd_state; 232762306a36Sopenharmony_ci u8 raid_level; 232862306a36Sopenharmony_ci __le16 device_info; 232962306a36Sopenharmony_ci __le16 flags; 233062306a36Sopenharmony_ci __le16 io_throttle_group; 233162306a36Sopenharmony_ci __le16 io_throttle_group_low; 233262306a36Sopenharmony_ci __le16 io_throttle_group_high; 233362306a36Sopenharmony_ci __le32 reserved0c; 233462306a36Sopenharmony_ci}; 233562306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_STATE_OFFLINE (0x00) 233662306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_STATE_PARTIALLY_DEGRADED (0x01) 233762306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_STATE_DEGRADED (0x02) 233862306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_STATE_OPTIMAL (0x03) 233962306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_0 (0) 234062306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_1 (1) 234162306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_5 (5) 234262306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_6 (6) 234362306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_10 (10) 234462306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_50 (50) 234562306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_RAIDLEVEL_RAID_60 (60) 234662306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_DEVICE_INFO_HDD (0x0010) 234762306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_DEVICE_INFO_SSD (0x0008) 234862306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_DEVICE_INFO_NVME (0x0004) 234962306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_DEVICE_INFO_SATA (0x0002) 235062306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_DEVICE_INFO_SAS (0x0001) 235162306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_FLAGS_IO_THROTTLE_GROUP_QD_MASK (0xf000) 235262306a36Sopenharmony_ci#define MPI3_DEVICE0_VD_FLAGS_IO_THROTTLE_GROUP_QD_SHIFT (12) 235362306a36Sopenharmony_ciunion mpi3_device0_dev_spec_format { 235462306a36Sopenharmony_ci struct mpi3_device0_sas_sata_format sas_sata_format; 235562306a36Sopenharmony_ci struct mpi3_device0_pcie_format pcie_format; 235662306a36Sopenharmony_ci struct mpi3_device0_vd_format vd_format; 235762306a36Sopenharmony_ci}; 235862306a36Sopenharmony_ci 235962306a36Sopenharmony_cistruct mpi3_device_page0 { 236062306a36Sopenharmony_ci struct mpi3_config_page_header header; 236162306a36Sopenharmony_ci __le16 dev_handle; 236262306a36Sopenharmony_ci __le16 parent_dev_handle; 236362306a36Sopenharmony_ci __le16 slot; 236462306a36Sopenharmony_ci __le16 enclosure_handle; 236562306a36Sopenharmony_ci __le64 wwid; 236662306a36Sopenharmony_ci __le16 persistent_id; 236762306a36Sopenharmony_ci u8 io_unit_port; 236862306a36Sopenharmony_ci u8 access_status; 236962306a36Sopenharmony_ci __le16 flags; 237062306a36Sopenharmony_ci __le16 reserved1e; 237162306a36Sopenharmony_ci __le16 slot_index; 237262306a36Sopenharmony_ci __le16 queue_depth; 237362306a36Sopenharmony_ci u8 reserved24[3]; 237462306a36Sopenharmony_ci u8 device_form; 237562306a36Sopenharmony_ci union mpi3_device0_dev_spec_format device_specific; 237662306a36Sopenharmony_ci}; 237762306a36Sopenharmony_ci 237862306a36Sopenharmony_ci#define MPI3_DEVICE0_PAGEVERSION (0x00) 237962306a36Sopenharmony_ci#define MPI3_DEVICE0_PARENT_INVALID (0xffff) 238062306a36Sopenharmony_ci#define MPI3_DEVICE0_ENCLOSURE_HANDLE_NO_ENCLOSURE (0x0000) 238162306a36Sopenharmony_ci#define MPI3_DEVICE0_WWID_INVALID (0xffffffffffffffff) 238262306a36Sopenharmony_ci#define MPI3_DEVICE0_PERSISTENTID_INVALID (0xffff) 238362306a36Sopenharmony_ci#define MPI3_DEVICE0_IOUNITPORT_INVALID (0xff) 238462306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NO_ERRORS (0x00) 238562306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NEEDS_INITIALIZATION (0x01) 238662306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_CAP_UNSUPPORTED (0x02) 238762306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_DEVICE_BLOCKED (0x03) 238862306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_UNAUTHORIZED (0x04) 238962306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_DEVICE_MISSING_DELAY (0x05) 239062306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PREPARE (0x06) 239162306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SAFE_MODE (0x07) 239262306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_GENERIC_MAX (0x0f) 239362306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SAS_UNKNOWN (0x10) 239462306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_ROUTE_NOT_ADDRESSABLE (0x11) 239562306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SMP_ERROR_NOT_ADDRESSABLE (0x12) 239662306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SAS_MAX (0x1f) 239762306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_UNKNOWN (0x20) 239862306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_AFFILIATION_CONFLICT (0x21) 239962306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_DIAG (0x22) 240062306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_IDENTIFICATION (0x23) 240162306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_CHECK_POWER (0x24) 240262306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_PIO_SN (0x25) 240362306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_MDMA_SN (0x26) 240462306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_UDMA_SN (0x27) 240562306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_ZONING_VIOLATION (0x28) 240662306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_NOT_ADDRESSABLE (0x29) 240762306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_SIF_MAX (0x2f) 240862306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PCIE_UNKNOWN (0x30) 240962306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PCIE_MEM_SPACE_ACCESS (0x31) 241062306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PCIE_UNSUPPORTED (0x32) 241162306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PCIE_MSIX_REQUIRED (0x33) 241262306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PCIE_ECRC_REQUIRED (0x34) 241362306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_PCIE_MAX (0x3f) 241462306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_UNKNOWN (0x40) 241562306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_READY_TIMEOUT (0x41) 241662306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_DEVCFG_UNSUPPORTED (0x42) 241762306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_IDENTIFY_FAILED (0x43) 241862306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_QCONFIG_FAILED (0x44) 241962306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_QCREATION_FAILED (0x45) 242062306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_EVENTCFG_FAILED (0x46) 242162306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_GET_FEATURE_STAT_FAILED (0x47) 242262306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_IDLE_TIMEOUT (0x48) 242362306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_CTRL_FAILURE_STATUS (0x49) 242462306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_INSUFFICIENT_POWER (0x4a) 242562306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_DOORBELL_STRIDE (0x4b) 242662306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_MEM_PAGE_MIN_SIZE (0x4c) 242762306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_MEMORY_ALLOCATION (0x4d) 242862306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_COMPLETION_TIME (0x4e) 242962306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_BAR (0x4f) 243062306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_NS_DESCRIPTOR (0x50) 243162306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_INCOMPATIBLE_SETTINGS (0x51) 243262306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_TOO_MANY_ERRORS (0x52) 243362306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_NVME_MAX (0x5f) 243462306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_VD_UNKNOWN (0x80) 243562306a36Sopenharmony_ci#define MPI3_DEVICE0_ASTATUS_VD_MAX (0x8f) 243662306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_MASK (0xe000) 243762306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_NO_LIMIT (0x0000) 243862306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_256_LB (0x2000) 243962306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_MAX_WRITE_SAME_2048_LB (0x4000) 244062306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_CONTROLLER_DEV_HANDLE (0x0080) 244162306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_IO_THROTTLING_REQUIRED (0x0010) 244262306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_HIDDEN (0x0008) 244362306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_ATT_METHOD_VIRTUAL (0x0004) 244462306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_ATT_METHOD_DIR_ATTACHED (0x0002) 244562306a36Sopenharmony_ci#define MPI3_DEVICE0_FLAGS_DEVICE_PRESENT (0x0001) 244662306a36Sopenharmony_ci#define MPI3_DEVICE0_QUEUE_DEPTH_NOT_APPLICABLE (0x0000) 244762306a36Sopenharmony_cistruct mpi3_device1_sas_sata_format { 244862306a36Sopenharmony_ci __le32 reserved00; 244962306a36Sopenharmony_ci}; 245062306a36Sopenharmony_cistruct mpi3_device1_pcie_format { 245162306a36Sopenharmony_ci __le16 vendor_id; 245262306a36Sopenharmony_ci __le16 device_id; 245362306a36Sopenharmony_ci __le16 subsystem_vendor_id; 245462306a36Sopenharmony_ci __le16 subsystem_id; 245562306a36Sopenharmony_ci __le32 reserved08; 245662306a36Sopenharmony_ci u8 revision_id; 245762306a36Sopenharmony_ci u8 reserved0d; 245862306a36Sopenharmony_ci __le16 pci_parameters; 245962306a36Sopenharmony_ci}; 246062306a36Sopenharmony_ci 246162306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_DATA_SIZE_128B (0x0) 246262306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_DATA_SIZE_256B (0x1) 246362306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_DATA_SIZE_512B (0x2) 246462306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_DATA_SIZE_1024B (0x3) 246562306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_DATA_SIZE_2048B (0x4) 246662306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_DATA_SIZE_4096B (0x5) 246762306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_MAX_READ_REQ_MASK (0x01c0) 246862306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_MAX_READ_REQ_SHIFT (6) 246962306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_CURR_MAX_PAYLOAD_MASK (0x0038) 247062306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_CURR_MAX_PAYLOAD_SHIFT (3) 247162306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_SUPP_MAX_PAYLOAD_MASK (0x0007) 247262306a36Sopenharmony_ci#define MPI3_DEVICE1_PCIE_PARAMS_SUPP_MAX_PAYLOAD_SHIFT (0) 247362306a36Sopenharmony_cistruct mpi3_device1_vd_format { 247462306a36Sopenharmony_ci __le32 reserved00; 247562306a36Sopenharmony_ci}; 247662306a36Sopenharmony_ci 247762306a36Sopenharmony_ciunion mpi3_device1_dev_spec_format { 247862306a36Sopenharmony_ci struct mpi3_device1_sas_sata_format sas_sata_format; 247962306a36Sopenharmony_ci struct mpi3_device1_pcie_format pcie_format; 248062306a36Sopenharmony_ci struct mpi3_device1_vd_format vd_format; 248162306a36Sopenharmony_ci}; 248262306a36Sopenharmony_ci 248362306a36Sopenharmony_cistruct mpi3_device_page1 { 248462306a36Sopenharmony_ci struct mpi3_config_page_header header; 248562306a36Sopenharmony_ci __le16 dev_handle; 248662306a36Sopenharmony_ci __le16 reserved0a; 248762306a36Sopenharmony_ci __le16 link_change_count; 248862306a36Sopenharmony_ci __le16 rate_change_count; 248962306a36Sopenharmony_ci __le16 tm_count; 249062306a36Sopenharmony_ci __le16 reserved12; 249162306a36Sopenharmony_ci __le32 reserved14[10]; 249262306a36Sopenharmony_ci u8 reserved3c[3]; 249362306a36Sopenharmony_ci u8 device_form; 249462306a36Sopenharmony_ci union mpi3_device1_dev_spec_format device_specific; 249562306a36Sopenharmony_ci}; 249662306a36Sopenharmony_ci 249762306a36Sopenharmony_ci#define MPI3_DEVICE1_PAGEVERSION (0x00) 249862306a36Sopenharmony_ci#define MPI3_DEVICE1_COUNTER_MAX (0xfffe) 249962306a36Sopenharmony_ci#define MPI3_DEVICE1_COUNTER_INVALID (0xffff) 250062306a36Sopenharmony_ci#endif 2501