regulator: Add AXP717 boost support
Subsystems (5)
v3 cover regulator: Add AXP717 boost support
This is remainder of the AXP717 fix series, containing support for the boost regulator. This is meant to increase the battery voltage to the 5 volts required to provide the USB VBUS power.
It's the usual trinity of DT bindings patch (1/3), the MFD part describing the PMIC registers (2/3) and the final patch to model the regulator (3/3).
Compared to v2, this drops the merged patches, and just retains the boost related parts. It also changes the internal name of the register to AXP717_MODULE_EN_CONTROL_2, since there is another control register we will need later for battery support.
Please have a look and test!
Cheers,
Andre
Changelog v2 .. v3:
- drop already merged fix patches
- rename control register name to make room for second control register
- rebase on top of v6.11-rc3
- add review tags
Andre Przywara (3):
dt-bindings: mfd: x-powers,axp152: add boost regulator
mfd: axp20x: AXP717: Add support for boost regulator
regulator: axp20x: AXP717: Add boost regulator
Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 +- drivers/mfd/axp20x.c | 2 ++ drivers/regulator/axp20x-regulator.c | 4 ++++ include/linux/mfd/axp20x.h | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.4
PATCH v3 1/3 dt-bindings: mfd: x-powers,axp152: add boost regulator
The X-Powers AXP717 contains a boost regulator, that it meant to provide the 5V USB VBUS voltage when the devices operates on battery.
Add the name "boost" to the regexp describing the allowed node names, to allow the regulator to be described in the devicetree.
--- Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml +1 -1
@@ -274,7 +274,7 @@ properties: Defines the work frequency of DC-DC in kHz. patternProperties: - "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo)$": + "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo|boost)$": $ref: /schemas/regulator/regulator.yaml# type: object unevaluatedProperties: false
Signature · 1 line
2.39.4
PATCH v3 2/3 mfd: axp20x: AXP717: Add support for boost regulator
In reply to Andre PrzywaraThe AXP717 also contains a boost regulator, to provide the 5V USB VBUS rail when running on battery.
Add the registers to the MFD description to be able to use them from the regulator driver.
--- drivers/mfd/axp20x.c | 2 ++ include/linux/mfd/axp20x.h | 2 ++ 2 files changed, 4 insertions(+)
drivers/mfd/axp20x.c +2 -0
@@ -209,6 +209,8 @@ static const struct regmap_access_table axp313a_volatile_table = { };static const struct regmap_range axp717_writeable_ranges[] = { +regmap_reg_range (AXP717_MODULE_EN_CONTROL_2 ,AXP717_MODULE_EN_CONTROL_2 ), +regmap_reg_range (AXP717_BOOST_CONTROL ,AXP717_BOOST_CONTROL ),regmap_reg_range (AXP717_IRQ0_EN ,AXP717_IRQ4_EN ),regmap_reg_range (AXP717_IRQ0_STATE ,AXP717_IRQ4_STATE ),regmap_reg_range (AXP717_DCDC_OUTPUT_CONTROL ,AXP717_CPUSLDO_CONTROL ),
include/linux/mfd/axp20x.h +2 -0
@@ -115,6 +115,8 @@ enum axp20x_variants {#define AXP313A_IRQ_STATE 0x21#define AXP717_ON_INDICATE 0x00 +#define AXP717_MODULE_EN_CONTROL_2 0x19 +#define AXP717_BOOST_CONTROL 0x1e#define AXP717_IRQ0_EN 0x40#define AXP717_IRQ1_EN 0x41#define AXP717_IRQ2_EN 0x42
Signature · 1 line
2.39.4
PATCH v3 3/3 regulator: axp20x: AXP717: Add boost regulator
In reply to Andre PrzywaraThe AXP717 also contains an adjustable boost regulator, to provide the 5V USB VBUS rail when running on battery.
Add the regulator description that states the voltage range this regulator can cover.
--- drivers/regulator/axp20x-regulator.c | 4 ++++ include/linux/mfd/axp20x.h | 1 + 2 files changed, 5 insertions(+)
drivers/regulator/axp20x-regulator.c +4 -0
@@ -143,6 +143,7 @@#define AXP717_DCDC3_NUM_VOLTAGES 103#define AXP717_DCDC_V_OUT_MASK GENMASK(6, 0)#define AXP717_LDO_V_OUT_MASK GENMASK(4, 0) +#define AXP717_BOOST_V_OUT_MASK GENMASK(7, 4)#define AXP803_PWR_OUT_DCDC1_MASK BIT_MASK(0)#define AXP803_PWR_OUT_DCDC2_MASK BIT_MASK(1)
@@ -834,6 +835,9 @@ static const struct regulator_desc axp717_regulators[] = {AXP_DESC (AXP717 ,CPUSLDO ,"cpusldo" ,"vin1" ,500 ,1400 ,50 ,AXP717_CPUSLDO_CONTROL ,AXP717_LDO_V_OUT_MASK ,AXP717_LDO1_OUTPUT_CONTROL ,BIT (4 )), +AXP_DESC (AXP717 ,BOOST ,"boost" ,"vin1" ,4550 ,5510 ,64 , +AXP717_BOOST_CONTROL ,AXP717_BOOST_V_OUT_MASK , + AXP717_MODULE_EN_CONTROL_2, BIT(4)), };/* DCDC ranges shared with AXP813 */
include/linux/mfd/axp20x.h +1 -0
@@ -486,6 +486,7 @@ enum {AXP717_CLDO3 ,AXP717_CLDO4 ,AXP717_CPUSLDO , +AXP717_BOOST , AXP717_REG_ID_MAX, };
Signature · 1 line
2.39.4
Quoted 12 lines · Andre Przywara
This is remainder of the AXP717 fix series, containing support for the boost regulator. This is meant to increase the battery voltage to the 5 volts required to provide the USB VBUS power.
It's the usual trinity of DT bindings patch (1/3), the MFD part describing the PMIC registers (2/3) and the final patch to model the regulator (3/3).
Compared to v2, this drops the merged patches, and just retains the boost related parts. It also changes the internal name of the register toAXP717_MODULE_EN_CONTROL_2, since there is another control register we will need later for battery support.
Quoted 1 line
Please have a look and test!
Whole series is
Not sure which tree this is going through, but since Lee already gave acks, maybe we could have it all go through the regulator tree?
Thanks
Quoted 23 lines
Cheers,
AndreChangelog v2 .. v3:
- drop already merged fix patches
- rename control register name to make room for second control register
- rebase on top of v6.11-rc3
- add review tagsAndre Przywara (3):
dt-bindings: mfd: x-powers,axp152: add boost regulator
mfd: axp20x: AXP717: Add support for boost regulator
regulator: axp20x: AXP717: Add boost regulatorDocumentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 2 +- drivers/mfd/axp20x.c | 2 ++ drivers/regulator/axp20x-regulator.c | 4 ++++ include/linux/mfd/axp20x.h | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-)--
2.39.4
Mark Brown
maintainerQuoted 2 lines · Chen-Yu Tsai
Not sure which tree this is going through, but since Lee already gave acks, maybe we could have it all go through the regulator tree?
That's what I'm expecting given the acks.
Mark Brown
maintainerQuoted 11 lines · Andre Przywara
This is remainder of the AXP717 fix series, containing support for the boost regulator. This is meant to increase the battery voltage to the 5 volts required to provide the USB VBUS power.
It's the usual trinity of DT bindings patch (1/3), the MFD part describing the PMIC registers (2/3) and the final patch to model the regulator (3/3).
Compared to v2, this drops the merged patches, and just retains the boost related parts. It also changes the internal name of the register toAXP717_MODULE_EN_CONTROL_2, since there is another control register we will need later for battery support.
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/3] dt-bindings: mfd: x-powers,axp152: add boost regulator
commit: b4c21faf69b8eec1016c776be4777f39f194e3b0
[2/3] mfd: axp20x: AXP717: Add support for boost regulator
commit: bb2ac59f8205165fce5aee9135bd1e2ea9b1a74b
[3/3] regulator: axp20x: AXP717: Add boost regulator
commit: 22dfe2ea1d63f15d8b9661e7690ac0a03159db6aAll being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark