Angel Pons | ae59387 | 2020-04-04 18:50:57 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 2 | |
Martin Roth | 5f67263 | 2019-04-22 16:04:13 -0600 | [diff] [blame] | 3 | #ifndef __PICASSO_CHIP_H__ |
| 4 | #define __PICASSO_CHIP_H__ |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 5 | |
Furquan Shaikh | 033aa0d | 2020-05-09 14:26:37 -0700 | [diff] [blame] | 6 | #include <amdblocks/chip.h> |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 7 | #include <commonlib/helpers.h> |
| 8 | #include <drivers/i2c/designware/dw_i2c.h> |
Felix Held | d8bcad5 | 2022-01-10 22:27:29 +0100 | [diff] [blame] | 9 | #include <gpio.h> |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 10 | #include <soc/i2c.h> |
Martin Roth | 7e78e56 | 2019-11-03 23:29:02 -0700 | [diff] [blame] | 11 | #include <soc/iomap.h> |
Furquan Shaikh | 69c2811 | 2020-04-28 18:57:52 -0700 | [diff] [blame] | 12 | #include <soc/southbridge.h> |
Martin Roth | c7acf16 | 2020-05-28 00:44:50 -0600 | [diff] [blame] | 13 | #include <arch/x86/include/arch/smp/mpspec.h> /* point from top level */ |
Felix Held | 7890380 | 2021-04-20 22:37:35 +0200 | [diff] [blame] | 14 | #include <types.h> |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 15 | |
Chris Wang | 04dfc26 | 2020-05-19 14:46:35 +0800 | [diff] [blame] | 16 | /* |
| 17 | USB 2.0 PHY Parameters |
| 18 | */ |
Felix Held | 0b5a614 | 2020-07-23 19:37:17 +0200 | [diff] [blame] | 19 | struct __packed usb2_phy_tune { |
Chris Wang | 04dfc26 | 2020-05-19 14:46:35 +0800 | [diff] [blame] | 20 | /* Disconnect Threshold Adjustment. Range 0 - 0x7 */ |
| 21 | uint8_t com_pds_tune; |
| 22 | /* Squelch Threshold Adjustment. Range 0 - 0x7 */ |
| 23 | uint8_t sq_rx_tune; |
| 24 | /* FS/LS Source Impedance Adjustment. Range 0 - 0xF */ |
| 25 | uint8_t tx_fsls_tune; |
Martin Roth | 26f97f9 | 2021-10-01 14:53:22 -0600 | [diff] [blame] | 26 | /* HS Transmitter Pre-Emphasis Current Control. Range 0 - 0x3 */ |
Chris Wang | 04dfc26 | 2020-05-19 14:46:35 +0800 | [diff] [blame] | 27 | uint8_t tx_pre_emp_amp_tune; |
| 28 | /* HS Transmitter Pre-Emphasis Duration Control. Range: 0 - 0x1 */ |
| 29 | uint8_t tx_pre_emp_pulse_tune; |
| 30 | /* HS Transmitter Rise/Fall Time Adjustment. Range: 0 - 0x3 */ |
| 31 | uint8_t tx_rise_tune; |
| 32 | /* HS DC Voltage Level Adjustment. Range 0 - 0xF */ |
Kevin Chiu | de20b28 | 2020-11-19 14:09:47 +0800 | [diff] [blame] | 33 | uint8_t tx_vref_tune; |
Chris Wang | 04dfc26 | 2020-05-19 14:46:35 +0800 | [diff] [blame] | 34 | /* Transmitter High-Speed Crossover Adjustment. Range 0 - 0x3 */ |
| 35 | uint8_t tx_hsxv_tune; |
| 36 | /* USB Source Impedance Adjustment. Range 0 - 0x3. */ |
| 37 | uint8_t tx_res_tune; |
| 38 | }; |
| 39 | |
Chris Wang | 3f92902 | 2020-09-14 17:03:06 +0800 | [diff] [blame] | 40 | /* force USB3 port to gen1, bit0 - controller0 Port0, bit1 - Port1, etc */ |
| 41 | union __packed usb3_force_gen1 { |
| 42 | struct { |
| 43 | uint8_t xhci0_port0:1; |
| 44 | uint8_t xhci0_port1:1; |
| 45 | uint8_t xhci0_port2:1; |
| 46 | uint8_t xhci0_port3:1; |
| 47 | } ports; |
| 48 | uint8_t usb3_port_force_gen1_en; |
| 49 | }; |
| 50 | |
Chris Wang | ad4f6d7 | 2021-01-26 20:09:34 +0800 | [diff] [blame] | 51 | enum rfmux_configuration_setting { |
| 52 | USB_PD_RFMUX_SAFE_STATE = 0x0, |
| 53 | USB_PD_RFMUX_USB31_MODE = 0x1, |
| 54 | USB_PD_RFMUX_USB31_MODE_FLIP = 0x2, |
| 55 | USB_PD_RFMUX_ATE_MODE = 0x3, |
| 56 | USB_PD_RFMUX_DP_X2_MODE = 0x4, |
| 57 | USB_PD_RFMUX_MF_MODE_ALT_D_F = 0x6, |
| 58 | USB_PD_RFMUX_DP_X2_MODE_FLIP = 0x8, |
| 59 | USB_PD_RFMUX_MF_MODE_ALT_D_F_FLIP = 0x9, |
| 60 | USB_PD_RFMUX_DP_X4_MODE = 0xc, |
| 61 | }; |
| 62 | |
| 63 | struct usb_pd_control { |
| 64 | uint8_t rfmux_override_en; |
| 65 | uint32_t rfmux_config; |
| 66 | }; |
| 67 | |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame] | 68 | #define USB_PORT_COUNT 6 |
Chris Wang | 68d68f1 | 2021-02-03 04:32:06 +0800 | [diff] [blame] | 69 | |
| 70 | struct __packed usb3_phy_tune { |
| 71 | uint8_t rx_eq_delta_iq_ovrd_val; |
| 72 | uint8_t rx_eq_delta_iq_ovrd_en; |
| 73 | }; |
| 74 | /* the RV2 USB3 port count */ |
| 75 | #define RV2_USB3_PORT_COUNT 4 |
Chris Wang | ad4f6d7 | 2021-01-26 20:09:34 +0800 | [diff] [blame] | 76 | #define USB_PD_PORT_COUNT 2 |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame] | 77 | |
Raul E Rangel | 5590d9a | 2020-09-03 15:41:58 -0600 | [diff] [blame] | 78 | enum sd_emmc_driver_strength { |
| 79 | SD_EMMC_DRIVE_STRENGTH_B, |
| 80 | SD_EMMC_DRIVE_STRENGTH_A, |
| 81 | SD_EMMC_DRIVE_STRENGTH_C, |
| 82 | SD_EMMC_DRIVE_STRENGTH_D, |
| 83 | }; |
| 84 | |
Chris Wang | 4e66d93 | 2020-12-18 14:58:56 +0800 | [diff] [blame] | 85 | /* dpphy_override */ |
| 86 | enum sysinfo_dpphy_override { |
| 87 | ENABLE_DVI_TUNINGSET = 0x01, |
| 88 | ENABLE_HDMI_TUNINGSET = 0x02, |
| 89 | ENABLE_HDMI6G_TUNINGSET = 0x04, |
| 90 | ENABLE_DP_TUNINGSET = 0x08, |
| 91 | ENABLE_DP_HBR3_TUNINGSET = 0x10, |
| 92 | ENABLE_DP_HBR_TUNINGSET = 0x20, |
| 93 | ENABLE_DP_HBR2_TUNINGSET = 0x40, |
| 94 | ENABLE_EDP_TUNINGSET = 0x80, |
| 95 | }; |
| 96 | |
Marshall Dawson | bc4c903 | 2019-06-11 12:18:20 -0600 | [diff] [blame] | 97 | struct soc_amd_picasso_config { |
Furquan Shaikh | 033aa0d | 2020-05-09 14:26:37 -0700 | [diff] [blame] | 98 | struct soc_amd_common_config common_config; |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 99 | /* |
Karthikeyan Ramasubramanian | 0dbea48 | 2021-03-08 23:23:50 -0700 | [diff] [blame] | 100 | * If sb_reset_i2c_peripherals() is called, this devicetree register |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 101 | * defines which I2C SCL will be toggled 9 times at 100 KHz. |
Karthikeyan Ramasubramanian | 0dbea48 | 2021-03-08 23:23:50 -0700 | [diff] [blame] | 102 | * For example, should we need I2C0 and I2C3 have their peripheral |
Martin Roth | 26f97f9 | 2021-10-01 14:53:22 -0600 | [diff] [blame] | 103 | * devices reset by toggling SCL, use: |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 104 | * |
| 105 | * register i2c_scl_reset = (GPIO_I2C0_SCL | GPIO_I2C3_SCL) |
| 106 | */ |
| 107 | u8 i2c_scl_reset; |
Karthikeyan Ramasubramanian | 4f87ae1 | 2021-03-18 23:16:29 -0600 | [diff] [blame] | 108 | struct dw_i2c_bus_config i2c[I2C_CTRLR_COUNT]; |
Akshu Agrawal | 42d4a57 | 2019-12-16 15:13:17 +0530 | [diff] [blame] | 109 | |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 110 | /* System config index */ |
| 111 | uint8_t system_config; |
| 112 | |
| 113 | /* STAPM Configuration */ |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 114 | uint32_t fast_ppt_limit_mW; |
| 115 | uint32_t slow_ppt_limit_mW; |
| 116 | uint32_t slow_ppt_time_constant_s; |
| 117 | uint32_t stapm_time_constant_s; |
| 118 | uint32_t sustained_power_limit_mW; |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 119 | |
Tim Van Patten | 9244358 | 2022-08-23 16:06:33 -0600 | [diff] [blame] | 120 | /* STAPM Configuration for tablet mode */ |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 121 | uint32_t fast_ppt_limit_tablet_mode_mW; |
| 122 | uint32_t slow_ppt_limit_tablet_mode_mW; |
| 123 | uint32_t sustained_power_limit_tablet_mode_mW; |
Chris Wang | 4735b1c | 2020-07-13 23:29:29 +0800 | [diff] [blame] | 124 | |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 125 | /* PROCHOT_L de-assertion Ramp Time */ |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 126 | uint32_t prochot_l_deassertion_ramp_time_ms; |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 127 | |
Marshall Dawson | 8079c5c | 2020-07-08 08:18:16 -0600 | [diff] [blame] | 128 | enum { |
| 129 | DOWNCORE_AUTO = 0, |
Felix Held | 5dea827 | 2021-04-20 22:38:50 +0200 | [diff] [blame] | 130 | DOWNCORE_1 = 1, /* Run with 1 physical core */ |
| 131 | DOWNCORE_2 = 3, /* Run with 2 physical cores */ |
| 132 | DOWNCORE_3 = 4, /* Run with 3 physical cores */ |
Marshall Dawson | 8079c5c | 2020-07-08 08:18:16 -0600 | [diff] [blame] | 133 | } downcore_mode; |
Felix Held | b5c2350 | 2021-04-20 22:40:25 +0200 | [diff] [blame] | 134 | bool smt_disable; /* true=disable SMT on all physical cores */ |
Marshall Dawson | 8079c5c | 2020-07-08 08:18:16 -0600 | [diff] [blame] | 135 | |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 136 | /* Lower die temperature limit */ |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 137 | uint32_t thermctl_limit_degreeC; |
| 138 | uint32_t thermctl_limit_tablet_mode_degreeC; |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 139 | |
| 140 | /* FP5 Processor Voltage Supply PSI Currents. 0 indicates use SOC default */ |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 141 | uint32_t psi0_current_limit_mA; |
| 142 | uint32_t psi0_soc_current_limit_mA; |
| 143 | uint32_t vddcr_soc_voltage_margin_mV; |
| 144 | uint32_t vddcr_vdd_voltage_margin_mV; |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 145 | |
| 146 | /* VRM Limits. 0 indicates use SOC default */ |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 147 | uint32_t vrm_maximum_current_limit_mA; |
| 148 | uint32_t vrm_soc_maximum_current_limit_mA; |
| 149 | uint32_t vrm_current_limit_mA; |
| 150 | uint32_t vrm_soc_current_limit_mA; |
Marshall Dawson | 8df0127 | 2020-01-21 22:06:57 -0700 | [diff] [blame] | 151 | |
| 152 | /* Misc SMU settings */ |
| 153 | uint8_t sb_tsi_alert_comparator_mode_en; |
| 154 | uint8_t core_dldo_bypass; |
| 155 | uint8_t min_soc_vid_offset; |
| 156 | uint8_t aclk_dpm0_freq_400MHz; |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 157 | uint32_t telemetry_vddcr_vdd_slope_mA; |
Chris Wang | ed03371 | 2020-02-14 18:24:54 +0800 | [diff] [blame] | 158 | uint32_t telemetry_vddcr_vdd_offset; |
Zheng Bao | 795d73c | 2020-10-27 15:36:55 +0800 | [diff] [blame] | 159 | uint32_t telemetry_vddcr_soc_slope_mA; |
Chris Wang | ed03371 | 2020-02-14 18:24:54 +0800 | [diff] [blame] | 160 | uint32_t telemetry_vddcr_soc_offset; |
Furquan Shaikh | 69c2811 | 2020-04-28 18:57:52 -0700 | [diff] [blame] | 161 | |
Patrick Huang | ed1592b | 2021-04-20 20:40:09 +0800 | [diff] [blame] | 162 | /* |
| 163 | * HDMI 2.0 disable setting |
| 164 | * bit0~3: disable HDMI 2.0 DDI0~3 |
| 165 | */ |
| 166 | uint8_t hdmi2_disable; |
| 167 | |
Raul E Rangel | 7c79d83 | 2020-09-03 14:30:33 -0600 | [diff] [blame] | 168 | struct { |
| 169 | /* |
| 170 | * SDHCI doesn't directly support eMMC. There is an implicit mapping between |
| 171 | * eMMC timing modes and SDHCI UHS-I timing modes defined in the linux |
| 172 | * kernel. |
| 173 | * |
| 174 | * HS -> UHS_SDR12 (0x00) |
| 175 | * DDR52 -> UHS_DDR50 (0x04) |
| 176 | * HS200 -> UHS_SDR104 (0x03) |
| 177 | * HS400 -> NONE (0x05) |
| 178 | * |
| 179 | * The kernel driver uses a heuristic to determine if HS400 is supported. |
| 180 | */ |
| 181 | enum { |
| 182 | SD_EMMC_DISABLE, |
| 183 | SD_EMMC_SD_LOW_SPEED, |
| 184 | SD_EMMC_SD_HIGH_SPEED, |
| 185 | SD_EMMC_SD_UHS_I_SDR_50, |
| 186 | SD_EMMC_SD_UHS_I_DDR_50, |
| 187 | SD_EMMC_SD_UHS_I_SDR_104, |
| 188 | SD_EMMC_EMMC_SDR_26, |
| 189 | SD_EMMC_EMMC_SDR_52, |
Raul E Rangel | f56b784 | 2020-12-04 10:29:56 -0700 | [diff] [blame] | 190 | SD_EMMC_EMMC_DDR_104, |
Raul E Rangel | 7c79d83 | 2020-09-03 14:30:33 -0600 | [diff] [blame] | 191 | SD_EMMC_EMMC_HS200, |
| 192 | SD_EMMC_EMMC_HS400, |
| 193 | SD_EMMC_EMMC_HS300, |
| 194 | } timing; |
Raul E Rangel | 5590d9a | 2020-09-03 15:41:58 -0600 | [diff] [blame] | 195 | |
| 196 | /* |
| 197 | * Sets the driver strength reflected in the SDHCI Preset Value Registers. |
| 198 | * |
| 199 | * According to the SDHCI spec: |
| 200 | * The host should select the weakest drive strength that meets rise / |
| 201 | * fall time requirement at system operating frequency. |
| 202 | */ |
| 203 | enum sd_emmc_driver_strength sdr104_hs400_driver_strength; |
| 204 | enum sd_emmc_driver_strength ddr50_driver_strength; |
| 205 | enum sd_emmc_driver_strength sdr50_driver_strength; |
| 206 | |
| 207 | /* |
| 208 | * Sets the frequency in kHz reflected in the Initialization Preset Value |
| 209 | * Register. |
| 210 | * |
| 211 | * This value is used while in open-drain mode, and has a maximum value of |
| 212 | * 400 kHz. |
| 213 | */ |
| 214 | uint16_t init_khz_preset; |
Raul E Rangel | 7c79d83 | 2020-09-03 14:30:33 -0600 | [diff] [blame] | 215 | } emmc_config; |
Chris Wang | 5ec975e | 2020-10-05 13:39:14 +0800 | [diff] [blame] | 216 | |
Chris Wang | 3f92902 | 2020-09-14 17:03:06 +0800 | [diff] [blame] | 217 | /* Force USB3 port to gen1, bit0 - controller0 Port0, bit1 - Port1 */ |
| 218 | union usb3_force_gen1 usb3_port_force_gen1; |
Chris Wang | 04dfc26 | 2020-05-19 14:46:35 +0800 | [diff] [blame] | 219 | |
Felix Held | 1d0154c | 2020-07-23 19:37:42 +0200 | [diff] [blame] | 220 | uint8_t has_usb2_phy_tune_params; |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame] | 221 | struct usb2_phy_tune usb_2_port_tune_params[USB_PORT_COUNT]; |
Felix Held | bcb3d03 | 2020-07-24 19:10:03 +0200 | [diff] [blame] | 222 | enum { |
| 223 | USB_OC_PIN_0 = 0x0, |
| 224 | USB_OC_PIN_1 = 0x1, |
| 225 | USB_OC_PIN_2 = 0x2, |
| 226 | USB_OC_PIN_3 = 0x3, |
| 227 | USB_OC_PIN_4 = 0x4, |
| 228 | USB_OC_PIN_5 = 0x5, |
| 229 | USB_OC_NONE = 0xf, |
| 230 | } usb_port_overcurrent_pin[USB_PORT_COUNT]; |
Felix Held | 82a0a63 | 2020-08-28 01:40:20 +0200 | [diff] [blame] | 231 | |
Chris Wang | 68d68f1 | 2021-02-03 04:32:06 +0800 | [diff] [blame] | 232 | /* RV2 SOC Usb 3.1 PHY Parameters */ |
| 233 | uint8_t usb3_phy_override; |
| 234 | /* |
| 235 | * 1,RX_EQ_DELTA_IQ_OVRD_VAL- Override value for rx_eq_delta_iq. Range 0-0xF |
| 236 | * 2,RX_EQ_DELTA_IQ_OVRD_EN - Enable override value for rx_eq_delta_iq. Range 0-0x1 |
| 237 | */ |
| 238 | struct usb3_phy_tune usb3_phy_tune_params[RV2_USB3_PORT_COUNT]; |
| 239 | /* Override value for rx_vref_ctrl. Range 0 - 0x1F */ |
| 240 | uint8_t usb3_rx_vref_ctrl; |
| 241 | /* Enable override value for rx_vref_ctrl. Range 0 - 0x1 */ |
| 242 | uint8_t usb3_rx_vref_ctrl_en; |
| 243 | /* Override value for tx_vboost_lvl: 0 - 0x7. */ |
| 244 | uint8_t usb_3_tx_vboost_lvl; |
| 245 | /* Enable override value for tx_vboost_lvl. Range: 0 - 0x1 */ |
| 246 | uint8_t usb_3_tx_vboost_lvl_en; |
| 247 | /* Override value for rx_vref_ctrl. Range 0 - 0x1F.*/ |
| 248 | uint8_t usb_3_rx_vref_ctrl_x; |
| 249 | /* Enable override value for rx_vref_ctrl. Range 0 - 0x1. */ |
| 250 | uint8_t usb_3_rx_vref_ctrl_en_x; |
| 251 | /* Override value for tx_vboost_lvl: 0 - 0x7. */ |
| 252 | uint8_t usb_3_tx_vboost_lvl_x; |
| 253 | /* Enable override value for tx_vboost_lvl. Range: 0 - 0x1. */ |
| 254 | uint8_t usb_3_tx_vboost_lvl_en_x; |
| 255 | |
Felix Held | 0e099ea | 2021-05-18 01:34:06 +0200 | [diff] [blame] | 256 | /* The array index is the general purpose PCIe clock output number. Values in here |
| 257 | aren't the values written to the register to have the default to be always on. */ |
| 258 | enum { |
| 259 | GPP_CLK_ON, /* GPP clock always on; default */ |
| 260 | GPP_CLK_REQ, /* GPP clock controlled by corresponding #CLK_REQx pin */ |
| 261 | GPP_CLK_OFF, /* GPP clk off */ |
| 262 | } gpp_clk_config[GPP_CLK_OUTPUT_COUNT]; |
| 263 | |
Felix Held | 0fec867 | 2021-05-25 21:07:23 +0200 | [diff] [blame] | 264 | /* performance policy for the PCIe links: power consumption vs. link speed */ |
| 265 | enum { |
Matt Papageorge | 5a2feed | 2021-07-20 15:09:46 -0500 | [diff] [blame] | 266 | DXIO_PSPP_DISABLED = 0, |
| 267 | DXIO_PSPP_PERFORMANCE, |
Felix Held | 0fec867 | 2021-05-25 21:07:23 +0200 | [diff] [blame] | 268 | DXIO_PSPP_BALANCED, |
| 269 | DXIO_PSPP_POWERSAVE, |
| 270 | } pspp_policy; |
| 271 | |
Karthikeyan Ramasubramanian | 39b7afa | 2021-04-29 16:50:51 -0600 | [diff] [blame] | 272 | /* If using an external 48MHz OSC for codec, will disable internal X48M_OSC */ |
| 273 | bool acp_i2s_use_external_48mhz_osc; |
Chris Wang | 4e66d93 | 2020-12-18 14:58:56 +0800 | [diff] [blame] | 274 | |
| 275 | /* eDP phy tuning settings */ |
Chris Wang | 4c4a360 | 2021-02-02 13:04:33 +0800 | [diff] [blame] | 276 | uint16_t edp_phy_override; |
| 277 | /* bit vector of phy, bit0=1: DP0, bit1=1: DP1, bit2=1: DP2 bit3=1: DP3 */ |
| 278 | uint8_t edp_physel; |
Chris Wang | 4e66d93 | 2020-12-18 14:58:56 +0800 | [diff] [blame] | 279 | |
| 280 | struct { |
| 281 | uint8_t dp_vs_pemph_level; |
| 282 | uint8_t deemph_6db4; |
| 283 | uint8_t boostadj; |
| 284 | uint16_t margin_deemph; |
| 285 | } edp_tuningset; |
Chris Wang | 3ec3cb8 | 2020-12-23 04:29:57 +0800 | [diff] [blame] | 286 | |
| 287 | /* |
| 288 | * eDP panel power sequence control |
| 289 | * all pwr sequence numbers below are in uint of 4ms and "0" as default value |
| 290 | */ |
| 291 | uint8_t edp_pwr_adjust_enable; |
| 292 | uint8_t pwron_digon_to_de; |
| 293 | uint8_t pwron_de_to_varybl; |
| 294 | uint8_t pwrdown_varybloff_to_de; |
| 295 | uint8_t pwrdown_de_to_digoff; |
| 296 | uint8_t pwroff_delay; |
| 297 | uint8_t pwron_varybl_to_blon; |
| 298 | uint8_t pwrdown_bloff_to_varybloff; |
| 299 | uint8_t min_allowed_bl_level; |
Chris Wang | ad4f6d7 | 2021-01-26 20:09:34 +0800 | [diff] [blame] | 300 | |
| 301 | /* allow USB PD port setting override */ |
| 302 | struct usb_pd_control usb_pd_config_override[USB_PD_PORT_COUNT]; |
Martin Roth | 5c354b9 | 2019-04-22 14:55:16 -0600 | [diff] [blame] | 303 | }; |
| 304 | |
Martin Roth | 5f67263 | 2019-04-22 16:04:13 -0600 | [diff] [blame] | 305 | #endif /* __PICASSO_CHIP_H__ */ |