|
| 1 | +From 06fe32bb5f65c784e7819b875c505fcceab11b99 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] lenovo/x230: introduce FHD variant |
| 5 | + |
| 6 | +There is a modification for the x230 which uses the 2nd DP from the dock |
| 7 | +as the integrated panel's connection, which allows using a custom eDP |
| 8 | +panel instead of the stock LVDS display. |
| 9 | + |
| 10 | +There are several adapter boards present on the market and all of them |
| 11 | +uses the same method of enabling the custom eDP panel. |
| 12 | + |
| 13 | +To make this work with coreboot, the internal LVDS connector should be |
| 14 | +disabled in libgfxinit. The VBT has been modified as well, which allows |
| 15 | +brightness controls to work out of the box. |
| 16 | + |
| 17 | +The modifications done to the VBT are: |
| 18 | +- Remove the LVDS port entry. |
| 19 | +- Move the DP-3 (which is the 2nd DP on the dock) entry to the first |
| 20 | + position on the list. |
| 21 | +- Set the DP-3 as internally connected. |
| 22 | + |
| 23 | +This has been reported to work with the following panels: |
| 24 | +- LP125WF2-SPB4 (1920*1080, 12.5") |
| 25 | +- LQ125T1JW02 (2560*1440, 12.5") |
| 26 | +- LQ133M1JW21 (1920*1080, 13.3") |
| 27 | +- LTN133HL10-201 (1920*1080, 13.3") |
| 28 | +- B133HAN04.6 (1920*1080, 13.3") |
| 29 | +- B133QAN02.0 (2560*1600, 13.3") |
| 30 | + |
| 31 | +Other eDP panels not on this list should work as well. |
| 32 | + |
| 33 | +Change-Id: I0355d39a61956792e69bccd5274cfc2749d72bf0 |
| 34 | +Signed-off-by: Alexander Couzens <lynxis@fe80.eu> |
| 35 | +Signed-off-by: Felix Singer <felixsinger@posteo.net> |
| 36 | +--- |
| 37 | + src/mainboard/lenovo/x230/Kconfig | 15 ++++++++----- |
| 38 | + src/mainboard/lenovo/x230/Kconfig.name | 3 +++ |
| 39 | + src/mainboard/lenovo/x230/Makefile.inc | 5 +++++ |
| 40 | + .../lenovo/x230/variants/x230_edp/data.vbt | Bin 0 -> 4281 bytes |
| 41 | + .../x230/variants/x230_edp/gma-mainboard.ads | 21 ++++++++++++++++++ |
| 42 | + 5 files changed, 38 insertions(+), 6 deletions(-) |
| 43 | + create mode 100644 src/mainboard/lenovo/x230/variants/x230_edp/data.vbt |
| 44 | + create mode 100644 src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads |
| 45 | + |
| 46 | +diff --git a/src/mainboard/lenovo/x230/Kconfig b/src/mainboard/lenovo/x230/Kconfig |
| 47 | +index a6fd796206..7aa5af6d85 100644 |
| 48 | +--- a/src/mainboard/lenovo/x230/Kconfig |
| 49 | ++++ b/src/mainboard/lenovo/x230/Kconfig |
| 50 | +@@ -1,4 +1,4 @@ |
| 51 | +-if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S |
| 52 | ++if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S || BOARD_LENOVO_X230_EDP |
| 53 | + |
| 54 | + config BOARD_SPECIFIC_OPTIONS |
| 55 | + def_bool y |
| 56 | +@@ -11,7 +11,7 @@ |
| 57 | + select H8_HAS_BAT_THRESHOLDS_IMPL |
| 58 | + select H8_HAS_PRIMARY_FN_KEYS if BOARD_LENOVO_X230S |
| 59 | + select NO_UART_ON_SUPERIO |
| 60 | +- select BOARD_ROMSIZE_KB_12288 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T |
| 61 | ++ select BOARD_ROMSIZE_KB_12288 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP |
| 62 | + select BOARD_ROMSIZE_KB_16384 if BOARD_LENOVO_X230S |
| 63 | + select HAVE_ACPI_TABLES |
| 64 | + select HAVE_OPTION_TABLE |
| 65 | +@@ -20,7 +20,7 @@ |
| 66 | + select INTEL_INT15 |
| 67 | + select DRIVERS_RICOH_RCE822 |
| 68 | + select MEMORY_MAPPED_TPM |
| 69 | +- select MAINBOARD_HAS_TPM1 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T |
| 70 | ++ select MAINBOARD_HAS_TPM1 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP |
| 71 | + select MAINBOARD_HAS_LIBGFXINIT |
| 72 | + select GFX_GMA_PANEL_1_ON_LVDS if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T |
| 73 | + select INTEL_GMA_HAVE_VBT |
| 74 | +@@ -51,17 +51,20 @@ |
| 75 | + default "lenovo/x230" |
| 76 | + |
| 77 | + config VARIANT_DIR |
| 78 | +- default "x230" if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T |
| 79 | ++ default "x230" if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP |
| 80 | + default "x230s" if BOARD_LENOVO_X230S |
| 81 | + |
| 82 | + config MAINBOARD_PART_NUMBER |
| 83 | +- default "ThinkPad X230" if BOARD_LENOVO_X230 |
| 84 | ++ default "ThinkPad X230" if BOARD_LENOVO_X230 || BOARD_LENOVO_X230_EDP |
| 85 | + default "ThinkPad X230t" if BOARD_LENOVO_X230T |
| 86 | + default "ThinkPad X230s" if BOARD_LENOVO_X230S |
| 87 | + |
| 88 | + config OVERRIDE_DEVICETREE |
| 89 | + default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" |
| 90 | + |
| 91 | ++config INTEL_GMA_VBT_FILE |
| 92 | ++ default "variants/x230_edp/data.vbt" if BOARD_LENOVO_X230_EDP |
| 93 | ++ |
| 94 | + config USBDEBUG_HCD_INDEX |
| 95 | + int |
| 96 | + default 2 |
| 97 | +@@ -83,4 +86,4 @@ |
| 98 | + config THINKPADEC_HKEY_EISAID |
| 99 | + default "LEN0068" |
| 100 | + |
| 101 | +-endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S |
| 102 | ++endif # BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230S || BOARD_LENOVO_X230_EDP |
| 103 | +diff --git a/src/mainboard/lenovo/x230/Kconfig.name b/src/mainboard/lenovo/x230/Kconfig.name |
| 104 | +index 1a01436879..e7290a12dd 100644 |
| 105 | +--- a/src/mainboard/lenovo/x230/Kconfig.name |
| 106 | ++++ b/src/mainboard/lenovo/x230/Kconfig.name |
| 107 | +@@ -6,3 +6,6 @@ config BOARD_LENOVO_X230T |
| 108 | + |
| 109 | + config BOARD_LENOVO_X230S |
| 110 | + bool "ThinkPad X230s" |
| 111 | ++ |
| 112 | ++config BOARD_LENOVO_X230_EDP |
| 113 | ++ bool "ThinkPad X230 eDP Mod (2K/FHD)" |
| 114 | +diff --git a/src/mainboard/lenovo/x230/Makefile.inc b/src/mainboard/lenovo/x230/Makefile.inc |
| 115 | +index 8e801f145d..6e6f9f90b9 100644 |
| 116 | +--- a/src/mainboard/lenovo/x230/Makefile.inc |
| 117 | ++++ b/src/mainboard/lenovo/x230/Makefile.inc |
| 118 | +@@ -5,4 +5,9 @@ bootblock-y += variants/$(VARIANT_DIR)/gpio.c |
| 119 | + romstage-y += variants/$(VARIANT_DIR)/early_init.c |
| 120 | + romstage-y += variants/$(VARIANT_DIR)/gpio.c |
| 121 | + ramstage-y += variants/$(VARIANT_DIR)/hda_verb.c |
| 122 | ++ |
| 123 | ++ifeq ($(CONFIG_BOARD_LENOVO_X230_EDP),y) |
| 124 | ++ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/x230_edp/gma-mainboard.ads |
| 125 | ++else |
| 126 | + ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads |
| 127 | ++endif |
| 128 | +diff --git a/src/mainboard/lenovo/x230/variants/x230_edp/data.vbt b/src/mainboard/lenovo/x230/variants/x230_edp/data.vbt |
| 129 | +new file mode 100644 |
| 130 | +index 0000000000000000000000000000000000000000..13384d45571ff76e592335143d01315e37893186 |
| 131 | +GIT binary patch |
| 132 | +literal 4281 |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
| 161 | +zP4#WvIv2Sie|71?P3)md%>vj%v~DWNT8*x>a2}rST)i~8vd61DwO!2$JZMNNi6hyH |
| 162 | +z2d_)6&979w%w$-vyatVrqw??t&t%}iZhDAP3%j_I#cGANdzLq>W;J(F=Xwkxxj%^H |
| 163 | +zwQDmn=w}|@-y`RG{*wz0>A(ZGtk~AM=#-fE(LV1uZE98+Nk>UmiyyuJ8?##<Mr{1g |
| 164 | +p(B@uj-Va_SU#<T#GXLCvin_ms#}9BYOE7UKDyX7coWuJX{tbC=%boxL |
| 165 | + |
| 166 | +literal 0 |
| 167 | +HcmV?d00001 |
| 168 | + |
| 169 | +diff --git a/src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads b/src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads |
| 170 | +new file mode 100644 |
| 171 | +index 0000000000..f7cf0bc264 |
| 172 | +--- /dev/null |
| 173 | ++++ b/src/mainboard/lenovo/x230/variants/x230_edp/gma-mainboard.ads |
| 174 | +@@ -0,0 +1,21 @@ |
| 175 | ++-- SPDX-License-Identifier: GPL-2.0-or-later |
| 176 | ++ |
| 177 | ++with HW.GFX.GMA; |
| 178 | ++with HW.GFX.GMA.Display_Probing; |
| 179 | ++ |
| 180 | ++use HW.GFX.GMA; |
| 181 | ++use HW.GFX.GMA.Display_Probing; |
| 182 | ++ |
| 183 | ++private package GMA.Mainboard is |
| 184 | ++ |
| 185 | ++ ports : constant Port_List := |
| 186 | ++ (DP1, |
| 187 | ++ DP2, |
| 188 | ++ DP3, |
| 189 | ++ HDMI1, |
| 190 | ++ HDMI2, |
| 191 | ++ HDMI3, |
| 192 | ++ Analog, |
| 193 | ++ others => Disabled); |
| 194 | ++ |
| 195 | ++end GMA.Mainboard; |
| 196 | +-- |
| 197 | +2.30.2 |
| 198 | + |
0 commit comments