Sean Rhodes | 2e665eb | 2021-06-01 22:55:07 +0100 | [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 | |
| 12 | # CPU (soc/intel/cannonlake/cpu.c) |
| 13 | # Power limit |
| 14 | register "power_limits_config" = "{ |
| 15 | .tdp_pl1_override = 15, |
| 16 | .tdp_pl2_override = 20, |
| 17 | }" |
| 18 | |
| 19 | # Enable Enhanced Intel SpeedStep |
| 20 | register "eist_enable" = "1" |
| 21 | |
| 22 | # Graphics (soc/intel/cannonlake/graphics.c) |
| 23 | # IGD Displays |
| 24 | register "gfx" = "GMA_STATIC_DISPLAYS(0)" |
| 25 | |
| 26 | # FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c) |
| 27 | # FSP configuration |
| 28 | register "SaGv" = "SaGv_Enabled" |
| 29 | register "enable_c6dram" = "1" |
| 30 | |
| 31 | # FSP Silicon (soc/intel/cannonlake/fsp_params.c) |
| 32 | # Serial I/O |
| 33 | register "SerialIoDevMode" = "{ |
| 34 | [PchSerialIoIndexI2C0] = PchSerialIoPci, |
| 35 | [PchSerialIoIndexUART2] = PchSerialIoSkipInit, |
| 36 | }" |
| 37 | |
| 38 | # Misc |
| 39 | register "AcousticNoiseMitigation" = "1" |
| 40 | |
| 41 | # Power |
| 42 | register "PchPmSlpS3MinAssert" = "2" # 50ms |
| 43 | register "PchPmSlpS4MinAssert" = "3" # 1s |
| 44 | register "PchPmSlpSusMinAssert" = "3" # 500ms |
| 45 | register "PchPmSlpAMinAssert" = "3" # 2s |
| 46 | |
| 47 | # Thermal |
| 48 | register "tcc_offset" = "10" |
| 49 | |
| 50 | # Enable eDP device |
| 51 | # register "DdiPortEdp" = "1" |
| 52 | |
| 53 | # PM Util (soc/intel/cannonlake/pmutil.c) |
| 54 | # GPE configuration |
| 55 | # Note that GPE events called out in ASL code rely on this |
| 56 | # route. i.e. If this route changes then the affected GPE |
| 57 | # offset bits also need to be changed. |
| 58 | # sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG) |
| 59 | register "gpe0_dw0" = "PMC_GPP_B" |
| 60 | register "gpe0_dw1" = "PMC_GPP_C" |
| 61 | register "gpe0_dw2" = "PMC_GPP_E" |
| 62 | |
| 63 | # Actual device tree. |
| 64 | device cpu_cluster 0 on |
| 65 | device lapic 0 on end |
| 66 | end |
| 67 | |
| 68 | device domain 0 on |
| 69 | device pci 00.0 on end # Host Bridge |
| 70 | device pci 02.0 on end # Integrated Graphics Device |
| 71 | device pci 04.0 on # SA Thermal Device |
| 72 | register "Device4Enable" = "1" |
| 73 | end |
| 74 | device pci 12.0 on end # Thermal Subsystem |
| 75 | device pci 12.5 off end # UFS SCS |
| 76 | device pci 12.6 off end # GSPI #2 |
| 77 | device pci 14.0 on # USB xHCI |
| 78 | # USB2 |
| 79 | register "usb2_ports[0]" = "USB2_PORT_MID(OC2)" # Type-C Port 1 |
| 80 | register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Port 2 |
| 81 | register "usb2_ports[2]" = "USB2_PORT_MID(OC2)" # Bluetooth |
| 82 | register "usb2_ports[3]" = "USB2_PORT_MID(OC2)" # SD Card |
| 83 | register "usb2_ports[5]" = "USB2_PORT_MID(OC3)" # Type-A Port 3 |
| 84 | register "usb2_ports[6]" = "USB2_PORT_MID(OC3)" # Camera |
| 85 | register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # CNVi Bluetooth |
| 86 | # USB3 |
| 87 | register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC2)" |
| 88 | register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" |
| 89 | register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC2)" |
| 90 | end |
| 91 | device pci 14.1 off end # USB xDCI (OTG) |
| 92 | device pci 14.3 on # CNVi wifi |
| 93 | chip drivers/wifi/generic |
| 94 | register "wake" = "GPE0_PME_B0" |
| 95 | device generic 0 on end |
| 96 | end |
| 97 | end |
| 98 | device pci 14.5 off end # SDCard |
| 99 | device pci 15.0 on # I2C #0 |
| 100 | chip drivers/i2c/hid |
| 101 | register "generic.hid" = ""StarPoint"" |
| 102 | register "generic.desc" = ""Touchpad"" |
| 103 | register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_B3_IRQ)" |
| 104 | register "generic.probed" = "1" |
| 105 | register "hid_desc_reg_offset" = "0x20" |
| 106 | device i2c 2c on end |
| 107 | end |
| 108 | end |
| 109 | device pci 15.1 off end # I2C #1 |
| 110 | device pci 15.2 off end # I2C #2 |
| 111 | device pci 15.3 off end # I2C #3 |
| 112 | device pci 16.0 on end # Management Engine Interface 1 |
| 113 | device pci 16.1 off end # Management Engine Interface 2 |
| 114 | device pci 16.2 off end # Management Engine IDE-R |
| 115 | device pci 16.3 off end # Management Engine KT Redirection |
| 116 | device pci 16.4 off end # Management Engine Interface 3 |
| 117 | device pci 16.5 off end # Management Engine Interface 4 |
| 118 | device pci 17.0 on # SATA |
| 119 | register "SataSalpSupport" = "1" |
| 120 | # Port 1 |
| 121 | register "SataPortsEnable[1]" = "1" |
| 122 | register "SataPortsDevSlp[1]" = "1" |
| 123 | # Port 2 |
| 124 | register "SataPortsEnable[2]" = "1" |
| 125 | register "SataPortsDevSlp[2]" = "1" |
| 126 | end |
| 127 | device pci 19.0 off end # I2C #4 |
| 128 | device pci 19.1 off end # I2C #5 |
| 129 | device pci 19.2 on end # UART #2 |
| 130 | device pci 1a.0 off end # eMMC - not fitted |
| 131 | device pci 1c.0 off end # PCI Express Port 1 |
| 132 | device pci 1c.1 off end # PCI Express Port 2 |
| 133 | device pci 1c.2 off end # PCI Express Port 3 |
| 134 | device pci 1c.3 off end # PCI Express Port 4 |
| 135 | device pci 1c.4 off end # PCI Express Port 5 |
| 136 | device pci 1c.5 off end # PCI Express Port 6 |
| 137 | device pci 1c.6 off end # PCI Express Port 7 |
| 138 | device pci 1c.7 off end # PCI Express Port 8 |
| 139 | device pci 1d.0 on # PCI Express Port 9 (SSD x4) |
| 140 | device pci 00.0 on end |
| 141 | register "PcieRpSlotImplemented[8]" = "1" |
| 142 | register "PcieRpEnable[8]" = "1" |
| 143 | register "PcieRpLtrEnable[8]" = "1" |
| 144 | register "PcieClkSrcUsage[1]" = "8" |
| 145 | register "PcieClkSrcClkReq[1]" = "1" |
| 146 | smbios_slot_desc "SlotTypeM2Socket3" "SlotLengthOther" "M.2/M 2280" "SlotDataBusWidth4X" |
| 147 | end |
| 148 | device pci 1d.1 off end # PCI Express Port 10 |
| 149 | device pci 1d.2 off end # PCI Express Port 11 |
| 150 | device pci 1d.3 off end # PCI Express Port 12 |
| 151 | device pci 1d.4 off end # PCI Express Port 13 (LAN) |
| 152 | device pci 1d.5 off end # PCI Express Port 14 (WLAN) |
| 153 | device pci 1d.6 off end # PCI Express Port 15 |
| 154 | device pci 1d.7 off end # PCI Express Port 16 |
| 155 | device pci 1e.0 on end # UART #0 |
| 156 | device pci 1e.1 off end # UART #1 |
| 157 | device pci 1e.2 off end # GSPI #0 |
| 158 | device pci 1e.3 off end # GSPI #1 |
| 159 | device pci 1f.0 on # LPC Interface |
| 160 | # LPC configuration from lspci -s 1f.0 -xxx |
| 161 | # Address 0x84: Decode 0x680 - 0x68F |
| 162 | register "gen1_dec" = "0x000c0681" |
| 163 | # Address 0x88: Decode |
| 164 | register "gen2_dec" = "0x000c1641" |
| 165 | # Address 0x8C: Decode 0x200 - 0x2FF |
| 166 | register "gen3_dec" = "0x00fc0201" |
| 167 | # Address 0x90: Decode 0x80 - 0x8F (Port 80) |
| 168 | register "gen4_dec" = "0x000c0081" |
| 169 | |
| 170 | chip ec/starlabs/it8987 |
| 171 | # Port 4Eh/4Fh |
| 172 | device pnp 4e.0 on # IO Interface |
| 173 | end |
| 174 | end |
| 175 | end |
| 176 | device pci 1f.1 off end # P2SB |
| 177 | device pci 1f.2 on end # Power Management Controller |
| 178 | device pci 1f.3 on # Intel HDA |
| 179 | subsystemid 0x10ec 0x119e |
| 180 | register "PchHdaAudioLinkHda" = "1" |
| 181 | end |
| 182 | device pci 1f.4 on end # SMBus |
| 183 | device pci 1f.5 on end # PCH SPI |
| 184 | device pci 1f.6 off end # GbE |
| 185 | end |
| 186 | end |