Robert Chen | 6cb9993 | 2023-03-28 23:06:59 -0400 | [diff] [blame] | 1 | fw_config |
| 2 | field AUDIO_CODEC_SOURCE 40 42 |
| 3 | option AUDIO_CODEC_UNPROVISIONED 0 |
| 4 | option AUDIO_CODEC_ALC5682 1 |
| 5 | option AUDIO_CODEC_ALC5682I_VS 2 |
| 6 | end |
| 7 | end |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 8 | chip soc/intel/jasperlake |
| 9 | |
| 10 | # USB Port Configuration |
| 11 | register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Camera |
| 12 | register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # WF Camera |
| 13 | |
| 14 | register "SerialIoI2cMode" = "{ |
| 15 | [PchSerialIoIndexI2C0] = PchSerialIoPci, |
| 16 | [PchSerialIoIndexI2C1] = PchSerialIoPci, |
| 17 | [PchSerialIoIndexI2C2] = PchSerialIoPci, |
| 18 | [PchSerialIoIndexI2C3] = PchSerialIoDisabled, |
| 19 | [PchSerialIoIndexI2C4] = PchSerialIoPci, |
| 20 | [PchSerialIoIndexI2C5] = PchSerialIoPci, |
| 21 | }" |
| 22 | |
| 23 | # Intel Common SoC Config |
| 24 | #+-------------------+---------------------------+ |
| 25 | #| Field | Value | |
| 26 | #+-------------------+---------------------------+ |
| 27 | #| GSPI0 | cr50 TPM. Early init is | |
| 28 | #| | required to set up a BAR | |
| 29 | #| | for TPM communication | |
| 30 | #| | before memory is up | |
| 31 | #| I2C0 | Trackpad | |
| 32 | #| I2C1 | Digitizer | |
| 33 | #| I2C2 | Touchscreen | |
| 34 | #| I2C3 | | |
| 35 | #| I2C4 | Audio | |
| 36 | #| I2C5 | P-Sensor | |
| 37 | #+-------------------+---------------------------+ |
| 38 | register "common_soc_config" = "{ |
| 39 | .gspi[0] = { |
| 40 | .speed_mhz = 1, |
| 41 | .early_init = 1, |
| 42 | }, |
| 43 | .i2c[0] = { |
| 44 | .speed = I2C_SPEED_FAST, |
Tony Huang | e4aa07e | 2021-05-13 15:06:59 +0800 | [diff] [blame] | 45 | .rise_time_ns = 212, |
| 46 | .fall_time_ns = 38, |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 47 | }, |
| 48 | .i2c[1] = { |
| 49 | .speed = I2C_SPEED_FAST, |
| 50 | }, |
| 51 | .i2c[2] = { |
| 52 | .speed = I2C_SPEED_FAST, |
Tony Huang | e4aa07e | 2021-05-13 15:06:59 +0800 | [diff] [blame] | 53 | .rise_time_ns = 212, |
| 54 | .fall_time_ns = 38, |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 55 | }, |
| 56 | .i2c[4] = { |
| 57 | .speed = I2C_SPEED_FAST, |
Tony Huang | e4aa07e | 2021-05-13 15:06:59 +0800 | [diff] [blame] | 58 | .rise_time_ns = 212, |
| 59 | .fall_time_ns = 38, |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 60 | }, |
| 61 | .i2c[5] = { |
| 62 | .speed = I2C_SPEED_FAST, |
Tony Huang | e4aa07e | 2021-05-13 15:06:59 +0800 | [diff] [blame] | 63 | .rise_time_ns = 212, |
| 64 | .fall_time_ns = 38, |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 65 | }, |
| 66 | }" |
| 67 | |
Robert Chen | 6978a21 | 2021-09-22 16:49:51 +0800 | [diff] [blame] | 68 | register "tcc_offset" = "20" # TCC of 85C |
| 69 | |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 70 | device domain 0 on |
Robert Chen | 6978a21 | 2021-09-22 16:49:51 +0800 | [diff] [blame] | 71 | device pci 04.0 on |
| 72 | chip drivers/intel/dptf |
| 73 | # Default DPTF Policy for all drawcia boards if not overridden |
| 74 | register "options.tsr[0].desc" = ""Memory"" |
| 75 | register "options.tsr[1].desc" = ""Ambient"" |
| 76 | register "options.tsr[2].desc" = ""Charger"" |
| 77 | register "options.tsr[3].desc" = ""5V regulator"" |
| 78 | ## Passive Policy |
| 79 | register "policies.passive" = "{ |
| 80 | [0] = DPTF_PASSIVE(CPU, CPU, 80, 1000), |
| 81 | [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 70, 4000), |
| 82 | [2] = DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 51, 1000), |
| 83 | [3] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_2, 75, 5000), |
| 84 | [4] = DPTF_PASSIVE(CPU, TEMP_SENSOR_3, 60, 1000) |
| 85 | }" |
| 86 | ## Critical Policy |
| 87 | register "policies.critical" = "{ |
| 88 | [0] = DPTF_CRITICAL(CPU, 119, SHUTDOWN), |
| 89 | [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 115, SHUTDOWN), |
| 90 | [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 115, SHUTDOWN), |
| 91 | [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 115, SHUTDOWN), |
| 92 | [4] = DPTF_CRITICAL(TEMP_SENSOR_3, 115, SHUTDOWN) |
| 93 | }" |
| 94 | register "controls.power_limits" = "{ |
| 95 | .pl1 = { |
| 96 | .min_power = 3800, |
| 97 | .max_power = 5800, |
| 98 | .time_window_min = 1 * MSECS_PER_SEC, |
| 99 | .time_window_max = 1 * MSECS_PER_SEC, |
| 100 | .granularity = 200, |
| 101 | }, |
| 102 | .pl2 = { |
| 103 | .min_power = 20000, |
| 104 | .max_power = 20000, |
| 105 | .time_window_min = 1 * MSECS_PER_SEC, |
| 106 | .time_window_max = 1 * MSECS_PER_SEC, |
| 107 | .granularity = 1000, |
| 108 | } |
| 109 | }" |
| 110 | ## Charger Performance Control (Control, mA) |
| 111 | register "controls.charger_perf" = "{ |
| 112 | [0] = { 255, 3000 }, |
| 113 | [1] = { 24, 1500 }, |
| 114 | [2] = { 16, 1000 }, |
| 115 | [3] = { 8, 500 } |
| 116 | }" |
| 117 | device generic 0 alias dptf_policy on end |
| 118 | end |
| 119 | end # SA Thermal device |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 120 | device pci 14.0 on |
| 121 | chip drivers/usb/acpi |
| 122 | device usb 0.0 on |
| 123 | chip drivers/usb/acpi |
Furquan Shaikh | e7821e8 | 2021-09-16 19:58:20 -0700 | [diff] [blame] | 124 | register "desc" = ""LTE"" |
| 125 | register "type" = "UPC_TYPE_INTERNAL" |
| 126 | register "group" = "ACPI_PLD_GROUP(2, 2)" |
| 127 | register "has_power_resource" = "1" |
| 128 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_H17)" |
| 129 | register "reset_off_delay_ms" = "20" |
| 130 | register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A10)" |
| 131 | register "enable_delay_ms" = "20" |
| 132 | device usb 2.3 on |
| 133 | probe DB_PORTS DB_PORTS_1C_LTE |
| 134 | end |
| 135 | end |
| 136 | chip drivers/usb/acpi |
| 137 | register "desc" = ""Right Type-A Port"" |
Tony Huang | 856b579 | 2021-05-19 16:59:17 +0800 | [diff] [blame] | 138 | register "type" = "UPC_TYPE_A" |
| 139 | register "group" = "ACPI_PLD_GROUP(2, 2)" |
| 140 | device usb 2.3 on |
Tony Huang | 856b579 | 2021-05-19 16:59:17 +0800 | [diff] [blame] | 141 | probe DB_PORTS DB_PORTS_1C_1A |
| 142 | end |
Tony Huang | a1165fd | 2021-04-09 13:38:59 +0800 | [diff] [blame] | 143 | end |
| 144 | chip drivers/usb/acpi |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 145 | register "desc" = ""UFCamera"" |
| 146 | register "type" = "UPC_TYPE_INTERNAL" |
| 147 | device usb 2.5 on end |
| 148 | end |
| 149 | chip drivers/usb/acpi |
| 150 | register "desc" = ""WFCamera"" |
| 151 | register "type" = "UPC_TYPE_INTERNAL" |
| 152 | device usb 2.6 on end |
| 153 | end |
Tony Huang | a1165fd | 2021-04-09 13:38:59 +0800 | [diff] [blame] | 154 | chip drivers/usb/acpi |
Furquan Shaikh | e7821e8 | 2021-09-16 19:58:20 -0700 | [diff] [blame] | 155 | register "desc" = ""LTE"" |
| 156 | register "type" = "UPC_TYPE_INTERNAL" |
Tony Huang | 856b579 | 2021-05-19 16:59:17 +0800 | [diff] [blame] | 157 | register "group" = "ACPI_PLD_GROUP(2, 2)" |
| 158 | device usb 3.3 on |
| 159 | probe DB_PORTS DB_PORTS_1C_LTE |
Furquan Shaikh | e7821e8 | 2021-09-16 19:58:20 -0700 | [diff] [blame] | 160 | end |
| 161 | end |
| 162 | chip drivers/usb/acpi |
| 163 | register "desc" = ""Right Type-A Port"" |
| 164 | register "type" = "UPC_TYPE_USB3_A" |
| 165 | register "group" = "ACPI_PLD_GROUP(2, 2)" |
| 166 | device usb 3.3 on |
Tony Huang | 856b579 | 2021-05-19 16:59:17 +0800 | [diff] [blame] | 167 | probe DB_PORTS DB_PORTS_1C_1A |
| 168 | end |
Tony Huang | a1165fd | 2021-04-09 13:38:59 +0800 | [diff] [blame] | 169 | end |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 170 | end |
| 171 | end |
| 172 | end # USB xHCI |
| 173 | device pci 15.0 on |
| 174 | chip drivers/i2c/generic |
| 175 | register "hid" = ""ELAN0000"" |
| 176 | register "desc" = ""ELAN Touchpad"" |
| 177 | register "irq" = "ACPI_IRQ_WAKE_EDGE_LOW(GPP_B3_IRQ)" |
| 178 | register "wake" = "GPE0_DW0_03" |
Matt DeVillier | 2cf52d8 | 2022-09-01 15:09:24 -0500 | [diff] [blame] | 179 | register "detect" = "1" |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 180 | device i2c 15 on end |
| 181 | end |
| 182 | end #I2C 0 |
Tony Huang | 5f5ea02 | 2021-02-23 13:28:42 +0800 | [diff] [blame] | 183 | device pci 15.2 on |
| 184 | chip drivers/i2c/generic |
| 185 | register "hid" = ""ELAN0001"" |
| 186 | register "desc" = ""ELAN Touchscreen"" |
| 187 | register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" |
Matt DeVillier | c3cef7e | 2022-12-21 12:22:21 -0600 | [diff] [blame] | 188 | register "detect" = "1" |
Tony Huang | 5f5ea02 | 2021-02-23 13:28:42 +0800 | [diff] [blame] | 189 | register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 190 | register "reset_delay_ms" = "20" |
| 191 | register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 192 | register "enable_delay_ms" = "1" |
| 193 | register "has_power_resource" = "1" |
| 194 | device i2c 10 on end |
| 195 | end |
| 196 | chip drivers/i2c/hid |
| 197 | register "generic.hid" = ""ELAN2513"" |
| 198 | register "generic.desc" = ""ELAN Touchscreen"" |
| 199 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" |
Matt DeVillier | c3cef7e | 2022-12-21 12:22:21 -0600 | [diff] [blame] | 200 | register "generic.detect" = "1" |
Tony Huang | 5f5ea02 | 2021-02-23 13:28:42 +0800 | [diff] [blame] | 201 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 202 | register "generic.reset_delay_ms" = "20" |
| 203 | register "generic.reset_off_delay_ms" = "2" |
| 204 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 205 | register "generic.enable_delay_ms" = "10" |
| 206 | register "generic.stop_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_A11)" |
| 207 | register "generic.stop_delay_ms" = "130" |
| 208 | register "generic.has_power_resource" = "1" |
| 209 | register "hid_desc_reg_offset" = "0x01" |
| 210 | device i2c 15 on end |
| 211 | end |
Robert Chen | b885be4 | 2023-04-12 01:48:36 -0400 | [diff] [blame] | 212 | chip drivers/i2c/hid |
| 213 | register "generic.hid" = ""GTCH7503"" |
| 214 | register "generic.desc" = ""G2TOUCH Touchscreen"" |
| 215 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_D4_IRQ)" |
| 216 | register "generic.detect" = "1" |
| 217 | register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D5)" |
| 218 | register "generic.reset_delay_ms" = "50" |
| 219 | register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D6)" |
| 220 | register "generic.enable_delay_ms" = "1" |
| 221 | register "generic.has_power_resource" = "1" |
| 222 | register "hid_desc_reg_offset" = "0x01" |
| 223 | device i2c 40 on end |
| 224 | end |
| 225 | |
Tony Huang | 5f5ea02 | 2021-02-23 13:28:42 +0800 | [diff] [blame] | 226 | end # I2C 2 |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 227 | device pci 15.3 off end #I2C 3 |
| 228 | device pci 19.0 on |
| 229 | chip drivers/i2c/generic |
| 230 | register "hid" = ""10EC5682"" |
| 231 | register "name" = ""RT58"" |
| 232 | register "desc" = ""Realtek RT5682"" |
| 233 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_D16)" |
| 234 | register "property_count" = "1" |
| 235 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 236 | register "property_list[0].name" = ""realtek,jd-src"" |
| 237 | register "property_list[0].integer" = "1" |
Robert Chen | 6cb9993 | 2023-03-28 23:06:59 -0400 | [diff] [blame] | 238 | device i2c 1a on |
| 239 | probe AUDIO_CODEC_SOURCE AUDIO_CODEC_UNPROVISIONED |
| 240 | probe AUDIO_CODEC_SOURCE AUDIO_CODEC_ALC5682 |
| 241 | end |
| 242 | end |
| 243 | chip drivers/i2c/generic |
| 244 | register "hid" = ""RTL5682"" |
| 245 | register "name" = ""RT58"" |
| 246 | register "desc" = ""Headset Codec"" |
| 247 | register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_D16)" |
| 248 | # Set the jd_src to RT5668_JD1 for jack detection |
| 249 | register "property_count" = "1" |
| 250 | register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER" |
| 251 | register "property_list[0].name" = ""realtek,jd-src"" |
| 252 | register "property_list[0].integer" = "1" |
| 253 | device i2c 1a on |
| 254 | probe AUDIO_CODEC_SOURCE AUDIO_CODEC_ALC5682I_VS |
| 255 | end |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 256 | end |
| 257 | end #I2C 4 |
Tony Huang | 66713d0c | 2021-06-02 14:00:49 +0800 | [diff] [blame] | 258 | device pci 19.1 on |
| 259 | chip drivers/i2c/sx9324 |
| 260 | register "desc" = ""SAR Proximity Sensor"" |
| 261 | register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_E11_IRQ)" |
| 262 | register "uid" = "2" |
| 263 | register "reg_gnrl_ctrl0" = "0x0a" |
| 264 | register "reg_gnrl_ctrl1" = "0x22" |
| 265 | register "reg_afe_ctrl0" = "0x20" |
| 266 | register "reg_afe_ctrl3" = "0x01" |
| 267 | register "reg_afe_ctrl4" = "0x47" |
| 268 | register "reg_afe_ctrl6" = "0x00" |
| 269 | register "reg_afe_ctrl7" = "0x47" |
| 270 | register "reg_afe_ctrl8" = "0x12" |
| 271 | register "reg_afe_ctrl9" = "0x0f" |
| 272 | register "reg_afe_ph0" = "0x37" |
| 273 | register "reg_afe_ph1" = "0x29" |
| 274 | register "reg_afe_ph2" = "0x1f" |
| 275 | register "reg_afe_ph3" = "0x3d" |
| 276 | register "reg_prox_ctrl0" = "0x0b" |
| 277 | register "reg_prox_ctrl1" = "0x0b" |
| 278 | register "reg_prox_ctrl2" = "0x20" |
| 279 | register "reg_prox_ctrl3" = "0x20" |
| 280 | register "reg_prox_ctrl4" = "0x0c" |
| 281 | register "reg_prox_ctrl5" = "0x00" |
| 282 | register "reg_prox_ctrl6" = "0x2d" |
| 283 | register "reg_prox_ctrl7" = "0xc0" |
| 284 | register "reg_adv_ctrl0" = "0x00" |
| 285 | register "reg_adv_ctrl1" = "0x00" |
| 286 | register "reg_adv_ctrl2" = "0x00" |
| 287 | register "reg_adv_ctrl3" = "0x00" |
| 288 | register "reg_adv_ctrl4" = "0x00" |
| 289 | register "reg_adv_ctrl5" = "0x05" |
| 290 | register "reg_adv_ctrl6" = "0x00" |
| 291 | register "reg_adv_ctrl7" = "0x00" |
| 292 | register "reg_adv_ctrl8" = "0x00" |
| 293 | register "reg_adv_ctrl9" = "0x00" |
| 294 | register "reg_adv_ctrl10" = "0x00" |
| 295 | register "reg_adv_ctrl11" = "0x00" |
| 296 | register "reg_adv_ctrl12" = "0x00" |
| 297 | register "reg_adv_ctrl13" = "0x00" |
| 298 | register "reg_adv_ctrl14" = "0x80" |
| 299 | register "reg_adv_ctrl15" = "0x0c" |
| 300 | register "reg_adv_ctrl16" = "0x04" |
| 301 | register "reg_adv_ctrl17" = "0x70" |
| 302 | register "reg_adv_ctrl18" = "0x40" |
| 303 | register "reg_adv_ctrl19" = "0x00" |
| 304 | register "reg_adv_ctrl20" = "0x00" |
| 305 | register "reg_irq_cfg0" = "0x00" |
| 306 | register "reg_irq_cfg1" = "0x80" |
| 307 | register "reg_irq_cfg2" = "0x00" |
| 308 | device i2c 28 on end |
| 309 | end |
| 310 | end # I2C 5 |
Tony Huang | 6e0ca68 | 2021-02-03 18:18:02 +0800 | [diff] [blame] | 311 | device pci 1f.3 on |
| 312 | chip drivers/generic/max98357a |
| 313 | register "hid" = ""MX98360A"" |
| 314 | register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D17)" |
| 315 | device generic 0 on end |
| 316 | end |
| 317 | end # Intel HDA |
| 318 | end |
| 319 | end |