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