Lines Matching +full:pcie +full:- +full:phy1
1 // SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/reset-controller.h>
22 #define UNIPHIER_RESET_ID_END ((unsigned int)(-1))
58 UNIPHIER_RESETX(30, 0x2000, 19), /* SATA-PHY */
66 UNIPHIER_RESETX(12, 0x2000, 6), /* GIO (PCIe, USB3) */
69 UNIPHIER_RESETX(24, 0x2008, 2), /* PCIe */
80 UNIPHIER_RESETX(16, 0x2014, 4), /* USB30-PHY0 */
81 UNIPHIER_RESETX(17, 0x2014, 0), /* USB30-PHY1 */
82 UNIPHIER_RESETX(18, 0x2014, 2), /* USB30-PHY2 */
83 UNIPHIER_RESETX(20, 0x2014, 5), /* USB31-PHY0 */
84 UNIPHIER_RESETX(21, 0x2014, 1), /* USB31-PHY1 */
86 UNIPHIER_RESET(30, 0x2014, 8), /* SATA-PHY (active high) */
110 UNIPHIER_RESETX(16, 0x200c, 12), /* USB30-PHY0 */
111 UNIPHIER_RESETX(17, 0x200c, 13), /* USB30-PHY1 */
112 UNIPHIER_RESETX(18, 0x200c, 14), /* USB30-PHY2 */
113 UNIPHIER_RESETX(19, 0x200c, 15), /* USB30-PHY3 */
114 UNIPHIER_RESETX(24, 0x200c, 4), /* PCIe */
129 UNIPHIER_RESETX(16, 0x200c, 16), /* USB30-PHY0 */
130 UNIPHIER_RESETX(17, 0x200c, 18), /* USB30-PHY1 */
131 UNIPHIER_RESETX(18, 0x200c, 20), /* USB30-PHY2 */
132 UNIPHIER_RESETX(20, 0x200c, 17), /* USB31-PHY0 */
133 UNIPHIER_RESETX(21, 0x200c, 19), /* USB31-PHY1 */
134 UNIPHIER_RESETX(24, 0x200c, 3), /* PCIe */
137 UNIPHIER_RESETX(30, 0x200c, 21), /* SATA-PHY */
147 UNIPHIER_RESETX(16, 0x200c, 24), /* USB30-PHY0 */
148 UNIPHIER_RESETX(17, 0x200c, 25), /* USB30-PHY1 */
149 UNIPHIER_RESETX(18, 0x200c, 26), /* USB30-PHY2 */
150 UNIPHIER_RESETX(24, 0x200c, 8), /* PCIe */
152 UNIPHIER_RESETX(58, 0x2010, 8), /* HDMI-Tx */
273 for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) { in uniphier_reset_update()
276 if (p->id != id) in uniphier_reset_update()
279 mask = BIT(p->bit); in uniphier_reset_update()
286 if (p->flags & UNIPHIER_RESET_ACTIVE_LOW) in uniphier_reset_update()
289 return regmap_write_bits(priv->regmap, p->reg, mask, val); in uniphier_reset_update()
292 dev_err(priv->dev, "reset_id=%lu was not handled\n", id); in uniphier_reset_update()
293 return -EINVAL; in uniphier_reset_update()
314 for (p = priv->data; p->id != UNIPHIER_RESET_ID_END; p++) { in uniphier_reset_status()
318 if (p->id != id) in uniphier_reset_status()
321 ret = regmap_read(priv->regmap, p->reg, &val); in uniphier_reset_status()
325 asserted = !!(val & BIT(p->bit)); in uniphier_reset_status()
327 if (p->flags & UNIPHIER_RESET_ACTIVE_LOW) in uniphier_reset_status()
333 dev_err(priv->dev, "reset_id=%lu was not found\n", id); in uniphier_reset_status()
334 return -EINVAL; in uniphier_reset_status()
345 struct device *dev = &pdev->dev; in uniphier_reset_probe()
354 return -EINVAL; in uniphier_reset_probe()
356 parent = of_get_parent(dev->of_node); /* parent should be syscon node */ in uniphier_reset_probe()
367 return -ENOMEM; in uniphier_reset_probe()
369 for (p = data; p->id != UNIPHIER_RESET_ID_END; p++) in uniphier_reset_probe()
370 nr_resets = max(nr_resets, p->id + 1); in uniphier_reset_probe()
372 priv->rcdev.ops = &uniphier_reset_ops; in uniphier_reset_probe()
373 priv->rcdev.owner = dev->driver->owner; in uniphier_reset_probe()
374 priv->rcdev.of_node = dev->of_node; in uniphier_reset_probe()
375 priv->rcdev.nr_resets = nr_resets; in uniphier_reset_probe()
376 priv->dev = dev; in uniphier_reset_probe()
377 priv->regmap = regmap; in uniphier_reset_probe()
378 priv->data = data; in uniphier_reset_probe()
380 return devm_reset_controller_register(&pdev->dev, &priv->rcdev); in uniphier_reset_probe()
386 .compatible = "socionext,uniphier-ld4-reset",
390 .compatible = "socionext,uniphier-pro4-reset",
394 .compatible = "socionext,uniphier-sld8-reset",
398 .compatible = "socionext,uniphier-pro5-reset",
402 .compatible = "socionext,uniphier-pxs2-reset",
406 .compatible = "socionext,uniphier-ld11-reset",
410 .compatible = "socionext,uniphier-ld20-reset",
414 .compatible = "socionext,uniphier-pxs3-reset",
418 .compatible = "socionext,uniphier-nx1-reset",
423 .compatible = "socionext,uniphier-ld4-mio-reset",
427 .compatible = "socionext,uniphier-pro4-mio-reset",
431 .compatible = "socionext,uniphier-sld8-mio-reset",
435 .compatible = "socionext,uniphier-pro5-sd-reset",
439 .compatible = "socionext,uniphier-pxs2-sd-reset",
443 .compatible = "socionext,uniphier-ld11-mio-reset",
447 .compatible = "socionext,uniphier-ld11-sd-reset",
451 .compatible = "socionext,uniphier-ld20-sd-reset",
455 .compatible = "socionext,uniphier-pxs3-sd-reset",
459 .compatible = "socionext,uniphier-nx1-sd-reset",
464 .compatible = "socionext,uniphier-ld4-peri-reset",
468 .compatible = "socionext,uniphier-pro4-peri-reset",
472 .compatible = "socionext,uniphier-sld8-peri-reset",
476 .compatible = "socionext,uniphier-pro5-peri-reset",
480 .compatible = "socionext,uniphier-pxs2-peri-reset",
484 .compatible = "socionext,uniphier-ld11-peri-reset",
488 .compatible = "socionext,uniphier-ld20-peri-reset",
492 .compatible = "socionext,uniphier-pxs3-peri-reset",
496 .compatible = "socionext,uniphier-nx1-peri-reset",
501 .compatible = "socionext,uniphier-ld11-adamv-reset",
505 .compatible = "socionext,uniphier-ld20-adamv-reset",
515 .name = "uniphier-reset",