andyp73

CML devicetree

Feb 16th, 2021
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.25 KB | None | 0 0
  1. chip soc/intel/cannonlake
  2. register "common_soc_config" = "{
  3. .chipset_lockdown = CHIPSET_LOCKDOWN_COREBOOT,
  4. }"
  5.  
  6. # Send an extra VR mailbox command for the PS4 exit issue
  7. register "SendVrMbxCmd" = "2"
  8.  
  9. # CPU (soc/intel/cannonlake/cpu.c)
  10. # Power limit
  11. register "power_limits_config" = "{
  12. .tdp_pl1_override = 20,
  13. .tdp_pl2_override = 30,
  14. }"
  15.  
  16. # Enable Enhanced Intel SpeedStep
  17. register "eist_enable" = "1"
  18.  
  19. # Graphics (soc/intel/cannonlake/graphics.c)
  20. # IGD Displays
  21. register "gfx" = "GMA_STATIC_DISPLAYS(0)"
  22.  
  23. # FSP Memory (soc/intel/cannonlake/romstage/fsp_params.c)
  24. # FSP configuration
  25. register "SaGv" = "SaGv_Enabled"
  26. register "ScsEmmcHs400Enabled" = "1"
  27.  
  28. # FSP Silicon (soc/intel/cannonlake/fsp_params.c)
  29. # Serial I/O
  30. register "SerialIoDevMode" = "{
  31. [PchSerialIoIndexI2C0] = PchSerialIoPci,
  32. [PchSerialIoIndexI2C1] = PchSerialIoPci,
  33. [PchSerialIoIndexI2C2] = PchSerialIoPci,
  34. [PchSerialIoIndexI2C3] = PchSerialIoPci,
  35. [PchSerialIoIndexI2C4] = PchSerialIoDisabled,
  36. [PchSerialIoIndexI2C5] = PchSerialIoPci,
  37. [PchSerialIoIndexSPI0] = PchSerialIoPci,
  38. [PchSerialIoIndexSPI1] = PchSerialIoPci,
  39. [PchSerialIoIndexSPI2] = PchSerialIoDisabled,
  40. [PchSerialIoIndexUART0] = PchSerialIoSkipInit,
  41. [PchSerialIoIndexUART1] = PchSerialIoDisabled,
  42. [PchSerialIoIndexUART2] = PchSerialIoSkipInit,
  43. }"
  44.  
  45. # Misc
  46. register "AcousticNoiseMitigation" = "1"
  47. register "satapwroptimize" = "1"
  48.  
  49. # Power
  50. register "PchPmSlpS3MinAssert" = "3" # 50ms
  51. register "PchPmSlpS4MinAssert" = "1" # 1s
  52. register "PchPmSlpSusMinAssert" = "2" # 500ms
  53. register "PchPmSlpAMinAssert" = "4" # 2s
  54.  
  55. # Thermal
  56. register "tcc_offset" = "12"
  57.  
  58. # Enable eDP device
  59. register "DdiPortEdp" = "1"
  60.  
  61. # Enable HPD for DDI ports B/C
  62. register "DdiPortBHpd" = "1"
  63. register "DdiPortCHpd" = "1"
  64.  
  65. # Enable DDC for DDI ports B/C
  66. register "DdiPortBDdc" = "1"
  67. register "DdiPortCDdc" = "1"
  68.  
  69. # Disable S0ix
  70. register "s0ix_enable" = "0"
  71.  
  72. # PM Util (soc/intel/cannonlake/pmutil.c)
  73. # GPE configuration
  74. # Note that GPE events called out in ASL code rely on this
  75. # route. i.e. If this route changes then the affected GPE
  76. # offset bits also need to be changed.
  77. # sudo devmem2 0xfe001920 (pmc_bar + GPIO_GPE_CFG)
  78. register "gpe0_dw0" = "PMC_GPP_B"
  79. register "gpe0_dw1" = "PMC_GPP_C"
  80. register "gpe0_dw2" = "PMC_GPP_E"
  81.  
  82. # Actual device tree.
  83. device cpu_cluster 0 on
  84. device lapic 0 on end
  85. end
  86.  
  87. device domain 0 on
  88. device pci 00.0 on end # Host Bridge
  89. device pci 02.0 on end # Integrated Graphics Device
  90. device pci 04.0 on # SA Thermal Device
  91. register "Device4Enable" = "1"
  92. end
  93. device pci 08.0 on end # Gaussian Mixture Model
  94. device pci 12.0 on end # Thermal Subsystem
  95. device pci 12.5 off end # UFS SCS
  96. device pci 12.6 off end # GSPI #2
  97. device pci 14.0 on # USB xHCI
  98. # USB2
  99. register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC_SKIP)" # Type-C port 1
  100. register "usb2_ports[1]" = "USB2_PORT_MID(OC0)" # Type-A port 2
  101. register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
  102. register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # uSD Card
  103. register "usb2_ports[5]" = "USB2_PORT_MID(OC0)" # Type-A port 3
  104. register "usb2_ports[6]" = "USB2_PORT_MID(OC0)" # Camera
  105. register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Actual Bluetooth port
  106.  
  107. # USB3
  108. register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)"
  109. register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC0)"
  110. register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC0)"
  111. end
  112. device pci 14.1 off end # USB xDCI (OTG)
  113. device pci 14.3 on # CNVi wifi
  114. chip drivers/wifi/generic
  115. register "wake" = "GPE0_PME_B0"
  116. device generic 0 on end
  117. end
  118. end
  119. device pci 14.5 off end # SDCard
  120. device pci 15.0 on # I2C #0
  121. chip drivers/i2c/hid
  122. register "generic.hid" = ""PCT1336""
  123. register "generic.desc" = ""Touchpad""
  124. register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_B3_IRQ)"
  125. register "generic.probed" = "1"
  126. register "hid_desc_reg_offset" = "0x20"
  127. device i2c 2c on end
  128. end
  129. end
  130. device pci 15.1 on end # I2C #1
  131. device pci 15.2 off end # I2C #2
  132. device pci 15.3 off end # I2C #3
  133. device pci 16.0 off end # Management Engine Interface 1
  134. device pci 16.1 off end # Management Engine Interface 2
  135. device pci 16.2 off end # Management Engine IDE-R
  136. device pci 16.3 off end # Management Engine KT Redirection
  137. device pci 16.4 off end # Management Engine Interface 3
  138. device pci 16.5 off end # Management Engine Interface 4
  139. device pci 17.0 on # SATA
  140. register "SataSalpSupport" = "1"
  141.  
  142. # Port 1
  143. register "SataPortsEnable[1]" = "1"
  144. register "SataPortsDevSlp[1]" = "0"
  145.  
  146. # Port 2
  147. register "SataPortsEnable[2]" = "1"
  148. register "SataPortsDevSlp[2]" = "0"
  149. end
  150. device pci 19.0 off end # I2C #4
  151. device pci 19.1 off end # I2C #5
  152. device pci 19.2 on end # UART #2
  153. device pci 1a.0 on end # eMMC - not fitted
  154. device pci 1c.0 off end # PCI Express Port 1
  155. device pci 1c.1 off end # PCI Express Port 2
  156. device pci 1c.2 off end # PCI Express Port 3
  157. device pci 1c.3 off end # PCI Express Port 4
  158. device pci 1c.4 off end # PCI Express Port 5
  159. device pci 1c.5 off end # PCI Express Port 6
  160. device pci 1c.6 off end # PCI Express Port 7
  161. device pci 1c.7 off end # PCI Express Port 8
  162. device pci 1d.0 on # PCI Express Port 9 (SSD x4)
  163. device pci 00.0 on end
  164. register "PcieRpSlotImplemented[8]" = "1"
  165. register "PcieRpEnable[8]" = "1"
  166. register "PcieRpLtrEnable[8]" = "1"
  167. register "PcieClkSrcUsage[1]" = "8"
  168. register "PcieClkSrcClkReq[1]" = "1"
  169. smbios_slot_desc "SlotTypeM2Socket3" "SlotLengthOther" "M.2/M 2280" "SlotDataBusWidth4X"
  170. end
  171. device pci 1d.1 off end # PCI Express Port 10
  172. device pci 1d.2 off end # PCI Express Port 11
  173. device pci 1d.3 off end # PCI Express Port 12
  174. device pci 1d.4 on # PCI Express Port 13 (LAN)
  175. device pci 00.0 on end
  176. register "PcieRpSlotImplemented[12]" = "1"
  177. register "PcieRpEnable[12]" = "0"
  178. register "PcieRpLtrEnable[12]" = "0"
  179. register "PcieClkSrcUsage[2]" = "12"
  180. register "PcieClkSrcClkReq[2]" = "2"
  181. end
  182. device pci 1d.5 on # PCI Express Port 14 (WLAN)
  183. register "PcieRpSlotImplemented[13]" = "1"
  184. register "PcieRpEnable[13]" = "1"
  185. register "PcieRpLtrEnable[13]" = "1"
  186. register "PcieClkSrcUsage[0]" = "13"
  187. register "PcieClkSrcClkReq[0]" = "0"
  188. chip drivers/wifi/generic
  189. device pci 00.0 on end
  190. end
  191. end
  192. device pci 1d.6 off end # PCI Express Port 15
  193. device pci 1d.7 off end # PCI Express Port 16
  194. device pci 1e.0 on end # UART #0
  195. device pci 1e.1 off end # UART #1
  196. device pci 1e.2 off end # GSPI #0
  197. device pci 1e.3 off end # GSPI #1
  198. device pci 1f.0 on # LPC Interface
  199. # LPC configuration from lspci -s 1f.0 -xxx
  200. # Address 0x84: Decode 0x680 - 0x68F
  201. register "gen1_dec" = "0x000c0681"
  202. # Address 0x88: Decode
  203. register "gen2_dec" = "0x000c1641"
  204. # Address 0x8C: Decode 0x200 - 0x2FF
  205. register "gen3_dec" = "0x00fc0201"
  206. # Address 0x90: Decode 0x80 - 0x8F (Port 80)
  207. register "gen4_dec" = "0x000c0081"
  208.  
  209. chip ec/starlabs/it8987
  210. # Port 4Eh/4Fh
  211. device pnp 4e.0 on # IO Interface
  212. end
  213. device pnp 4e.5 off end # KBC Mouse
  214. device pnp 4e.6 on # KBC Keyboard
  215. io 0x60 = 0x0060
  216. io 0x62 = 0x0064
  217. irq 0x70 = 1
  218. end
  219. end
  220. chip drivers/pc80/tpm
  221. device pnp 0c31.0 on end
  222. end
  223. end
  224. device pci 1f.1 off end # P2SB
  225. device pci 1f.2 off end # Power Management Controller
  226. device pci 1f.3 on # Intel HDA
  227. subsystemid 0x10ec 0x119e
  228. register "PchHdaAudioLinkHda" = "1"
  229. end
  230. device pci 1f.4 on end # SMBus
  231. device pci 1f.5 on end # PCH SPI
  232. device pci 1f.6 off end # GbE
  233. end
  234. end
  235.  
Add Comment
Please, Sign In to add comment