Lines Matching +full:dcdc +full:- +full:reg
1 // SPDX-License-Identifier: GPL-2.0-or-later
73 /* DCDC regulator IDs */
118 /* DCDC group CSR: supported voltages in microvolts */
125 /* DCDC group IOSR1: supported voltages in microvolts */
133 /* DCDC group SDSR1: supported voltages in microvolts */
206 return BCM590XX_CSRVOUT1 + (id - BCM590XX_REG_CSR) * 3; in bcm590xx_get_vsel_register()
211 int reg = 0; in bcm590xx_get_enable_register() local
214 reg = BCM590XX_RFLDOPMCTRL1 + id * 2; in bcm590xx_get_enable_register()
216 reg = BCM590XX_GPLDO1PMCTRL1 + id * 2; in bcm590xx_get_enable_register()
220 reg = BCM590XX_CSRPMCTRL1; in bcm590xx_get_enable_register()
223 reg = BCM590XX_IOSR1PMCTRL1; in bcm590xx_get_enable_register()
226 reg = BCM590XX_IOSR2PMCTRL1; in bcm590xx_get_enable_register()
229 reg = BCM590XX_MSRPMCTRL1; in bcm590xx_get_enable_register()
232 reg = BCM590XX_SDSR1PMCTRL1; in bcm590xx_get_enable_register()
235 reg = BCM590XX_SDSR2PMCTRL1; in bcm590xx_get_enable_register()
238 reg = BCM590XX_VSRPMCTRL1; in bcm590xx_get_enable_register()
241 reg = BCM590XX_OTG_CTRL; in bcm590xx_get_enable_register()
246 return reg; in bcm590xx_get_enable_register()
277 struct bcm590xx *bcm590xx = dev_get_drvdata(pdev->dev.parent); in bcm590xx_probe()
284 pmu = devm_kzalloc(&pdev->dev, sizeof(*pmu), GFP_KERNEL); in bcm590xx_probe()
286 return -ENOMEM; in bcm590xx_probe()
288 pmu->mfd = bcm590xx; in bcm590xx_probe()
292 pmu->desc = devm_kcalloc(&pdev->dev, in bcm590xx_probe()
296 if (!pmu->desc) in bcm590xx_probe()
297 return -ENOMEM; in bcm590xx_probe()
303 pmu->desc[i].name = info->name; in bcm590xx_probe()
304 pmu->desc[i].of_match = of_match_ptr(info->name); in bcm590xx_probe()
305 pmu->desc[i].regulators_node = of_match_ptr("regulators"); in bcm590xx_probe()
306 pmu->desc[i].supply_name = info->vin_name; in bcm590xx_probe()
307 pmu->desc[i].id = i; in bcm590xx_probe()
308 pmu->desc[i].volt_table = info->volt_table; in bcm590xx_probe()
309 pmu->desc[i].n_voltages = info->n_voltages; in bcm590xx_probe()
310 pmu->desc[i].linear_ranges = info->linear_ranges; in bcm590xx_probe()
311 pmu->desc[i].n_linear_ranges = info->n_linear_ranges; in bcm590xx_probe()
314 pmu->desc[i].ops = &bcm590xx_ops_ldo; in bcm590xx_probe()
315 pmu->desc[i].vsel_mask = BCM590XX_LDO_VSEL_MASK; in bcm590xx_probe()
317 pmu->desc[i].ops = &bcm590xx_ops_vbus; in bcm590xx_probe()
319 pmu->desc[i].ops = &bcm590xx_ops_dcdc; in bcm590xx_probe()
320 pmu->desc[i].vsel_mask = BCM590XX_SR_VSEL_MASK; in bcm590xx_probe()
324 pmu->desc[i].enable_mask = BCM590XX_VBUS_ENABLE; in bcm590xx_probe()
326 pmu->desc[i].vsel_reg = bcm590xx_get_vsel_register(i); in bcm590xx_probe()
327 pmu->desc[i].enable_is_inverted = true; in bcm590xx_probe()
328 pmu->desc[i].enable_mask = BCM590XX_REG_ENABLE; in bcm590xx_probe()
330 pmu->desc[i].enable_reg = bcm590xx_get_enable_register(i); in bcm590xx_probe()
331 pmu->desc[i].type = REGULATOR_VOLTAGE; in bcm590xx_probe()
332 pmu->desc[i].owner = THIS_MODULE; in bcm590xx_probe()
334 config.dev = bcm590xx->dev; in bcm590xx_probe()
337 config.regmap = bcm590xx->regmap_sec; in bcm590xx_probe()
339 config.regmap = bcm590xx->regmap_pri; in bcm590xx_probe()
341 rdev = devm_regulator_register(&pdev->dev, &pmu->desc[i], in bcm590xx_probe()
344 dev_err(bcm590xx->dev, in bcm590xx_probe()
346 pdev->name); in bcm590xx_probe()
356 .name = "bcm590xx-vregs",
365 MODULE_ALIAS("platform:bcm590xx-vregs");