Lines Matching +full:eye +full:- +full:diagram +full:- +full:param

1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2017-2018 Hilisicon Electronics Co., Ltd.
73 ret = regmap_write(priv->peri_crg, PERI_CRG_ISODIS, USB_REFCLK_ISO_EN); in hi3660_phy_init()
79 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, val); in hi3660_phy_init()
85 ret = regmap_write(priv->peri_crg, PERI_CRG_RSTEN4, val); in hi3660_phy_init()
92 ret = regmap_update_bits(priv->otg_bc, USBOTG3_CTRL0, mask, val); in hi3660_phy_init()
98 ret = regmap_update_bits(priv->otg_bc, USBOTG3_CTRL7, mask, val); in hi3660_phy_init()
104 ret = regmap_update_bits(priv->otg_bc, USBOTG3_CTRL2, mask, 0); in hi3660_phy_init()
113 ret = regmap_write(priv->peri_crg, PERI_CRG_RSTDIS4, val); in hi3660_phy_init()
123 ret = regmap_update_bits(priv->otg_bc, USBOTG3_CTRL3, mask, val); in hi3660_phy_init()
130 ret = regmap_write(priv->otg_bc, USBOTG3_CTRL4, in hi3660_phy_init()
131 priv->eye_diagram_param); in hi3660_phy_init()
137 dev_err(priv->dev, "failed to init phy ret: %d\n", ret); in hi3660_phy_init()
149 ret = regmap_write(priv->peri_crg, PERI_CRG_RSTEN4, val); in hi3660_phy_exit()
155 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, val); in hi3660_phy_exit()
161 dev_err(priv->dev, "failed to exit phy ret: %d\n", ret); in hi3660_phy_exit()
174 struct device *dev = &pdev->dev; in hi3660_phy_probe()
180 return -ENOMEM; in hi3660_phy_probe()
182 priv->dev = dev; in hi3660_phy_probe()
183 priv->peri_crg = syscon_regmap_lookup_by_phandle(dev->of_node, in hi3660_phy_probe()
184 "hisilicon,pericrg-syscon"); in hi3660_phy_probe()
185 if (IS_ERR(priv->peri_crg)) { in hi3660_phy_probe()
186 dev_err(dev, "no hisilicon,pericrg-syscon\n"); in hi3660_phy_probe()
187 return PTR_ERR(priv->peri_crg); in hi3660_phy_probe()
190 priv->pctrl = syscon_regmap_lookup_by_phandle(dev->of_node, in hi3660_phy_probe()
191 "hisilicon,pctrl-syscon"); in hi3660_phy_probe()
192 if (IS_ERR(priv->pctrl)) { in hi3660_phy_probe()
193 dev_err(dev, "no hisilicon,pctrl-syscon\n"); in hi3660_phy_probe()
194 return PTR_ERR(priv->pctrl); in hi3660_phy_probe()
197 /* node of hi3660 phy is a sub-node of usb3_otg_bc */ in hi3660_phy_probe()
198 priv->otg_bc = syscon_node_to_regmap(dev->parent->of_node); in hi3660_phy_probe()
199 if (IS_ERR(priv->otg_bc)) { in hi3660_phy_probe()
200 dev_err(dev, "no hisilicon,usb3-otg-bc-syscon\n"); in hi3660_phy_probe()
201 return PTR_ERR(priv->otg_bc); in hi3660_phy_probe()
204 if (of_property_read_u32(dev->of_node, "hisilicon,eye-diagram-param", in hi3660_phy_probe()
205 &(priv->eye_diagram_param))) in hi3660_phy_probe()
206 priv->eye_diagram_param = HI3660_USB_DEFAULT_PHY_PARAM; in hi3660_phy_probe()
218 {.compatible = "hisilicon,hi3660-usb-phy",},
226 .name = "hi3660-usb-phy",