Lines Matching +full:hsic +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0-only
10 #include <linux/pinctrl/pinctrl-state.h>
29 struct ulpi *ulpi = uphy->ulpi; in qcom_usb_hsic_phy_power_on()
33 ret = clk_prepare_enable(uphy->phy_clk); in qcom_usb_hsic_phy_power_on()
37 ret = clk_prepare_enable(uphy->cal_clk); in qcom_usb_hsic_phy_power_on()
41 ret = clk_prepare_enable(uphy->cal_sleep_clk); in qcom_usb_hsic_phy_power_on()
55 /* Configure pins for HSIC functionality */ in qcom_usb_hsic_phy_power_on()
56 pins_default = pinctrl_lookup_state(uphy->pctl, PINCTRL_STATE_DEFAULT); in qcom_usb_hsic_phy_power_on()
62 ret = pinctrl_select_state(uphy->pctl, pins_default); in qcom_usb_hsic_phy_power_on()
66 /* Enable HSIC mode in HSIC_CFG register */ in qcom_usb_hsic_phy_power_on()
71 /* Disable auto-resume */ in qcom_usb_hsic_phy_power_on()
79 clk_disable_unprepare(uphy->cal_sleep_clk); in qcom_usb_hsic_phy_power_on()
81 clk_disable_unprepare(uphy->cal_clk); in qcom_usb_hsic_phy_power_on()
83 clk_disable_unprepare(uphy->phy_clk); in qcom_usb_hsic_phy_power_on()
91 clk_disable_unprepare(uphy->cal_sleep_clk); in qcom_usb_hsic_phy_power_off()
92 clk_disable_unprepare(uphy->cal_clk); in qcom_usb_hsic_phy_power_off()
93 clk_disable_unprepare(uphy->phy_clk); in qcom_usb_hsic_phy_power_off()
110 uphy = devm_kzalloc(&ulpi->dev, sizeof(*uphy), GFP_KERNEL); in qcom_usb_hsic_phy_probe()
112 return -ENOMEM; in qcom_usb_hsic_phy_probe()
115 uphy->ulpi = ulpi; in qcom_usb_hsic_phy_probe()
116 uphy->pctl = devm_pinctrl_get(&ulpi->dev); in qcom_usb_hsic_phy_probe()
117 if (IS_ERR(uphy->pctl)) in qcom_usb_hsic_phy_probe()
118 return PTR_ERR(uphy->pctl); in qcom_usb_hsic_phy_probe()
120 uphy->phy_clk = clk = devm_clk_get(&ulpi->dev, "phy"); in qcom_usb_hsic_phy_probe()
124 uphy->cal_clk = clk = devm_clk_get(&ulpi->dev, "cal"); in qcom_usb_hsic_phy_probe()
128 uphy->cal_sleep_clk = clk = devm_clk_get(&ulpi->dev, "cal_sleep"); in qcom_usb_hsic_phy_probe()
132 uphy->phy = devm_phy_create(&ulpi->dev, ulpi->dev.of_node, in qcom_usb_hsic_phy_probe()
134 if (IS_ERR(uphy->phy)) in qcom_usb_hsic_phy_probe()
135 return PTR_ERR(uphy->phy); in qcom_usb_hsic_phy_probe()
136 phy_set_drvdata(uphy->phy, uphy); in qcom_usb_hsic_phy_probe()
138 p = devm_of_phy_provider_register(&ulpi->dev, of_phy_simple_xlate); in qcom_usb_hsic_phy_probe()
143 { .compatible = "qcom,usb-hsic-phy", },
157 MODULE_DESCRIPTION("Qualcomm USB HSIC phy");