blob: 82a8b9c96e2ba28fda2c6058a7dcc99a0b9df105 [file] [log] [blame]
Shawn Lin9ddc0782021-01-15 18:01:22 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Rockchip DesignWare based PCIe host controller driver
4 *
5 * Copyright (c) 2021 Rockchip, Inc.
6 */
7
8#include <common.h>
9#include <clk.h>
10#include <dm.h>
11#include <generic-phy.h>
12#include <pci.h>
13#include <power-domain.h>
14#include <reset.h>
15#include <syscon.h>
16#include <asm/arch-rockchip/clock.h>
Simon Glass401d1c42020-10-30 21:38:53 -060017#include <asm/global_data.h>
Shawn Lin9ddc0782021-01-15 18:01:22 +080018#include <asm/io.h>
19#include <asm-generic/gpio.h>
20#include <dm/device_compat.h>
21#include <linux/iopoll.h>
22#include <linux/delay.h>
23#include <power/regulator.h>
24
Neil Armstrongc90f3d02021-03-25 15:49:20 +010025#include "pcie_dw_common.h"
26
Shawn Lin9ddc0782021-01-15 18:01:22 +080027DECLARE_GLOBAL_DATA_PTR;
28
29/**
30 * struct rk_pcie - RK DW PCIe controller state
31 *
32 * @vpcie3v3: The 3.3v power supply for slot
Shawn Lin9ddc0782021-01-15 18:01:22 +080033 * @apb_base: The base address of vendor regs
Shawn Lin9ddc0782021-01-15 18:01:22 +080034 * @rst_gpio: The #PERST signal for slot
Shawn Lin9ddc0782021-01-15 18:01:22 +080035 */
36struct rk_pcie {
Neil Armstrongc90f3d02021-03-25 15:49:20 +010037 /* Must be first member of the struct */
38 struct pcie_dw dw;
Shawn Lin9ddc0782021-01-15 18:01:22 +080039 struct udevice *vpcie3v3;
Shawn Lin9ddc0782021-01-15 18:01:22 +080040 void *apb_base;
Shawn Lin9ddc0782021-01-15 18:01:22 +080041 struct phy phy;
42 struct clk_bulk clks;
Shawn Lin9ddc0782021-01-15 18:01:22 +080043 struct reset_ctl_bulk rsts;
44 struct gpio_desc rst_gpio;
Jon Lin014a3192023-04-27 10:35:33 +030045 u32 gen;
Shawn Lin9ddc0782021-01-15 18:01:22 +080046};
47
48/* Parameters for the waiting for iATU enabled routine */
49#define PCIE_CLIENT_GENERAL_DEBUG 0x104
50#define PCIE_CLIENT_HOT_RESET_CTRL 0x180
51#define PCIE_LTSSM_ENABLE_ENHANCE BIT(4)
52#define PCIE_CLIENT_LTSSM_STATUS 0x300
53#define SMLH_LINKUP BIT(16)
54#define RDLH_LINKUP BIT(17)
55#define PCIE_CLIENT_DBG_FIFO_MODE_CON 0x310
56#define PCIE_CLIENT_DBG_FIFO_PTN_HIT_D0 0x320
57#define PCIE_CLIENT_DBG_FIFO_PTN_HIT_D1 0x324
58#define PCIE_CLIENT_DBG_FIFO_TRN_HIT_D0 0x328
59#define PCIE_CLIENT_DBG_FIFO_TRN_HIT_D1 0x32c
60#define PCIE_CLIENT_DBG_FIFO_STATUS 0x350
61#define PCIE_CLIENT_DBG_TRANSITION_DATA 0xffff0000
62#define PCIE_CLIENT_DBF_EN 0xffff0003
63
Shawn Lin9ddc0782021-01-15 18:01:22 +080064static int rk_pcie_read(void __iomem *addr, int size, u32 *val)
65{
66 if ((uintptr_t)addr & (size - 1)) {
67 *val = 0;
Anand Moona122d3a2021-06-05 14:38:41 +000068 return -EOPNOTSUPP;
Shawn Lin9ddc0782021-01-15 18:01:22 +080069 }
70
71 if (size == 4) {
72 *val = readl(addr);
73 } else if (size == 2) {
74 *val = readw(addr);
75 } else if (size == 1) {
76 *val = readb(addr);
77 } else {
78 *val = 0;
79 return -ENODEV;
80 }
81
82 return 0;
83}
84
85static int rk_pcie_write(void __iomem *addr, int size, u32 val)
86{
87 if ((uintptr_t)addr & (size - 1))
Anand Moona122d3a2021-06-05 14:38:41 +000088 return -EOPNOTSUPP;
Shawn Lin9ddc0782021-01-15 18:01:22 +080089
90 if (size == 4)
91 writel(val, addr);
92 else if (size == 2)
93 writew(val, addr);
94 else if (size == 1)
95 writeb(val, addr);
96 else
97 return -ENODEV;
98
99 return 0;
100}
101
102static u32 __rk_pcie_read_apb(struct rk_pcie *rk_pcie, void __iomem *base,
103 u32 reg, size_t size)
104{
105 int ret;
106 u32 val;
107
108 ret = rk_pcie_read(base + reg, size, &val);
109 if (ret)
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100110 dev_err(rk_pcie->dw.dev, "Read APB address failed\n");
Shawn Lin9ddc0782021-01-15 18:01:22 +0800111
112 return val;
113}
114
115static void __rk_pcie_write_apb(struct rk_pcie *rk_pcie, void __iomem *base,
116 u32 reg, size_t size, u32 val)
117{
118 int ret;
119
120 ret = rk_pcie_write(base + reg, size, val);
121 if (ret)
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100122 dev_err(rk_pcie->dw.dev, "Write APB address failed\n");
Shawn Lin9ddc0782021-01-15 18:01:22 +0800123}
124
125/**
126 * rk_pcie_readl_apb() - Read vendor regs
127 *
128 * @rk_pcie: Pointer to the PCI controller state
129 * @reg: Offset of regs
130 */
131static inline u32 rk_pcie_readl_apb(struct rk_pcie *rk_pcie, u32 reg)
132{
133 return __rk_pcie_read_apb(rk_pcie, rk_pcie->apb_base, reg, 0x4);
134}
135
136/**
137 * rk_pcie_writel_apb() - Write vendor regs
138 *
139 * @rk_pcie: Pointer to the PCI controller state
140 * @reg: Offset of regs
141 * @val: Value to be writen
142 */
143static inline void rk_pcie_writel_apb(struct rk_pcie *rk_pcie, u32 reg,
144 u32 val)
145{
146 __rk_pcie_write_apb(rk_pcie, rk_pcie->apb_base, reg, 0x4, val);
147}
148
Shawn Lin9ddc0782021-01-15 18:01:22 +0800149/**
150 * rk_pcie_configure() - Configure link capabilities and speed
151 *
152 * @rk_pcie: Pointer to the PCI controller state
153 * @cap_speed: The capabilities and speed to configure
154 *
155 * Configure the link capabilities and speed in the PCIe root complex.
156 */
157static void rk_pcie_configure(struct rk_pcie *pci, u32 cap_speed)
158{
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100159 dw_pcie_dbi_write_enable(&pci->dw, true);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800160
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100161 clrsetbits_le32(pci->dw.dbi_base + PCIE_LINK_CAPABILITY,
Shawn Lin9ddc0782021-01-15 18:01:22 +0800162 TARGET_LINK_SPEED_MASK, cap_speed);
163
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100164 clrsetbits_le32(pci->dw.dbi_base + PCIE_LINK_CTL_2,
Shawn Lin9ddc0782021-01-15 18:01:22 +0800165 TARGET_LINK_SPEED_MASK, cap_speed);
166
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100167 dw_pcie_dbi_write_enable(&pci->dw, false);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800168}
169
170static void rk_pcie_enable_debug(struct rk_pcie *rk_pcie)
171{
172 rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_DBG_FIFO_PTN_HIT_D0,
173 PCIE_CLIENT_DBG_TRANSITION_DATA);
174 rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_DBG_FIFO_PTN_HIT_D1,
175 PCIE_CLIENT_DBG_TRANSITION_DATA);
176 rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_DBG_FIFO_TRN_HIT_D0,
177 PCIE_CLIENT_DBG_TRANSITION_DATA);
178 rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_DBG_FIFO_TRN_HIT_D1,
179 PCIE_CLIENT_DBG_TRANSITION_DATA);
180 rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_DBG_FIFO_MODE_CON,
181 PCIE_CLIENT_DBF_EN);
182}
183
184static void rk_pcie_debug_dump(struct rk_pcie *rk_pcie)
185{
186 u32 loop;
187
188 debug("ltssm = 0x%x\n",
189 rk_pcie_readl_apb(rk_pcie, PCIE_CLIENT_LTSSM_STATUS));
190 for (loop = 0; loop < 64; loop++)
191 debug("fifo_status = 0x%x\n",
192 rk_pcie_readl_apb(rk_pcie, PCIE_CLIENT_DBG_FIFO_STATUS));
193}
194
195static inline void rk_pcie_link_status_clear(struct rk_pcie *rk_pcie)
196{
197 rk_pcie_writel_apb(rk_pcie, PCIE_CLIENT_GENERAL_DEBUG, 0x0);
198}
199
200static inline void rk_pcie_disable_ltssm(struct rk_pcie *rk_pcie)
201{
202 rk_pcie_writel_apb(rk_pcie, 0x0, 0xc0008);
203}
204
205static inline void rk_pcie_enable_ltssm(struct rk_pcie *rk_pcie)
206{
207 rk_pcie_writel_apb(rk_pcie, 0x0, 0xc000c);
208}
209
210static int is_link_up(struct rk_pcie *priv)
211{
212 u32 val;
213
214 val = rk_pcie_readl_apb(priv, PCIE_CLIENT_LTSSM_STATUS);
215 if ((val & (RDLH_LINKUP | SMLH_LINKUP)) == 0x30000 &&
216 (val & GENMASK(5, 0)) == 0x11)
217 return 1;
218
219 return 0;
220}
221
222/**
223 * rk_pcie_link_up() - Wait for the link to come up
224 *
225 * @rk_pcie: Pointer to the PCI controller state
226 * @cap_speed: Desired link speed
227 *
228 * Return: 1 (true) for active line and negetive (false) for no link (timeout)
229 */
230static int rk_pcie_link_up(struct rk_pcie *priv, u32 cap_speed)
231{
232 int retries;
233
234 if (is_link_up(priv)) {
235 printf("PCI Link already up before configuration!\n");
236 return 1;
237 }
238
239 /* DW pre link configurations */
240 rk_pcie_configure(priv, cap_speed);
241
Shawn Lin9ddc0782021-01-15 18:01:22 +0800242 rk_pcie_disable_ltssm(priv);
243 rk_pcie_link_status_clear(priv);
244 rk_pcie_enable_debug(priv);
245
Jonas Karlman7ce186a2023-07-22 13:30:19 +0000246 /* Reset the device */
247 if (dm_gpio_is_valid(&priv->rst_gpio))
248 dm_gpio_set_value(&priv->rst_gpio, 0);
249
Shawn Lin9ddc0782021-01-15 18:01:22 +0800250 /* Enable LTSSM */
251 rk_pcie_enable_ltssm(priv);
252
Jonas Karlman7ce186a2023-07-22 13:30:19 +0000253 /*
254 * PCIe requires the refclk to be stable for 100ms prior to releasing
255 * PERST. See table 2-4 in section 2.6.2 AC Specifications of the PCI
256 * Express Card Electromechanical Specification, 1.1. However, we don't
257 * know if the refclk is coming from RC's PHY or external OSC. If it's
258 * from RC, so enabling LTSSM is the just right place to release #PERST.
259 */
260 mdelay(100);
261 if (dm_gpio_is_valid(&priv->rst_gpio))
262 dm_gpio_set_value(&priv->rst_gpio, 1);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800263
Jonas Karlman7ce186a2023-07-22 13:30:19 +0000264 /* Check if the link is up or not */
265 for (retries = 0; retries < 10; retries++) {
266 if (is_link_up(priv))
267 break;
268
269 mdelay(100);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800270 }
271
Jonas Karlman7ce186a2023-07-22 13:30:19 +0000272 if (retries >= 10) {
273 dev_err(priv->dw.dev, "PCIe-%d Link Fail\n",
274 dev_seq(priv->dw.dev));
275 return -EIO;
276 }
277
278 dev_info(priv->dw.dev, "PCIe Link up, LTSSM is 0x%x\n",
279 rk_pcie_readl_apb(priv, PCIE_CLIENT_LTSSM_STATUS));
280 rk_pcie_debug_dump(priv);
281 return 0;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800282}
283
284static int rockchip_pcie_init_port(struct udevice *dev)
285{
286 int ret;
287 u32 val;
288 struct rk_pcie *priv = dev_get_priv(dev);
289
Jonas Karlman7ce186a2023-07-22 13:30:19 +0000290 ret = reset_assert_bulk(&priv->rsts);
291 if (ret) {
292 dev_err(dev, "failed to assert resets (ret=%d)\n", ret);
293 return ret;
294 }
295
Shawn Lin9ddc0782021-01-15 18:01:22 +0800296 /* Set power and maybe external ref clk input */
Jonas Karlman8b001ee2023-07-22 13:30:18 +0000297 ret = regulator_set_enable_if_allowed(priv->vpcie3v3, true);
298 if (ret && ret != -ENOSYS) {
299 dev_err(dev, "failed to enable vpcie3v3 (ret=%d)\n", ret);
300 return ret;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800301 }
302
Shawn Lin9ddc0782021-01-15 18:01:22 +0800303 ret = generic_phy_init(&priv->phy);
304 if (ret) {
305 dev_err(dev, "failed to init phy (ret=%d)\n", ret);
Jonas Karlman8b001ee2023-07-22 13:30:18 +0000306 goto err_disable_regulator;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800307 }
308
309 ret = generic_phy_power_on(&priv->phy);
310 if (ret) {
311 dev_err(dev, "failed to power on phy (ret=%d)\n", ret);
312 goto err_exit_phy;
313 }
314
315 ret = reset_deassert_bulk(&priv->rsts);
316 if (ret) {
317 dev_err(dev, "failed to deassert resets (ret=%d)\n", ret);
318 goto err_power_off_phy;
319 }
320
321 ret = clk_enable_bulk(&priv->clks);
322 if (ret) {
323 dev_err(dev, "failed to enable clks (ret=%d)\n", ret);
324 goto err_deassert_bulk;
325 }
326
327 /* LTSSM EN ctrl mode */
328 val = rk_pcie_readl_apb(priv, PCIE_CLIENT_HOT_RESET_CTRL);
329 val |= PCIE_LTSSM_ENABLE_ENHANCE | (PCIE_LTSSM_ENABLE_ENHANCE << 16);
330 rk_pcie_writel_apb(priv, PCIE_CLIENT_HOT_RESET_CTRL, val);
331
332 /* Set RC mode */
333 rk_pcie_writel_apb(priv, 0x0, 0xf00040);
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100334 pcie_dw_setup_host(&priv->dw);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800335
Jon Lin014a3192023-04-27 10:35:33 +0300336 ret = rk_pcie_link_up(priv, priv->gen);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800337 if (ret < 0)
338 goto err_link_up;
339
340 return 0;
341err_link_up:
342 clk_disable_bulk(&priv->clks);
343err_deassert_bulk:
344 reset_assert_bulk(&priv->rsts);
345err_power_off_phy:
346 generic_phy_power_off(&priv->phy);
347err_exit_phy:
348 generic_phy_exit(&priv->phy);
Jonas Karlman8b001ee2023-07-22 13:30:18 +0000349err_disable_regulator:
350 regulator_set_enable_if_allowed(priv->vpcie3v3, false);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800351
352 return ret;
353}
354
355static int rockchip_pcie_parse_dt(struct udevice *dev)
356{
357 struct rk_pcie *priv = dev_get_priv(dev);
358 int ret;
359
Johan Jonkere5822ec2023-03-13 01:31:49 +0100360 priv->dw.dbi_base = dev_read_addr_index_ptr(dev, 0);
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100361 if (!priv->dw.dbi_base)
Johan Jonkere5822ec2023-03-13 01:31:49 +0100362 return -EINVAL;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800363
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100364 dev_dbg(dev, "DBI address is 0x%p\n", priv->dw.dbi_base);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800365
Johan Jonkere5822ec2023-03-13 01:31:49 +0100366 priv->apb_base = dev_read_addr_index_ptr(dev, 1);
Shawn Lin9ddc0782021-01-15 18:01:22 +0800367 if (!priv->apb_base)
Johan Jonkere5822ec2023-03-13 01:31:49 +0100368 return -EINVAL;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800369
370 dev_dbg(dev, "APB address is 0x%p\n", priv->apb_base);
371
Jonas Karlmanbed7b2f2023-07-22 13:30:16 +0000372 priv->dw.cfg_base = dev_read_addr_size_index_ptr(dev, 2,
373 &priv->dw.cfg_size);
374 if (!priv->dw.cfg_base)
375 return -EINVAL;
376
377 dev_dbg(dev, "CFG address is 0x%p\n", priv->dw.cfg_base);
378
Shawn Lin9ddc0782021-01-15 18:01:22 +0800379 ret = gpio_request_by_name(dev, "reset-gpios", 0,
380 &priv->rst_gpio, GPIOD_IS_OUT);
381 if (ret) {
382 dev_err(dev, "failed to find reset-gpios property\n");
383 return ret;
384 }
385
386 ret = reset_get_bulk(dev, &priv->rsts);
387 if (ret) {
388 dev_err(dev, "Can't get reset: %d\n", ret);
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300389 goto rockchip_pcie_parse_dt_err_reset_get_bulk;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800390 }
391
392 ret = clk_get_bulk(dev, &priv->clks);
393 if (ret) {
394 dev_err(dev, "Can't get clock: %d\n", ret);
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300395 goto rockchip_pcie_parse_dt_err_clk_get_bulk;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800396 }
397
398 ret = device_get_supply_regulator(dev, "vpcie3v3-supply",
399 &priv->vpcie3v3);
400 if (ret && ret != -ENOENT) {
401 dev_err(dev, "failed to get vpcie3v3 supply (ret=%d)\n", ret);
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300402 goto rockchip_pcie_parse_dt_err_supply_regulator;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800403 }
404
405 ret = generic_phy_get_by_index(dev, 0, &priv->phy);
406 if (ret) {
407 dev_err(dev, "failed to get pcie phy (ret=%d)\n", ret);
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300408 goto rockchip_pcie_parse_dt_err_phy_get_by_index;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800409 }
410
Jon Lin014a3192023-04-27 10:35:33 +0300411 priv->gen = dev_read_u32_default(dev, "max-link-speed",
412 LINK_SPEED_GEN_3);
413
Shawn Lin9ddc0782021-01-15 18:01:22 +0800414 return 0;
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300415
416rockchip_pcie_parse_dt_err_phy_get_by_index:
417 /* regulators don't need release */
418rockchip_pcie_parse_dt_err_supply_regulator:
419 clk_release_bulk(&priv->clks);
420rockchip_pcie_parse_dt_err_clk_get_bulk:
421 reset_release_bulk(&priv->rsts);
422rockchip_pcie_parse_dt_err_reset_get_bulk:
423 dm_gpio_free(dev, &priv->rst_gpio);
424 return ret;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800425}
426
427/**
428 * rockchip_pcie_probe() - Probe the PCIe bus for active link
429 *
430 * @dev: A pointer to the device being operated on
431 *
432 * Probe for an active link on the PCIe bus and configure the controller
433 * to enable this port.
434 *
435 * Return: 0 on success, else -ENODEV
436 */
437static int rockchip_pcie_probe(struct udevice *dev)
438{
439 struct rk_pcie *priv = dev_get_priv(dev);
440 struct udevice *ctlr = pci_get_controller(dev);
441 struct pci_controller *hose = dev_get_uclass_priv(ctlr);
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100442 int ret = 0;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800443
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100444 priv->dw.first_busno = dev_seq(dev);
445 priv->dw.dev = dev;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800446
447 ret = rockchip_pcie_parse_dt(dev);
448 if (ret)
449 return ret;
450
451 ret = rockchip_pcie_init_port(dev);
452 if (ret)
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300453 goto rockchip_pcie_probe_err_init_port;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800454
455 dev_info(dev, "PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n",
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100456 dev_seq(dev), pcie_dw_get_link_speed(&priv->dw),
457 pcie_dw_get_link_width(&priv->dw),
Shawn Lin9ddc0782021-01-15 18:01:22 +0800458 hose->first_busno);
459
Shawn Lin9ddc0782021-01-15 18:01:22 +0800460
Eugen Hristeve04b67a2023-04-13 17:11:03 +0300461 ret = pcie_dw_prog_outbound_atu_unroll(&priv->dw,
462 PCIE_ATU_REGION_INDEX0,
463 PCIE_ATU_TYPE_MEM,
464 priv->dw.mem.phys_start,
465 priv->dw.mem.bus_start,
466 priv->dw.mem.size);
467 if (!ret)
468 return ret;
469
470rockchip_pcie_probe_err_init_port:
471 clk_release_bulk(&priv->clks);
472 reset_release_bulk(&priv->rsts);
473 dm_gpio_free(dev, &priv->rst_gpio);
474
475 return ret;
Shawn Lin9ddc0782021-01-15 18:01:22 +0800476}
477
478static const struct dm_pci_ops rockchip_pcie_ops = {
Neil Armstrongc90f3d02021-03-25 15:49:20 +0100479 .read_config = pcie_dw_read_config,
480 .write_config = pcie_dw_write_config,
Shawn Lin9ddc0782021-01-15 18:01:22 +0800481};
482
483static const struct udevice_id rockchip_pcie_ids[] = {
484 { .compatible = "rockchip,rk3568-pcie" },
Jon Lin53744802023-04-27 10:35:32 +0300485 { .compatible = "rockchip,rk3588-pcie" },
Shawn Lin9ddc0782021-01-15 18:01:22 +0800486 { }
487};
488
489U_BOOT_DRIVER(rockchip_dw_pcie) = {
490 .name = "pcie_dw_rockchip",
491 .id = UCLASS_PCI,
492 .of_match = rockchip_pcie_ids,
493 .ops = &rockchip_pcie_ops,
494 .probe = rockchip_pcie_probe,
495 .priv_auto = sizeof(struct rk_pcie),
496};