Debian Codegraph @

src/soc/amd/phoenix/chip.h

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #ifndef PHOENIX_CHIP_H
4 #define PHOENIX_CHIP_H
5
6 #include <amdblocks/chip.h>
7 #include <amdblocks/i2c.h>
8 #include <amdblocks/pci_clk_req.h>
9 #include <gpio.h>
10 #include <soc/i2c.h>
11 #include <soc/southbridge.h>
12 #include <drivers/i2c/designware/dw_i2c.h>
13 #include <types.h>
14 #if CONFIG(PLATFORM_USES_FSP2_0)
15 #include <vendorcode/amd/fsp/phoenix/FspUsb.h>
16 #else
17 #include "chip_opensil.h"
18 #endif
19
20 struct soc_amd_phoenix_config {
21 struct soc_amd_common_config common_config;
22 u8 i2c_scl_reset;
23 struct dw_i2c_bus_config i2c[I2C_CTRLR_COUNT];
24 struct i2c_pad_control i2c_pad[I2C_CTRLR_COUNT];
25
26 /* Enable S0iX support */
27 bool s0ix_enable;
28
29 enum {
30 DOWNCORE_AUTO = 0,
31 DOWNCORE_1 = 1, /* Run with 1 physical core */
32 DOWNCORE_2 = 3, /* Run with 2 physical cores */
33 DOWNCORE_3 = 4, /* Run with 3 physical cores */
34 DOWNCORE_4 = 6, /* Run with 4 physical cores */
35 DOWNCORE_5 = 8, /* Run with 5 physical cores */
36 DOWNCORE_6 = 9, /* Run with 6 physical cores */
37 DOWNCORE_7 = 10, /* Run with 7 physical cores */
38 } downcore_mode;
39 bool disable_smt; /* disable second thread on all physical cores */
40
41 uint8_t stt_control;
42 uint8_t stt_pcb_sensor_count;
43 uint16_t stt_min_limit;
44 uint16_t stt_m1;
45 uint16_t stt_m2;
46 uint16_t stt_m3;
47 uint16_t stt_m4;
48 uint16_t stt_m5;
49 uint16_t stt_m6;
50 uint16_t stt_c_apu;
51 uint16_t stt_c_gpu;
52 uint16_t stt_c_hs2;
53 uint16_t stt_alpha_apu;
54 uint16_t stt_alpha_gpu;
55 uint16_t stt_alpha_hs2;
56 uint16_t stt_skin_temp_apu;
57 uint16_t stt_skin_temp_gpu;
58 uint16_t stt_skin_temp_hs2;
59 uint16_t stt_error_coeff;
60 uint16_t stt_error_rate_coefficient;
61
62 /* Default */
63 uint8_t stapm_boost;
64 uint32_t stapm_time_constant_s;
65 uint32_t apu_only_sppt_limit;
66 uint32_t sustained_power_limit_mW;
67 uint32_t fast_ppt_limit_mW;
68 uint32_t slow_ppt_limit_mW;
69 uint32_t slow_ppt_time_constant_s;
70 uint32_t thermctl_limit_degreeC;
71 uint32_t vrm_current_limit_mA;
72 uint32_t vrm_maximum_current_limit_mA;
73 uint32_t vrm_soc_current_limit_mA;
74 /* Throttle (e.g., Low/No Battery) */
75 uint32_t vrm_current_limit_throttle_mA;
76 uint32_t vrm_maximum_current_limit_throttle_mA;
77 uint32_t vrm_soc_current_limit_throttle_mA;
78
79 uint8_t smartshift_enable;
80
81 uint8_t system_configuration;
82
83 uint8_t cppc_ctrl;
84 uint8_t cppc_perf_limit_max_range;
85 uint8_t cppc_perf_limit_min_range;
86 uint8_t cppc_epp_max_range;
87 uint8_t cppc_epp_min_range;
88 uint8_t cppc_preferred_cores;
89
90 /* telemetry settings */
91 uint32_t telemetry_vddcrvddfull_scale_current_mA;
92 uint32_t telemetry_vddcrvddoffset;
93 uint32_t telemetry_vddcrsocfull_scale_current_mA;
94 uint32_t telemetry_vddcrsocoffset;
95
96 /* The array index is the general purpose PCIe clock output number. Values in here
97 aren't the values written to the register to have the default to be always on. */
98 enum gpp_clk_req gpp_clk_config[GPP_CLK_OUTPUT_AVAILABLE];
99
100 /* performance policy for the PCIe links: power consumption vs. link speed */
101 enum {
102 DXIO_PSPP_DISABLED = 0,
103 DXIO_PSPP_PERFORMANCE,
104 DXIO_PSPP_BALANCED,
105 DXIO_PSPP_POWERSAVE,
106 } pspp_policy;
107
108 bool usb_phy_custom;
109 struct usb_phy_config usb_phy;
110
111 #if !CONFIG(PLATFORM_USES_FSP2_0)
112 struct ddi_descriptor ddi[DDI_DESCRIPTOR_COUNT];
113 #endif
114 };
115
116 #endif /* PHOENIX_CHIP_H */