Lines Matching +full:vbus +full:- +full:divider

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>
81 return readl(data->usbss + offset); in cdns_ti_readl()
86 writel(value, data->usbss + offset); in cdns_ti_writel()
103 struct device *dev = &pdev->dev; in cdns_ti_probe()
104 struct device_node *node = pdev->dev.of_node; in cdns_ti_probe()
113 return -ENOMEM; in cdns_ti_probe()
117 data->dev = dev; in cdns_ti_probe()
119 data->usbss = devm_platform_ioremap_resource(pdev, 0); in cdns_ti_probe()
120 if (IS_ERR(data->usbss)) { in cdns_ti_probe()
122 return PTR_ERR(data->usbss); in cdns_ti_probe()
125 data->usb2_refclk = devm_clk_get(dev, "ref"); in cdns_ti_probe()
126 if (IS_ERR(data->usb2_refclk)) { in cdns_ti_probe()
128 return PTR_ERR(data->usb2_refclk); in cdns_ti_probe()
131 data->lpm_clk = devm_clk_get(dev, "lpm"); in cdns_ti_probe()
132 if (IS_ERR(data->lpm_clk)) { in cdns_ti_probe()
134 return PTR_ERR(data->lpm_clk); in cdns_ti_probe()
137 rate = clk_get_rate(data->usb2_refclk); in cdns_ti_probe()
146 return -EINVAL; in cdns_ti_probe()
169 data->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider"); in cdns_ti_probe()
170 if (data->vbus_divider) in cdns_ti_probe()
178 data->usb2_only = device_property_read_bool(dev, "ti,usb2-only"); in cdns_ti_probe()
179 if (data->usb2_only) in cdns_ti_probe()
188 /* de-assert RESET */ in cdns_ti_probe()
201 pm_runtime_put_sync(data->dev); in cdns_ti_probe()
202 pm_runtime_disable(data->dev); in cdns_ti_probe()
218 struct device *dev = &pdev->dev; in cdns_ti_remove()
228 { .compatible = "ti,j721e-usb", },
229 { .compatible = "ti,am64-usb", },
238 .name = "cdns3-ti",
245 MODULE_ALIAS("platform:cdns3-ti");