Lines Matching +full:analog +full:- +full:out
1 // SPDX-License-Identifier: GPL-2.0
14 #include <dt-bindings/phy/phy.h>
30 struct phy *analog; member
47 ret = phy_power_on(priv->analog); in phy_axg_pcie_power_on()
51 regmap_update_bits(priv->regmap, MESON_PCIE_REG0, in phy_axg_pcie_power_on()
61 ret = phy_power_off(priv->analog); in phy_axg_pcie_power_off()
65 regmap_update_bits(priv->regmap, MESON_PCIE_REG0, in phy_axg_pcie_power_off()
75 ret = phy_init(priv->analog); in phy_axg_pcie_init()
79 regmap_write(priv->regmap, MESON_PCIE_REG0, MESON_PCIE_PHY_INIT); in phy_axg_pcie_init()
80 return reset_control_reset(priv->reset); in phy_axg_pcie_init()
88 ret = phy_exit(priv->analog); in phy_axg_pcie_exit()
92 return reset_control_reset(priv->reset); in phy_axg_pcie_exit()
100 ret = phy_reset(priv->analog); in phy_axg_pcie_reset()
102 goto out; in phy_axg_pcie_reset()
104 ret = reset_control_assert(priv->reset); in phy_axg_pcie_reset()
106 goto out; in phy_axg_pcie_reset()
109 ret = reset_control_deassert(priv->reset); in phy_axg_pcie_reset()
111 goto out; in phy_axg_pcie_reset()
114 out: in phy_axg_pcie_reset()
130 struct device *dev = &pdev->dev; in phy_axg_pcie_probe()
132 struct device_node *np = dev->of_node; in phy_axg_pcie_probe()
138 return -ENOMEM; in phy_axg_pcie_probe()
140 priv->phy = devm_phy_create(dev, np, &phy_axg_pcie_ops); in phy_axg_pcie_probe()
141 if (IS_ERR(priv->phy)) { in phy_axg_pcie_probe()
142 ret = PTR_ERR(priv->phy); in phy_axg_pcie_probe()
143 if (ret != -EPROBE_DEFER) in phy_axg_pcie_probe()
152 priv->regmap = devm_regmap_init_mmio(dev, base, in phy_axg_pcie_probe()
154 if (IS_ERR(priv->regmap)) in phy_axg_pcie_probe()
155 return PTR_ERR(priv->regmap); in phy_axg_pcie_probe()
157 priv->reset = devm_reset_control_array_get_exclusive(dev); in phy_axg_pcie_probe()
158 if (IS_ERR(priv->reset)) in phy_axg_pcie_probe()
159 return PTR_ERR(priv->reset); in phy_axg_pcie_probe()
161 priv->analog = devm_phy_get(dev, "analog"); in phy_axg_pcie_probe()
162 if (IS_ERR(priv->analog)) in phy_axg_pcie_probe()
163 return PTR_ERR(priv->analog); in phy_axg_pcie_probe()
165 phy_set_drvdata(priv->phy, priv); in phy_axg_pcie_probe()
174 .compatible = "amlogic,axg-pcie-phy",
183 .name = "phy-axg-pcie",