Eric Lai | d47a104 | 2023-02-15 13:50:04 +0800 | [diff] [blame] | 1 | chip soc/intel/alderlake |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 2 | # Intel Common SoC Config |
| 3 | #+-------------------+---------------------------+ |
| 4 | #| Field | Value | |
| 5 | #+-------------------+---------------------------+ |
| 6 | #| I2C0 | Audio | |
| 7 | #| I2C1 | GPU | |
| 8 | #| I2C2 | External graphic | |
| 9 | #| I2C3 | cr50 TPM. Early init is | |
| 10 | #| | required to set up a BAR | |
| 11 | #| | for TPM communication | |
| 12 | #| I2C5 | Trackpad | |
| 13 | #+-------------------+---------------------------+ |
| 14 | register "common_soc_config" = "{ |
| 15 | .i2c[0] = { |
| 16 | .speed = I2C_SPEED_FAST, |
| 17 | .rise_time_ns = 650, |
| 18 | .fall_time_ns = 400, |
| 19 | .data_hold_time_ns = 50, |
| 20 | }, |
| 21 | .i2c[1] = { |
| 22 | .speed = I2C_SPEED_FAST, |
| 23 | .rise_time_ns = 650, |
| 24 | .fall_time_ns = 300, |
| 25 | .data_hold_time_ns = 50, |
| 26 | }, |
| 27 | .i2c[2] = { |
| 28 | .speed = I2C_SPEED_FAST, |
| 29 | .rise_time_ns = 650, |
| 30 | .fall_time_ns = 300, |
| 31 | .data_hold_time_ns = 50, |
| 32 | }, |
| 33 | .i2c[3] = { |
| 34 | .early_init = 1, |
| 35 | .speed = I2C_SPEED_FAST, |
| 36 | .rise_time_ns = 600, |
| 37 | .fall_time_ns = 400, |
| 38 | .data_hold_time_ns = 50, |
| 39 | }, |
| 40 | .i2c[5] = { |
| 41 | .speed = I2C_SPEED_FAST, |
| 42 | .rise_time_ns = 650, |
| 43 | .fall_time_ns = 400, |
| 44 | .data_hold_time_ns = 50, |
| 45 | }, |
| 46 | }" |
| 47 | |
| 48 | register "tcc_offset" = "3" # TCC of 97 |
| 49 | register "sagv" = "SaGv_Disabled" |
| 50 | |
| 51 | register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC1)" # USB2_C0 |
| 52 | register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC2)" # USB2_C1 |
| 53 | register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # UCAM |
| 54 | register "usb2_ports[7]" = "USB2_PORT_MID(OC0)" # Type-A Port A1 |
| 55 | register "usb2_ports[8]" = "USB2_PORT_MID(OC3)" # Type-A Port A0 |
| 56 | register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # M.2 Bluetooth |
| 57 | |
| 58 | register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)" # USB3/2 Type A port A1 |
| 59 | register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC3)" # USB3/2 Type A port A0 |
| 60 | |
| 61 | register "tcss_ports[0]" = "TCSS_PORT_DEFAULT(OC2)" # Typc-C Port C1 |
| 62 | register "tcss_ports[2]" = "TCSS_PORT_DEFAULT(OC1)" # Typc-C Port C0 |
| 63 | |
| 64 | register "serial_io_i2c_mode" = "{ |
| 65 | [PchSerialIoIndexI2C0] = PchSerialIoPci, |
| 66 | [PchSerialIoIndexI2C1] = PchSerialIoPci, |
| 67 | [PchSerialIoIndexI2C2] = PchSerialIoPci, |
| 68 | [PchSerialIoIndexI2C3] = PchSerialIoPci, |
| 69 | [PchSerialIoIndexI2C4] = PchSerialIoDisabled, |
| 70 | [PchSerialIoIndexI2C5] = PchSerialIoPci, |
| 71 | }" |
| 72 | |
Eric Lai | d47a104 | 2023-02-15 13:50:04 +0800 | [diff] [blame] | 73 | device domain 0 on |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 74 | device ref pcie4_0 on |
| 75 | # Enable CPU PCIe RP 1 using CLKREQ 0 and CLKSRC 0 |
| 76 | register "cpu_pcie_rp[CPU_RP(1)]" = "{ |
| 77 | .clk_req = 0, |
| 78 | .clk_src = 0, |
| 79 | .flags = PCIE_RP_LTR | PCIE_RP_AER, |
| 80 | }" |
| 81 | device pci 00.0 alias dgpu on end |
| 82 | end |
| 83 | device ref dtt on |
| 84 | chip drivers/intel/dptf |
| 85 | ## sensor information |
| 86 | register "options.tsr[0].desc" = ""DRAM"" |
| 87 | register "options.tsr[1].desc" = ""GPU"" |
| 88 | register "options.tsr[2].desc" = ""Charger"" |
| 89 | # TODO: below values are initial reference values only |
| 90 | ## Active Policy |
| 91 | register "policies.active" = "{ |
| 92 | [0] = { |
| 93 | .target = DPTF_CPU, |
| 94 | .thresholds = { |
| 95 | TEMP_PCT(85, 90), |
| 96 | TEMP_PCT(80, 80), |
| 97 | TEMP_PCT(75, 70), |
| 98 | TEMP_PCT(70, 50), |
| 99 | TEMP_PCT(65, 30), |
| 100 | } |
| 101 | }, |
| 102 | [1] = { |
| 103 | .target = DPTF_TEMP_SENSOR_1, |
| 104 | .thresholds = { |
| 105 | TEMP_PCT(50, 90), |
| 106 | TEMP_PCT(48, 70), |
| 107 | TEMP_PCT(46, 60), |
| 108 | TEMP_PCT(43, 40), |
| 109 | TEMP_PCT(40, 30), |
| 110 | } |
| 111 | } |
| 112 | }" |
| 113 | ## Passive Policy |
| 114 | register "policies.passive" = "{ |
| 115 | [0] = DPTF_PASSIVE(CPU, CPU, 95, 5000), |
| 116 | [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 75, 5000), |
| 117 | [2] = DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 75, 5000), |
| 118 | [3] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_2, 75, 5000), |
| 119 | }" |
| 120 | ## Critical Policy |
| 121 | register "policies.critical" = "{ |
| 122 | [0] = DPTF_CRITICAL(CPU, 105, SHUTDOWN), |
| 123 | [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 105, SHUTDOWN), |
| 124 | [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 105, SHUTDOWN), |
| 125 | [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 105, SHUTDOWN), |
| 126 | }" |
| 127 | register "controls.power_limits" = "{ |
| 128 | .pl1 = { |
| 129 | .min_power = 3000, |
| 130 | .max_power = 15000, |
| 131 | .time_window_min = 28 * MSECS_PER_SEC, |
| 132 | .time_window_max = 32 * MSECS_PER_SEC, |
| 133 | .granularity = 200, |
| 134 | }, |
| 135 | .pl2 = { |
| 136 | .min_power = 55000, |
| 137 | .max_power = 55000, |
| 138 | .time_window_min = 28 * MSECS_PER_SEC, |
| 139 | .time_window_max = 32 * MSECS_PER_SEC, |
| 140 | .granularity = 1000, |
| 141 | } |
| 142 | }" |
| 143 | register "oem_data.oem_variables" = "{ |
| 144 | [0] = 0x0 |
| 145 | }" |
| 146 | ## Charger Performance Control (Control, mA) |
| 147 | register "controls.charger_perf" = "{ |
| 148 | [0] = { 255, 1700 }, |
| 149 | [1] = { 24, 1500 }, |
| 150 | [2] = { 16, 1000 }, |
| 151 | [3] = { 8, 500 } |
| 152 | }" |
| 153 | ## Fan Performance Control (Percent, Speed, Noise, Power) |
| 154 | register "controls.fan_perf" = "{ |
| 155 | [0] = { 90, 4700, 220, 2200, }, |
| 156 | [1] = { 80, 4500, 180, 1800, }, |
| 157 | [2] = { 70, 4300, 145, 1450, }, |
| 158 | [3] = { 60, 3700, 115, 1150, }, |
| 159 | [4] = { 50, 3300, 90, 900, }, |
| 160 | [5] = { 40, 3100, 55, 550, }, |
| 161 | [6] = { 30, 2800, 30, 300, }, |
| 162 | [7] = { 20, 2500, 15, 150, }, |
| 163 | [8] = { 10, 2300, 10, 100, }, |
| 164 | [9] = { 0, 0, 0, 50, } |
| 165 | }" |
| 166 | |
| 167 | ## Fan options |
| 168 | register "options.fan.fine_grained_control" = "1" |
| 169 | register "options.fan.step_size" = "2" |
| 170 | |
| 171 | device generic 0 alias dptf_policy on end |
| 172 | end |
| 173 | end |
| 174 | device ref cnvi_wifi on |
| 175 | chip drivers/wifi/generic |
| 176 | register "wake" = "GPE0_PME_B0" |
| 177 | device generic 0 on end |
| 178 | end |
| 179 | end |
| 180 | device ref i2c0 on |
| 181 | chip drivers/i2c/generic |
| 182 | register "hid" = ""RTL5682"" |
| 183 | register "name" = ""RT58"" |
| 184 | register "desc" = ""Headset Codec"" |
| 185 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_A23)" |
| 186 | # Set the jd_src to RT5668_JD1 for jack detection |
| 187 | register "property_count" = "1" |
| 188 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 189 | register "property_list[0].name" = ""realtek,jd-src"" |
| 190 | register "property_list[0].integer" = "1" |
| 191 | device i2c 1a on end |
| 192 | end |
| 193 | end #I2C0 |
| 194 | device ref i2c1 on end # GPU |
| 195 | device ref i2c2 on end # External GPU |
| 196 | device ref i2c3 on |
| 197 | chip drivers/i2c/tpm |
| 198 | register "hid" = ""GOOG0005"" |
Tarun Tuli | 15dd44e | 2023-04-14 19:32:24 +0000 | [diff] [blame] | 199 | register "irq" = "ACPI_IRQ_EDGE_LOW(GPP_A20_IRQ)" |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 200 | device i2c 50 on end |
| 201 | end |
| 202 | end |
| 203 | device ref i2c5 on |
| 204 | chip drivers/i2c/generic |
| 205 | register "hid" = ""ELAN0000"" |
| 206 | register "desc" = ""ELAN Touchpad"" |
| 207 | register "irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_F14_IRQ)" |
| 208 | register "wake" = "GPE0_DW2_14" |
| 209 | register "detect" = "1" |
| 210 | device i2c 15 on end |
| 211 | end |
| 212 | end |
| 213 | device ref pcie_rp3 on |
Tarun Tuli | 1c25808 | 2023-04-20 18:01:33 +0000 | [diff] [blame] | 214 | chip soc/intel/common/block/pcie/rtd3 |
| 215 | register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H13)" |
| 216 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D18)" |
| 217 | register "srcclk_pin" = "3" |
| 218 | device generic 0 on end |
| 219 | end |
| 220 | # Enable SD Card PCIE 3 using clk 4 |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 221 | register "pch_pcie_rp[PCH_RP(3)]" = "{ |
| 222 | .clk_src = 4, |
| 223 | .clk_req = 4, |
Tarun Tuli | 1c25808 | 2023-04-20 18:01:33 +0000 | [diff] [blame] | 224 | .flags = PCIE_RP_HOTPLUG | PCIE_RP_LTR | PCIE_RP_AER, |
| 225 | }" |
| 226 | end #PCIE3 SD card |
| 227 | device ref pcie_rp4 off end |
| 228 | device ref pcie_rp6 off end |
| 229 | device ref pcie_rp7 off end |
| 230 | device ref pcie_rp8 on |
| 231 | # Enable PCIE 8 using clk 3 |
| 232 | register "pch_pcie_rp[PCH_RP(8)]" = "{ |
| 233 | .clk_src = 3, |
| 234 | .clk_req = 3, |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 235 | .flags = PCIE_RP_LTR | PCIE_RP_AER, |
| 236 | }" |
| 237 | chip drivers/net |
| 238 | register "customized_leds" = "0x05af" |
| 239 | register "wake" = "GPE0_DW0_07" |
| 240 | register "device_index" = "0" |
| 241 | register "add_acpi_dma_property" = "true" |
| 242 | device pci 00.0 on end |
| 243 | end |
| 244 | end #RTL8111H Ethernet NIC |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 245 | device ref pcie_rp9 on |
| 246 | # Enable NVMe PCIE 9 using clk 1 |
| 247 | register "pch_pcie_rp[PCH_RP(9)]" = "{ |
| 248 | .clk_src = 1, |
| 249 | .clk_req = 1, |
| 250 | .flags = PCIE_RP_LTR | PCIE_RP_AER, |
| 251 | }" |
| 252 | end #PCIE9-12 SSD |
| 253 | device ref hda on |
| 254 | chip drivers/generic/max98357a |
| 255 | register "hid" = ""MX98360A"" |
| 256 | register "sdmode_gpio" = |
| 257 | "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)" |
| 258 | register "sdmode_delay" = "5" |
| 259 | device generic 0 on end |
| 260 | end |
| 261 | end |
| 262 | device ref pch_espi on |
| 263 | chip ec/google/chromeec |
| 264 | use conn0 as mux_conn[0] |
| 265 | use conn1 as mux_conn[1] |
| 266 | device pnp 0c09.0 on end |
| 267 | end |
| 268 | end |
| 269 | device ref pmc hidden |
| 270 | chip drivers/intel/pmc_mux |
| 271 | device generic 0 on |
| 272 | chip drivers/intel/pmc_mux/conn |
| 273 | use usb2_port1 as usb2_port |
| 274 | use tcss_usb3_port3 as usb3_port |
| 275 | device generic 0 alias conn0 on end |
| 276 | end |
| 277 | chip drivers/intel/pmc_mux/conn |
| 278 | use usb2_port3 as usb2_port |
| 279 | use tcss_usb3_port1 as usb3_port |
| 280 | device generic 1 alias conn1 on end |
| 281 | end |
| 282 | end |
| 283 | end |
| 284 | end |
| 285 | device ref tcss_xhci on |
| 286 | chip drivers/usb/acpi |
| 287 | device ref tcss_root_hub on |
| 288 | chip drivers/usb/acpi |
| 289 | register "desc" = ""USB3 Type-C Port C1 (MLB)"" |
| 290 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 291 | register "use_custom_pld" = "true" |
Eric Lai | f4a51ab | 2023-06-19 13:35:49 +0800 | [diff] [blame^] | 292 | register "custom_pld" = "ACPI_PLD_TYPE_C(BACK, LEFT, ACPI_PLD_GROUP(2, 1))" |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 293 | device ref tcss_usb3_port1 on end |
| 294 | end |
| 295 | chip drivers/usb/acpi |
| 296 | register "desc" = ""USB3 Type-C Port C0 (MLB)"" |
| 297 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 298 | register "use_custom_pld" = "true" |
Eric Lai | f4a51ab | 2023-06-19 13:35:49 +0800 | [diff] [blame^] | 299 | register "custom_pld" = "ACPI_PLD_TYPE_C(BACK, RIGHT, ACPI_PLD_GROUP(1, 1))" |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 300 | device ref tcss_usb3_port3 on end |
| 301 | end |
| 302 | end |
| 303 | end |
| 304 | end |
| 305 | device ref xhci on |
| 306 | chip drivers/usb/acpi |
| 307 | device ref xhci_root_hub on |
| 308 | chip drivers/usb/acpi |
| 309 | register "desc" = ""USB2 Type-C Port C0 (MLB)"" |
| 310 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 311 | register "use_custom_pld" = "true" |
Eric Lai | f4a51ab | 2023-06-19 13:35:49 +0800 | [diff] [blame^] | 312 | register "custom_pld" = "ACPI_PLD_TYPE_C(BACK, RIGHT, ACPI_PLD_GROUP(1, 1))" |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 313 | device ref usb2_port1 on end |
| 314 | end |
| 315 | chip drivers/usb/acpi |
| 316 | register "desc" = ""USB2 Type-C Port C1 (MLB)"" |
| 317 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
| 318 | register "use_custom_pld" = "true" |
Eric Lai | f4a51ab | 2023-06-19 13:35:49 +0800 | [diff] [blame^] | 319 | register "custom_pld" = "ACPI_PLD_TYPE_C(BACK, LEFT, ACPI_PLD_GROUP(2, 1))" |
Eric Lai | 3b3012f | 2023-03-21 12:16:45 +0800 | [diff] [blame] | 320 | device ref usb2_port3 on end |
| 321 | end |
| 322 | chip drivers/usb/acpi |
| 323 | register "desc" = ""USB2 Camera"" |
| 324 | register "type" = "UPC_TYPE_INTERNAL" |
| 325 | device ref usb2_port6 on end |
| 326 | end |
| 327 | chip drivers/usb/acpi |
| 328 | register "desc" = ""USB2 Type-A Port 1"" |
| 329 | register "type" = "UPC_TYPE_A" |
| 330 | register "use_custom_pld" = "true" |
| 331 | register "custom_pld" = "ACPI_PLD_TYPE_A(LEFT, LEFT, ACPI_PLD_GROUP(3, 2))" |
| 332 | device ref usb2_port8 on end |
| 333 | end |
| 334 | chip drivers/usb/acpi |
| 335 | register "desc" = ""USB2 Type-A Port 0"" |
| 336 | register "type" = "UPC_TYPE_A" |
| 337 | register "use_custom_pld" = "true" |
| 338 | register "custom_pld" = "ACPI_PLD_TYPE_A(RIGHT, RIGHT, ACPI_PLD_GROUP(3, 1))" |
| 339 | device ref usb2_port9 on end |
| 340 | end |
| 341 | chip drivers/usb/acpi |
| 342 | register "desc" = ""USB2 Bluetooth"" |
| 343 | register "type" = "UPC_TYPE_INTERNAL" |
| 344 | register "reset_gpio" = |
| 345 | "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D4)" |
| 346 | device ref usb2_port10 on end |
| 347 | end |
| 348 | chip drivers/usb/acpi |
| 349 | register "desc" = ""USB3 Type-A Port 1"" |
| 350 | register "type" = "UPC_TYPE_USB3_A" |
| 351 | register "use_custom_pld" = "true" |
| 352 | register "custom_pld" = "ACPI_PLD_TYPE_A(RIGHT, RIGHT, ACPI_PLD_GROUP(3, 1))" |
| 353 | device ref usb3_port1 on end |
| 354 | end |
| 355 | chip drivers/usb/acpi |
| 356 | register "desc" = ""USB3 Type-A Port 0"" |
| 357 | register "type" = "UPC_TYPE_USB3_A" |
| 358 | register "use_custom_pld" = "true" |
| 359 | register "custom_pld" = "ACPI_PLD_TYPE_A(LEFT, LEFT, ACPI_PLD_GROUP(3, 2))" |
| 360 | device ref usb3_port2 on end |
| 361 | end |
| 362 | end |
| 363 | end |
| 364 | end |
| 365 | end |
Eric Lai | d47a104 | 2023-02-15 13:50:04 +0800 | [diff] [blame] | 366 | end |