Lines Matching +full:j721e +full:- +full:usb
1 // SPDX-License-Identifier: GPL-2.0
3 * cdns3-ti.c - TI specific Glue layer for Cadence USB Controller
5 * Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com
14 #include <linux/dma-mapping.h>
20 /* USB Wrapper register offsets */
80 return readl(data->usbss + offset); in cdns_ti_readl()
85 writel(value, data->usbss + offset); in cdns_ti_writel()
90 struct device *dev = &pdev->dev; in cdns_ti_probe()
91 struct device_node *node = pdev->dev.of_node; in cdns_ti_probe()
100 return -ENOMEM; in cdns_ti_probe()
104 data->dev = dev; in cdns_ti_probe()
106 data->usbss = devm_platform_ioremap_resource(pdev, 0); in cdns_ti_probe()
107 if (IS_ERR(data->usbss)) { in cdns_ti_probe()
109 return PTR_ERR(data->usbss); in cdns_ti_probe()
112 data->usb2_refclk = devm_clk_get(dev, "ref"); in cdns_ti_probe()
113 if (IS_ERR(data->usb2_refclk)) { in cdns_ti_probe()
115 return PTR_ERR(data->usb2_refclk); in cdns_ti_probe()
118 data->lpm_clk = devm_clk_get(dev, "lpm"); in cdns_ti_probe()
119 if (IS_ERR(data->lpm_clk)) { in cdns_ti_probe()
121 return PTR_ERR(data->lpm_clk); in cdns_ti_probe()
124 rate = clk_get_rate(data->usb2_refclk); in cdns_ti_probe()
133 return -EINVAL; in cdns_ti_probe()
156 data->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider"); in cdns_ti_probe()
157 if (data->vbus_divider) in cdns_ti_probe()
165 data->usb2_only = device_property_read_bool(dev, "ti,usb2-only"); in cdns_ti_probe()
166 if (data->usb2_only) in cdns_ti_probe()
175 /* de-assert RESET */ in cdns_ti_probe()
188 pm_runtime_put_sync(data->dev); in cdns_ti_probe()
189 pm_runtime_disable(data->dev); in cdns_ti_probe()
205 struct device *dev = &pdev->dev; in cdns_ti_remove()
215 { .compatible = "ti,j721e-usb", },
216 { .compatible = "ti,am64-usb", },
225 .name = "cdns3-ti",
232 MODULE_ALIAS("platform:cdns3-ti");