blob: 2ef3e8b2337e1bf86522fe040ab8a23d5d816241 [file] [log] [blame]
Arthur Heymansf1b14122023-07-14 20:44:55 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <stdint.h>
4
5/*
6 * GENOA MPIO mapping
7 * P0 -> [0-15]
8 * G0 -> [16-31]
9 * P1 -> [32-47]
10 * G1 -> [48-63]
11 * P2 -> [64-79]
12 * G2 -> [80-95]
13 * P3 -> [96-111]
14 * G3 -> [112-127]
15 * P4 -> [128-131]
16 * P5 -> [132-136]
17 */
18
19enum mpio_type {
20 PCIE,
21 SATA,
22};
23
24/* Sync with PCIE_HOTPLUG_TYPE */
25enum mpio_hotplug {
26 HotplugDisabled, ///< Hotplug disable
27 Basic, ///< Basic Hotplug
28 ServerExpress, ///< Server Hotplug Express Module
29 Enhanced, ///< Enhanced
30 Inboard, ///< Inboard
31 ServerEntSSD, ///< Server Hotplug Enterprise SSD
32 UBM, ///< UBM Backplane
33 OCP, ///< OCP NIC 3.0
34};
35
36enum pcie_link_speed {
37 MaxSupported,
38 Gen1,
39 Gen2,
40 Gen3,
41 Gen4,
42 Gen5,
43};
44
45/* Sync with PCIE_ASPM_TYPE */
46enum pcie_asmp {
47 aspm_disabled,
48 L0s,
49 L1,
50 L0sL1,
51};
52
53struct vendorcode_amd_opensil_genoa_poc_mpio_config {
54 enum mpio_type type;
55 uint8_t start_lane;
56 uint8_t end_lane;
57 uint8_t gpio_group;
58 enum mpio_hotplug hotplug;
59 enum pcie_link_speed speed;
60 enum pcie_asmp aspm;
61 uint8_t aspm_l1_1 : 1;
62 uint8_t aspm_l1_2 : 1;
63 uint8_t clock_pm : 1;
64 uint8_t bmc : 1;
65};