Lines Matching +full:cluster +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0+
3 * USB cluster support for Armada 375 platform.
7 * Gregory CLEMENT <gregory.clement@free-electrons.com>
10 * USB3 controller. The USB cluster control register allows to manage
14 #include <dt-bindings/phy/phy.h>
38 return -ENODEV; in armada375_usb_phy_init()
40 reg = readl(cluster_phy->reg); in armada375_usb_phy_init()
41 if (cluster_phy->use_usb3) in armada375_usb_phy_init()
45 writel(reg, cluster_phy->reg); in armada375_usb_phy_init()
69 return ERR_PTR(-ENODEV); in armada375_usb_phy_xlate()
77 if (WARN_ON((cluster_phy->phy_provided != PHY_NONE) && in armada375_usb_phy_xlate()
78 (cluster_phy->phy_provided != args->args[0]))) { in armada375_usb_phy_xlate()
81 if (args->args[0] == PHY_TYPE_USB2) in armada375_usb_phy_xlate()
82 return ERR_PTR(-EBUSY); in armada375_usb_phy_xlate()
84 return ERR_PTR(-ENODEV); in armada375_usb_phy_xlate()
87 if (args->args[0] == PHY_TYPE_USB2) in armada375_usb_phy_xlate()
88 cluster_phy->use_usb3 = false; in armada375_usb_phy_xlate()
89 else if (args->args[0] == PHY_TYPE_USB3) in armada375_usb_phy_xlate()
90 cluster_phy->use_usb3 = true; in armada375_usb_phy_xlate()
92 dev_err(dev, "Invalid PHY mode\n"); in armada375_usb_phy_xlate()
93 return ERR_PTR(-ENODEV); in armada375_usb_phy_xlate()
96 /* Store which phy mode is used for next test */ in armada375_usb_phy_xlate()
97 cluster_phy->phy_provided = args->args[0]; in armada375_usb_phy_xlate()
99 return cluster_phy->phy; in armada375_usb_phy_xlate()
104 struct device *dev = &pdev->dev; in armada375_usb_phy_probe()
112 return -ENOMEM; in armada375_usb_phy_probe()
124 cluster_phy->phy = phy; in armada375_usb_phy_probe()
125 cluster_phy->reg = usb_cluster_base; in armada375_usb_phy_probe()
130 phy_provider = devm_of_phy_provider_register(&pdev->dev, in armada375_usb_phy_probe()
136 { .compatible = "marvell,armada-375-usb-cluster", },
144 .name = "armada-375-usb-cluster",