Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 1 | chip soc/intel/cannonlake |
| 2 | register "common_soc_config" = "{ |
| 3 | .chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT, |
| 4 | /* Touchpad */ |
| 5 | .i2c[0] = { |
| 6 | .speed = I2C_SPEED_FAST, |
| 7 | .rise_time_ns = 80, |
| 8 | .fall_time_ns = 110, |
| 9 | }, |
| 10 | }" |
| 11 | |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 12 | # CPU (soc/intel/cannonlake/cpu.c) |
| 13 | # Power limit |
| 14 | register "power_limits_config" = "{ |
| 15 | .tdp_pl1_override = 20, |
| 16 | .tdp_pl2_override = 30, |
| 17 | }" |
| 18 | |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 19 | # Enable Enhanced Intel SpeedStep |
| 20 | register "eist_enable" = "1" |
| 21 | |
| 22 | # FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c) |
| 23 | register "SaGv" = "SaGv_Enabled" |
| 24 | #register "enable_c6dram" = "1" |
| 25 | |
| 26 | # FSP Silicon (soc/intel/cannonlake/fsp_params.c) |
| 27 | # Serial I/O |
| 28 | register "SerialIoDevMode" = "{ |
| 29 | [PchSerialIoIndexI2C0] = PchSerialIoPci, // Touchpad |
| 30 | [PchSerialIoIndexUART2] = PchSerialIoSkipInit, // LPSS UART |
| 31 | }" |
| 32 | |
| 33 | # Misc |
| 34 | register "AcousticNoiseMitigation" = "1" |
| 35 | #register "dmipwroptimize" = "1" |
| 36 | #register "satapwroptimize" = "1" |
| 37 | |
| 38 | # Power |
| 39 | register "PchPmSlpS3MinAssert" = "3" # 50ms |
| 40 | register "PchPmSlpS4MinAssert" = "1" # 1s |
| 41 | register "PchPmSlpSusMinAssert" = "2" # 500ms |
| 42 | register "PchPmSlpAMinAssert" = "4" # 2s |
| 43 | |
| 44 | # Thermal |
| 45 | register "tcc_offset" = "12" |
| 46 | |
| 47 | # PM Util (soc/intel/cannonlake/pmutil.c) |
| 48 | # GPE configuration |
| 49 | # Note that GPE events called out in ASL code rely on this |
| 50 | # route. i.e. If this route changes then the affected GPE |
| 51 | # offset bits also need to be changed. |
| 52 | # sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG) |
| 53 | register "gpe0_dw0" = "PMC_GPP_C" |
| 54 | register "gpe0_dw1" = "PMC_GPP_D" |
| 55 | register "gpe0_dw2" = "PMC_GPP_E" |
| 56 | |
| 57 | # Actual device tree |
| 58 | device cpu_cluster 0 on |
| 59 | device lapic 0 on end |
| 60 | end |
| 61 | |
| 62 | device domain 0 on |
| 63 | subsystemid 0x1558 0x1401 inherit |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 64 | device pci 00.0 on end # Host Bridge |
Michael Niewöhner | 6efff74 | 2020-12-19 14:12:41 +0100 | [diff] [blame] | 65 | device pci 02.0 on # Integrated Graphics Device |
| 66 | register "gfx" = "GMA_DEFAULT_PANEL(0)" |
| 67 | register "panel_cfg" = "{ |
| 68 | .up_delay_ms = 200, |
| 69 | .down_delay_ms = 50, |
| 70 | .cycle_delay_ms = 500, |
| 71 | .backlight_pwm_hz = 1000, |
| 72 | .backlight_on_delay_ms = 1, |
| 73 | .backlight_off_delay_ms = 1, |
| 74 | }" |
| 75 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 76 | device pci 04.0 on # SA Thermal device |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 77 | register "Device4Enable" = "1" |
| 78 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 79 | device pci 12.0 on end # Thermal Subsystem |
| 80 | device pci 12.5 off end # UFS SCS |
| 81 | device pci 12.6 off end # GSPI #2 |
| 82 | device pci 13.0 off end # Integrated Sensor Hub |
| 83 | device pci 14.0 on # USB xHCI |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 84 | # USB2 |
| 85 | register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A port 1 |
| 86 | register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # Type-C port 2 |
| 87 | register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # Type-A port 3 |
| 88 | register "usb2_ports[6]" = "USB2_PORT_MAX(OC_SKIP)" # Camera |
| 89 | register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth |
| 90 | # USB3 |
| 91 | register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A port 1 |
| 92 | register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-C port 2 |
| 93 | register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A port 3 |
| 94 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 95 | device pci 14.1 off end # USB xDCI (OTG) |
| 96 | device pci 14.3 on # CNVi wifi |
Furquan Shaikh | edac4ef | 2020-10-09 08:50:14 -0700 | [diff] [blame] | 97 | chip drivers/wifi/generic |
| 98 | register "wake" = "GPE0_PME_B0" |
| 99 | device generic 0 on end |
| 100 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 101 | end |
| 102 | device pci 14.5 off end # SDCard |
| 103 | device pci 15.0 on # I2C #0 |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 104 | chip drivers/i2c/hid |
| 105 | register "generic.hid" = ""ELAN040D"" |
| 106 | register "generic.desc" = ""ELAN Touchpad"" |
Michael Niewöhner | d990455 | 2020-11-25 00:38:19 +0100 | [diff] [blame] | 107 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_B3_IRQ)" |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 108 | register "generic.probed" = "1" |
| 109 | register "hid_desc_reg_offset" = "0x01" |
| 110 | device i2c 15 on end |
| 111 | end |
Felix Singer | 310e050 | 2020-09-30 20:05:41 +0000 | [diff] [blame] | 112 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 113 | device pci 15.1 off end # I2C #1 |
| 114 | device pci 15.2 off end # I2C #2 |
| 115 | device pci 15.3 off end # I2C #3 |
| 116 | device pci 16.0 off end # Management Engine Interface 1 |
| 117 | device pci 16.1 off end # Management Engine Interface 2 |
| 118 | device pci 16.2 off end # Management Engine IDE-R |
| 119 | device pci 16.3 off end # Management Engine KT Redirection |
| 120 | device pci 16.4 off end # Management Engine Interface 3 |
| 121 | device pci 16.5 off end # Management Engine Interface 4 |
| 122 | device pci 17.0 on # SATA |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 123 | register "SataSalpSupport" = "1" |
| 124 | # Port 2 (J_SSD2) |
| 125 | register "SataPortsEnable[1]" = "1" |
| 126 | register "SataPortsDevSlp[1]" = "1" |
| 127 | # Port 3 (J_SSD1) |
| 128 | register "SataPortsEnable[2]" = "1" |
| 129 | register "SataPortsDevSlp[2]" = "1" |
| 130 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 131 | device pci 19.0 off end # I2C #4 |
| 132 | device pci 19.1 off end # I2C #5 |
| 133 | device pci 19.2 on end # UART #2 |
| 134 | device pci 1a.0 off end # eMMC |
| 135 | device pci 1c.0 off end # PCI Express Port 1 |
| 136 | device pci 1c.1 off end # PCI Express Port 2 |
| 137 | device pci 1c.2 off end # PCI Express Port 3 |
| 138 | device pci 1c.3 off end # PCI Express Port 4 |
| 139 | device pci 1c.4 off end # PCI Express Port 5 |
| 140 | device pci 1c.5 on # PCI Express Port 6 |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 141 | device pci 00.0 on end # x1 Card reader |
| 142 | register "PcieRpEnable[5]" = "1" |
| 143 | register "PcieRpLtrEnable[5]" = "1" |
| 144 | register "PcieClkSrcUsage[3]" = "5" |
| 145 | register "PcieClkSrcClkReq[3]" = "3" |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 146 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 147 | device pci 1c.6 off end # PCI Express Port 7 |
| 148 | device pci 1c.7 on # PCI Express Port 8 |
Furquan Shaikh | a266d1e | 2020-10-04 12:52:54 -0700 | [diff] [blame] | 149 | chip drivers/wifi/generic |
Felix Singer | 8271cce | 2020-12-06 04:58:23 +0100 | [diff] [blame] | 150 | device pci 00.0 on end |
Michael Niewöhner | 92c1546 | 2020-09-24 10:17:58 +0200 | [diff] [blame] | 151 | end |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 152 | register "PcieRpEnable[7]" = "1" |
| 153 | register "PcieRpLtrEnable[7]" = "1" |
| 154 | register "PcieClkSrcUsage[2]" = "7" |
| 155 | register "PcieClkSrcClkReq[2]" = "2" |
| 156 | register "PcieRpSlotImplemented[7]" = "1" |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 157 | smbios_slot_desc "SlotTypeM2Socket1_SD" "SlotLengthOther" "M.2/E 2230 (J_WLAN1)" "SlotDataBusWidth1X" |
| 158 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 159 | device pci 1d.0 on # PCI Express Port 9 |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 160 | register "PcieRpEnable[8]" = "1" |
| 161 | register "PcieRpLtrEnable[8]" = "1" |
| 162 | register "PcieClkSrcUsage[4]" = "8" |
| 163 | register "PcieClkSrcClkReq[4]" = "4" |
| 164 | register "PcieRpSlotImplemented[8]" = "1" |
| 165 | smbios_slot_desc "SlotTypeM2Socket3" "SlotLengthOther" "M.2/M 2280 (J_SSD2)" "SlotDataBusWidth4X" |
| 166 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 167 | device pci 1d.1 off end # PCI Express Port 10 |
| 168 | device pci 1d.2 off end # PCI Express Port 11 |
| 169 | device pci 1d.3 off end # PCI Express Port 12 |
| 170 | device pci 1d.4 on # PCI Express Port 13 |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 171 | register "PcieRpEnable[12]" = "1" |
| 172 | register "PcieRpLtrEnable[12]" = "1" |
| 173 | register "PcieClkSrcUsage[5]" = "12" |
| 174 | register "PcieClkSrcClkReq[5]" = "5" |
| 175 | register "PcieRpSlotImplemented[12]" = "1" |
| 176 | smbios_slot_desc "SlotTypeM2Socket3" "SlotLengthOther" "M.2/M 2280 (J_SSD1)" "SlotDataBusWidth4X" |
| 177 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 178 | device pci 1d.5 off end # PCI Express Port 14 |
| 179 | device pci 1d.6 off end # PCI Express Port 15 |
| 180 | device pci 1d.7 off end # PCI Express Port 16 |
| 181 | device pci 1e.0 off end # UART #0 |
| 182 | device pci 1e.1 off end # UART #1 |
| 183 | device pci 1e.2 off end # GSPI #0 |
| 184 | device pci 1e.3 off end # GSPI #1 |
| 185 | device pci 1f.0 on # LPC Interface |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 186 | # LPC configuration from lspci -s 1f.0 -xxx |
| 187 | # Address 0x84: Decode 0x80 - 0x8F (Port 80) |
| 188 | register "gen1_dec" = "0x000c0081" |
Angel Pons | 747a2fc | 2021-03-17 19:33:19 +0100 | [diff] [blame] | 189 | # Address 0x88: Decode 0x68 - 0x6F (EC PM channel) |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 190 | register "gen2_dec" = "0x00040069" |
| 191 | # Address 0x8C: Decode 0xE00 - 0xEFF (AP/EC command) |
Felix Singer | ad50856 | 2020-12-06 10:32:20 +0100 | [diff] [blame] | 192 | register "gen3_dec" = "0x00fc0e01" |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 193 | # Address 0x90: Decode 0xF00 - 0xFFF (AP/EC debug) |
Felix Singer | ad50856 | 2020-12-06 10:32:20 +0100 | [diff] [blame] | 194 | register "gen4_dec" = "0x00fc0f01" |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 195 | chip drivers/pc80/tpm # TPM |
| 196 | device pnp 0c31.0 on end |
| 197 | end |
| 198 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 199 | device pci 1f.1 hidden end # P2SB |
| 200 | device pci 1f.2 hidden end # Power Management Controller |
| 201 | device pci 1f.3 on # Intel HDA |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 202 | register "PchHdaAudioLinkHda" = "1" |
| 203 | end |
Felix Singer | e9da62a | 2020-12-06 04:56:03 +0100 | [diff] [blame] | 204 | device pci 1f.4 on end # SMBus |
| 205 | device pci 1f.5 on end # PCH SPI |
| 206 | device pci 1f.6 off end # GbE |
Felix Singer | da3375e | 2020-09-22 20:32:33 +0000 | [diff] [blame] | 207 | end |
| 208 | end |