1 // SPDX-License-Identifier: GPL-2.0
3 * PCIe host controller driver for Kirin Phone SoCs
5 * Copyright (C) 2017 HiSilicon Electronics Co., Ltd.
6 * https://www.huawei.com
11 #include <linux/clk.h>
12 #include <linux/compiler.h>
13 #include <linux/delay.h>
14 #include <linux/err.h>
15 #include <linux/gpio.h>
16 #include <linux/gpio/consumer.h>
17 #include <linux/interrupt.h>
18 #include <linux/mfd/syscon.h>
19 #include <linux/of_address.h>
20 #include <linux/of_device.h>
21 #include <linux/of_gpio.h>
22 #include <linux/of_pci.h>
23 #include <linux/phy/phy.h>
24 #include <linux/pci.h>
25 #include <linux/pci_regs.h>
26 #include <linux/platform_device.h>
27 #include <linux/regmap.h>
28 #include <linux/resource.h>
29 #include <linux/types.h>
30 #include "pcie-designware.h"
32 #define to_kirin_pcie(x) dev_get_drvdata((x)->dev)
34 /* PCIe ELBI registers */
35 #define SOC_PCIECTRL_CTRL0_ADDR 0x000
36 #define SOC_PCIECTRL_CTRL1_ADDR 0x004
37 #define PCIE_ELBI_SLV_DBI_ENABLE (0x1 << 21)
39 /* info located in APB */
40 #define PCIE_APP_LTSSM_ENABLE 0x01c
41 #define PCIE_APB_PHY_STATUS0 0x400
42 #define PCIE_LINKUP_ENABLE (0x8020)
43 #define PCIE_LTSSM_ENABLE_BIT (0x1 << 11)
45 /* info located in sysctrl */
46 #define SCTRL_PCIE_CMOS_OFFSET 0x60
47 #define SCTRL_PCIE_CMOS_BIT 0x10
48 #define SCTRL_PCIE_ISO_OFFSET 0x44
49 #define SCTRL_PCIE_ISO_BIT 0x30
50 #define SCTRL_PCIE_HPCLK_OFFSET 0x190
51 #define SCTRL_PCIE_HPCLK_BIT 0x184000
52 #define SCTRL_PCIE_OE_OFFSET 0x14a
53 #define PCIE_DEBOUNCE_PARAM 0xF0F400
54 #define PCIE_OE_BYPASS (0x3 << 28)
57 * Max number of connected PCI slots at an external PCI bridge
59 * This is used on HiKey 970, which has a PEX 8606 bridge with 4 connected
60 * lanes (lane 0 upstream, and the other three lanes, one connected to an
61 * in-board Ethernet adapter and the other two connected to M.2 and mini
64 * Each slot has a different clock source and uses a separate PERST# pin.
66 #define MAX_PCI_SLOTS 3
68 enum pcie_kirin_phy_type {
69 PCIE_KIRIN_INTERNAL_PHY,
70 PCIE_KIRIN_EXTERNAL_PHY
74 enum pcie_kirin_phy_type type;
79 void *phy_priv; /* only for PCIE_KIRIN_INTERNAL_PHY */
82 int gpio_id_dwc_perst;
86 int gpio_id_reset[MAX_PCI_SLOTS];
87 const char *reset_names[MAX_PCI_SLOTS];
91 int gpio_id_clkreq[MAX_PCI_SLOTS];
92 const char *clkreq_names[MAX_PCI_SLOTS];
96 * Kirin 960 PHY. Can't be split into a PHY driver without changing the
100 #define REF_CLK_FREQ 100000000
102 /* PHY info located in APB */
103 #define PCIE_APB_PHY_CTRL0 0x0
104 #define PCIE_APB_PHY_CTRL1 0x4
105 #define PCIE_APB_PHY_STATUS0 0x400
106 #define PIPE_CLK_STABLE BIT(19)
107 #define PHY_REF_PAD_BIT BIT(8)
108 #define PHY_PWR_DOWN_BIT BIT(22)
109 #define PHY_RST_ACK_BIT BIT(16)
112 #define CRGCTRL_PCIE_ASSERT_OFFSET 0x88
113 #define CRGCTRL_PCIE_ASSERT_BIT 0x8c000000
116 #define REF_2_PERST_MIN 21000
117 #define REF_2_PERST_MAX 25000
118 #define PERST_2_ACCESS_MIN 10000
119 #define PERST_2_ACCESS_MAX 12000
120 #define PIPE_CLK_WAIT_MIN 550
121 #define PIPE_CLK_WAIT_MAX 600
122 #define TIME_CMOS_MIN 100
123 #define TIME_CMOS_MAX 105
124 #define TIME_PHY_PD_MIN 10
125 #define TIME_PHY_PD_MAX 11
127 struct hi3660_pcie_phy {
130 struct regmap *crgctrl;
131 struct regmap *sysctrl;
132 struct clk *apb_sys_clk;
133 struct clk *apb_phy_clk;
134 struct clk *phy_ref_clk;
139 /* Registers in PCIePHY */
140 static inline void kirin_apb_phy_writel(struct hi3660_pcie_phy *hi3660_pcie_phy,
143 writel(val, hi3660_pcie_phy->base + reg);
146 static inline u32 kirin_apb_phy_readl(struct hi3660_pcie_phy *hi3660_pcie_phy,
149 return readl(hi3660_pcie_phy->base + reg);
152 static int hi3660_pcie_phy_get_clk(struct hi3660_pcie_phy *phy)
154 struct device *dev = phy->dev;
156 phy->phy_ref_clk = devm_clk_get(dev, "pcie_phy_ref");
157 if (IS_ERR(phy->phy_ref_clk))
158 return PTR_ERR(phy->phy_ref_clk);
160 phy->aux_clk = devm_clk_get(dev, "pcie_aux");
161 if (IS_ERR(phy->aux_clk))
162 return PTR_ERR(phy->aux_clk);
164 phy->apb_phy_clk = devm_clk_get(dev, "pcie_apb_phy");
165 if (IS_ERR(phy->apb_phy_clk))
166 return PTR_ERR(phy->apb_phy_clk);
168 phy->apb_sys_clk = devm_clk_get(dev, "pcie_apb_sys");
169 if (IS_ERR(phy->apb_sys_clk))
170 return PTR_ERR(phy->apb_sys_clk);
172 phy->aclk = devm_clk_get(dev, "pcie_aclk");
173 if (IS_ERR(phy->aclk))
174 return PTR_ERR(phy->aclk);
179 static int hi3660_pcie_phy_get_resource(struct hi3660_pcie_phy *phy)
181 struct device *dev = phy->dev;
182 struct platform_device *pdev;
185 pdev = container_of(dev, struct platform_device, dev);
187 phy->base = devm_platform_ioremap_resource_byname(pdev, "phy");
188 if (IS_ERR(phy->base))
189 return PTR_ERR(phy->base);
191 phy->crgctrl = syscon_regmap_lookup_by_compatible("hisilicon,hi3660-crgctrl");
192 if (IS_ERR(phy->crgctrl))
193 return PTR_ERR(phy->crgctrl);
195 phy->sysctrl = syscon_regmap_lookup_by_compatible("hisilicon,hi3660-sctrl");
196 if (IS_ERR(phy->sysctrl))
197 return PTR_ERR(phy->sysctrl);
202 static int hi3660_pcie_phy_start(struct hi3660_pcie_phy *phy)
204 struct device *dev = phy->dev;
207 reg_val = kirin_apb_phy_readl(phy, PCIE_APB_PHY_CTRL1);
208 reg_val &= ~PHY_REF_PAD_BIT;
209 kirin_apb_phy_writel(phy, reg_val, PCIE_APB_PHY_CTRL1);
211 reg_val = kirin_apb_phy_readl(phy, PCIE_APB_PHY_CTRL0);
212 reg_val &= ~PHY_PWR_DOWN_BIT;
213 kirin_apb_phy_writel(phy, reg_val, PCIE_APB_PHY_CTRL0);
214 usleep_range(TIME_PHY_PD_MIN, TIME_PHY_PD_MAX);
216 reg_val = kirin_apb_phy_readl(phy, PCIE_APB_PHY_CTRL1);
217 reg_val &= ~PHY_RST_ACK_BIT;
218 kirin_apb_phy_writel(phy, reg_val, PCIE_APB_PHY_CTRL1);
220 usleep_range(PIPE_CLK_WAIT_MIN, PIPE_CLK_WAIT_MAX);
221 reg_val = kirin_apb_phy_readl(phy, PCIE_APB_PHY_STATUS0);
222 if (reg_val & PIPE_CLK_STABLE) {
223 dev_err(dev, "PIPE clk is not stable\n");
230 static void hi3660_pcie_phy_oe_enable(struct hi3660_pcie_phy *phy)
234 regmap_read(phy->sysctrl, SCTRL_PCIE_OE_OFFSET, &val);
235 val |= PCIE_DEBOUNCE_PARAM;
236 val &= ~PCIE_OE_BYPASS;
237 regmap_write(phy->sysctrl, SCTRL_PCIE_OE_OFFSET, val);
240 static int hi3660_pcie_phy_clk_ctrl(struct hi3660_pcie_phy *phy, bool enable)
247 ret = clk_set_rate(phy->phy_ref_clk, REF_CLK_FREQ);
251 ret = clk_prepare_enable(phy->phy_ref_clk);
255 ret = clk_prepare_enable(phy->apb_sys_clk);
259 ret = clk_prepare_enable(phy->apb_phy_clk);
263 ret = clk_prepare_enable(phy->aclk);
267 ret = clk_prepare_enable(phy->aux_clk);
274 clk_disable_unprepare(phy->aux_clk);
276 clk_disable_unprepare(phy->aclk);
278 clk_disable_unprepare(phy->apb_phy_clk);
280 clk_disable_unprepare(phy->apb_sys_clk);
282 clk_disable_unprepare(phy->phy_ref_clk);
287 static int hi3660_pcie_phy_power_on(struct kirin_pcie *pcie)
289 struct hi3660_pcie_phy *phy = pcie->phy_priv;
292 /* Power supply for Host */
293 regmap_write(phy->sysctrl,
294 SCTRL_PCIE_CMOS_OFFSET, SCTRL_PCIE_CMOS_BIT);
295 usleep_range(TIME_CMOS_MIN, TIME_CMOS_MAX);
297 hi3660_pcie_phy_oe_enable(phy);
299 ret = hi3660_pcie_phy_clk_ctrl(phy, true);
303 /* ISO disable, PCIeCtrl, PHY assert and clk gate clear */
304 regmap_write(phy->sysctrl,
305 SCTRL_PCIE_ISO_OFFSET, SCTRL_PCIE_ISO_BIT);
306 regmap_write(phy->crgctrl,
307 CRGCTRL_PCIE_ASSERT_OFFSET, CRGCTRL_PCIE_ASSERT_BIT);
308 regmap_write(phy->sysctrl,
309 SCTRL_PCIE_HPCLK_OFFSET, SCTRL_PCIE_HPCLK_BIT);
311 ret = hi3660_pcie_phy_start(phy);
318 hi3660_pcie_phy_clk_ctrl(phy, false);
322 static int hi3660_pcie_phy_init(struct platform_device *pdev,
323 struct kirin_pcie *pcie)
325 struct device *dev = &pdev->dev;
326 struct hi3660_pcie_phy *phy;
329 phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
333 pcie->phy_priv = phy;
336 ret = hi3660_pcie_phy_get_clk(phy);
340 return hi3660_pcie_phy_get_resource(phy);
343 static int hi3660_pcie_phy_power_off(struct kirin_pcie *pcie)
345 struct hi3660_pcie_phy *phy = pcie->phy_priv;
347 /* Drop power supply for Host */
348 regmap_write(phy->sysctrl, SCTRL_PCIE_CMOS_OFFSET, 0x00);
350 hi3660_pcie_phy_clk_ctrl(phy, false);
356 * The non-PHY part starts here
359 static const struct regmap_config pcie_kirin_regmap_conf = {
360 .name = "kirin_pcie_apb",
366 static int kirin_pcie_get_gpio_enable(struct kirin_pcie *pcie,
367 struct platform_device *pdev)
369 struct device *dev = &pdev->dev;
373 /* This is an optional property */
374 ret = gpiod_count(dev, "hisilicon,clken");
378 if (ret > MAX_PCI_SLOTS) {
379 dev_err(dev, "Too many GPIO clock requests!\n");
383 pcie->n_gpio_clkreq = ret;
385 for (i = 0; i < pcie->n_gpio_clkreq; i++) {
386 pcie->gpio_id_clkreq[i] = of_get_named_gpio(dev->of_node,
387 "hisilicon,clken-gpios", i);
388 if (pcie->gpio_id_clkreq[i] < 0)
389 return pcie->gpio_id_clkreq[i];
391 sprintf(name, "pcie_clkreq_%d", i);
392 pcie->clkreq_names[i] = devm_kstrdup_const(dev, name,
394 if (!pcie->clkreq_names[i])
401 static int kirin_pcie_parse_port(struct kirin_pcie *pcie,
402 struct platform_device *pdev,
403 struct device_node *node)
405 struct device *dev = &pdev->dev;
406 struct device_node *parent, *child;
410 for_each_available_child_of_node(node, parent) {
411 for_each_available_child_of_node(parent, child) {
414 pcie->gpio_id_reset[i] = of_get_named_gpio(child,
416 if (pcie->gpio_id_reset[i] < 0)
420 if (pcie->num_slots > MAX_PCI_SLOTS) {
421 dev_err(dev, "Too many PCI slots!\n");
426 ret = of_pci_get_devfn(child);
428 dev_err(dev, "failed to parse devfn: %d\n", ret);
432 slot = PCI_SLOT(ret);
434 sprintf(name, "pcie_perst_%d", slot);
435 pcie->reset_names[i] = devm_kstrdup_const(dev, name,
437 if (!pcie->reset_names[i]) {
452 static long kirin_pcie_get_resource(struct kirin_pcie *kirin_pcie,
453 struct platform_device *pdev)
455 struct device *dev = &pdev->dev;
456 struct device_node *child, *node = dev->of_node;
457 void __iomem *apb_base;
460 apb_base = devm_platform_ioremap_resource_byname(pdev, "apb");
461 if (IS_ERR(apb_base))
462 return PTR_ERR(apb_base);
464 kirin_pcie->apb = devm_regmap_init_mmio(dev, apb_base,
465 &pcie_kirin_regmap_conf);
466 if (IS_ERR(kirin_pcie->apb))
467 return PTR_ERR(kirin_pcie->apb);
469 /* pcie internal PERST# gpio */
470 kirin_pcie->gpio_id_dwc_perst = of_get_named_gpio(dev->of_node,
472 if (kirin_pcie->gpio_id_dwc_perst == -EPROBE_DEFER) {
473 return -EPROBE_DEFER;
474 } else if (!gpio_is_valid(kirin_pcie->gpio_id_dwc_perst)) {
475 dev_err(dev, "unable to get a valid gpio pin\n");
479 ret = kirin_pcie_get_gpio_enable(kirin_pcie, pdev);
483 /* Parse OF children */
484 for_each_available_child_of_node(node, child) {
485 ret = kirin_pcie_parse_port(kirin_pcie, pdev, child);
497 static void kirin_pcie_sideband_dbi_w_mode(struct kirin_pcie *kirin_pcie,
502 regmap_read(kirin_pcie->apb, SOC_PCIECTRL_CTRL0_ADDR, &val);
504 val = val | PCIE_ELBI_SLV_DBI_ENABLE;
506 val = val & ~PCIE_ELBI_SLV_DBI_ENABLE;
508 regmap_write(kirin_pcie->apb, SOC_PCIECTRL_CTRL0_ADDR, val);
511 static void kirin_pcie_sideband_dbi_r_mode(struct kirin_pcie *kirin_pcie,
516 regmap_read(kirin_pcie->apb, SOC_PCIECTRL_CTRL1_ADDR, &val);
518 val = val | PCIE_ELBI_SLV_DBI_ENABLE;
520 val = val & ~PCIE_ELBI_SLV_DBI_ENABLE;
522 regmap_write(kirin_pcie->apb, SOC_PCIECTRL_CTRL1_ADDR, val);
525 static int kirin_pcie_rd_own_conf(struct pci_bus *bus, unsigned int devfn,
526 int where, int size, u32 *val)
528 struct dw_pcie *pci = to_dw_pcie_from_pp(bus->sysdata);
531 return PCIBIOS_DEVICE_NOT_FOUND;
533 *val = dw_pcie_read_dbi(pci, where, size);
534 return PCIBIOS_SUCCESSFUL;
537 static int kirin_pcie_wr_own_conf(struct pci_bus *bus, unsigned int devfn,
538 int where, int size, u32 val)
540 struct dw_pcie *pci = to_dw_pcie_from_pp(bus->sysdata);
543 return PCIBIOS_DEVICE_NOT_FOUND;
545 dw_pcie_write_dbi(pci, where, size, val);
546 return PCIBIOS_SUCCESSFUL;
549 static int kirin_pcie_add_bus(struct pci_bus *bus)
551 struct dw_pcie *pci = to_dw_pcie_from_pp(bus->sysdata);
552 struct kirin_pcie *kirin_pcie = to_kirin_pcie(pci);
555 if (!kirin_pcie->num_slots)
558 /* Send PERST# to each slot */
559 for (i = 0; i < kirin_pcie->num_slots; i++) {
560 ret = gpio_direction_output(kirin_pcie->gpio_id_reset[i], 1);
562 dev_err(pci->dev, "PERST# %s error: %d\n",
563 kirin_pcie->reset_names[i], ret);
566 usleep_range(PERST_2_ACCESS_MIN, PERST_2_ACCESS_MAX);
571 static struct pci_ops kirin_pci_ops = {
572 .read = kirin_pcie_rd_own_conf,
573 .write = kirin_pcie_wr_own_conf,
574 .add_bus = kirin_pcie_add_bus,
577 static u32 kirin_pcie_read_dbi(struct dw_pcie *pci, void __iomem *base,
578 u32 reg, size_t size)
580 struct kirin_pcie *kirin_pcie = to_kirin_pcie(pci);
583 kirin_pcie_sideband_dbi_r_mode(kirin_pcie, true);
584 dw_pcie_read(base + reg, size, &ret);
585 kirin_pcie_sideband_dbi_r_mode(kirin_pcie, false);
590 static void kirin_pcie_write_dbi(struct dw_pcie *pci, void __iomem *base,
591 u32 reg, size_t size, u32 val)
593 struct kirin_pcie *kirin_pcie = to_kirin_pcie(pci);
595 kirin_pcie_sideband_dbi_w_mode(kirin_pcie, true);
596 dw_pcie_write(base + reg, size, val);
597 kirin_pcie_sideband_dbi_w_mode(kirin_pcie, false);
600 static int kirin_pcie_link_up(struct dw_pcie *pci)
602 struct kirin_pcie *kirin_pcie = to_kirin_pcie(pci);
605 regmap_read(kirin_pcie->apb, PCIE_APB_PHY_STATUS0, &val);
606 if ((val & PCIE_LINKUP_ENABLE) == PCIE_LINKUP_ENABLE)
612 static int kirin_pcie_start_link(struct dw_pcie *pci)
614 struct kirin_pcie *kirin_pcie = to_kirin_pcie(pci);
616 /* assert LTSSM enable */
617 regmap_write(kirin_pcie->apb, PCIE_APP_LTSSM_ENABLE,
618 PCIE_LTSSM_ENABLE_BIT);
623 static int kirin_pcie_host_init(struct dw_pcie_rp *pp)
625 pp->bridge->ops = &kirin_pci_ops;
630 static int kirin_pcie_gpio_request(struct kirin_pcie *kirin_pcie,
635 for (i = 0; i < kirin_pcie->num_slots; i++) {
636 if (!gpio_is_valid(kirin_pcie->gpio_id_reset[i])) {
637 dev_err(dev, "unable to get a valid %s gpio\n",
638 kirin_pcie->reset_names[i]);
642 ret = devm_gpio_request(dev, kirin_pcie->gpio_id_reset[i],
643 kirin_pcie->reset_names[i]);
648 for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++) {
649 if (!gpio_is_valid(kirin_pcie->gpio_id_clkreq[i])) {
650 dev_err(dev, "unable to get a valid %s gpio\n",
651 kirin_pcie->clkreq_names[i]);
655 ret = devm_gpio_request(dev, kirin_pcie->gpio_id_clkreq[i],
656 kirin_pcie->clkreq_names[i]);
660 ret = gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 0);
668 static const struct dw_pcie_ops kirin_dw_pcie_ops = {
669 .read_dbi = kirin_pcie_read_dbi,
670 .write_dbi = kirin_pcie_write_dbi,
671 .link_up = kirin_pcie_link_up,
672 .start_link = kirin_pcie_start_link,
675 static const struct dw_pcie_host_ops kirin_pcie_host_ops = {
676 .host_init = kirin_pcie_host_init,
679 static int kirin_pcie_power_off(struct kirin_pcie *kirin_pcie)
683 if (kirin_pcie->type == PCIE_KIRIN_INTERNAL_PHY)
684 return hi3660_pcie_phy_power_off(kirin_pcie);
686 for (i = 0; i < kirin_pcie->n_gpio_clkreq; i++)
687 gpio_direction_output(kirin_pcie->gpio_id_clkreq[i], 1);
689 phy_power_off(kirin_pcie->phy);
690 phy_exit(kirin_pcie->phy);
695 static int kirin_pcie_power_on(struct platform_device *pdev,
696 struct kirin_pcie *kirin_pcie)
698 struct device *dev = &pdev->dev;
701 if (kirin_pcie->type == PCIE_KIRIN_INTERNAL_PHY) {
702 ret = hi3660_pcie_phy_init(pdev, kirin_pcie);
706 ret = hi3660_pcie_phy_power_on(kirin_pcie);
710 kirin_pcie->phy = devm_of_phy_get(dev, dev->of_node, NULL);
711 if (IS_ERR(kirin_pcie->phy))
712 return PTR_ERR(kirin_pcie->phy);
714 ret = kirin_pcie_gpio_request(kirin_pcie, dev);
718 ret = phy_init(kirin_pcie->phy);
722 ret = phy_power_on(kirin_pcie->phy);
727 /* perst assert Endpoint */
728 usleep_range(REF_2_PERST_MIN, REF_2_PERST_MAX);
730 if (!gpio_request(kirin_pcie->gpio_id_dwc_perst, "pcie_perst_bridge")) {
731 ret = gpio_direction_output(kirin_pcie->gpio_id_dwc_perst, 1);
736 usleep_range(PERST_2_ACCESS_MIN, PERST_2_ACCESS_MAX);
740 kirin_pcie_power_off(kirin_pcie);
745 static int __exit kirin_pcie_remove(struct platform_device *pdev)
747 struct kirin_pcie *kirin_pcie = platform_get_drvdata(pdev);
749 dw_pcie_host_deinit(&kirin_pcie->pci->pp);
751 kirin_pcie_power_off(kirin_pcie);
756 struct kirin_pcie_data {
757 enum pcie_kirin_phy_type phy_type;
760 static const struct kirin_pcie_data kirin_960_data = {
761 .phy_type = PCIE_KIRIN_INTERNAL_PHY,
764 static const struct kirin_pcie_data kirin_970_data = {
765 .phy_type = PCIE_KIRIN_EXTERNAL_PHY,
768 static const struct of_device_id kirin_pcie_match[] = {
769 { .compatible = "hisilicon,kirin960-pcie", .data = &kirin_960_data },
770 { .compatible = "hisilicon,kirin970-pcie", .data = &kirin_970_data },
774 static int kirin_pcie_probe(struct platform_device *pdev)
776 struct device *dev = &pdev->dev;
777 const struct kirin_pcie_data *data;
778 struct kirin_pcie *kirin_pcie;
783 dev_err(dev, "NULL node\n");
787 data = of_device_get_match_data(dev);
789 dev_err(dev, "OF data missing\n");
793 kirin_pcie = devm_kzalloc(dev, sizeof(struct kirin_pcie), GFP_KERNEL);
797 pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
802 pci->ops = &kirin_dw_pcie_ops;
803 pci->pp.ops = &kirin_pcie_host_ops;
804 kirin_pcie->pci = pci;
805 kirin_pcie->type = data->phy_type;
807 ret = kirin_pcie_get_resource(kirin_pcie, pdev);
811 platform_set_drvdata(pdev, kirin_pcie);
813 ret = kirin_pcie_power_on(pdev, kirin_pcie);
817 return dw_pcie_host_init(&pci->pp);
820 static struct platform_driver kirin_pcie_driver = {
821 .probe = kirin_pcie_probe,
822 .remove = __exit_p(kirin_pcie_remove),
824 .name = "kirin-pcie",
825 .of_match_table = kirin_pcie_match,
826 .suppress_bind_attrs = true,
829 module_platform_driver(kirin_pcie_driver);
831 MODULE_DEVICE_TABLE(of, kirin_pcie_match);
832 MODULE_DESCRIPTION("PCIe host controller driver for Kirin Phone SoCs");
834 MODULE_LICENSE("GPL v2");