0001-lenovo-x230-introduce-FHD-variant.patch 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. From 53ebc7b1b9b59cc831383ed71478536c9e183d00 Mon Sep 17 00:00:00 2001
  2. From: Alexander Couzens <lynxis@fe80.eu>
  3. Date: Sat, 19 Mar 2022 13:42:33 +0000
  4. Subject: [PATCH 1/7] lenovo/x230: introduce FHD variant
  5. There is a modification for the x230 which uses the 2nd DP from the dock
  6. as the integrated panel's connection, which allows using a custom eDP
  7. panel instead of the stock LVDS display.
  8. There are several adapter boards present on the market and all of them
  9. uses the same method of enabling the custom eDP panel.
  10. To make this work with coreboot, the internal LVDS connector should be
  11. disabled in libgfxinit. The VBT has been modified as well, which allows
  12. brightness controls to work out of the box.
  13. The modifications done to the VBT are:
  14. - Remove the LVDS port entry.
  15. - Move the DP-3 (which is the 2nd DP on the dock) entry to the first
  16. position on the list.
  17. - Set the DP-3 as internally connected.
  18. This has been reported to work with the following panels:
  19. - LP125WF2-SPB4 (1920*1080, 12.5")
  20. - LQ125T1JW02 (2560*1440, 12.5")
  21. - LQ133M1JW21 (1920*1080, 13.3")
  22. - LTN133HL10-201 (1920*1080, 13.3")
  23. - B133HAN04.6 (1920*1080, 13.3")
  24. - B133QAN02.0 (2560*1600, 13.3")
  25. Other eDP panels not on this list should work as well.
  26. Change-Id: I0355d39a61956792e69bccd5274cfc2749d72bf0
  27. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
  28. Signed-off-by: Felix Singer <felixsinger@posteo.net>
  29. ---
  30. src/mainboard/lenovo/x230/Kconfig | 15 ++++++++-----
  31. src/mainboard/lenovo/x230/Kconfig.name | 3 +++
  32. src/mainboard/lenovo/x230/Makefile.inc | 5 +++++
  33. .../lenovo/x230/variants/x230_edp/data.vbt | Bin 0 -> 4281 bytes
  34. .../x230/variants/x230_edp/gma-mainboard.ads | 21 ++++++++++++++++++
  35. 5 files changed, 38 insertions(+), 6 deletions(-)
  36. create mode 100644 src/mainboard/lenovo/x230/variants/x230_edp/data.vbt
  37. create mode 100644 src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads
  38. diff --git a/src/mainboard/lenovo/x230/Kconfig b/src/mainboard/lenovo/x230/Kconfig
  39. index a6fd796206..7aa5af6d85 100644
  40. --- a/src/mainboard/lenovo/x230/Kconfig
  41. +++ b/src/mainboard/lenovo/x230/Kconfig
  42. @@ -1,4 +1,4 @@
  43. -if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S
  44. +if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S || BOARD_LENOVO_X230_EDP
  45. config BOARD_SPECIFIC_OPTIONS
  46. def_bool y
  47. @@ -11,7 +11,7 @@ config BOARD_SPECIFIC_OPTIONS
  48. select H8_HAS_BAT_TRESHOLDS_IMPL
  49. select H8_HAS_PRIMARY_FN_KEYS if BOARD_LENOVO_X230S
  50. select NO_UART_ON_SUPERIO
  51. - select BOARD_ROMSIZE_KB_12288 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T
  52. + select BOARD_ROMSIZE_KB_12288 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP
  53. select BOARD_ROMSIZE_KB_16384 if BOARD_LENOVO_X230S
  54. select HAVE_ACPI_TABLES
  55. select HAVE_OPTION_TABLE
  56. @@ -20,7 +20,7 @@ config BOARD_SPECIFIC_OPTIONS
  57. select INTEL_INT15
  58. select DRIVERS_RICOH_RCE822
  59. select MEMORY_MAPPED_TPM
  60. - select MAINBOARD_HAS_TPM1 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T
  61. + select MAINBOARD_HAS_TPM1 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP
  62. select MAINBOARD_HAS_LIBGFXINIT
  63. select GFX_GMA_PANEL_1_ON_LVDS if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T
  64. select INTEL_GMA_HAVE_VBT
  65. @@ -51,17 +51,20 @@ config MAINBOARD_DIR
  66. default "lenovo/x230"
  67. config VARIANT_DIR
  68. - default "x230" if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T
  69. + default "x230" if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP
  70. default "x230s" if BOARD_LENOVO_X230S
  71. config MAINBOARD_PART_NUMBER
  72. - default "ThinkPad X230" if BOARD_LENOVO_X230
  73. + default "ThinkPad X230" if BOARD_LENOVO_X230 || BOARD_LENOVO_X230_EDP
  74. default "ThinkPad X230t" if BOARD_LENOVO_X230T
  75. default "ThinkPad X230s" if BOARD_LENOVO_X230S
  76. config OVERRIDE_DEVICETREE
  77. default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
  78. +config INTEL_GMA_VBT_FILE
  79. + default "variants/x230_edp/data.vbt" if BOARD_LENOVO_X230_EDP
  80. +
  81. config USBDEBUG_HCD_INDEX
  82. int
  83. default 2
  84. @@ -83,4 +86,4 @@ config PS2M_EISAID
  85. config THINKPADEC_HKEY_EISAID
  86. default "LEN0068"
  87. -endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S
  88. +endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S || BOARD_LENOVO_X230_EDP
  89. diff --git a/src/mainboard/lenovo/x230/Kconfig.name b/src/mainboard/lenovo/x230/Kconfig.name
  90. index 1a01436879..e7290a12dd 100644
  91. --- a/src/mainboard/lenovo/x230/Kconfig.name
  92. +++ b/src/mainboard/lenovo/x230/Kconfig.name
  93. @@ -6,3 +6,6 @@ config BOARD_LENOVO_X230T
  94. config BOARD_LENOVO_X230S
  95. bool "ThinkPad X230s"
  96. +
  97. +config BOARD_LENOVO_X230_EDP
  98. + bool "ThinkPad X230 eDP Mod (2K/FHD)"
  99. diff --git a/src/mainboard/lenovo/x230/Makefile.inc b/src/mainboard/lenovo/x230/Makefile.inc
  100. index 8e801f145d..6e6f9f90b9 100644
  101. --- a/src/mainboard/lenovo/x230/Makefile.inc
  102. +++ b/src/mainboard/lenovo/x230/Makefile.inc
  103. @@ -5,4 +5,9 @@ bootblock-y += variants/$(VARIANT_DIR)/gpio.c
  104. romstage-y += variants/$(VARIANT_DIR)/early_init.c
  105. romstage-y += variants/$(VARIANT_DIR)/gpio.c
  106. ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c
  107. +
  108. +ifeq ($(CONFIG_BOARD_LENOVO_X230_EDP),y)
  109. +ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/x230_edp/gma-mainboard.ads
  110. +else
  111. ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
  112. +endif
  113. diff --git a/src/mainboard/lenovo/x230/variants/x230_edp/data.vbt b/src/mainboard/lenovo/x230/variants/x230_edp/data.vbt
  114. new file mode 100644
  115. index 0000000000000000000000000000000000000000..13384d45571ff76e592335143d01315e37893186
  116. GIT binary patch
  117. literal 4281
  118. zcmdT`Z)_aZ5&ym0y}P}=-MjTVC6^<yCLz$XvE%h&S*h!)@6LAcg^PXugKH2XcDRE^
  119. zHNiLuN+i^5TbBk=p_5vr0Ri$CB!v1Q6%yhL5TS}%ZG|E}(5mW(6!8It5AdN?tBP`+
  120. zx3_i!7V#AnmCow7GdpkI?0YkBW_RywafYVHi@l}UV$Y$8VyQezRd{&CInDRYR4h$Q
  121. zA08>p6b={56T^4V^SA+LolmX+RUx+79#iSqiP~ars*|P{j#W<|Sw32Qpw?S@B$TK!
  122. zT%y8#_th3_%L^xJRhpi?y+F#XZ5B@+U98gh$p??rmIq1sVr%N_-*;O-QJ>e_m+#Gc
  123. zeSJ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zcI2=F|Kw{2>VlIOTx;M223I$qhjl3%0pyLp$ECQ*_^UYE{?(M!zFMP3W9I<gN%(cT
  139. zyvs4>_cUj9w4&M7&s8K0k<cwUM!E2PTu7mct3rr`5sB*7)nZ4R`hWT~<uZuic%Tb%
  140. z5{?q{&YwfGl9W%nBS~{SNhgx-V@b1~q?eQKTGD(wN&iT?re$ukXwY)YmN{$Dqn7)m
  141. zWuCX_HOswZnSZhfw(HvFPMeChJ7b&o+O%T3=WKJ;rZ;W(kGA=)O-9Pirp&!5I+$|r
  142. zNtySj=%*?7xs>@rirz}Oms94I6gg>kPulEG+g%^&e&n+7+xV#SfijjY{5o+C7V}H-
  143. zZs9PGrN7SK-OZ8YGZ>yr(&i#tdss~q`sQ|0&fnIIOUJ;O2*-=b;v=kW?O}6KsoH4P
  144. z0smI&%EQn#cd@w$RZTVP=TtP?l7~|?nRTSIQO2qkgO+Z!=3#T$D-XeMvn68}T3Ey8
  145. zHleye(7mkLXe*JtfA{Q*lj!gc)Wck4IFj|C#q&~HiNmA&>Z|kF4(U<Y;5eIloj)C%
  146. zP4#WvIv2Sie|71?P3)md%>vj%v~DWNT8*x>a2}rST)i~8vd61DwO!2$JZMNNi6hyH
  147. z2d_)6&979w%w$-vyatVrqw??t&t%}iZhDAP3%j_I#cGANdzLq>W;J(F=Xwkxxj%^H
  148. zwQDmn=w}|@-y`RG{*wz0>A(ZGtk~AM=#-fE(LV1uZE98+Nk>UmiyyuJ8?##<Mr{1g
  149. p(B@uj-Va_SU#<T#GXLCvin_ms#}9BYOE7UKDyX7coWuJX{tbC=%boxL
  150. literal 0
  151. HcmV?d00001
  152. diff --git a/src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads b/src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads
  153. new file mode 100644
  154. index 0000000000..f7cf0bc264
  155. --- /dev/null
  156. +++ b/src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads
  157. @@ -0,0 +1,21 @@
  158. +-- SPDX-License-Identifier: GPL-2.0-or-later
  159. +
  160. +with HW.GFX.GMA;
  161. +with HW.GFX.GMA.Display_Probing;
  162. +
  163. +use HW.GFX.GMA;
  164. +use HW.GFX.GMA.Display_Probing;
  165. +
  166. +private package GMA.Mainboard is
  167. +
  168. + ports : constant Port_List :=
  169. + (DP1,
  170. + DP2,
  171. + DP3,
  172. + HDMI1,
  173. + HDMI2,
  174. + HDMI3,
  175. + Analog,
  176. + others => Disabled);
  177. +
  178. +end GMA.Mainboard;
  179. --
  180. 2.25.1