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>
79 return readl(data->usbss + offset); in cdns_ti_readl()
84 writel(value, data->usbss + offset); in cdns_ti_writel()
89 struct device *dev = &pdev->dev; in cdns_ti_probe()
90 struct device_node *node = pdev->dev.of_node; in cdns_ti_probe()
99 return -ENOMEM; in cdns_ti_probe()
103 data->dev = dev; in cdns_ti_probe()
105 data->usbss = devm_platform_ioremap_resource(pdev, 0); in cdns_ti_probe()
106 if (IS_ERR(data->usbss)) { in cdns_ti_probe()
108 return PTR_ERR(data->usbss); in cdns_ti_probe()
111 data->usb2_refclk = devm_clk_get(dev, "ref"); in cdns_ti_probe()
112 if (IS_ERR(data->usb2_refclk)) { in cdns_ti_probe()
114 return PTR_ERR(data->usb2_refclk); in cdns_ti_probe()
117 data->lpm_clk = devm_clk_get(dev, "lpm"); in cdns_ti_probe()
118 if (IS_ERR(data->lpm_clk)) { in cdns_ti_probe()
120 return PTR_ERR(data->lpm_clk); in cdns_ti_probe()
123 rate = clk_get_rate(data->usb2_refclk); in cdns_ti_probe()
132 return -EINVAL; in cdns_ti_probe()
155 data->vbus_divider = device_property_read_bool(dev, "ti,vbus-divider"); in cdns_ti_probe()
156 if (data->vbus_divider) in cdns_ti_probe()
164 data->usb2_only = device_property_read_bool(dev, "ti,usb2-only"); in cdns_ti_probe()
165 if (data->usb2_only) in cdns_ti_probe()
174 /* de-assert RESET */ in cdns_ti_probe()
187 pm_runtime_put_sync(data->dev); in cdns_ti_probe()
188 pm_runtime_disable(data->dev); in cdns_ti_probe()
204 struct device *dev = &pdev->dev; in cdns_ti_remove()
216 { .compatible = "ti,j721e-usb", },
225 .name = "cdns3-ti",
232 MODULE_ALIAS("platform:cdns3-ti");