blob: 96f60bea4cef8022f1f7f5325f4cdc3a90e0482d [file] [log] [blame]
Felix Held7c58dd62024-02-26 21:16:48 +01001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <types.h>
4
5enum mpio_engine_type {
Felix Held929ef5f2024-03-15 19:19:46 +01006 IFTYPE_UNUSED,
Felix Heldf7aafac2024-03-19 17:53:39 +01007 IFTYPE_PCIE,
8 IFTYPE_SATA,
Felix Held7c58dd62024-02-26 21:16:48 +01009};
10
11/* Sync with PCIE_HOTPLUG_TYPE */
12enum mpio_hotplug {
13 HOTPLUG_DISABLED = 0,
14 HOTPLUG_BASIC,
15 HOTPLUG_SERVER_EXPRESS,
16 HOTPLUG_ENHANCED,
17 HOTPLUG_INBOARD,
18 HOTPLUG_SERVER_ENT_SSD,
19 HOTPLUG_UBM,
20 HOTPLUG_OCP,
21};
22
23enum pcie_link_speed {
24 GEN_MAX = 0, /* Maximum supported */
25 GEN1,
26 GEN2,
27 GEN3,
28 GEN4,
29 GEN5,
30};
31
32/* Sync with PCIE_ASPM_TYPE */
33enum pcie_aspm {
34 ASPM_DISABLED = 0,
35 ASPM_L0s,
36 ASPM_L1,
37 ASPM_L0sL1,
38};
39
40
41/* CLKREQ for PCIe type descriptors */
42enum pcie_clk_req {
43 CLK_DISABLE = 0x00,
44 CLK_REQ0,
45 CLK_REQ1,
46 CLK_REQ2,
47 CLK_REQ3,
48 CLK_REQ4,
49 CLK_REQ5,
50 CLK_REQ6,
51};
52
53enum pcie_slot_power_limit_scale {
54 SLOT_POWER_LIMIT_DIVISOR_1 = 0, /* Scale factor 1 */
55 SLOT_POWER_LIMIT_DIVISOR_10 = 1, /* Scale factor 0.1 */
56 SLOT_POWER_LIMIT_DIVISOR_100 = 2, /* Scale factor 0.01 */
57 SLOT_POWER_LIMIT_DIVISOR_1000 = 3, /* Scale factor 0.001 */
58};
59
60struct vendorcode_amd_opensil_stub_mpio_config {
61 enum mpio_engine_type type;
62 uint8_t start_lane;
63 uint8_t end_lane;
64 uint8_t gpio_group;
65 enum mpio_hotplug hotplug;
66 enum pcie_link_speed speed_capability;
67 enum pcie_aspm aspm;
68 bool aspm_l1_1;
69 bool aspm_l1_2;
70 enum pcie_clk_req clk_req;
71 bool clock_pm;
72 uint8_t slot_power_limit;
73 enum pcie_slot_power_limit_scale slot_power_limit_scale;
74 bool bmc;
75};