Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | chip soc/amd/picasso |
| 3 | |
| 4 | # Set FADT Configuration |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 5 | register "fadt_boot_arch" = "ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042" |
| 6 | register "fadt_flags" = "ACPI_FADT_WBINVD | /* See table 5-34 ACPI 6.3 spec */ |
| 7 | ACPI_FADT_C1_SUPPORTED | |
| 8 | ACPI_FADT_SLEEP_BUTTON | |
| 9 | ACPI_FADT_S4_RTC_WAKE | |
| 10 | ACPI_FADT_32BIT_TIMER | |
| 11 | ACPI_FADT_RESET_REGISTER | |
| 12 | ACPI_FADT_SEALED_CASE | |
| 13 | ACPI_FADT_PCI_EXPRESS_WAKE | |
| 14 | ACPI_FADT_REMOTE_POWER_ON" |
| 15 | |
| 16 | register "acp_pin_cfg" = "I2S_PINS_I2S_TDM" |
Furquan Shaikh | a469736 | 2020-07-15 21:25:14 -0700 | [diff] [blame] | 17 | register "acp_i2s_wake_enable" = "1" |
| 18 | register "acpi_pme_enable" = "1" |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 19 | |
| 20 | # Start : OPN Performance Configuration |
| 21 | # (Configuratin that is common for all variants) |
| 22 | # For the below fields, 0 indicates use SOC default |
| 23 | |
| 24 | # PROCHOT_L de-assertion Ramp Time |
| 25 | register "prochot_l_deassertion_ramp_time" = "20" #mS |
| 26 | |
| 27 | # Lower die temperature limit |
| 28 | register "thermctl_limit" = "100" #degrees C |
| 29 | |
| 30 | # FP5 Processor Voltage Supply PSI Currents |
| 31 | register "psi0_current_limit" = "18000" #mA |
| 32 | register "psi0_soc_current_limit" = "12000" #mA |
| 33 | register "vddcr_soc_voltage_margin" = "0" #mV |
| 34 | register "vddcr_vdd_voltage_margin" = "0" #mV |
| 35 | |
| 36 | # VRM Limits |
| 37 | register "vrm_maximum_current_limit" = "0" #mA |
| 38 | register "vrm_soc_maximum_current_limit" = "0" #mA |
| 39 | register "vrm_current_limit" = "0" #mA |
| 40 | register "vrm_soc_current_limit" = "0" #mA |
| 41 | |
| 42 | # Misc SMU settings |
| 43 | register "sb_tsi_alert_comparator_mode_en" = "0" |
| 44 | register "core_dldo_bypass" = "1" |
| 45 | register "min_soc_vid_offset" = "0" |
| 46 | register "aclk_dpm0_freq_400MHz" = "0" |
| 47 | |
| 48 | # End : OPN Performance Configuration |
| 49 | |
| 50 | register "sd_emmc_config" = "SD_EMMC_EMMC_HS400" |
| 51 | |
Lucas Chen | c1bb32f | 2020-05-26 19:31:48 +0800 | [diff] [blame] | 52 | register "xhci0_force_gen1" = "0" |
| 53 | |
Felix Held | 1d0154c | 2020-07-23 19:37:42 +0200 | [diff] [blame] | 54 | register "has_usb2_phy_tune_params" = "1" |
| 55 | |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 56 | # Controller0 Port0 Default |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame^] | 57 | register "usb_2_port_tune_params[0]" = "{ |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 58 | .com_pds_tune = 0x03, |
| 59 | .sq_rx_tune = 0x3, |
| 60 | .tx_fsls_tune = 0x3, |
| 61 | .tx_pre_emp_amp_tune = 0x03, |
| 62 | .tx_pre_emp_pulse_tune = 0x0, |
| 63 | .tx_rise_tune = 0x1, |
| 64 | .rx_vref_tune = 0x6, |
| 65 | .tx_hsxv_tune = 0x3, |
| 66 | .tx_res_tune = 0x01, |
| 67 | }" |
| 68 | |
| 69 | # Controller0 Port1 Default |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame^] | 70 | register "usb_2_port_tune_params[1]" = "{ |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 71 | .com_pds_tune = 0x03, |
| 72 | .sq_rx_tune = 0x3, |
| 73 | .tx_fsls_tune = 0x3, |
| 74 | .tx_pre_emp_amp_tune = 0x03, |
| 75 | .tx_pre_emp_pulse_tune = 0x0, |
| 76 | .tx_rise_tune = 0x1, |
| 77 | .rx_vref_tune = 0x6, |
| 78 | .tx_hsxv_tune = 0x3, |
| 79 | .tx_res_tune = 0x01, |
| 80 | }" |
| 81 | |
| 82 | # Controller0 Port2 Default |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame^] | 83 | register "usb_2_port_tune_params[2]" = "{ |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 84 | .com_pds_tune = 0x03, |
| 85 | .sq_rx_tune = 0x3, |
| 86 | .tx_fsls_tune = 0x3, |
| 87 | .tx_pre_emp_amp_tune = 0x03, |
| 88 | .tx_pre_emp_pulse_tune = 0x0, |
| 89 | .tx_rise_tune = 0x1, |
| 90 | .rx_vref_tune = 0x6, |
| 91 | .tx_hsxv_tune = 0x3, |
| 92 | .tx_res_tune = 0x01, |
| 93 | }" |
| 94 | |
| 95 | # Controller0 Port3 Default |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame^] | 96 | register "usb_2_port_tune_params[3]" = "{ |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 97 | .com_pds_tune = 0x03, |
| 98 | .sq_rx_tune = 0x3, |
| 99 | .tx_fsls_tune = 0x3, |
| 100 | .tx_pre_emp_amp_tune = 0x03, |
| 101 | .tx_pre_emp_pulse_tune = 0x0, |
| 102 | .tx_rise_tune = 0x1, |
| 103 | .rx_vref_tune = 0x6, |
| 104 | .tx_hsxv_tune = 0x3, |
| 105 | .tx_res_tune = 0x01, |
| 106 | }" |
| 107 | |
| 108 | # Controller1 Port0 Default |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame^] | 109 | register "usb_2_port_tune_params[4]" = "{ |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 110 | .com_pds_tune = 0x03, |
| 111 | .sq_rx_tune = 0x3, |
| 112 | .tx_fsls_tune = 0x3, |
| 113 | .tx_pre_emp_amp_tune = 0x02, |
| 114 | .tx_pre_emp_pulse_tune = 0x0, |
| 115 | .tx_rise_tune = 0x1, |
| 116 | .rx_vref_tune = 0x5, |
| 117 | .tx_hsxv_tune = 0x3, |
| 118 | .tx_res_tune = 0x01, |
| 119 | }" |
| 120 | |
| 121 | # Controller1 Port1 Default |
Felix Held | 3a7389e | 2020-07-23 18:22:30 +0200 | [diff] [blame^] | 122 | register "usb_2_port_tune_params[5]" = "{ |
Chris Wang | 1e3e528 | 2020-06-23 21:10:57 +0800 | [diff] [blame] | 123 | .com_pds_tune = 0x03, |
| 124 | .sq_rx_tune = 0x3, |
| 125 | .tx_fsls_tune = 0x3, |
| 126 | .tx_pre_emp_amp_tune = 0x02, |
| 127 | .tx_pre_emp_pulse_tune = 0x0, |
| 128 | .tx_rise_tune = 0x1, |
| 129 | .rx_vref_tune = 0x5, |
| 130 | .tx_hsxv_tune = 0x3, |
| 131 | .tx_res_tune = 0x01, |
| 132 | }" |
| 133 | |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 134 | # SPI Configuration |
| 135 | register "common_config.spi_config" = "{ |
Rob Barnes | 13ec6a0 | 2020-07-14 13:23:43 -0600 | [diff] [blame] | 136 | .normal_speed = SPI_SPEED_33M, /* MHz */ |
| 137 | .fast_speed = SPI_SPEED_66M, /* MHz */ |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 138 | .altio_speed = SPI_SPEED_66M, /* MHz */ |
| 139 | .tpm_speed = SPI_SPEED_66M, /* MHz */ |
Martin Roth | 637f941 | 2020-07-06 20:02:36 -0600 | [diff] [blame] | 140 | .read_mode = SPI_READ_MODE_DUAL122, |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 141 | }" |
| 142 | |
| 143 | # eSPI Configuration |
| 144 | register "common_config.espi_config" = "{ |
| 145 | .std_io_decode_bitmap = ESPI_DECODE_IO_0x80_EN | ESPI_DECODE_IO_0X60_0X64_EN, |
| 146 | .generic_io_range[0] = { |
| 147 | .base = 0x62, |
| 148 | /* |
| 149 | * Only 0x62 and 0x66 are required. But, this is not supported by |
| 150 | * standard IO decodes and there are only 4 generic I/O windows |
| 151 | * available. Hence, open a window from 0x62-0x67. |
| 152 | */ |
| 153 | .size = 5, |
| 154 | }, |
| 155 | .generic_io_range[1] = { |
| 156 | .base = 0x800, /* EC_HOST_CMD_REGION0 */ |
| 157 | .size = 256, /* EC_HOST_CMD_REGION_SIZE * 2 */ |
| 158 | }, |
| 159 | .generic_io_range[2] = { |
| 160 | .base = 0x900, /* EC_LPC_ADDR_MEMMAP */ |
| 161 | .size = 255, /* EC_MEMMAP_SIZE */ |
| 162 | }, |
| 163 | .generic_io_range[3] = { |
| 164 | .base = 0x200, /* EC_LPC_ADDR_HOST_DATA */ |
| 165 | .size = 8, /* 0x200 - 0x207 */ |
| 166 | }, |
| 167 | |
| 168 | .io_mode = ESPI_IO_MODE_QUAD, |
| 169 | .op_freq_mhz = ESPI_OP_FREQ_33_MHZ, |
| 170 | .crc_check_enable = 1, |
| 171 | .dedicated_alert_pin = 1, |
| 172 | .periph_ch_en = 1, |
| 173 | .vw_ch_en = 1, |
| 174 | .oob_ch_en = 0, |
| 175 | .flash_ch_en = 0, |
| 176 | |
Aaron Durbin | 76fcf829 | 2020-07-02 11:08:21 -0600 | [diff] [blame] | 177 | .vw_irq_polarity = ESPI_VW_IRQ_LEVEL_HIGH(1) | ESPI_VW_IRQ_LEVEL_HIGH(12), |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 178 | }" |
| 179 | |
| 180 | register "i2c_scl_reset" = "GPIO_I2C2_SCL | GPIO_I2C3_SCL" |
| 181 | |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 182 | device cpu_cluster 0 on |
| 183 | device lapic 0 on end |
| 184 | end |
| 185 | |
| 186 | # See AMD 55570-B1 Table 13: PCI Device ID Assignments. |
| 187 | device domain 0 on |
| 188 | subsystemid 0x1022 0x1510 inherit |
| 189 | device pci 0.0 on end # Root Complex |
| 190 | device pci 0.2 on end # IOMMU |
| 191 | device pci 1.0 on end # Dummy Host Bridge, must be enabled |
| 192 | device pci 1.1 off end # GPP Bridge 0 |
| 193 | device pci 1.2 on end # GPP Bridge 1 - Wifi |
| 194 | device pci 1.3 on end # GPP Bridge 2 - SD |
| 195 | device pci 1.4 off end # GPP Bridge 3 |
| 196 | device pci 1.5 off end # GPP Bridge 4 |
| 197 | device pci 8.0 on end # Dummy Host Bridge, must be enabled |
| 198 | device pci 8.1 on # Internal GPP Bridge 0 to Bus A |
| 199 | device pci 0.0 on end # Internal GPU |
| 200 | device pci 0.1 on end # Display HDA |
| 201 | device pci 0.2 on end # Crypto Coprocesor |
Rob Barnes | f0d1c9a | 2020-06-24 09:42:02 -0600 | [diff] [blame] | 202 | device pci 0.3 on # USB 3.1 |
| 203 | chip drivers/usb/acpi |
| 204 | register "desc" = ""Root Hub"" |
| 205 | register "type" = "UPC_TYPE_HUB" |
| 206 | device usb 0.0 on |
| 207 | chip drivers/usb/acpi |
| 208 | register "desc" = ""Left Type-C Port"" |
| 209 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 210 | register "group" = "ACPI_PLD_GROUP(1, 1)" |
| 211 | device usb 2.0 on end |
| 212 | end |
| 213 | chip drivers/usb/acpi |
| 214 | register "desc" = ""Right Type-C Port"" |
| 215 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 216 | register "group" = "ACPI_PLD_GROUP(2, 2)" |
| 217 | device usb 2.1 on end |
| 218 | end |
| 219 | chip drivers/usb/acpi |
| 220 | register "desc" = ""Left Type-A Port"" |
| 221 | register "type" = "UPC_TYPE_USB3_A" |
| 222 | register "group" = "ACPI_PLD_GROUP(1, 2)" |
| 223 | device usb 2.2 on end |
| 224 | end |
| 225 | chip drivers/usb/acpi |
| 226 | register "desc" = ""Right Type-A Port"" |
| 227 | register "type" = "UPC_TYPE_USB3_A" |
| 228 | register "group" = "ACPI_PLD_GROUP(2, 1)" |
| 229 | device usb 2.3 on end |
| 230 | end |
| 231 | chip drivers/usb/acpi |
| 232 | register "desc" = ""User-Facing Camera"" |
| 233 | register "type" = "UPC_TYPE_INTERNAL" |
| 234 | device usb 2.4 on end |
| 235 | end |
| 236 | chip drivers/usb/acpi |
| 237 | register "desc" = ""Bluetooth"" |
| 238 | register "type" = "UPC_TYPE_INTERNAL" |
| 239 | device usb 2.5 on end |
| 240 | end |
| 241 | chip drivers/usb/acpi |
| 242 | register "desc" = ""Left Type-C Port"" |
| 243 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 244 | register "group" = "ACPI_PLD_GROUP(1, 1)" |
| 245 | device usb 3.0 on end |
| 246 | end |
| 247 | chip drivers/usb/acpi |
| 248 | register "desc" = ""Right Type-C Port"" |
| 249 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 250 | register "group" = "ACPI_PLD_GROUP(2, 2)" |
| 251 | device usb 3.1 on end |
| 252 | end |
| 253 | chip drivers/usb/acpi |
| 254 | register "desc" = ""Left Type-A Port"" |
| 255 | register "type" = "UPC_TYPE_USB3_A" |
| 256 | register "group" = "ACPI_PLD_GROUP(1, 2)" |
| 257 | device usb 3.2 on end |
| 258 | end |
| 259 | chip drivers/usb/acpi |
| 260 | register "desc" = ""Right Type-A Port"" |
| 261 | register "type" = "UPC_TYPE_USB3_A" |
| 262 | register "group" = "ACPI_PLD_GROUP(2, 1)" |
| 263 | device usb 3.3 on end |
| 264 | end |
| 265 | end |
| 266 | end |
| 267 | end |
Furquan Shaikh | 24ec79c | 2020-07-16 13:40:28 -0700 | [diff] [blame] | 268 | device pci 0.5 on |
| 269 | chip drivers/amd/i2s_machine_dev |
| 270 | register "hid" = ""AMDI5682"" |
| 271 | # DMIC select GPIO for ACP machine device |
| 272 | # This GPIO is used to select DMIC0 or DMIC1 by the |
| 273 | # kernel driver. It does not really have a polarity |
| 274 | # since low and high control the selection of DMIC and |
| 275 | # hence does not have an active polarity. |
| 276 | # Kernel driver does not use the polarity field and |
| 277 | # instead treats the GPIO selection as follows: |
| 278 | # Set low (0) = Select DMIC0 |
| 279 | # Set high (1) = Select DMIC1 |
| 280 | register "dmic_select_gpio" = "ACPI_GPIO_OUTPUT(GPIO_67)" |
| 281 | device generic 0.0 on end |
| 282 | end |
| 283 | end # Audio |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 284 | device pci 0.6 on end # HDA |
| 285 | device pci 0.7 on end # non-Sensor Fusion Hub device |
| 286 | end |
| 287 | device pci 8.2 on # Internal GPP Bridge 0 to Bus B |
| 288 | device pci 0.0 on end # AHCI |
| 289 | end |
| 290 | device pci 14.0 on end # SM |
| 291 | device pci 14.3 on # - D14F3 bridge |
| 292 | chip ec/google/chromeec |
| 293 | device pnp 0c09.0 on |
| 294 | chip ec/google/chromeec/i2c_tunnel |
| 295 | register "uid" = "1" |
| 296 | register "remote_bus" = "8" |
| 297 | device generic 0.0 on |
| 298 | chip drivers/i2c/generic |
| 299 | register "hid" = ""10EC5682"" |
| 300 | register "name" = ""RT58"" |
| 301 | register "uid" = "1" |
| 302 | register "desc" = ""Realtek RT5682"" |
| 303 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(62)" |
| 304 | register "property_count" = "1" |
| 305 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 306 | register "property_list[0].name" = ""realtek,jd-src"" |
| 307 | register "property_list[0].integer" = "1" |
| 308 | device i2c 1a on end |
| 309 | end |
| 310 | end |
| 311 | end |
| 312 | chip ec/google/chromeec/i2c_tunnel |
| 313 | register "name" = ""MSTH"" |
| 314 | register "uid" = "1" |
| 315 | register "remote_bus" = "9" |
| 316 | device generic 1.0 on end |
| 317 | end |
Furquan Shaikh | e284bff | 2020-07-02 16:03:06 -0700 | [diff] [blame] | 318 | chip ec/google/chromeec/audio_codec |
| 319 | register "uid" = "1" |
| 320 | device generic 0 on end |
| 321 | end |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 322 | end |
| 323 | end |
| 324 | end |
| 325 | device pci 18.0 on end # Data fabric [0-7] |
| 326 | device pci 18.1 on end |
| 327 | device pci 18.2 on end |
| 328 | device pci 18.3 on end |
| 329 | device pci 18.4 on end |
| 330 | device pci 18.5 on end |
| 331 | device pci 18.6 on end |
| 332 | end # domain |
| 333 | |
| 334 | chip drivers/generic/max98357a |
Raul E Rangel | 19704cd | 2020-06-02 10:43:20 -0600 | [diff] [blame] | 335 | register "hid" = ""MX98357A"" |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 336 | register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_91)" |
| 337 | register "sdmode_delay" = "5" |
| 338 | device generic 0.1 on end |
| 339 | end |
| 340 | |
| 341 | device mmio 0xfedc5000 on |
| 342 | chip drivers/i2c/tpm |
| 343 | register "hid" = ""GOOG0005"" |
| 344 | register "desc" = ""Cr50 TPM"" |
| 345 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_3)" |
| 346 | device i2c 50 on end |
| 347 | end |
| 348 | end |
| 349 | |
Raul E Rangel | 5e29c0e | 2020-06-12 11:41:16 -0600 | [diff] [blame] | 350 | device mmio 0xfedca000 off end # UART1 |
| 351 | device mmio 0xfedce000 off end # UART2 |
| 352 | device mmio 0xfedcf000 off end # UART3 |
| 353 | |
Raul E Rangel | b3c4132 | 2020-05-20 14:07:41 -0600 | [diff] [blame] | 354 | end # chip soc/amd/picasso |