coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
chip.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __PICASSO_CHIP_H__
4 #define __PICASSO_CHIP_H__
5 
6 #include <amdblocks/chip.h>
7 #include <commonlib/helpers.h>
9 #include <gpio.h>
10 #include <soc/i2c.h>
11 #include <soc/iomap.h>
12 #include <soc/southbridge.h>
13 #include <arch/x86/include/arch/smp/mpspec.h> /* point from top level */
14 #include <types.h>
15 
16 /*
17  USB 2.0 PHY Parameters
18 */
20  /* Disconnect Threshold Adjustment. Range 0 - 0x7 */
22  /* Squelch Threshold Adjustment. Range 0 - 0x7 */
24  /* FS/LS Source Impedance Adjustment. Range 0 - 0xF */
26  /* HS Transmitter Pre-Emphasis Current Control. Range 0 - 0x3 */
28  /* HS Transmitter Pre-Emphasis Duration Control. Range: 0 - 0x1 */
30  /* HS Transmitter Rise/Fall Time Adjustment. Range: 0 - 0x3 */
32  /* HS DC Voltage Level Adjustment. Range 0 - 0xF */
34  /* Transmitter High-Speed Crossover Adjustment. Range 0 - 0x3 */
36  /* USB Source Impedance Adjustment. Range 0 - 0x3. */
38 };
39 
40 /* force USB3 port to gen1, bit0 - controller0 Port0, bit1 - Port1, etc */
42  struct {
47  } ports;
49 };
50 
61 };
62 
66 };
67 
68 #define USB_PORT_COUNT 6
69 
72  uint8_t rx_eq_delta_iq_ovrd_en;
73 };
74 /* the RV2 USB3 port count */
75 #define RV2_USB3_PORT_COUNT 4
76 #define USB_PD_PORT_COUNT 2
77 
83 };
84 
85 /* dpphy_override */
95 };
96 
99  /*
100  * If sb_reset_i2c_peripherals() is called, this devicetree register
101  * defines which I2C SCL will be toggled 9 times at 100 KHz.
102  * For example, should we need I2C0 and I2C3 have their peripheral
103  * devices reset by toggling SCL, use:
104  *
105  * register i2c_scl_reset = (GPIO_I2C0_SCL | GPIO_I2C3_SCL)
106  */
109 
110  /* System config index */
112 
113  /* STAPM Configuration */
119 
120  /* Enable dptc for tablet mode (0 = disable, 1 = enable) */
122 
123  /* STAPM Configuration for tablet mode (need enable dptc_enable first) */
127 
128  /* PROCHOT_L de-assertion Ramp Time */
130 
131  enum {
133  DOWNCORE_1 = 1, /* Run with 1 physical core */
134  DOWNCORE_2 = 3, /* Run with 2 physical cores */
135  DOWNCORE_3 = 4, /* Run with 3 physical cores */
137  bool smt_disable; /* true=disable SMT on all physical cores */
138 
139  /* Lower die temperature limit */
142 
143  /* FP5 Processor Voltage Supply PSI Currents. 0 indicates use SOC default */
148 
149  /* VRM Limits. 0 indicates use SOC default */
154 
155  /* Misc SMU settings */
164 
165  /*
166  * HDMI 2.0 disable setting
167  * bit0~3: disable HDMI 2.0 DDI0~3
168  */
170 
171  struct {
172  /*
173  * SDHCI doesn't directly support eMMC. There is an implicit mapping between
174  * eMMC timing modes and SDHCI UHS-I timing modes defined in the linux
175  * kernel.
176  *
177  * HS -> UHS_SDR12 (0x00)
178  * DDR52 -> UHS_DDR50 (0x04)
179  * HS200 -> UHS_SDR104 (0x03)
180  * HS400 -> NONE (0x05)
181  *
182  * The kernel driver uses a heuristic to determine if HS400 is supported.
183  */
184  enum {
198 
199  /*
200  * Sets the driver strength reflected in the SDHCI Preset Value Registers.
201  *
202  * According to the SDHCI spec:
203  * The host should select the weakest drive strength that meets rise /
204  * fall time requirement at system operating frequency.
205  */
209 
210  /*
211  * Sets the frequency in kHz reflected in the Initialization Preset Value
212  * Register.
213  *
214  * This value is used while in open-drain mode, and has a maximum value of
215  * 400 kHz.
216  */
219 
220  /* Force USB3 port to gen1, bit0 - controller0 Port0, bit1 - Port1 */
222 
225  enum {
232  USB_OC_NONE = 0xf,
234 
235  /* RV2 SOC Usb 3.1 PHY Parameters */
237  /*
238  * 1,RX_EQ_DELTA_IQ_OVRD_VAL- Override value for rx_eq_delta_iq. Range 0-0xF
239  * 2,RX_EQ_DELTA_IQ_OVRD_EN - Enable override value for rx_eq_delta_iq. Range 0-0x1
240  */
242  /* Override value for rx_vref_ctrl. Range 0 - 0x1F */
244  /* Enable override value for rx_vref_ctrl. Range 0 - 0x1 */
246  /* Override value for tx_vboost_lvl: 0 - 0x7. */
248  /* Enable override value for tx_vboost_lvl. Range: 0 - 0x1 */
250  /* Override value for rx_vref_ctrl. Range 0 - 0x1F.*/
252  /* Enable override value for rx_vref_ctrl. Range 0 - 0x1. */
254  /* Override value for tx_vboost_lvl: 0 - 0x7. */
256  /* Enable override value for tx_vboost_lvl. Range: 0 - 0x1. */
258 
259  /* The array index is the general purpose PCIe clock output number. Values in here
260  aren't the values written to the register to have the default to be always on. */
261  enum {
262  GPP_CLK_ON, /* GPP clock always on; default */
263  GPP_CLK_REQ, /* GPP clock controlled by corresponding #CLK_REQx pin */
264  GPP_CLK_OFF, /* GPP clk off */
266 
267  /* performance policy for the PCIe links: power consumption vs. link speed */
268  enum {
274 
275  /* If using an external 48MHz OSC for codec, will disable internal X48M_OSC */
277 
278  /* eDP phy tuning settings */
280  /* bit vector of phy, bit0=1: DP0, bit1=1: DP1, bit2=1: DP2 bit3=1: DP3 */
282 
283  struct {
289 
290  /*
291  * eDP panel power sequence control
292  * all pwr sequence numbers below are in uint of 4ms and "0" as default value
293  */
303 
304  /* allow USB PD port setting override */
306 };
307 
308 #endif /* __PICASSO_CHIP_H__ */
#define I2C_CTRLR_COUNT
Definition: iomap.h:9
#define GPP_CLK_OUTPUT_COUNT
Definition: southbridge.h:97
#define RV2_USB3_PORT_COUNT
Definition: chip.h:75
#define USB_PD_PORT_COUNT
Definition: chip.h:76
sysinfo_dpphy_override
Definition: chip.h:86
@ ENABLE_HDMI6G_TUNINGSET
Definition: chip.h:89
@ ENABLE_EDP_TUNINGSET
Definition: chip.h:94
@ ENABLE_DVI_TUNINGSET
Definition: chip.h:87
@ ENABLE_DP_HBR2_TUNINGSET
Definition: chip.h:93
@ ENABLE_DP_TUNINGSET
Definition: chip.h:90
@ ENABLE_DP_HBR3_TUNINGSET
Definition: chip.h:91
@ ENABLE_HDMI_TUNINGSET
Definition: chip.h:88
@ ENABLE_DP_HBR_TUNINGSET
Definition: chip.h:92
sd_emmc_driver_strength
Definition: chip.h:78
@ SD_EMMC_DRIVE_STRENGTH_C
Definition: chip.h:81
@ SD_EMMC_DRIVE_STRENGTH_D
Definition: chip.h:82
@ SD_EMMC_DRIVE_STRENGTH_A
Definition: chip.h:80
@ SD_EMMC_DRIVE_STRENGTH_B
Definition: chip.h:79
#define USB_PORT_COUNT
Definition: chip.h:68
rfmux_configuration_setting
Definition: chip.h:51
@ USB_PD_RFMUX_DP_X2_MODE_FLIP
Definition: chip.h:58
@ USB_PD_RFMUX_SAFE_STATE
Definition: chip.h:52
@ USB_PD_RFMUX_MF_MODE_ALT_D_F
Definition: chip.h:57
@ USB_PD_RFMUX_DP_X4_MODE
Definition: chip.h:60
@ USB_PD_RFMUX_USB31_MODE
Definition: chip.h:53
@ USB_PD_RFMUX_MF_MODE_ALT_D_F_FLIP
Definition: chip.h:59
@ USB_PD_RFMUX_ATE_MODE
Definition: chip.h:55
@ USB_PD_RFMUX_DP_X2_MODE
Definition: chip.h:56
@ USB_PD_RFMUX_USB31_MODE_FLIP
Definition: chip.h:54
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
uint8_t u8
Definition: stdint.h:45
unsigned char uint8_t
Definition: stdint.h:8
Definition: x86.c:23
uint8_t usb3_rx_vref_ctrl
Definition: chip.h:243
uint8_t min_soc_vid_offset
Definition: chip.h:158
uint32_t slow_ppt_time_constant_s
Definition: chip.h:116
uint8_t aclk_dpm0_freq_400MHz
Definition: chip.h:159
uint8_t edp_physel
Definition: chip.h:281
uint32_t sustained_power_limit_mW
Definition: chip.h:118
uint8_t usb_3_rx_vref_ctrl_en_x
Definition: chip.h:253
uint8_t usb3_phy_override
Definition: chip.h:236
uint32_t fast_ppt_limit_tablet_mode_mW
Definition: chip.h:124
struct usb3_phy_tune usb3_phy_tune_params[RV2_USB3_PORT_COUNT]
Definition: chip.h:241
uint32_t vrm_maximum_current_limit_mA
Definition: chip.h:150
uint8_t sb_tsi_alert_comparator_mode_en
Definition: chip.h:156
uint8_t hdmi2_disable
Definition: chip.h:169
union usb3_force_gen1 usb3_port_force_gen1
Definition: chip.h:221
uint32_t fast_ppt_limit_mW
Definition: chip.h:114
struct usb2_phy_tune usb_2_port_tune_params[USB_PORT_COUNT]
Definition: chip.h:224
uint32_t telemetry_vddcr_vdd_offset
Definition: chip.h:161
struct soc_amd_picasso_config::@417 emmc_config
uint32_t psi0_soc_current_limit_mA
Definition: chip.h:145
struct usb_pd_control usb_pd_config_override[USB_PD_PORT_COUNT]
Definition: chip.h:305
struct soc_amd_common_config common_config
Definition: chip.h:98
uint8_t pwrdown_bloff_to_varybloff
Definition: chip.h:301
uint32_t stapm_time_constant_s
Definition: chip.h:117
uint16_t edp_phy_override
Definition: chip.h:279
struct soc_amd_picasso_config::@421 edp_tuningset
uint8_t pwron_digon_to_de
Definition: chip.h:295
uint32_t telemetry_vddcr_soc_slope_mA
Definition: chip.h:162
uint32_t slow_ppt_limit_mW
Definition: chip.h:115
uint8_t dptc_enable
Definition: chip.h:121
bool acp_i2s_use_external_48mhz_osc
Definition: chip.h:276
uint8_t core_dldo_bypass
Definition: chip.h:157
uint32_t vrm_soc_maximum_current_limit_mA
Definition: chip.h:151
uint8_t usb_3_rx_vref_ctrl_x
Definition: chip.h:251
struct dw_i2c_bus_config i2c[I2C_CTRLR_COUNT]
Definition: chip.h:108
uint32_t slow_ppt_limit_tablet_mode_mW
Definition: chip.h:125
uint32_t vddcr_vdd_voltage_margin_mV
Definition: chip.h:147
uint32_t vrm_soc_current_limit_mA
Definition: chip.h:153
uint32_t vrm_current_limit_mA
Definition: chip.h:152
uint8_t has_usb2_phy_tune_params
Definition: chip.h:223
uint8_t edp_pwr_adjust_enable
Definition: chip.h:294
uint16_t margin_deemph
Definition: chip.h:287
uint8_t pwroff_delay
Definition: chip.h:299
uint32_t thermctl_limit_degreeC
Definition: chip.h:140
uint8_t deemph_6db4
Definition: chip.h:285
uint8_t pwron_varybl_to_blon
Definition: chip.h:300
uint32_t thermctl_limit_tablet_mode_degreeC
Definition: chip.h:141
enum sd_emmc_driver_strength sdr104_hs400_driver_strength
Definition: chip.h:206
enum sd_emmc_driver_strength ddr50_driver_strength
Definition: chip.h:207
uint32_t telemetry_vddcr_vdd_slope_mA
Definition: chip.h:160
uint32_t psi0_current_limit_mA
Definition: chip.h:144
uint8_t usb_3_tx_vboost_lvl
Definition: chip.h:247
uint32_t prochot_l_deassertion_ramp_time_ms
Definition: chip.h:129
uint8_t min_allowed_bl_level
Definition: chip.h:302
uint8_t usb_3_tx_vboost_lvl_en_x
Definition: chip.h:257
uint8_t pwron_de_to_varybl
Definition: chip.h:296
enum soc_amd_picasso_config::@420 pspp_policy
enum soc_amd_picasso_config::@418 usb_port_overcurrent_pin[USB_PORT_COUNT]
uint32_t vddcr_soc_voltage_margin_mV
Definition: chip.h:146
uint8_t pwrdown_de_to_digoff
Definition: chip.h:298
uint8_t usb3_rx_vref_ctrl_en
Definition: chip.h:245
uint32_t sustained_power_limit_tablet_mode_mW
Definition: chip.h:126
uint8_t usb_3_tx_vboost_lvl_en
Definition: chip.h:249
enum soc_amd_picasso_config::@417::@422 timing
uint32_t telemetry_vddcr_soc_offset
Definition: chip.h:163
uint16_t init_khz_preset
Definition: chip.h:217
uint8_t boostadj
Definition: chip.h:286
uint8_t usb_3_tx_vboost_lvl_x
Definition: chip.h:255
uint8_t dp_vs_pemph_level
Definition: chip.h:284
uint8_t pwrdown_varybloff_to_de
Definition: chip.h:297
enum sd_emmc_driver_strength sdr50_driver_strength
Definition: chip.h:208
enum soc_amd_picasso_config::@419 gpp_clk_config[GPP_CLK_OUTPUT_COUNT]
uint8_t system_config
Definition: chip.h:111
enum soc_amd_picasso_config::@416 downcore_mode
uint8_t tx_vref_tune
Definition: chip.h:33
uint8_t tx_res_tune
Definition: chip.h:37
uint8_t tx_pre_emp_amp_tune
Definition: chip.h:27
uint8_t tx_rise_tune
Definition: chip.h:31
uint8_t tx_pre_emp_pulse_tune
Definition: chip.h:29
uint8_t tx_hsxv_tune
Definition: chip.h:35
uint8_t tx_fsls_tune
Definition: chip.h:25
uint8_t com_pds_tune
Definition: chip.h:21
uint8_t sq_rx_tune
Definition: chip.h:23
uint8_t rx_eq_delta_iq_ovrd_val
Definition: chip.h:71
uint8_t rfmux_override_en
Definition: chip.h:64
uint32_t rfmux_config
Definition: chip.h:65
uint8_t xhci0_port0
Definition: chip.h:43
uint8_t xhci0_port3
Definition: chip.h:46
uint8_t usb3_port_force_gen1_en
Definition: chip.h:48
uint8_t xhci0_port1
Definition: chip.h:44
uint8_t xhci0_port2
Definition: chip.h:45