0027-rebase-dell-e6530-to-newer-coreboot-code.patch 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. From 88652afd52b0a8e0fc8bb1656e59d8ae4796d847 Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <info@minifree.org>
  3. Date: Thu, 25 Jan 2024 14:30:03 +0000
  4. Subject: [PATCH 27/30] rebase dell/e6530 to newer coreboot code
  5. i diffed nicholas's current e6430 patch, versus the old one,
  6. prior to this revision update in lbmk, also cross referencing
  7. the original e6430 and e6530 patches, diffing them, and the
  8. result in this patch. most notably, spd data is now defined in
  9. the devicetree, instead of early_init.c as per:
  10. commit 45e4ab4a660cb7ce312f2d11a153f2d9ef4158da
  11. Author: Keith Hui <buurin@gmail.com>
  12. Date: Sat Jul 22 12:49:05 2023 -0400
  13. mb/*: Update SPD mapping for sandybridge boards
  14. This should work fine. Will test after this builds.
  15. Signed-off-by: Leah Rowe <info@minifree.org>
  16. ---
  17. src/mainboard/dell/e6530/Kconfig | 15 +++++++++++----
  18. src/mainboard/dell/e6530/cmos.layout | 2 +-
  19. src/mainboard/dell/e6530/devicetree.cb | 8 +++++---
  20. src/mainboard/dell/e6530/early_init.c | 12 +++---------
  21. 4 files changed, 20 insertions(+), 17 deletions(-)
  22. diff --git a/src/mainboard/dell/e6530/Kconfig b/src/mainboard/dell/e6530/Kconfig
  23. index 582adddbd4..a104566890 100644
  24. --- a/src/mainboard/dell/e6530/Kconfig
  25. +++ b/src/mainboard/dell/e6530/Kconfig
  26. @@ -20,18 +20,25 @@ config BOARD_SPECIFIC_OPTIONS
  27. select SYSTEM_TYPE_LAPTOP
  28. select USE_NATIVE_RAMINIT
  29. +config DRAM_RESET_GATE_GPIO
  30. + default 60
  31. +
  32. config MAINBOARD_DIR
  33. default "dell/e6530"
  34. config MAINBOARD_PART_NUMBER
  35. default "Latitude E6530"
  36. -config VGA_BIOS_ID
  37. - default "8086,0166"
  38. +config PS2K_EISAID
  39. + default "PNP0303"
  40. -config DRAM_RESET_GATE_GPIO
  41. - default 60
  42. +config PS2M_EISAID
  43. + default "PNP0F13"
  44. config USBDEBUG_HCD_INDEX
  45. default 2
  46. +
  47. +config VGA_BIOS_ID
  48. + default "8086,0166"
  49. +
  50. endif
  51. diff --git a/src/mainboard/dell/e6530/cmos.layout b/src/mainboard/dell/e6530/cmos.layout
  52. index e85ea4c661..1aa7e77bce 100644
  53. --- a/src/mainboard/dell/e6530/cmos.layout
  54. +++ b/src/mainboard/dell/e6530/cmos.layout
  55. @@ -25,7 +25,7 @@ entries
  56. # coreboot config options: EC
  57. 412 1 e 1 bluetooth
  58. 413 1 e 1 wwan
  59. -415 1 e 1 wlan
  60. +414 1 e 1 wlan
  61. # coreboot config options: ME
  62. 424 1 e 14 me_state
  63. diff --git a/src/mainboard/dell/e6530/devicetree.cb b/src/mainboard/dell/e6530/devicetree.cb
  64. index 96eed178c5..37135bcf0f 100644
  65. --- a/src/mainboard/dell/e6530/devicetree.cb
  66. +++ b/src/mainboard/dell/e6530/devicetree.cb
  67. @@ -12,6 +12,8 @@ chip northbridge/intel/sandybridge # FIXME: GPU registers may not always apply.
  68. register "gpu_panel_power_up_delay" = "400"
  69. register "gpu_pch_backlight" = "0x13121312"
  70. + register "spd_addresses" = "{0x50, 0, 0x52, 0}"
  71. +
  72. device domain 0x0 on
  73. subsystemid 0x1028 0x0535 inherit
  74. @@ -24,7 +26,7 @@ chip northbridge/intel/sandybridge # FIXME: GPU registers may not always apply.
  75. register "gen1_dec" = "0x007c0681"
  76. register "gen2_dec" = "0x005c0921"
  77. register "gen3_dec" = "0x003c07e1"
  78. - register "gen4_dec" = "0x007c0901"
  79. + register "gen4_dec" = "0x00000911" # Ports 0x910/0x911 for EC
  80. register "gpi0_routing" = "2"
  81. register "pcie_hotplug_map" = "{ 0, 0, 1, 1, 0, 0, 0, 0 }"
  82. register "pcie_port_coalesce" = "1"
  83. @@ -37,7 +39,7 @@ chip northbridge/intel/sandybridge # FIXME: GPU registers may not always apply.
  84. register "xhci_switchable_ports" = "0x0000000f"
  85. device ref xhci on end # USB 3.0 Controller
  86. - device ref mei1 off end # Management Engine Interface 1
  87. + device ref mei1 on end # Management Engine Interface 1
  88. device ref mei2 off end # Management Engine Interface 2
  89. device ref me_ide_r off end # Management Engine IDE-R
  90. device ref me_kt on end # Management Engine KT
  91. @@ -48,7 +50,7 @@ chip northbridge/intel/sandybridge # FIXME: GPU registers may not always apply.
  92. device ref pcie_rp2 on end # PCIe Port #2
  93. device ref pcie_rp3 on end # PCIe Port #3
  94. device ref pcie_rp4 on end # PCIe Port #4
  95. - device ref pcie_rp5 off end # PCIe Port #5
  96. + device ref pcie_rp5 on end # PCIe Port #5
  97. device ref pcie_rp6 on end # PCIe Port #6
  98. device ref pcie_rp7 off end # PCIe Port #7
  99. device ref pcie_rp8 off end # PCIe Port #8
  100. diff --git a/src/mainboard/dell/e6530/early_init.c b/src/mainboard/dell/e6530/early_init.c
  101. index d57f48e7f1..2b40f6963f 100644
  102. --- a/src/mainboard/dell/e6530/early_init.c
  103. +++ b/src/mainboard/dell/e6530/early_init.c
  104. @@ -4,7 +4,6 @@
  105. #include <bootblock_common.h>
  106. #include <device/pci_ops.h>
  107. #include <ec/dell/mec5035/mec5035.h>
  108. -#include <northbridge/intel/sandybridge/raminit_native.h>
  109. #include <southbridge/intel/bd82x6x/pch.h>
  110. const struct southbridge_usb_port mainboard_usb_ports[] = {
  111. @@ -26,13 +25,8 @@ const struct southbridge_usb_port mainboard_usb_ports[] = {
  112. void bootblock_mainboard_early_init(void)
  113. {
  114. - pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x82, 0x1c0f);
  115. - pci_write_config16(PCI_DEV(0, 0x1f, 0), 0x80, 0x0000);
  116. + pci_write_config16(PCH_LPC_DEV, LPC_EN, CNF1_LPC_EN | MC_LPC_EN
  117. + | KBC_LPC_EN | FDD_LPC_EN | LPT_LPC_EN
  118. + | COMB_LPC_EN | COMA_LPC_EN);
  119. mec5035_early_init();
  120. }
  121. -
  122. -void mainboard_get_spd(spd_raw_data *spd, bool id_only)
  123. -{
  124. - read_spd(&spd[0], 0x50, id_only);
  125. - read_spd(&spd[2], 0x52, id_only);
  126. -}
  127. --
  128. 2.39.2