FrankChu | 6e12245 | 2022-02-07 16:45:26 +0800 | [diff] [blame] | 1 | fw_config |
| 2 | field AUDIO_CODEC_SOURCE 41 43 |
| 3 | option AUDIO_CODEC_UNPROVISIONED 0 |
| 4 | option AUDIO_CODEC_ALC5682 1 |
| 5 | option AUDIO_CODEC_ALC5682I_VS 2 |
| 6 | end |
| 7 | end |
FrankChu | 86a241e | 2020-11-30 12:56:42 +0800 | [diff] [blame] | 8 | chip soc/intel/tigerlake |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 9 | # BitMask where bits [3:0] are Controller 0 Channel [3:0] and |
| 10 | # bits [7:4] are Controller 1 Channel [3:0]. |
| 11 | # Enable Command Mirroring for controller 0 channel 0 and 1, |
| 12 | # and controller 1 channel 0 and 1. |
| 13 | register "CmdMirror" = "0x00000033" |
| 14 | |
| 15 | register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC0)" # Type-A / Type-C Port 0 |
| 16 | register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC1)" # Type-A / Type-C Port 1 |
| 17 | register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # Front Camera |
| 18 | register "usb2_ports[4]" = "USB2_PORT_TYPE_C(OC0)" # Type-A / Type-C Port 0 |
| 19 | |
| 20 | register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)" # Type-A / Type-C Port 0 |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 21 | |
| 22 | # Disable SRCCLKREQ1# |
| 23 | register "PcieClkSrcUsage[1]" = "PCIE_CLK_NOTUSED" |
| 24 | |
| 25 | #+-------------------+---------------------------+ |
| 26 | #| Field | Value | |
| 27 | #+-------------------+---------------------------+ |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 28 | #| GSPI0 | cr50 TPM. Early init is | |
| 29 | #| | required to set up a BAR | |
| 30 | #| | for TPM communication | |
| 31 | #| | before memory is up | |
| 32 | #| I2C0 | Audio | |
| 33 | #| I2C1 | Touchscreen | |
| 34 | #| I2C5 | Trackpad | |
| 35 | #+-------------------+---------------------------+ |
| 36 | register "common_soc_config" = "{ |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 37 | .gspi[0] = { |
| 38 | .speed_mhz = 1, |
| 39 | .early_init = 1, |
| 40 | }, |
| 41 | .i2c[0] = { |
| 42 | .speed = I2C_SPEED_FAST, |
| 43 | }, |
| 44 | .i2c[1] = { |
| 45 | .speed = I2C_SPEED_FAST, |
| 46 | }, |
| 47 | .i2c[5] = { |
| 48 | .speed = I2C_SPEED_FAST, |
Hao Chou | 70eb6c9 | 2021-04-27 13:45:14 +0800 | [diff] [blame] | 49 | .speed_config[0] = { |
| 50 | .speed = I2C_SPEED_FAST, |
| 51 | .scl_lcnt = 155, |
| 52 | .scl_hcnt = 80, |
| 53 | .sda_hold = 36, |
| 54 | }, |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 55 | }, |
| 56 | }" |
FrankChu | 86a241e | 2020-11-30 12:56:42 +0800 | [diff] [blame] | 57 | |
| 58 | device domain 0 on |
hao_chou | 9fd2ad1 | 2021-03-17 14:11:41 +0800 | [diff] [blame] | 59 | device ref dptf on |
| 60 | chip drivers/intel/dptf |
| 61 | ## Disable Active Policy |
| 62 | register "policies.active" = "{[0] = {.target=DPTF_NONE}}" |
| 63 | |
| 64 | ## Passive Policy |
| 65 | register "policies.passive" = "{ |
| 66 | [0] = DPTF_PASSIVE(CPU, CPU, 57, 30000), |
| 67 | [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 45, 10000), |
| 68 | [2] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_0, 56, 30000), |
| 69 | [3] = DPTF_PASSIVE(CPU, TEMP_SENSOR_2, 54, 10000), |
| 70 | [4] = DPTF_PASSIVE(CPU, TEMP_SENSOR_3, 46, 10000)}" |
| 71 | |
| 72 | ## Critical Policy |
| 73 | register "policies.critical" = "{ |
| 74 | [0] = DPTF_CRITICAL(CPU, 100, SHUTDOWN), |
| 75 | [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 75, SHUTDOWN), |
| 76 | [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 75, SHUTDOWN), |
| 77 | [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 75, SHUTDOWN), |
| 78 | [4] = DPTF_CRITICAL(TEMP_SENSOR_3, 75, SHUTDOWN)}" |
| 79 | |
| 80 | ## Power Limits Control |
| 81 | # 7-9W PL1 in 200mW increments, avg over 28-32s interval |
| 82 | # PL2 is fixed at 40W, avg over 28-32s interval |
| 83 | register "controls.power_limits" = "{ |
| 84 | .pl1 = {.min_power = 7000, |
| 85 | .max_power = 9000, |
| 86 | .time_window_min = 28 * MSECS_PER_SEC, |
| 87 | .time_window_max = 32 * MSECS_PER_SEC, |
| 88 | .granularity = 200,}, |
| 89 | .pl2 = {.min_power = 40000, |
| 90 | .max_power = 40000, |
| 91 | .time_window_min = 28 * MSECS_PER_SEC, |
| 92 | .time_window_max = 32 * MSECS_PER_SEC, |
| 93 | .granularity = 1000,}}" |
| 94 | |
| 95 | ## Charger Performance Control (Control, mA) |
| 96 | register "controls.charger_perf" = "{ |
| 97 | [0] = { 255, 2500 }, |
| 98 | [1] = { 24, 1900 }, |
| 99 | [2] = { 16, 1500 }, |
| 100 | [3] = { 8, 1000 }}" |
| 101 | |
| 102 | ## Fan Performance Control (Percent, Speed, Noise, Power) |
| 103 | register "controls.fan_perf" = "{[0] = {0}}" |
| 104 | |
| 105 | ## Fan options |
| 106 | register "options.fan.fine_grained_control" = "0" |
| 107 | register "options.fan.step_size" = "0" |
| 108 | |
| 109 | device generic 0 on end |
| 110 | end |
| 111 | end |
Furquan Shaikh | ae20d4c | 2021-08-24 00:38:39 -0700 | [diff] [blame] | 112 | |
| 113 | device ref tbt_pcie_rp0 on |
| 114 | probe DB_USB USB4_GEN3 |
| 115 | end |
| 116 | device ref tbt_pcie_rp1 on |
| 117 | probe DB_USB USB4_GEN2 |
| 118 | probe DB_USB USB4_GEN3 |
| 119 | end |
| 120 | device ref tbt_dma0 on |
| 121 | probe DB_USB USB4_GEN2 |
| 122 | probe DB_USB USB4_GEN3 |
| 123 | end |
| 124 | |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 125 | device ref i2c0 on |
| 126 | chip drivers/i2c/generic |
FrankChu | 6e12245 | 2022-02-07 16:45:26 +0800 | [diff] [blame] | 127 | # register "hid" is set in variant.c because of FW_CONFIG |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 128 | register "name" = ""RT58"" |
| 129 | register "desc" = ""Headset Codec"" |
| 130 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_R5)" |
| 131 | # Set the jd_src to RT5668_JD1 for jack detection |
| 132 | register "property_count" = "1" |
| 133 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 134 | register "property_list[0].name" = ""realtek,jd-src"" |
| 135 | register "property_list[0].integer" = "1" |
FrankChu | 6e12245 | 2022-02-07 16:45:26 +0800 | [diff] [blame] | 136 | device i2c 1a alias audio_codec on end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 137 | end |
| 138 | chip drivers/i2c/max98373 |
| 139 | register "vmon_slot_no" = "0" |
| 140 | register "imon_slot_no" = "1" |
| 141 | register "uid" = "0" |
| 142 | register "desc" = ""Right Speaker Amp"" |
| 143 | register "name" = ""MAXR"" |
| 144 | device i2c 31 on |
| 145 | probe AUDIO MAX98373_ALC5682I_I2S_UP4 |
| 146 | end |
| 147 | end |
| 148 | chip drivers/i2c/max98373 |
| 149 | register "vmon_slot_no" = "2" |
| 150 | register "imon_slot_no" = "3" |
| 151 | register "uid" = "1" |
| 152 | register "desc" = ""Left Speaker Amp"" |
| 153 | register "name" = ""MAXL"" |
| 154 | device i2c 32 on |
| 155 | probe AUDIO MAX98373_ALC5682I_I2S_UP4 |
| 156 | end |
| 157 | end |
| 158 | end |
| 159 | device ref i2c1 on |
| 160 | chip drivers/i2c/hid |
| 161 | register "generic.hid" = ""ELAN9008"" |
| 162 | register "generic.desc" = ""ELAN Touchscreen"" |
| 163 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E7_IRQ)" |
Matt DeVillier | 0d54a65 | 2022-12-21 08:44:19 -0600 | [diff] [blame] | 164 | register "generic.detect" = "1" |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 165 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C10)" |
| 166 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_F16)" |
| 167 | register "generic.reset_delay_ms" = "20" |
Hao Chou | a50f190 | 2021-04-01 14:46:00 +0800 | [diff] [blame] | 168 | register "generic.enable_delay_ms" = "7" |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 169 | register "generic.has_power_resource" = "1" |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 170 | register "hid_desc_reg_offset" = "0x01" |
| 171 | device i2c 10 on end |
| 172 | end |
hao_chou | a776ebb | 2021-03-04 17:44:06 +0800 | [diff] [blame] | 173 | chip drivers/generic/gpio_keys |
| 174 | register "name" = ""PENH"" |
| 175 | # GPP_E17 is the IRQ source, and GPP_E1 is the wake source |
Hao Chou | 0feb949 | 2021-04-19 10:42:54 +0800 | [diff] [blame] | 176 | register "gpio" = "ACPI_GPIO_INPUT_ACTIVE_HIGH(GPP_E17)" |
hao_chou | a776ebb | 2021-03-04 17:44:06 +0800 | [diff] [blame] | 177 | register "key.wake_gpe" = "GPE0_DW2_01" |
| 178 | register "key.wakeup_route" = "WAKEUP_ROUTE_SCI" |
| 179 | register "key.wakeup_event_action" = "EV_ACT_DEASSERTED" |
| 180 | register "key.dev_name" = ""EJCT"" |
| 181 | register "key.linux_code" = "SW_PEN_INSERTED" |
| 182 | register "key.linux_input_type" = "EV_SW" |
| 183 | register "key.label" = ""pen_eject"" |
| 184 | device generic 0 on end |
| 185 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 186 | end |
| 187 | device ref i2c5 on |
Zhuohao Lee | 275440e | 2021-01-19 13:06:18 +0800 | [diff] [blame] | 188 | chip drivers/i2c/generic |
| 189 | register "hid" = ""ELAN0000"" |
| 190 | register "desc" = ""ELAN Touchpad"" |
| 191 | register "irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_E15_IRQ)" |
| 192 | register "wake" = "GPE0_DW2_15" |
Matt DeVillier | 2cf52d8 | 2022-09-01 15:09:24 -0500 | [diff] [blame] | 193 | register "detect" = "1" |
Zhuohao Lee | 275440e | 2021-01-19 13:06:18 +0800 | [diff] [blame] | 194 | device i2c 15 on |
| 195 | probe TOUCHPAD REGULAR_TOUCHPAD |
| 196 | end |
| 197 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 198 | chip drivers/i2c/hid |
Zhuohao Lee | 275440e | 2021-01-19 13:06:18 +0800 | [diff] [blame] | 199 | register "generic.hid" = ""ELAN2701"" |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 200 | register "generic.desc" = ""ELAN Touchpad"" |
| 201 | register "generic.irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_E15_IRQ)" |
| 202 | register "generic.wake" = "GPE0_DW2_15" |
Matt DeVillier | 2cf52d8 | 2022-09-01 15:09:24 -0500 | [diff] [blame] | 203 | register "generic.detect" = "1" |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 204 | register "hid_desc_reg_offset" = "0x01" |
Zhuohao Lee | 275440e | 2021-01-19 13:06:18 +0800 | [diff] [blame] | 205 | device i2c 15 on |
| 206 | probe TOUCHPAD NUMPAD_TOUCHPAD |
| 207 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 208 | end |
| 209 | end |
| 210 | device ref pch_espi on |
| 211 | chip ec/google/chromeec |
| 212 | use conn0 as mux_conn[0] |
| 213 | use conn1 as mux_conn[1] |
| 214 | device pnp 0c09.0 on end |
| 215 | end |
| 216 | end |
Furquan Shaikh | bf42db6 | 2021-08-24 13:16:35 -0700 | [diff] [blame] | 217 | device ref hda on |
| 218 | probe AUDIO MAX98357_ALC5682I_I2S |
| 219 | probe AUDIO MAX98373_ALC5682I_I2S |
| 220 | probe AUDIO MAX98373_ALC5682_SNDW |
| 221 | probe AUDIO MAX98373_ALC5682I_I2S_UP4 |
| 222 | probe AUDIO MAX98360_ALC5682I_I2S |
Matt DeVillier | ba9f0c3 | 2022-12-20 12:35:05 -0600 | [diff] [blame] | 223 | probe AUDIO RT1011_ALC5682I_I2S |
Furquan Shaikh | bf42db6 | 2021-08-24 13:16:35 -0700 | [diff] [blame] | 224 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 225 | device ref pcie_rp9 on |
| 226 | chip soc/intel/common/block/pcie/rtd3 |
| 227 | register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_B2)" |
| 228 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_A11)" |
| 229 | register "srcclk_pin" = "0" |
| 230 | device generic 0 on end |
| 231 | end |
| 232 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 233 | device ref pmc hidden |
| 234 | # The pmc_mux chip driver is a placeholder for the |
| 235 | # PMC.MUX device in the ACPI hierarchy. |
| 236 | chip drivers/intel/pmc_mux |
| 237 | device generic 0 on |
| 238 | chip drivers/intel/pmc_mux/conn |
Reka Norman | d448f8c | 2021-12-09 12:09:27 +1100 | [diff] [blame] | 239 | use usb2_port5 as usb2_port |
| 240 | use tcss_usb3_port1 as usb3_port |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 241 | # SBU is fixed, HSL follows CC |
| 242 | register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL" |
| 243 | device generic 0 alias conn0 on end |
| 244 | end |
| 245 | chip drivers/intel/pmc_mux/conn |
Reka Norman | d448f8c | 2021-12-09 12:09:27 +1100 | [diff] [blame] | 246 | use usb2_port3 as usb2_port |
| 247 | use tcss_usb3_port2 as usb3_port |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 248 | # SBU is fixed, HSL follows CC |
| 249 | register "sbu_orientation" = "TYPEC_ORIENTATION_NORMAL" |
| 250 | device generic 1 alias conn1 on end |
| 251 | end |
| 252 | end |
| 253 | end |
| 254 | end |
| 255 | device ref north_xhci on |
| 256 | chip drivers/usb/acpi |
| 257 | device ref tcss_root_hub on |
| 258 | chip drivers/usb/acpi |
| 259 | register "desc" = ""USB3 Type-C Port C0 (MLB)"" |
| 260 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
hao_chou | b967c60 | 2021-01-27 18:21:43 +0800 | [diff] [blame] | 261 | register "group" = "ACPI_PLD_GROUP(4, 2)" |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 262 | device ref tcss_usb3_port1 on end |
| 263 | end |
| 264 | chip drivers/usb/acpi |
| 265 | register "desc" = ""USB3 Type-C Port C1 (MLB)"" |
| 266 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
hao_chou | b967c60 | 2021-01-27 18:21:43 +0800 | [diff] [blame] | 267 | register "group" = "ACPI_PLD_GROUP(3, 2)" |
| 268 | device ref tcss_usb3_port2 on |
| 269 | probe DB_USB USB4_GEN3 |
| 270 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 271 | end |
| 272 | end |
| 273 | end |
| 274 | end |
| 275 | device ref south_xhci on |
| 276 | chip drivers/usb/acpi |
| 277 | device ref xhci_root_hub on |
| 278 | chip drivers/usb/acpi |
| 279 | register "desc" = ""USB2 Type-A Port A0 (MLB)"" |
| 280 | register "type" = "UPC_TYPE_A" |
| 281 | register "group" = "ACPI_PLD_GROUP(1, 1)" |
hao_chou | b967c60 | 2021-01-27 18:21:43 +0800 | [diff] [blame] | 282 | device ref usb2_port1 on end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 283 | end |
| 284 | chip drivers/usb/acpi |
| 285 | register "desc" = ""USB2 Type-C Port C1 (MLB)"" |
| 286 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
hao_chou | b967c60 | 2021-01-27 18:21:43 +0800 | [diff] [blame] | 287 | register "group" = "ACPI_PLD_GROUP(3, 1)" |
| 288 | device ref usb2_port3 on |
| 289 | probe DB_USB USB4_GEN3 |
| 290 | end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 291 | end |
| 292 | chip drivers/usb/acpi |
| 293 | register "desc" = ""USB2 Camera"" |
| 294 | register "type" = "UPC_TYPE_INTERNAL" |
hao_chou | b967c60 | 2021-01-27 18:21:43 +0800 | [diff] [blame] | 295 | device ref usb2_port4 on end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 296 | end |
| 297 | chip drivers/usb/acpi |
| 298 | register "desc" = ""USB2 Type-C Port C0 (MLB)"" |
| 299 | register "type" = "UPC_TYPE_C_USB2_SS_SWITCH" |
hao_chou | b967c60 | 2021-01-27 18:21:43 +0800 | [diff] [blame] | 300 | register "group" = "ACPI_PLD_GROUP(4, 1)" |
| 301 | device ref usb2_port5 on end |
hao_chou | 1807cfb | 2020-12-28 19:52:51 +0800 | [diff] [blame] | 302 | end |
| 303 | chip drivers/usb/acpi |
| 304 | register "desc" = ""USB2 Bluetooth"" |
| 305 | register "type" = "UPC_TYPE_INTERNAL" |
| 306 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_A13)" |
| 307 | device ref usb2_port10 on end |
| 308 | end |
| 309 | chip drivers/usb/acpi |
| 310 | register "desc" = ""USB3 Type-A Port A0 (MLB)"" |
| 311 | register "type" = "UPC_TYPE_USB3_A" |
| 312 | register "group" = "ACPI_PLD_GROUP(1, 2)" |
| 313 | device ref usb3_port1 on end |
| 314 | end |
| 315 | end |
| 316 | end |
| 317 | end |
FrankChu | 86a241e | 2020-11-30 12:56:42 +0800 | [diff] [blame] | 318 | end |
FrankChu | 86a241e | 2020-11-30 12:56:42 +0800 | [diff] [blame] | 319 | end |