intel-lpss-pci.c 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Intel LPSS PCI support.
  4. *
  5. * Copyright (C) 2015, Intel Corporation
  6. *
  7. * Authors: Andy Shevchenko <[email protected]>
  8. * Mika Westerberg <[email protected]>
  9. */
  10. #include <linux/ioport.h>
  11. #include <linux/kernel.h>
  12. #include <linux/module.h>
  13. #include <linux/pci.h>
  14. #include <linux/pm_runtime.h>
  15. #include <linux/property.h>
  16. #include <linux/pxa2xx_ssp.h>
  17. #include "intel-lpss.h"
  18. /* Some DSDTs have an unused GEXP ACPI device conflicting with I2C4 resources */
  19. static const struct pci_device_id ignore_resource_conflicts_ids[] = {
  20. /* Microsoft Surface Go (version 1) I2C4 */
  21. { PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, 0x9d64, 0x152d, 0x1182), },
  22. /* Microsoft Surface Go 2 I2C4 */
  23. { PCI_DEVICE_SUB(PCI_VENDOR_ID_INTEL, 0x9d64, 0x152d, 0x1237), },
  24. { }
  25. };
  26. static int intel_lpss_pci_probe(struct pci_dev *pdev,
  27. const struct pci_device_id *id)
  28. {
  29. struct intel_lpss_platform_info *info;
  30. int ret;
  31. ret = pcim_enable_device(pdev);
  32. if (ret)
  33. return ret;
  34. info = devm_kmemdup(&pdev->dev, (void *)id->driver_data, sizeof(*info),
  35. GFP_KERNEL);
  36. if (!info)
  37. return -ENOMEM;
  38. info->mem = &pdev->resource[0];
  39. info->irq = pdev->irq;
  40. if (pci_match_id(ignore_resource_conflicts_ids, pdev))
  41. info->ignore_resource_conflicts = true;
  42. pdev->d3cold_delay = 0;
  43. /* Probably it is enough to set this for iDMA capable devices only */
  44. pci_set_master(pdev);
  45. pci_try_set_mwi(pdev);
  46. ret = intel_lpss_probe(&pdev->dev, info);
  47. if (ret)
  48. return ret;
  49. pm_runtime_put(&pdev->dev);
  50. pm_runtime_allow(&pdev->dev);
  51. return 0;
  52. }
  53. static void intel_lpss_pci_remove(struct pci_dev *pdev)
  54. {
  55. pm_runtime_forbid(&pdev->dev);
  56. pm_runtime_get_sync(&pdev->dev);
  57. intel_lpss_remove(&pdev->dev);
  58. }
  59. static INTEL_LPSS_PM_OPS(intel_lpss_pci_pm_ops);
  60. static const struct property_entry spt_spi_properties[] = {
  61. PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_SPT_SSP),
  62. { }
  63. };
  64. static const struct software_node spt_spi_node = {
  65. .properties = spt_spi_properties,
  66. };
  67. static const struct intel_lpss_platform_info spt_info = {
  68. .clk_rate = 120000000,
  69. .swnode = &spt_spi_node,
  70. };
  71. static const struct property_entry spt_i2c_properties[] = {
  72. PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 230),
  73. { },
  74. };
  75. static const struct software_node spt_i2c_node = {
  76. .properties = spt_i2c_properties,
  77. };
  78. static const struct intel_lpss_platform_info spt_i2c_info = {
  79. .clk_rate = 120000000,
  80. .swnode = &spt_i2c_node,
  81. };
  82. static const struct property_entry uart_properties[] = {
  83. PROPERTY_ENTRY_U32("reg-io-width", 4),
  84. PROPERTY_ENTRY_U32("reg-shift", 2),
  85. PROPERTY_ENTRY_BOOL("snps,uart-16550-compatible"),
  86. { },
  87. };
  88. static const struct software_node uart_node = {
  89. .properties = uart_properties,
  90. };
  91. static const struct intel_lpss_platform_info spt_uart_info = {
  92. .clk_rate = 120000000,
  93. .clk_con_id = "baudclk",
  94. .swnode = &uart_node,
  95. };
  96. static const struct property_entry bxt_spi_properties[] = {
  97. PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_BXT_SSP),
  98. { }
  99. };
  100. static const struct software_node bxt_spi_node = {
  101. .properties = bxt_spi_properties,
  102. };
  103. static const struct intel_lpss_platform_info bxt_info = {
  104. .clk_rate = 100000000,
  105. .swnode = &bxt_spi_node,
  106. };
  107. static const struct intel_lpss_platform_info bxt_uart_info = {
  108. .clk_rate = 100000000,
  109. .clk_con_id = "baudclk",
  110. .swnode = &uart_node,
  111. };
  112. static const struct property_entry bxt_i2c_properties[] = {
  113. PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 42),
  114. PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
  115. PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
  116. { },
  117. };
  118. static const struct software_node bxt_i2c_node = {
  119. .properties = bxt_i2c_properties,
  120. };
  121. static const struct intel_lpss_platform_info bxt_i2c_info = {
  122. .clk_rate = 133000000,
  123. .swnode = &bxt_i2c_node,
  124. };
  125. static const struct property_entry apl_i2c_properties[] = {
  126. PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 207),
  127. PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
  128. PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 208),
  129. { },
  130. };
  131. static const struct software_node apl_i2c_node = {
  132. .properties = apl_i2c_properties,
  133. };
  134. static const struct intel_lpss_platform_info apl_i2c_info = {
  135. .clk_rate = 133000000,
  136. .swnode = &apl_i2c_node,
  137. };
  138. static const struct property_entry glk_i2c_properties[] = {
  139. PROPERTY_ENTRY_U32("i2c-sda-hold-time-ns", 313),
  140. PROPERTY_ENTRY_U32("i2c-sda-falling-time-ns", 171),
  141. PROPERTY_ENTRY_U32("i2c-scl-falling-time-ns", 290),
  142. { },
  143. };
  144. static const struct software_node glk_i2c_node = {
  145. .properties = glk_i2c_properties,
  146. };
  147. static const struct intel_lpss_platform_info glk_i2c_info = {
  148. .clk_rate = 133000000,
  149. .swnode = &glk_i2c_node,
  150. };
  151. static const struct property_entry cnl_spi_properties[] = {
  152. PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_CNL_SSP),
  153. { }
  154. };
  155. static const struct software_node cnl_spi_node = {
  156. .properties = cnl_spi_properties,
  157. };
  158. static const struct intel_lpss_platform_info cnl_info = {
  159. .clk_rate = 120000000,
  160. .swnode = &cnl_spi_node,
  161. };
  162. static const struct intel_lpss_platform_info cnl_i2c_info = {
  163. .clk_rate = 216000000,
  164. .swnode = &spt_i2c_node,
  165. };
  166. static const struct intel_lpss_platform_info ehl_i2c_info = {
  167. .clk_rate = 100000000,
  168. .swnode = &bxt_i2c_node,
  169. };
  170. static const struct property_entry tgl_spi_properties[] = {
  171. PROPERTY_ENTRY_U32("intel,spi-pxa2xx-type", LPSS_CNL_SSP),
  172. { }
  173. };
  174. static const struct software_node tgl_spi_node = {
  175. .properties = tgl_spi_properties,
  176. };
  177. static const struct intel_lpss_platform_info tgl_info = {
  178. .clk_rate = 100000000,
  179. .swnode = &tgl_spi_node,
  180. };
  181. static const struct pci_device_id intel_lpss_pci_ids[] = {
  182. /* CML-LP */
  183. { PCI_VDEVICE(INTEL, 0x02a8), (kernel_ulong_t)&spt_uart_info },
  184. { PCI_VDEVICE(INTEL, 0x02a9), (kernel_ulong_t)&spt_uart_info },
  185. { PCI_VDEVICE(INTEL, 0x02aa), (kernel_ulong_t)&cnl_info },
  186. { PCI_VDEVICE(INTEL, 0x02ab), (kernel_ulong_t)&cnl_info },
  187. { PCI_VDEVICE(INTEL, 0x02c5), (kernel_ulong_t)&cnl_i2c_info },
  188. { PCI_VDEVICE(INTEL, 0x02c6), (kernel_ulong_t)&cnl_i2c_info },
  189. { PCI_VDEVICE(INTEL, 0x02c7), (kernel_ulong_t)&spt_uart_info },
  190. { PCI_VDEVICE(INTEL, 0x02e8), (kernel_ulong_t)&cnl_i2c_info },
  191. { PCI_VDEVICE(INTEL, 0x02e9), (kernel_ulong_t)&cnl_i2c_info },
  192. { PCI_VDEVICE(INTEL, 0x02ea), (kernel_ulong_t)&cnl_i2c_info },
  193. { PCI_VDEVICE(INTEL, 0x02eb), (kernel_ulong_t)&cnl_i2c_info },
  194. { PCI_VDEVICE(INTEL, 0x02fb), (kernel_ulong_t)&cnl_info },
  195. /* CML-H */
  196. { PCI_VDEVICE(INTEL, 0x06a8), (kernel_ulong_t)&spt_uart_info },
  197. { PCI_VDEVICE(INTEL, 0x06a9), (kernel_ulong_t)&spt_uart_info },
  198. { PCI_VDEVICE(INTEL, 0x06aa), (kernel_ulong_t)&cnl_info },
  199. { PCI_VDEVICE(INTEL, 0x06ab), (kernel_ulong_t)&cnl_info },
  200. { PCI_VDEVICE(INTEL, 0x06c7), (kernel_ulong_t)&spt_uart_info },
  201. { PCI_VDEVICE(INTEL, 0x06e8), (kernel_ulong_t)&cnl_i2c_info },
  202. { PCI_VDEVICE(INTEL, 0x06e9), (kernel_ulong_t)&cnl_i2c_info },
  203. { PCI_VDEVICE(INTEL, 0x06ea), (kernel_ulong_t)&cnl_i2c_info },
  204. { PCI_VDEVICE(INTEL, 0x06eb), (kernel_ulong_t)&cnl_i2c_info },
  205. { PCI_VDEVICE(INTEL, 0x06fb), (kernel_ulong_t)&cnl_info },
  206. /* BXT A-Step */
  207. { PCI_VDEVICE(INTEL, 0x0aac), (kernel_ulong_t)&bxt_i2c_info },
  208. { PCI_VDEVICE(INTEL, 0x0aae), (kernel_ulong_t)&bxt_i2c_info },
  209. { PCI_VDEVICE(INTEL, 0x0ab0), (kernel_ulong_t)&bxt_i2c_info },
  210. { PCI_VDEVICE(INTEL, 0x0ab2), (kernel_ulong_t)&bxt_i2c_info },
  211. { PCI_VDEVICE(INTEL, 0x0ab4), (kernel_ulong_t)&bxt_i2c_info },
  212. { PCI_VDEVICE(INTEL, 0x0ab6), (kernel_ulong_t)&bxt_i2c_info },
  213. { PCI_VDEVICE(INTEL, 0x0ab8), (kernel_ulong_t)&bxt_i2c_info },
  214. { PCI_VDEVICE(INTEL, 0x0aba), (kernel_ulong_t)&bxt_i2c_info },
  215. { PCI_VDEVICE(INTEL, 0x0abc), (kernel_ulong_t)&bxt_uart_info },
  216. { PCI_VDEVICE(INTEL, 0x0abe), (kernel_ulong_t)&bxt_uart_info },
  217. { PCI_VDEVICE(INTEL, 0x0ac0), (kernel_ulong_t)&bxt_uart_info },
  218. { PCI_VDEVICE(INTEL, 0x0ac2), (kernel_ulong_t)&bxt_info },
  219. { PCI_VDEVICE(INTEL, 0x0ac4), (kernel_ulong_t)&bxt_info },
  220. { PCI_VDEVICE(INTEL, 0x0ac6), (kernel_ulong_t)&bxt_info },
  221. { PCI_VDEVICE(INTEL, 0x0aee), (kernel_ulong_t)&bxt_uart_info },
  222. /* BXT B-Step */
  223. { PCI_VDEVICE(INTEL, 0x1aac), (kernel_ulong_t)&bxt_i2c_info },
  224. { PCI_VDEVICE(INTEL, 0x1aae), (kernel_ulong_t)&bxt_i2c_info },
  225. { PCI_VDEVICE(INTEL, 0x1ab0), (kernel_ulong_t)&bxt_i2c_info },
  226. { PCI_VDEVICE(INTEL, 0x1ab2), (kernel_ulong_t)&bxt_i2c_info },
  227. { PCI_VDEVICE(INTEL, 0x1ab4), (kernel_ulong_t)&bxt_i2c_info },
  228. { PCI_VDEVICE(INTEL, 0x1ab6), (kernel_ulong_t)&bxt_i2c_info },
  229. { PCI_VDEVICE(INTEL, 0x1ab8), (kernel_ulong_t)&bxt_i2c_info },
  230. { PCI_VDEVICE(INTEL, 0x1aba), (kernel_ulong_t)&bxt_i2c_info },
  231. { PCI_VDEVICE(INTEL, 0x1abc), (kernel_ulong_t)&bxt_uart_info },
  232. { PCI_VDEVICE(INTEL, 0x1abe), (kernel_ulong_t)&bxt_uart_info },
  233. { PCI_VDEVICE(INTEL, 0x1ac0), (kernel_ulong_t)&bxt_uart_info },
  234. { PCI_VDEVICE(INTEL, 0x1ac2), (kernel_ulong_t)&bxt_info },
  235. { PCI_VDEVICE(INTEL, 0x1ac4), (kernel_ulong_t)&bxt_info },
  236. { PCI_VDEVICE(INTEL, 0x1ac6), (kernel_ulong_t)&bxt_info },
  237. { PCI_VDEVICE(INTEL, 0x1aee), (kernel_ulong_t)&bxt_uart_info },
  238. /* EBG */
  239. { PCI_VDEVICE(INTEL, 0x1bad), (kernel_ulong_t)&bxt_uart_info },
  240. { PCI_VDEVICE(INTEL, 0x1bae), (kernel_ulong_t)&bxt_uart_info },
  241. /* GLK */
  242. { PCI_VDEVICE(INTEL, 0x31ac), (kernel_ulong_t)&glk_i2c_info },
  243. { PCI_VDEVICE(INTEL, 0x31ae), (kernel_ulong_t)&glk_i2c_info },
  244. { PCI_VDEVICE(INTEL, 0x31b0), (kernel_ulong_t)&glk_i2c_info },
  245. { PCI_VDEVICE(INTEL, 0x31b2), (kernel_ulong_t)&glk_i2c_info },
  246. { PCI_VDEVICE(INTEL, 0x31b4), (kernel_ulong_t)&glk_i2c_info },
  247. { PCI_VDEVICE(INTEL, 0x31b6), (kernel_ulong_t)&glk_i2c_info },
  248. { PCI_VDEVICE(INTEL, 0x31b8), (kernel_ulong_t)&glk_i2c_info },
  249. { PCI_VDEVICE(INTEL, 0x31ba), (kernel_ulong_t)&glk_i2c_info },
  250. { PCI_VDEVICE(INTEL, 0x31bc), (kernel_ulong_t)&bxt_uart_info },
  251. { PCI_VDEVICE(INTEL, 0x31be), (kernel_ulong_t)&bxt_uart_info },
  252. { PCI_VDEVICE(INTEL, 0x31c0), (kernel_ulong_t)&bxt_uart_info },
  253. { PCI_VDEVICE(INTEL, 0x31c2), (kernel_ulong_t)&bxt_info },
  254. { PCI_VDEVICE(INTEL, 0x31c4), (kernel_ulong_t)&bxt_info },
  255. { PCI_VDEVICE(INTEL, 0x31c6), (kernel_ulong_t)&bxt_info },
  256. { PCI_VDEVICE(INTEL, 0x31ee), (kernel_ulong_t)&bxt_uart_info },
  257. /* ICL-LP */
  258. { PCI_VDEVICE(INTEL, 0x34a8), (kernel_ulong_t)&spt_uart_info },
  259. { PCI_VDEVICE(INTEL, 0x34a9), (kernel_ulong_t)&spt_uart_info },
  260. { PCI_VDEVICE(INTEL, 0x34aa), (kernel_ulong_t)&cnl_info },
  261. { PCI_VDEVICE(INTEL, 0x34ab), (kernel_ulong_t)&cnl_info },
  262. { PCI_VDEVICE(INTEL, 0x34c5), (kernel_ulong_t)&bxt_i2c_info },
  263. { PCI_VDEVICE(INTEL, 0x34c6), (kernel_ulong_t)&bxt_i2c_info },
  264. { PCI_VDEVICE(INTEL, 0x34c7), (kernel_ulong_t)&spt_uart_info },
  265. { PCI_VDEVICE(INTEL, 0x34e8), (kernel_ulong_t)&bxt_i2c_info },
  266. { PCI_VDEVICE(INTEL, 0x34e9), (kernel_ulong_t)&bxt_i2c_info },
  267. { PCI_VDEVICE(INTEL, 0x34ea), (kernel_ulong_t)&bxt_i2c_info },
  268. { PCI_VDEVICE(INTEL, 0x34eb), (kernel_ulong_t)&bxt_i2c_info },
  269. { PCI_VDEVICE(INTEL, 0x34fb), (kernel_ulong_t)&cnl_info },
  270. /* ICL-N */
  271. { PCI_VDEVICE(INTEL, 0x38a8), (kernel_ulong_t)&spt_uart_info },
  272. /* TGL-H */
  273. { PCI_VDEVICE(INTEL, 0x43a7), (kernel_ulong_t)&bxt_uart_info },
  274. { PCI_VDEVICE(INTEL, 0x43a8), (kernel_ulong_t)&bxt_uart_info },
  275. { PCI_VDEVICE(INTEL, 0x43a9), (kernel_ulong_t)&bxt_uart_info },
  276. { PCI_VDEVICE(INTEL, 0x43aa), (kernel_ulong_t)&tgl_info },
  277. { PCI_VDEVICE(INTEL, 0x43ab), (kernel_ulong_t)&tgl_info },
  278. { PCI_VDEVICE(INTEL, 0x43ad), (kernel_ulong_t)&bxt_i2c_info },
  279. { PCI_VDEVICE(INTEL, 0x43ae), (kernel_ulong_t)&bxt_i2c_info },
  280. { PCI_VDEVICE(INTEL, 0x43d8), (kernel_ulong_t)&bxt_i2c_info },
  281. { PCI_VDEVICE(INTEL, 0x43da), (kernel_ulong_t)&bxt_uart_info },
  282. { PCI_VDEVICE(INTEL, 0x43e8), (kernel_ulong_t)&bxt_i2c_info },
  283. { PCI_VDEVICE(INTEL, 0x43e9), (kernel_ulong_t)&bxt_i2c_info },
  284. { PCI_VDEVICE(INTEL, 0x43ea), (kernel_ulong_t)&bxt_i2c_info },
  285. { PCI_VDEVICE(INTEL, 0x43eb), (kernel_ulong_t)&bxt_i2c_info },
  286. { PCI_VDEVICE(INTEL, 0x43fb), (kernel_ulong_t)&tgl_info },
  287. { PCI_VDEVICE(INTEL, 0x43fd), (kernel_ulong_t)&tgl_info },
  288. /* EHL */
  289. { PCI_VDEVICE(INTEL, 0x4b28), (kernel_ulong_t)&bxt_uart_info },
  290. { PCI_VDEVICE(INTEL, 0x4b29), (kernel_ulong_t)&bxt_uart_info },
  291. { PCI_VDEVICE(INTEL, 0x4b2a), (kernel_ulong_t)&bxt_info },
  292. { PCI_VDEVICE(INTEL, 0x4b2b), (kernel_ulong_t)&bxt_info },
  293. { PCI_VDEVICE(INTEL, 0x4b37), (kernel_ulong_t)&bxt_info },
  294. { PCI_VDEVICE(INTEL, 0x4b44), (kernel_ulong_t)&ehl_i2c_info },
  295. { PCI_VDEVICE(INTEL, 0x4b45), (kernel_ulong_t)&ehl_i2c_info },
  296. { PCI_VDEVICE(INTEL, 0x4b4b), (kernel_ulong_t)&ehl_i2c_info },
  297. { PCI_VDEVICE(INTEL, 0x4b4c), (kernel_ulong_t)&ehl_i2c_info },
  298. { PCI_VDEVICE(INTEL, 0x4b4d), (kernel_ulong_t)&bxt_uart_info },
  299. { PCI_VDEVICE(INTEL, 0x4b78), (kernel_ulong_t)&ehl_i2c_info },
  300. { PCI_VDEVICE(INTEL, 0x4b79), (kernel_ulong_t)&ehl_i2c_info },
  301. { PCI_VDEVICE(INTEL, 0x4b7a), (kernel_ulong_t)&ehl_i2c_info },
  302. { PCI_VDEVICE(INTEL, 0x4b7b), (kernel_ulong_t)&ehl_i2c_info },
  303. /* JSL */
  304. { PCI_VDEVICE(INTEL, 0x4da8), (kernel_ulong_t)&spt_uart_info },
  305. { PCI_VDEVICE(INTEL, 0x4da9), (kernel_ulong_t)&spt_uart_info },
  306. { PCI_VDEVICE(INTEL, 0x4daa), (kernel_ulong_t)&cnl_info },
  307. { PCI_VDEVICE(INTEL, 0x4dab), (kernel_ulong_t)&cnl_info },
  308. { PCI_VDEVICE(INTEL, 0x4dc5), (kernel_ulong_t)&bxt_i2c_info },
  309. { PCI_VDEVICE(INTEL, 0x4dc6), (kernel_ulong_t)&bxt_i2c_info },
  310. { PCI_VDEVICE(INTEL, 0x4dc7), (kernel_ulong_t)&spt_uart_info },
  311. { PCI_VDEVICE(INTEL, 0x4de8), (kernel_ulong_t)&bxt_i2c_info },
  312. { PCI_VDEVICE(INTEL, 0x4de9), (kernel_ulong_t)&bxt_i2c_info },
  313. { PCI_VDEVICE(INTEL, 0x4dea), (kernel_ulong_t)&bxt_i2c_info },
  314. { PCI_VDEVICE(INTEL, 0x4deb), (kernel_ulong_t)&bxt_i2c_info },
  315. { PCI_VDEVICE(INTEL, 0x4dfb), (kernel_ulong_t)&cnl_info },
  316. /* ADL-P */
  317. { PCI_VDEVICE(INTEL, 0x51a8), (kernel_ulong_t)&bxt_uart_info },
  318. { PCI_VDEVICE(INTEL, 0x51a9), (kernel_ulong_t)&bxt_uart_info },
  319. { PCI_VDEVICE(INTEL, 0x51aa), (kernel_ulong_t)&tgl_info },
  320. { PCI_VDEVICE(INTEL, 0x51ab), (kernel_ulong_t)&tgl_info },
  321. { PCI_VDEVICE(INTEL, 0x51c5), (kernel_ulong_t)&bxt_i2c_info },
  322. { PCI_VDEVICE(INTEL, 0x51c6), (kernel_ulong_t)&bxt_i2c_info },
  323. { PCI_VDEVICE(INTEL, 0x51c7), (kernel_ulong_t)&bxt_uart_info },
  324. { PCI_VDEVICE(INTEL, 0x51d8), (kernel_ulong_t)&bxt_i2c_info },
  325. { PCI_VDEVICE(INTEL, 0x51d9), (kernel_ulong_t)&bxt_i2c_info },
  326. { PCI_VDEVICE(INTEL, 0x51e8), (kernel_ulong_t)&bxt_i2c_info },
  327. { PCI_VDEVICE(INTEL, 0x51e9), (kernel_ulong_t)&bxt_i2c_info },
  328. { PCI_VDEVICE(INTEL, 0x51ea), (kernel_ulong_t)&bxt_i2c_info },
  329. { PCI_VDEVICE(INTEL, 0x51eb), (kernel_ulong_t)&bxt_i2c_info },
  330. { PCI_VDEVICE(INTEL, 0x51fb), (kernel_ulong_t)&tgl_info },
  331. /* ADL-M */
  332. { PCI_VDEVICE(INTEL, 0x54a8), (kernel_ulong_t)&bxt_uart_info },
  333. { PCI_VDEVICE(INTEL, 0x54a9), (kernel_ulong_t)&bxt_uart_info },
  334. { PCI_VDEVICE(INTEL, 0x54aa), (kernel_ulong_t)&tgl_info },
  335. { PCI_VDEVICE(INTEL, 0x54ab), (kernel_ulong_t)&tgl_info },
  336. { PCI_VDEVICE(INTEL, 0x54c5), (kernel_ulong_t)&bxt_i2c_info },
  337. { PCI_VDEVICE(INTEL, 0x54c6), (kernel_ulong_t)&bxt_i2c_info },
  338. { PCI_VDEVICE(INTEL, 0x54c7), (kernel_ulong_t)&bxt_uart_info },
  339. { PCI_VDEVICE(INTEL, 0x54e8), (kernel_ulong_t)&bxt_i2c_info },
  340. { PCI_VDEVICE(INTEL, 0x54e9), (kernel_ulong_t)&bxt_i2c_info },
  341. { PCI_VDEVICE(INTEL, 0x54ea), (kernel_ulong_t)&bxt_i2c_info },
  342. { PCI_VDEVICE(INTEL, 0x54eb), (kernel_ulong_t)&bxt_i2c_info },
  343. { PCI_VDEVICE(INTEL, 0x54fb), (kernel_ulong_t)&tgl_info },
  344. /* APL */
  345. { PCI_VDEVICE(INTEL, 0x5aac), (kernel_ulong_t)&apl_i2c_info },
  346. { PCI_VDEVICE(INTEL, 0x5aae), (kernel_ulong_t)&apl_i2c_info },
  347. { PCI_VDEVICE(INTEL, 0x5ab0), (kernel_ulong_t)&apl_i2c_info },
  348. { PCI_VDEVICE(INTEL, 0x5ab2), (kernel_ulong_t)&apl_i2c_info },
  349. { PCI_VDEVICE(INTEL, 0x5ab4), (kernel_ulong_t)&apl_i2c_info },
  350. { PCI_VDEVICE(INTEL, 0x5ab6), (kernel_ulong_t)&apl_i2c_info },
  351. { PCI_VDEVICE(INTEL, 0x5ab8), (kernel_ulong_t)&apl_i2c_info },
  352. { PCI_VDEVICE(INTEL, 0x5aba), (kernel_ulong_t)&apl_i2c_info },
  353. { PCI_VDEVICE(INTEL, 0x5abc), (kernel_ulong_t)&bxt_uart_info },
  354. { PCI_VDEVICE(INTEL, 0x5abe), (kernel_ulong_t)&bxt_uart_info },
  355. { PCI_VDEVICE(INTEL, 0x5ac0), (kernel_ulong_t)&bxt_uart_info },
  356. { PCI_VDEVICE(INTEL, 0x5ac2), (kernel_ulong_t)&bxt_info },
  357. { PCI_VDEVICE(INTEL, 0x5ac4), (kernel_ulong_t)&bxt_info },
  358. { PCI_VDEVICE(INTEL, 0x5ac6), (kernel_ulong_t)&bxt_info },
  359. { PCI_VDEVICE(INTEL, 0x5aee), (kernel_ulong_t)&bxt_uart_info },
  360. /* RPL-S */
  361. { PCI_VDEVICE(INTEL, 0x7a28), (kernel_ulong_t)&bxt_uart_info },
  362. { PCI_VDEVICE(INTEL, 0x7a29), (kernel_ulong_t)&bxt_uart_info },
  363. { PCI_VDEVICE(INTEL, 0x7a2a), (kernel_ulong_t)&tgl_info },
  364. { PCI_VDEVICE(INTEL, 0x7a2b), (kernel_ulong_t)&tgl_info },
  365. { PCI_VDEVICE(INTEL, 0x7a4c), (kernel_ulong_t)&bxt_i2c_info },
  366. { PCI_VDEVICE(INTEL, 0x7a4d), (kernel_ulong_t)&bxt_i2c_info },
  367. { PCI_VDEVICE(INTEL, 0x7a4e), (kernel_ulong_t)&bxt_i2c_info },
  368. { PCI_VDEVICE(INTEL, 0x7a4f), (kernel_ulong_t)&bxt_i2c_info },
  369. { PCI_VDEVICE(INTEL, 0x7a5c), (kernel_ulong_t)&bxt_uart_info },
  370. { PCI_VDEVICE(INTEL, 0x7a79), (kernel_ulong_t)&tgl_info },
  371. { PCI_VDEVICE(INTEL, 0x7a7b), (kernel_ulong_t)&tgl_info },
  372. { PCI_VDEVICE(INTEL, 0x7a7c), (kernel_ulong_t)&bxt_i2c_info },
  373. { PCI_VDEVICE(INTEL, 0x7a7d), (kernel_ulong_t)&bxt_i2c_info },
  374. { PCI_VDEVICE(INTEL, 0x7a7e), (kernel_ulong_t)&bxt_uart_info },
  375. /* ADL-S */
  376. { PCI_VDEVICE(INTEL, 0x7aa8), (kernel_ulong_t)&bxt_uart_info },
  377. { PCI_VDEVICE(INTEL, 0x7aa9), (kernel_ulong_t)&bxt_uart_info },
  378. { PCI_VDEVICE(INTEL, 0x7aaa), (kernel_ulong_t)&tgl_info },
  379. { PCI_VDEVICE(INTEL, 0x7aab), (kernel_ulong_t)&tgl_info },
  380. { PCI_VDEVICE(INTEL, 0x7acc), (kernel_ulong_t)&bxt_i2c_info },
  381. { PCI_VDEVICE(INTEL, 0x7acd), (kernel_ulong_t)&bxt_i2c_info },
  382. { PCI_VDEVICE(INTEL, 0x7ace), (kernel_ulong_t)&bxt_i2c_info },
  383. { PCI_VDEVICE(INTEL, 0x7acf), (kernel_ulong_t)&bxt_i2c_info },
  384. { PCI_VDEVICE(INTEL, 0x7adc), (kernel_ulong_t)&bxt_uart_info },
  385. { PCI_VDEVICE(INTEL, 0x7af9), (kernel_ulong_t)&tgl_info },
  386. { PCI_VDEVICE(INTEL, 0x7afb), (kernel_ulong_t)&tgl_info },
  387. { PCI_VDEVICE(INTEL, 0x7afc), (kernel_ulong_t)&bxt_i2c_info },
  388. { PCI_VDEVICE(INTEL, 0x7afd), (kernel_ulong_t)&bxt_i2c_info },
  389. { PCI_VDEVICE(INTEL, 0x7afe), (kernel_ulong_t)&bxt_uart_info },
  390. /* MTL-P */
  391. { PCI_VDEVICE(INTEL, 0x7e25), (kernel_ulong_t)&bxt_uart_info },
  392. { PCI_VDEVICE(INTEL, 0x7e26), (kernel_ulong_t)&bxt_uart_info },
  393. { PCI_VDEVICE(INTEL, 0x7e27), (kernel_ulong_t)&tgl_info },
  394. { PCI_VDEVICE(INTEL, 0x7e30), (kernel_ulong_t)&tgl_info },
  395. { PCI_VDEVICE(INTEL, 0x7e46), (kernel_ulong_t)&tgl_info },
  396. { PCI_VDEVICE(INTEL, 0x7e50), (kernel_ulong_t)&bxt_i2c_info },
  397. { PCI_VDEVICE(INTEL, 0x7e51), (kernel_ulong_t)&bxt_i2c_info },
  398. { PCI_VDEVICE(INTEL, 0x7e52), (kernel_ulong_t)&bxt_uart_info },
  399. { PCI_VDEVICE(INTEL, 0x7e78), (kernel_ulong_t)&bxt_i2c_info },
  400. { PCI_VDEVICE(INTEL, 0x7e79), (kernel_ulong_t)&bxt_i2c_info },
  401. { PCI_VDEVICE(INTEL, 0x7e7a), (kernel_ulong_t)&bxt_i2c_info },
  402. { PCI_VDEVICE(INTEL, 0x7e7b), (kernel_ulong_t)&bxt_i2c_info },
  403. /* MTP-S */
  404. { PCI_VDEVICE(INTEL, 0x7f28), (kernel_ulong_t)&bxt_uart_info },
  405. { PCI_VDEVICE(INTEL, 0x7f29), (kernel_ulong_t)&bxt_uart_info },
  406. { PCI_VDEVICE(INTEL, 0x7f2a), (kernel_ulong_t)&tgl_info },
  407. { PCI_VDEVICE(INTEL, 0x7f2b), (kernel_ulong_t)&tgl_info },
  408. { PCI_VDEVICE(INTEL, 0x7f4c), (kernel_ulong_t)&bxt_i2c_info },
  409. { PCI_VDEVICE(INTEL, 0x7f4d), (kernel_ulong_t)&bxt_i2c_info },
  410. { PCI_VDEVICE(INTEL, 0x7f4e), (kernel_ulong_t)&bxt_i2c_info },
  411. { PCI_VDEVICE(INTEL, 0x7f4f), (kernel_ulong_t)&bxt_i2c_info },
  412. { PCI_VDEVICE(INTEL, 0x7f5c), (kernel_ulong_t)&bxt_uart_info },
  413. { PCI_VDEVICE(INTEL, 0x7f5d), (kernel_ulong_t)&bxt_uart_info },
  414. { PCI_VDEVICE(INTEL, 0x7f5e), (kernel_ulong_t)&tgl_info },
  415. { PCI_VDEVICE(INTEL, 0x7f5f), (kernel_ulong_t)&tgl_info },
  416. { PCI_VDEVICE(INTEL, 0x7f7a), (kernel_ulong_t)&bxt_i2c_info },
  417. { PCI_VDEVICE(INTEL, 0x7f7b), (kernel_ulong_t)&bxt_i2c_info },
  418. /* LKF */
  419. { PCI_VDEVICE(INTEL, 0x98a8), (kernel_ulong_t)&bxt_uart_info },
  420. { PCI_VDEVICE(INTEL, 0x98a9), (kernel_ulong_t)&bxt_uart_info },
  421. { PCI_VDEVICE(INTEL, 0x98aa), (kernel_ulong_t)&bxt_info },
  422. { PCI_VDEVICE(INTEL, 0x98c5), (kernel_ulong_t)&bxt_i2c_info },
  423. { PCI_VDEVICE(INTEL, 0x98c6), (kernel_ulong_t)&bxt_i2c_info },
  424. { PCI_VDEVICE(INTEL, 0x98c7), (kernel_ulong_t)&bxt_uart_info },
  425. { PCI_VDEVICE(INTEL, 0x98e8), (kernel_ulong_t)&bxt_i2c_info },
  426. { PCI_VDEVICE(INTEL, 0x98e9), (kernel_ulong_t)&bxt_i2c_info },
  427. { PCI_VDEVICE(INTEL, 0x98ea), (kernel_ulong_t)&bxt_i2c_info },
  428. { PCI_VDEVICE(INTEL, 0x98eb), (kernel_ulong_t)&bxt_i2c_info },
  429. /* SPT-LP */
  430. { PCI_VDEVICE(INTEL, 0x9d27), (kernel_ulong_t)&spt_uart_info },
  431. { PCI_VDEVICE(INTEL, 0x9d28), (kernel_ulong_t)&spt_uart_info },
  432. { PCI_VDEVICE(INTEL, 0x9d29), (kernel_ulong_t)&spt_info },
  433. { PCI_VDEVICE(INTEL, 0x9d2a), (kernel_ulong_t)&spt_info },
  434. { PCI_VDEVICE(INTEL, 0x9d60), (kernel_ulong_t)&spt_i2c_info },
  435. { PCI_VDEVICE(INTEL, 0x9d61), (kernel_ulong_t)&spt_i2c_info },
  436. { PCI_VDEVICE(INTEL, 0x9d62), (kernel_ulong_t)&spt_i2c_info },
  437. { PCI_VDEVICE(INTEL, 0x9d63), (kernel_ulong_t)&spt_i2c_info },
  438. { PCI_VDEVICE(INTEL, 0x9d64), (kernel_ulong_t)&spt_i2c_info },
  439. { PCI_VDEVICE(INTEL, 0x9d65), (kernel_ulong_t)&spt_i2c_info },
  440. { PCI_VDEVICE(INTEL, 0x9d66), (kernel_ulong_t)&spt_uart_info },
  441. /* CNL-LP */
  442. { PCI_VDEVICE(INTEL, 0x9da8), (kernel_ulong_t)&spt_uart_info },
  443. { PCI_VDEVICE(INTEL, 0x9da9), (kernel_ulong_t)&spt_uart_info },
  444. { PCI_VDEVICE(INTEL, 0x9daa), (kernel_ulong_t)&cnl_info },
  445. { PCI_VDEVICE(INTEL, 0x9dab), (kernel_ulong_t)&cnl_info },
  446. { PCI_VDEVICE(INTEL, 0x9dc5), (kernel_ulong_t)&cnl_i2c_info },
  447. { PCI_VDEVICE(INTEL, 0x9dc6), (kernel_ulong_t)&cnl_i2c_info },
  448. { PCI_VDEVICE(INTEL, 0x9dc7), (kernel_ulong_t)&spt_uart_info },
  449. { PCI_VDEVICE(INTEL, 0x9de8), (kernel_ulong_t)&cnl_i2c_info },
  450. { PCI_VDEVICE(INTEL, 0x9de9), (kernel_ulong_t)&cnl_i2c_info },
  451. { PCI_VDEVICE(INTEL, 0x9dea), (kernel_ulong_t)&cnl_i2c_info },
  452. { PCI_VDEVICE(INTEL, 0x9deb), (kernel_ulong_t)&cnl_i2c_info },
  453. { PCI_VDEVICE(INTEL, 0x9dfb), (kernel_ulong_t)&cnl_info },
  454. /* TGL-LP */
  455. { PCI_VDEVICE(INTEL, 0xa0a8), (kernel_ulong_t)&bxt_uart_info },
  456. { PCI_VDEVICE(INTEL, 0xa0a9), (kernel_ulong_t)&bxt_uart_info },
  457. { PCI_VDEVICE(INTEL, 0xa0aa), (kernel_ulong_t)&cnl_info },
  458. { PCI_VDEVICE(INTEL, 0xa0ab), (kernel_ulong_t)&cnl_info },
  459. { PCI_VDEVICE(INTEL, 0xa0c5), (kernel_ulong_t)&spt_i2c_info },
  460. { PCI_VDEVICE(INTEL, 0xa0c6), (kernel_ulong_t)&spt_i2c_info },
  461. { PCI_VDEVICE(INTEL, 0xa0c7), (kernel_ulong_t)&bxt_uart_info },
  462. { PCI_VDEVICE(INTEL, 0xa0d8), (kernel_ulong_t)&spt_i2c_info },
  463. { PCI_VDEVICE(INTEL, 0xa0d9), (kernel_ulong_t)&spt_i2c_info },
  464. { PCI_VDEVICE(INTEL, 0xa0da), (kernel_ulong_t)&bxt_uart_info },
  465. { PCI_VDEVICE(INTEL, 0xa0db), (kernel_ulong_t)&bxt_uart_info },
  466. { PCI_VDEVICE(INTEL, 0xa0dc), (kernel_ulong_t)&bxt_uart_info },
  467. { PCI_VDEVICE(INTEL, 0xa0dd), (kernel_ulong_t)&bxt_uart_info },
  468. { PCI_VDEVICE(INTEL, 0xa0de), (kernel_ulong_t)&cnl_info },
  469. { PCI_VDEVICE(INTEL, 0xa0df), (kernel_ulong_t)&cnl_info },
  470. { PCI_VDEVICE(INTEL, 0xa0e8), (kernel_ulong_t)&spt_i2c_info },
  471. { PCI_VDEVICE(INTEL, 0xa0e9), (kernel_ulong_t)&spt_i2c_info },
  472. { PCI_VDEVICE(INTEL, 0xa0ea), (kernel_ulong_t)&spt_i2c_info },
  473. { PCI_VDEVICE(INTEL, 0xa0eb), (kernel_ulong_t)&spt_i2c_info },
  474. { PCI_VDEVICE(INTEL, 0xa0fb), (kernel_ulong_t)&cnl_info },
  475. { PCI_VDEVICE(INTEL, 0xa0fd), (kernel_ulong_t)&cnl_info },
  476. { PCI_VDEVICE(INTEL, 0xa0fe), (kernel_ulong_t)&cnl_info },
  477. /* SPT-H */
  478. { PCI_VDEVICE(INTEL, 0xa127), (kernel_ulong_t)&spt_uart_info },
  479. { PCI_VDEVICE(INTEL, 0xa128), (kernel_ulong_t)&spt_uart_info },
  480. { PCI_VDEVICE(INTEL, 0xa129), (kernel_ulong_t)&spt_info },
  481. { PCI_VDEVICE(INTEL, 0xa12a), (kernel_ulong_t)&spt_info },
  482. { PCI_VDEVICE(INTEL, 0xa160), (kernel_ulong_t)&spt_i2c_info },
  483. { PCI_VDEVICE(INTEL, 0xa161), (kernel_ulong_t)&spt_i2c_info },
  484. { PCI_VDEVICE(INTEL, 0xa162), (kernel_ulong_t)&spt_i2c_info },
  485. { PCI_VDEVICE(INTEL, 0xa166), (kernel_ulong_t)&spt_uart_info },
  486. /* KBL-H */
  487. { PCI_VDEVICE(INTEL, 0xa2a7), (kernel_ulong_t)&spt_uart_info },
  488. { PCI_VDEVICE(INTEL, 0xa2a8), (kernel_ulong_t)&spt_uart_info },
  489. { PCI_VDEVICE(INTEL, 0xa2a9), (kernel_ulong_t)&spt_info },
  490. { PCI_VDEVICE(INTEL, 0xa2aa), (kernel_ulong_t)&spt_info },
  491. { PCI_VDEVICE(INTEL, 0xa2e0), (kernel_ulong_t)&spt_i2c_info },
  492. { PCI_VDEVICE(INTEL, 0xa2e1), (kernel_ulong_t)&spt_i2c_info },
  493. { PCI_VDEVICE(INTEL, 0xa2e2), (kernel_ulong_t)&spt_i2c_info },
  494. { PCI_VDEVICE(INTEL, 0xa2e3), (kernel_ulong_t)&spt_i2c_info },
  495. { PCI_VDEVICE(INTEL, 0xa2e6), (kernel_ulong_t)&spt_uart_info },
  496. /* CNL-H */
  497. { PCI_VDEVICE(INTEL, 0xa328), (kernel_ulong_t)&spt_uart_info },
  498. { PCI_VDEVICE(INTEL, 0xa329), (kernel_ulong_t)&spt_uart_info },
  499. { PCI_VDEVICE(INTEL, 0xa32a), (kernel_ulong_t)&cnl_info },
  500. { PCI_VDEVICE(INTEL, 0xa32b), (kernel_ulong_t)&cnl_info },
  501. { PCI_VDEVICE(INTEL, 0xa347), (kernel_ulong_t)&spt_uart_info },
  502. { PCI_VDEVICE(INTEL, 0xa368), (kernel_ulong_t)&cnl_i2c_info },
  503. { PCI_VDEVICE(INTEL, 0xa369), (kernel_ulong_t)&cnl_i2c_info },
  504. { PCI_VDEVICE(INTEL, 0xa36a), (kernel_ulong_t)&cnl_i2c_info },
  505. { PCI_VDEVICE(INTEL, 0xa36b), (kernel_ulong_t)&cnl_i2c_info },
  506. { PCI_VDEVICE(INTEL, 0xa37b), (kernel_ulong_t)&cnl_info },
  507. /* CML-V */
  508. { PCI_VDEVICE(INTEL, 0xa3a7), (kernel_ulong_t)&spt_uart_info },
  509. { PCI_VDEVICE(INTEL, 0xa3a8), (kernel_ulong_t)&spt_uart_info },
  510. { PCI_VDEVICE(INTEL, 0xa3a9), (kernel_ulong_t)&spt_info },
  511. { PCI_VDEVICE(INTEL, 0xa3aa), (kernel_ulong_t)&spt_info },
  512. { PCI_VDEVICE(INTEL, 0xa3e0), (kernel_ulong_t)&spt_i2c_info },
  513. { PCI_VDEVICE(INTEL, 0xa3e1), (kernel_ulong_t)&spt_i2c_info },
  514. { PCI_VDEVICE(INTEL, 0xa3e2), (kernel_ulong_t)&spt_i2c_info },
  515. { PCI_VDEVICE(INTEL, 0xa3e3), (kernel_ulong_t)&spt_i2c_info },
  516. { PCI_VDEVICE(INTEL, 0xa3e6), (kernel_ulong_t)&spt_uart_info },
  517. /* LNL-M */
  518. { PCI_VDEVICE(INTEL, 0xa825), (kernel_ulong_t)&bxt_uart_info },
  519. { PCI_VDEVICE(INTEL, 0xa826), (kernel_ulong_t)&bxt_uart_info },
  520. { PCI_VDEVICE(INTEL, 0xa827), (kernel_ulong_t)&tgl_info },
  521. { PCI_VDEVICE(INTEL, 0xa830), (kernel_ulong_t)&tgl_info },
  522. { PCI_VDEVICE(INTEL, 0xa846), (kernel_ulong_t)&tgl_info },
  523. { PCI_VDEVICE(INTEL, 0xa850), (kernel_ulong_t)&ehl_i2c_info },
  524. { PCI_VDEVICE(INTEL, 0xa851), (kernel_ulong_t)&ehl_i2c_info },
  525. { PCI_VDEVICE(INTEL, 0xa852), (kernel_ulong_t)&bxt_uart_info },
  526. { PCI_VDEVICE(INTEL, 0xa878), (kernel_ulong_t)&ehl_i2c_info },
  527. { PCI_VDEVICE(INTEL, 0xa879), (kernel_ulong_t)&ehl_i2c_info },
  528. { PCI_VDEVICE(INTEL, 0xa87a), (kernel_ulong_t)&ehl_i2c_info },
  529. { PCI_VDEVICE(INTEL, 0xa87b), (kernel_ulong_t)&ehl_i2c_info },
  530. { }
  531. };
  532. MODULE_DEVICE_TABLE(pci, intel_lpss_pci_ids);
  533. static struct pci_driver intel_lpss_pci_driver = {
  534. .name = "intel-lpss",
  535. .id_table = intel_lpss_pci_ids,
  536. .probe = intel_lpss_pci_probe,
  537. .remove = intel_lpss_pci_remove,
  538. .driver = {
  539. .pm = &intel_lpss_pci_pm_ops,
  540. },
  541. };
  542. module_pci_driver(intel_lpss_pci_driver);
  543. MODULE_AUTHOR("Andy Shevchenko <[email protected]>");
  544. MODULE_AUTHOR("Mika Westerberg <[email protected]>");
  545. MODULE_DESCRIPTION("Intel LPSS PCI driver");
  546. MODULE_LICENSE("GPL v2");