// SPDX-License-Identifier: GPL-2.0+ /* * USB cluster support for Armada 375 platform. * * Copyright (C) 2014 Marvell * * Gregory CLEMENT <[email protected]> * * Armada 375 comes with an USB2 host and device controller and an * USB3 controller. The USB cluster control register allows to manage * common features of both USB controllers. */ #include <dt-bindings/phy/phy.h> #include <linux/init.h> #include <linux/io.h> #include <linux/kernel.h> #include <linux/of_address.h> #include <linux/phy/phy.h> #include <linux/platform_device.h> #define USB2_PHY_CONFIG_DISABLE … struct armada375_cluster_phy { … }; static int armada375_usb_phy_init(struct phy *phy) { … } static const struct phy_ops armada375_usb_phy_ops = …; /* * Only one controller can use this PHY. We shouldn't have the case * when two controllers want to use this PHY. But if this case occurs * then we provide a phy to the first one and return an error for the * next one. This error has also to be an error returned by * devm_phy_optional_get() so different from ENODEV for USB2. In the * USB3 case it still optional and we use ENODEV. */ static struct phy *armada375_usb_phy_xlate(struct device *dev, const struct of_phandle_args *args) { … } static int armada375_usb_phy_probe(struct platform_device *pdev) { … } static const struct of_device_id of_usb_cluster_table[] = …; static struct platform_driver armada375_usb_phy_driver = …; builtin_platform_driver(…) …;