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