Lines Matching +full:powered +full:- +full:on

1 // SPDX-License-Identifier: GPL-2.0
16 #include <dt-bindings/phy/phy.h>
53 bool powered; member
59 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_bandgap_enable()
62 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_bandgap_enable()
68 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_bandgap_disable()
70 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_bandgap_disable()
78 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_dsi_analog_enable()
81 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_dsi_analog_enable()
83 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_dsi_analog_enable()
87 regmap_write(priv->regmap, HHI_MIPI_CNTL1, 0x001e); in phy_dsi_analog_enable()
89 regmap_write(priv->regmap, HHI_MIPI_CNTL2, in phy_dsi_analog_enable()
93 switch (priv->config.lanes) { in phy_dsi_analog_enable()
110 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL2, in phy_dsi_analog_enable()
114 priv->dsi_enabled = true; in phy_dsi_analog_enable()
119 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_dsi_analog_disable()
122 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, BIT(31), 0); in phy_dsi_analog_disable()
123 regmap_update_bits(priv->regmap, HHI_MIPI_CNTL0, in phy_dsi_analog_disable()
126 regmap_write(priv->regmap, HHI_MIPI_CNTL1, 0x6); in phy_dsi_analog_disable()
128 regmap_write(priv->regmap, HHI_MIPI_CNTL2, 0x00200000); in phy_dsi_analog_disable()
130 priv->dsi_enabled = false; in phy_dsi_analog_disable()
139 ret = phy_mipi_dphy_config_validate(&opts->mipi_dphy); in phy_axg_mipi_pcie_analog_configure()
143 memcpy(&priv->config, opts, sizeof(priv->config)); in phy_axg_mipi_pcie_analog_configure()
145 priv->dsi_configured = true; in phy_axg_mipi_pcie_analog_configure()
147 /* If PHY was already powered on, setup the DSI analog part */ in phy_axg_mipi_pcie_analog_configure()
148 if (priv->powered) { in phy_axg_mipi_pcie_analog_configure()
150 if (priv->dsi_enabled) in phy_axg_mipi_pcie_analog_configure()
167 if (priv->dsi_configured) in phy_axg_mipi_pcie_analog_power_on()
170 priv->powered = true; in phy_axg_mipi_pcie_analog_power_on()
181 if (priv->dsi_enabled) in phy_axg_mipi_pcie_analog_power_off()
184 priv->powered = false; in phy_axg_mipi_pcie_analog_power_off()
199 struct device *dev = &pdev->dev; in phy_axg_mipi_pcie_analog_probe()
201 struct device_node *np = dev->of_node, *parent_np; in phy_axg_mipi_pcie_analog_probe()
207 return -ENOMEM; in phy_axg_mipi_pcie_analog_probe()
210 parent_np = of_get_parent(dev->of_node); in phy_axg_mipi_pcie_analog_probe()
219 priv->regmap = map; in phy_axg_mipi_pcie_analog_probe()
221 priv->phy = devm_phy_create(dev, np, &phy_axg_mipi_pcie_analog_ops); in phy_axg_mipi_pcie_analog_probe()
222 if (IS_ERR(priv->phy)) { in phy_axg_mipi_pcie_analog_probe()
223 ret = PTR_ERR(priv->phy); in phy_axg_mipi_pcie_analog_probe()
224 if (ret != -EPROBE_DEFER) in phy_axg_mipi_pcie_analog_probe()
229 phy_set_drvdata(priv->phy, priv); in phy_axg_mipi_pcie_analog_probe()
239 .compatible = "amlogic,axg-mipi-pcie-analog-phy",
248 .name = "phy-axg-mipi-pcie-analog",