Debian Codegraph @

src/vendorcode/amd/opensil/stub/mpio/chip.h

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