• Home
  • Raw
  • Download

Lines Matching +full:omap +full:- +full:mailbox

2  * omap-control-phy.c - The PHY part of control module.
4 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com
30 * omap_control_pcie_pcs - set the PCS delay count
50 if (control_phy->type != OMAP_CTRL_TYPE_PCIE) { in omap_control_pcie_pcs()
55 val = readl(control_phy->pcie_pcs); in omap_control_pcie_pcs()
59 writel(val, control_phy->pcie_pcs); in omap_control_pcie_pcs()
64 * omap_control_phy_power - power on/off the phy using control module reg
85 if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) in omap_control_phy_power()
88 val = readl(control_phy->power); in omap_control_phy_power()
90 switch (control_phy->type) { in omap_control_phy_power()
100 rate = clk_get_rate(control_phy->sys_clk); in omap_control_phy_power()
139 __func__, control_phy->type); in omap_control_phy_power()
143 writel(val, control_phy->power); in omap_control_phy_power()
148 * omap_control_usb_host_mode - set AVALID, VBUSVALID and ID pin in grounded
151 * Writes to the mailbox register to notify the usb core that a usb
158 val = readl(ctrl_phy->otghs_control); in omap_control_usb_host_mode()
161 writel(val, ctrl_phy->otghs_control); in omap_control_usb_host_mode()
165 * omap_control_usb_device_mode - set AVALID, VBUSVALID and ID pin in high
169 * Writes to the mailbox register to notify the usb core that it has been
176 val = readl(ctrl_phy->otghs_control); in omap_control_usb_device_mode()
180 writel(val, ctrl_phy->otghs_control); in omap_control_usb_device_mode()
184 * omap_control_usb_set_sessionend - Enable SESSIONEND and IDIG to high
188 * Writes to the mailbox register to notify the usb core it's now in
195 val = readl(ctrl_phy->otghs_control); in omap_control_usb_set_sessionend()
198 writel(val, ctrl_phy->otghs_control); in omap_control_usb_set_sessionend()
202 * omap_control_usb_set_mode - Calls to functions to set USB in one of host mode
207 * This is an API to write to the mailbox register to notify the usb core that
224 if (ctrl_phy->type != OMAP_CTRL_TYPE_OTGHS) in omap_control_usb_set_mode()
238 dev_vdbg(dev, "invalid omap control usb mode\n"); in omap_control_usb_set_mode()
252 .compatible = "ti,control-phy-otghs",
256 .compatible = "ti,control-phy-usb2",
260 .compatible = "ti,control-phy-pipe3",
264 .compatible = "ti,control-phy-pcie",
268 .compatible = "ti,control-phy-usb2-dra7",
272 .compatible = "ti,control-phy-usb2-am437",
285 of_id = of_match_device(omap_control_phy_id_table, &pdev->dev); in omap_control_phy_probe()
287 return -EINVAL; in omap_control_phy_probe()
289 control_phy = devm_kzalloc(&pdev->dev, sizeof(*control_phy), in omap_control_phy_probe()
292 return -ENOMEM; in omap_control_phy_probe()
294 control_phy->dev = &pdev->dev; in omap_control_phy_probe()
295 control_phy->type = *(enum omap_control_phy_type *)of_id->data; in omap_control_phy_probe()
297 if (control_phy->type == OMAP_CTRL_TYPE_OTGHS) { in omap_control_phy_probe()
300 control_phy->otghs_control = devm_ioremap_resource( in omap_control_phy_probe()
301 &pdev->dev, res); in omap_control_phy_probe()
302 if (IS_ERR(control_phy->otghs_control)) in omap_control_phy_probe()
303 return PTR_ERR(control_phy->otghs_control); in omap_control_phy_probe()
307 control_phy->power = devm_ioremap_resource(&pdev->dev, res); in omap_control_phy_probe()
308 if (IS_ERR(control_phy->power)) { in omap_control_phy_probe()
309 dev_err(&pdev->dev, "Couldn't get power register\n"); in omap_control_phy_probe()
310 return PTR_ERR(control_phy->power); in omap_control_phy_probe()
314 if (control_phy->type == OMAP_CTRL_TYPE_PIPE3 || in omap_control_phy_probe()
315 control_phy->type == OMAP_CTRL_TYPE_PCIE) { in omap_control_phy_probe()
316 control_phy->sys_clk = devm_clk_get(control_phy->dev, in omap_control_phy_probe()
318 if (IS_ERR(control_phy->sys_clk)) { in omap_control_phy_probe()
320 return -EINVAL; in omap_control_phy_probe()
324 if (control_phy->type == OMAP_CTRL_TYPE_PCIE) { in omap_control_phy_probe()
327 control_phy->pcie_pcs = devm_ioremap_resource(&pdev->dev, res); in omap_control_phy_probe()
328 if (IS_ERR(control_phy->pcie_pcs)) in omap_control_phy_probe()
329 return PTR_ERR(control_phy->pcie_pcs); in omap_control_phy_probe()
332 dev_set_drvdata(control_phy->dev, control_phy); in omap_control_phy_probe()
340 .name = "omap-control-phy",
359 MODULE_DESCRIPTION("OMAP Control Module PHY Driver");