0012-mb-dell-gm45_latitudes-Add-E4300-variant.patch 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. From 3d1ec8039e200e252e7ee43820ab7baaf225e695 Mon Sep 17 00:00:00 2001
  2. From: Nicholas Chin <nic.c3.14@gmail.com>
  3. Date: Thu, 26 Sep 2024 19:51:25 -0600
  4. Subject: [PATCH 12/18] mb/dell/gm45_latitudes: Add E4300 variant
  5. Change-Id: I0f2059501b11be103187e3ce1a7c04ab85ae63d2
  6. Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
  7. ---
  8. src/mainboard/dell/gm45_latitude/Kconfig | 5 +
  9. src/mainboard/dell/gm45_latitude/Kconfig.name | 3 +
  10. .../gm45_latitude/variants/e4300/data.vbt | Bin 0 -> 3881 bytes
  11. .../variants/e4300/gma-mainboard.ads | 17 +++
  12. .../dell/gm45_latitude/variants/e4300/gpio.c | 138 ++++++++++++++++++
  13. .../gm45_latitude/variants/e4300/hda_verb.c | 37 +++++
  14. .../variants/e4300/overridetree.cb | 10 ++
  15. 7 files changed, 210 insertions(+)
  16. create mode 100644 src/mainboard/dell/gm45_latitude/variants/e4300/data.vbt
  17. create mode 100644 src/mainboard/dell/gm45_latitude/variants/e4300/gma-mainboard.ads
  18. create mode 100644 src/mainboard/dell/gm45_latitude/variants/e4300/gpio.c
  19. create mode 100644 src/mainboard/dell/gm45_latitude/variants/e4300/hda_verb.c
  20. create mode 100644 src/mainboard/dell/gm45_latitude/variants/e4300/overridetree.cb
  21. diff --git a/src/mainboard/dell/gm45_latitude/Kconfig b/src/mainboard/dell/gm45_latitude/Kconfig
  22. index ba76fb6e8c..144f9bcdf0 100644
  23. --- a/src/mainboard/dell/gm45_latitude/Kconfig
  24. +++ b/src/mainboard/dell/gm45_latitude/Kconfig
  25. @@ -21,6 +21,9 @@ config BOARD_DELL_GM45_LATITUDE_COMMON
  26. config BOARD_DELL_E6400
  27. select BOARD_DELL_GM45_LATITUDE_COMMON
  28. +config BOARD_DELL_E4300
  29. + select BOARD_DELL_GM45_LATITUDE_COMMON
  30. +
  31. if BOARD_DELL_GM45_LATITUDE_COMMON
  32. config INTEL_GMA_DPLL_REF_FREQ
  33. @@ -31,12 +34,14 @@ config MAINBOARD_DIR
  34. config MAINBOARD_PART_NUMBER
  35. default "Latitude E6400" if BOARD_DELL_E6400
  36. + default "Latitude E4300" if BOARD_DELL_E4300
  37. config OVERRIDE_DEVICETREE
  38. default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
  39. config VARIANT_DIR
  40. default "e6400" if BOARD_DELL_E6400
  41. + default "e4300" if BOARD_DELL_E4300
  42. config USBDEBUG_HCD_INDEX
  43. default 1
  44. diff --git a/src/mainboard/dell/gm45_latitude/Kconfig.name b/src/mainboard/dell/gm45_latitude/Kconfig.name
  45. index aefe777109..4dc95f46be 100644
  46. --- a/src/mainboard/dell/gm45_latitude/Kconfig.name
  47. +++ b/src/mainboard/dell/gm45_latitude/Kconfig.name
  48. @@ -1,4 +1,7 @@
  49. ## SPDX-License-Identifier: GPL-2.0-only
  50. +config BOARD_DELL_E4300
  51. + bool "Latitude E4300"
  52. +
  53. config BOARD_DELL_E6400
  54. bool "Latitude E6400"
  55. diff --git a/src/mainboard/dell/gm45_latitude/variants/e4300/data.vbt b/src/mainboard/dell/gm45_latitude/variants/e4300/data.vbt
  56. new file mode 100644
  57. index 0000000000000000000000000000000000000000..fa2f3db13f688b5687df16a155781d8674ea26f3
  58. GIT binary patch
  59.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>`tJBTNGZHe^T`VrkY0pv~u^?l~DG9UD8p8(692<oYlGx5_cte6LX
  90. JE5(FU=`RLB=-&VU
  91. literal 0
  92. HcmV?d00001
  93. diff --git a/src/mainboard/dell/gm45_latitude/variants/e4300/gma-mainboard.ads b/src/mainboard/dell/gm45_latitude/variants/e4300/gma-mainboard.ads
  94. new file mode 100644
  95. index 0000000000..89b81b3d69
  96. --- /dev/null
  97. +++ b/src/mainboard/dell/gm45_latitude/variants/e4300/gma-mainboard.ads
  98. @@ -0,0 +1,17 @@
  99. +-- SPDX-License-Identifier: GPL-2.0-or-later
  100. +
  101. +with HW.GFX.GMA;
  102. +with HW.GFX.GMA.Display_Probing;
  103. +
  104. +use HW.GFX.GMA;
  105. +use HW.GFX.GMA.Display_Probing;
  106. +
  107. +private package GMA.Mainboard is
  108. +
  109. + ports : constant Port_List :=
  110. + (DP2, -- dock DP
  111. + Analog, -- mainboard VGA
  112. + LVDS,
  113. + others => Disabled);
  114. +
  115. +end GMA.Mainboard;
  116. diff --git a/src/mainboard/dell/gm45_latitude/variants/e4300/gpio.c b/src/mainboard/dell/gm45_latitude/variants/e4300/gpio.c
  117. new file mode 100644
  118. index 0000000000..b50f8da0b5
  119. --- /dev/null
  120. +++ b/src/mainboard/dell/gm45_latitude/variants/e4300/gpio.c
  121. @@ -0,0 +1,138 @@
  122. +/* SPDX-License-Identifier: GPL-2.0-only */
  123. +
  124. +#include <southbridge/intel/common/gpio.h>
  125. +
  126. +static const struct pch_gpio_set1 pch_gpio_set1_mode = {
  127. + .gpio0 = GPIO_MODE_NATIVE,
  128. + .gpio1 = GPIO_MODE_GPIO,
  129. + .gpio2 = GPIO_MODE_GPIO,
  130. + .gpio3 = GPIO_MODE_GPIO,
  131. + .gpio4 = GPIO_MODE_GPIO,
  132. + .gpio5 = GPIO_MODE_GPIO,
  133. + .gpio6 = GPIO_MODE_GPIO,
  134. + .gpio7 = GPIO_MODE_GPIO,
  135. + .gpio8 = GPIO_MODE_GPIO,
  136. + .gpio9 = GPIO_MODE_NATIVE,
  137. + .gpio10 = GPIO_MODE_NATIVE,
  138. + .gpio11 = GPIO_MODE_NATIVE,
  139. + .gpio12 = GPIO_MODE_NATIVE,
  140. + .gpio13 = GPIO_MODE_GPIO,
  141. + .gpio14 = GPIO_MODE_GPIO,
  142. + .gpio15 = GPIO_MODE_NATIVE,
  143. + .gpio16 = GPIO_MODE_NATIVE,
  144. + .gpio17 = GPIO_MODE_GPIO,
  145. + .gpio18 = GPIO_MODE_GPIO,
  146. + .gpio19 = GPIO_MODE_GPIO,
  147. + .gpio20 = GPIO_MODE_GPIO,
  148. + .gpio21 = GPIO_MODE_GPIO,
  149. + .gpio22 = GPIO_MODE_GPIO,
  150. + .gpio23 = GPIO_MODE_NATIVE,
  151. + .gpio24 = GPIO_MODE_GPIO,
  152. + .gpio25 = GPIO_MODE_NATIVE,
  153. + .gpio26 = GPIO_MODE_NATIVE,
  154. + .gpio27 = GPIO_MODE_GPIO,
  155. + .gpio28 = GPIO_MODE_GPIO,
  156. + .gpio29 = GPIO_MODE_NATIVE,
  157. + .gpio30 = GPIO_MODE_NATIVE,
  158. + .gpio31 = GPIO_MODE_NATIVE,
  159. +};
  160. +
  161. +static const struct pch_gpio_set1 pch_gpio_set1_direction = {
  162. + .gpio1 = GPIO_DIR_INPUT,
  163. + .gpio2 = GPIO_DIR_INPUT,
  164. + .gpio3 = GPIO_DIR_INPUT,
  165. + .gpio4 = GPIO_DIR_INPUT,
  166. + .gpio5 = GPIO_DIR_INPUT,
  167. + .gpio6 = GPIO_DIR_INPUT,
  168. + .gpio7 = GPIO_DIR_INPUT,
  169. + .gpio8 = GPIO_DIR_INPUT,
  170. + .gpio13 = GPIO_DIR_INPUT,
  171. + .gpio14 = GPIO_DIR_INPUT,
  172. + .gpio17 = GPIO_DIR_INPUT,
  173. + .gpio18 = GPIO_DIR_INPUT,
  174. + .gpio19 = GPIO_DIR_INPUT,
  175. + .gpio20 = GPIO_DIR_INPUT,
  176. + .gpio21 = GPIO_DIR_INPUT,
  177. + .gpio22 = GPIO_DIR_INPUT,
  178. + .gpio24 = GPIO_DIR_INPUT,
  179. + .gpio27 = GPIO_DIR_INPUT,
  180. + .gpio28 = GPIO_DIR_INPUT,
  181. +};
  182. +
  183. +static const struct pch_gpio_set1 pch_gpio_set1_level = {
  184. +};
  185. +
  186. +static const struct pch_gpio_set1 pch_gpio_set1_blink = {
  187. +};
  188. +
  189. +static const struct pch_gpio_set1 pch_gpio_set1_invert = {
  190. + .gpio1 = GPIO_INVERT,
  191. + .gpio7 = GPIO_INVERT,
  192. + .gpio8 = GPIO_INVERT,
  193. +};
  194. +
  195. +static const struct pch_gpio_set2 pch_gpio_set2_mode = {
  196. + .gpio32 = GPIO_MODE_NATIVE,
  197. + .gpio33 = GPIO_MODE_GPIO,
  198. + .gpio34 = GPIO_MODE_GPIO,
  199. + .gpio35 = GPIO_MODE_NATIVE,
  200. + .gpio36 = GPIO_MODE_GPIO,
  201. + .gpio37 = GPIO_MODE_GPIO,
  202. + .gpio38 = GPIO_MODE_GPIO,
  203. + .gpio39 = GPIO_MODE_GPIO,
  204. + .gpio40 = GPIO_MODE_NATIVE,
  205. + .gpio41 = GPIO_MODE_NATIVE,
  206. + .gpio42 = GPIO_MODE_NATIVE,
  207. + .gpio43 = GPIO_MODE_NATIVE,
  208. + .gpio44 = GPIO_MODE_NATIVE,
  209. + .gpio45 = GPIO_MODE_NATIVE,
  210. + .gpio46 = GPIO_MODE_NATIVE,
  211. + .gpio47 = GPIO_MODE_NATIVE,
  212. + .gpio48 = GPIO_MODE_GPIO,
  213. + .gpio49 = GPIO_MODE_GPIO,
  214. + .gpio50 = GPIO_MODE_NATIVE,
  215. + .gpio51 = GPIO_MODE_NATIVE,
  216. + .gpio52 = GPIO_MODE_GPIO,
  217. + .gpio53 = GPIO_MODE_GPIO,
  218. + .gpio54 = GPIO_MODE_NATIVE,
  219. + .gpio55 = GPIO_MODE_NATIVE,
  220. + .gpio56 = GPIO_MODE_GPIO,
  221. + .gpio57 = GPIO_MODE_GPIO,
  222. + .gpio58 = GPIO_MODE_NATIVE,
  223. + .gpio59 = GPIO_MODE_NATIVE,
  224. + .gpio60 = GPIO_MODE_GPIO,
  225. +};
  226. +
  227. +static const struct pch_gpio_set2 pch_gpio_set2_direction = {
  228. + .gpio33 = GPIO_DIR_INPUT,
  229. + .gpio34 = GPIO_DIR_INPUT,
  230. + .gpio36 = GPIO_DIR_INPUT,
  231. + .gpio37 = GPIO_DIR_INPUT,
  232. + .gpio38 = GPIO_DIR_INPUT,
  233. + .gpio39 = GPIO_DIR_INPUT,
  234. + .gpio48 = GPIO_DIR_INPUT,
  235. + .gpio49 = GPIO_DIR_INPUT,
  236. + .gpio52 = GPIO_DIR_INPUT,
  237. + .gpio53 = GPIO_DIR_INPUT,
  238. + .gpio56 = GPIO_DIR_INPUT,
  239. + .gpio57 = GPIO_DIR_INPUT,
  240. + .gpio60 = GPIO_DIR_INPUT,
  241. +};
  242. +
  243. +static const struct pch_gpio_set2 pch_gpio_set2_level = {
  244. +};
  245. +
  246. +const struct pch_gpio_map mainboard_gpio_map = {
  247. + .set1 = {
  248. + .mode = &pch_gpio_set1_mode,
  249. + .direction = &pch_gpio_set1_direction,
  250. + .level = &pch_gpio_set1_level,
  251. + .blink = &pch_gpio_set1_blink,
  252. + .invert = &pch_gpio_set1_invert,
  253. + },
  254. + .set2 = {
  255. + .mode = &pch_gpio_set2_mode,
  256. + .direction = &pch_gpio_set2_direction,
  257. + .level = &pch_gpio_set2_level,
  258. + },
  259. +};
  260. diff --git a/src/mainboard/dell/gm45_latitude/variants/e4300/hda_verb.c b/src/mainboard/dell/gm45_latitude/variants/e4300/hda_verb.c
  261. new file mode 100644
  262. index 0000000000..a9948a93dd
  263. --- /dev/null
  264. +++ b/src/mainboard/dell/gm45_latitude/variants/e4300/hda_verb.c
  265. @@ -0,0 +1,37 @@
  266. +/* SPDX-License-Identifier: GPL-2.0-only */
  267. +
  268. +#include <device/azalia_device.h>
  269. +
  270. +const u32 cim_verb_data[] = {
  271. + /* coreboot specific header */
  272. + 0x111d76b2, /* IDT 92HD71B7X */
  273. + 0x1028024d, /* Subsystem ID */
  274. + 13, /* Number of entries */
  275. +
  276. + /* Pin Widget Verb Table */
  277. +
  278. + AZALIA_PIN_CFG(0, 0x0a, 0x0421101f),
  279. + AZALIA_PIN_CFG(0, 0x0b, 0x04a11021),
  280. + AZALIA_PIN_CFG(0, 0x0c, 0x40f000f0),
  281. + AZALIA_PIN_CFG(0, 0x0d, 0x90170110),
  282. + AZALIA_PIN_CFG(0, 0x0e, 0x23a1102e),
  283. + AZALIA_PIN_CFG(0, 0x0f, 0x23011050),
  284. + AZALIA_PIN_CFG(0, 0x14, 0x40f000f2),
  285. + AZALIA_PIN_CFG(0, 0x18, 0x90a601a0),
  286. + AZALIA_PIN_CFG(0, 0x19, 0x40f000f4),
  287. + AZALIA_PIN_CFG(0, 0x1e, 0x40f000f5),
  288. + AZALIA_PIN_CFG(0, 0x1f, 0x40f000f6),
  289. + AZALIA_PIN_CFG(0, 0x20, 0x40f000f7),
  290. + AZALIA_PIN_CFG(0, 0x27, 0x40f000f0),
  291. +};
  292. +
  293. +const u32 pc_beep_verbs[] = {
  294. + 0x00170500, /* power up codec */
  295. + 0x00d70500, /* power up speakers */
  296. + 0x00d70102, /* select mixer (input 0x2) for speakers */
  297. + 0x00d70740, /* enable speakers output */
  298. + 0x02770720, /* enable beep input */
  299. + 0x01737217, /* unmute beep (mixer's input 0x2), set amp 0dB */
  300. + 0x00d37000, /* unmute speakers */
  301. +};
  302. +AZALIA_ARRAY_SIZES;
  303. diff --git a/src/mainboard/dell/gm45_latitude/variants/e4300/overridetree.cb b/src/mainboard/dell/gm45_latitude/variants/e4300/overridetree.cb
  304. new file mode 100644
  305. index 0000000000..20dfa245fb
  306. --- /dev/null
  307. +++ b/src/mainboard/dell/gm45_latitude/variants/e4300/overridetree.cb
  308. @@ -0,0 +1,10 @@
  309. +## SPDX-License-Identifier: GPL-2.0-or-later
  310. +
  311. +chip northbridge/intel/gm45
  312. + device domain 0 on
  313. + subsystemid 0x1028 0x024d inherit
  314. + chip southbridge/intel/i82801ix
  315. + device pci 1c.2 off end # PCIe Port #3
  316. + end
  317. + end
  318. +end
  319. --
  320. 2.39.5