Lines Matching +full:vin2 +full:- +full:supply
361 .n_voltages = (((_max) - (_min)) / (_step) + 1), \
383 .n_voltages = (((_max) - (_min)) / (_step) + 1), \
455 switch (axp20x->variant) { in axp20x_set_ramp_delay()
485 return -ENOTSUPP; in axp20x_set_ramp_delay()
504 dev_err(axp20x->dev, "unsupported ramp value %d", ramp); in axp20x_set_ramp_delay()
505 return -EINVAL; in axp20x_set_ramp_delay()
511 return regmap_update_bits(axp20x->regmap, reg, mask, cfg); in axp20x_set_ramp_delay()
519 switch (axp20x->variant) { in axp20x_regulator_enable_regmap()
522 rdev->constraints && rdev->constraints->soft_start) { in axp20x_regulator_enable_regmap()
617 AXP_DESC(AXP20X, DCDC2, "dcdc2", "vin2", 700, 2275, 25,
644 AXP_DESC(AXP22X, DCDC2, "dcdc2", "vin2", 600, 1540, 20,
745 AXP_DESC_RANGES(AXP313A, DCDC2, "dcdc2", "vin2",
759 AXP_DESC_FIXED(AXP313A, RTC_LDO, "rtc-ldo", "vin1", 1800),
788 AXP_DESC_RANGES(AXP717, DCDC2, "dcdc2", "vin2",
893 AXP_DESC_RANGES(AXP803, DCDC2, "dcdc2", "vin2",
953 AXP_DESC_IO(AXP803, LDO_IO0, "ldo-io0", "ips", 700, 3300, 100,
957 AXP_DESC_IO(AXP803, LDO_IO1, "ldo-io1", "ips", 700, 3300, 100,
961 AXP_DESC_FIXED(AXP803, RTC_LDO, "rtc-ldo", "ips", 3000),
1055 AXP_DESC(AXP809, DCDC2, "dcdc2", "vin2", 600, 1540, 20,
1125 AXP_DESC_RANGES(AXP813, DCDC2, "dcdc2", "vin2",
1193 AXP_DESC_FIXED(AXP813, RTC_LDO, "rtc-ldo", "ips", 1800),
1194 AXP_DESC_IO(AXP813, LDO_IO0, "ldo-io0", "ips", 700, 3300, 100,
1198 AXP_DESC_IO(AXP813, LDO_IO1, "ldo-io1", "ips", 700, 3300, 100,
1232 AXP_DESC_RANGES(AXP15060, DCDC2, "dcdc2", "vin2",
1293 /* Supply comes from DCDC5 */
1297 /* Supply comes from DCDC1 */
1300 /* Supply comes from ALDO1 */
1301 AXP_DESC_FIXED(AXP15060, RTC_LDO, "rtc-ldo", NULL, 1800),
1306 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_set_dcdc_freq()
1310 switch (axp20x->variant) { in axp20x_set_dcdc_freq()
1332 if (axp20x->variant == AXP806_ID) in axp20x_set_dcdc_freq()
1348 dev_err(&pdev->dev, in axp20x_set_dcdc_freq()
1350 return -EINVAL; in axp20x_set_dcdc_freq()
1355 dev_err(&pdev->dev, in axp20x_set_dcdc_freq()
1357 return -EINVAL; in axp20x_set_dcdc_freq()
1365 dev_warn(&pdev->dev, "DCDC frequency too low. Set to %ukHz\n", in axp20x_set_dcdc_freq()
1371 dev_warn(&pdev->dev, "DCDC frequency too high. Set to %ukHz\n", in axp20x_set_dcdc_freq()
1375 dcdcfreq = (dcdcfreq - min) / step; in axp20x_set_dcdc_freq()
1377 return regmap_update_bits(axp20x->regmap, reg, in axp20x_set_dcdc_freq()
1387 np = of_node_get(pdev->dev.parent->of_node); in axp20x_regulator_parse_dt()
1393 dev_warn(&pdev->dev, "regulators node not found\n"); in axp20x_regulator_parse_dt()
1395 of_property_read_u32(regulators, "x-powers,dcdc-freq", &dcdcfreq); in axp20x_regulator_parse_dt()
1398 dev_err(&pdev->dev, "Error setting dcdc frequency: %d\n", ret); in axp20x_regulator_parse_dt()
1413 switch (axp20x->variant) { in axp20x_set_dcdc_workmode()
1417 return -EINVAL; in axp20x_set_dcdc_workmode()
1423 workmode <<= ffs(mask) - 1; in axp20x_set_dcdc_workmode()
1437 return -EINVAL; in axp20x_set_dcdc_workmode()
1439 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP22X_DCDC1); in axp20x_set_dcdc_workmode()
1440 workmode <<= id - AXP22X_DCDC1; in axp20x_set_dcdc_workmode()
1445 return -EINVAL; in axp20x_set_dcdc_workmode()
1447 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP803_DCDC1); in axp20x_set_dcdc_workmode()
1448 workmode <<= id - AXP803_DCDC1; in axp20x_set_dcdc_workmode()
1453 return -EINVAL; in axp20x_set_dcdc_workmode()
1455 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP813_DCDC1); in axp20x_set_dcdc_workmode()
1456 workmode <<= id - AXP813_DCDC1; in axp20x_set_dcdc_workmode()
1462 return -EINVAL; in axp20x_set_dcdc_workmode()
1464 mask = AXP22X_WORKMODE_DCDCX_MASK(id - AXP15060_DCDC1); in axp20x_set_dcdc_workmode()
1465 workmode <<= id - AXP15060_DCDC1; in axp20x_set_dcdc_workmode()
1471 return -EINVAL; in axp20x_set_dcdc_workmode()
1474 return regmap_update_bits(rdev->regmap, reg, mask, workmode); in axp20x_set_dcdc_workmode()
1478 * This function checks whether a regulator is part of a poly-phase
1489 switch (axp20x->variant) { in axp20x_is_polyphase_slave()
1492 regmap_read(axp20x->regmap, AXP803_POLYPHASE_CTRL, ®); in axp20x_is_polyphase_slave()
1503 regmap_read(axp20x->regmap, AXP806_DCDC_MODE_CTRL2, ®); in axp20x_is_polyphase_slave()
1520 regmap_read(axp20x->regmap, AXP15060_DCDC_MODE_CTRL1, ®); in axp20x_is_polyphase_slave()
1540 struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent); in axp20x_regulator_probe()
1543 .dev = pdev->dev.parent, in axp20x_regulator_probe()
1544 .regmap = axp20x->regmap, in axp20x_regulator_probe()
1554 switch (axp20x->variant) { in axp20x_regulator_probe()
1564 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1565 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1578 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1579 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1592 drivevbus = of_property_read_bool(pdev->dev.parent->of_node, in axp20x_regulator_probe()
1593 "x-powers,drive-vbus-en"); in axp20x_regulator_probe()
1600 dev_err(&pdev->dev, "Unsupported AXP variant: %ld\n", in axp20x_regulator_probe()
1601 axp20x->variant); in axp20x_regulator_probe()
1602 return -EINVAL; in axp20x_regulator_probe()
1613 * If this regulator is a slave in a poly-phase setup, in axp20x_regulator_probe()
1621 if (axp20x->variant == AXP813_ID && i == AXP813_FLDO3) in axp20x_regulator_probe()
1626 * connected internally, so we have to handle their supply in axp20x_regulator_probe()
1630 * so the supply names are correctly read. See the last in axp20x_regulator_probe()
1638 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1641 return -ENOMEM; in axp20x_regulator_probe()
1644 new_desc->supply_name = dcdc1_name; in axp20x_regulator_probe()
1651 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1654 return -ENOMEM; in axp20x_regulator_probe()
1657 new_desc->supply_name = dcdc5_name; in axp20x_regulator_probe()
1663 new_desc = devm_kzalloc(&pdev->dev, sizeof(*desc), in axp20x_regulator_probe()
1666 return -ENOMEM; in axp20x_regulator_probe()
1669 new_desc->supply_name = aldo1_name; in axp20x_regulator_probe()
1673 rdev = devm_regulator_register(&pdev->dev, desc, &config); in axp20x_regulator_probe()
1675 dev_err(&pdev->dev, "Failed to register %s\n", in axp20x_regulator_probe()
1681 ret = of_property_read_u32(rdev->dev.of_node, in axp20x_regulator_probe()
1682 "x-powers,dcdc-workmode", in axp20x_regulator_probe()
1686 dev_err(&pdev->dev, "Failed to set workmode on %s\n", in axp20x_regulator_probe()
1687 rdev->desc->name); in axp20x_regulator_probe()
1696 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1697 "regulator-name", in axp20x_regulator_probe()
1703 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1704 "regulator-name", in axp20x_regulator_probe()
1708 of_property_read_string(rdev->dev.of_node, in axp20x_regulator_probe()
1709 "regulator-name", in axp20x_regulator_probe()
1715 regmap_update_bits(axp20x->regmap, AXP20X_OVER_TMP, in axp20x_regulator_probe()
1717 rdev = devm_regulator_register(&pdev->dev, in axp20x_regulator_probe()
1721 dev_err(&pdev->dev, "Failed to register drivevbus\n"); in axp20x_regulator_probe()
1732 .name = "axp20x-regulator",
1742 MODULE_ALIAS("platform:axp20x-regulator");