dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant
Subsystems (4)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v3 1/3 dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant
The X-Powers AXP15060 is a PMIC seen on Starfive Visionfive 2 board. Add relative compatible item and CPUSLDO support and disables DC-DC frequency setting for it.
---
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
- Disables DC-DC frequency setting (Andre Przywara)
Changes since v1:
- Move cpusldo before drivevbus (Krzysztof Kozlowski)
[1] https://lore.kernel.org/linux-sunxi/[email protected]/
--- Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml +5 -2
@@ -77,7 +77,9 @@ allOf: properties: compatible: contains: - const: x-powers,axp313a + enum: + - x-powers,axp313a + - x-powers,axp15060 then: properties:
@@ -97,6 +99,7 @@ properties: - x-powers,axp806 - x-powers,axp809 - x-powers,axp813 + - x-powers,axp15060 - items: - const: x-powers,axp228 - const: x-powers,axp221
@@ -265,7 +268,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|drivevbus|dc5ldo)$": + "^(([a-f])?ldo[0-9]|dcdc[0-7a-e]|ldo(_|-)io(0|1)|(dc1)?sw|rtc(_|-)ldo|cpusldo|drivevbus|dc5ldo)$": $ref: /schemas/regulator/regulator.yaml# type: object unevaluatedProperties: false
Signature · 1 line
2.40.0
Quoted 12 lines · Shengyu Qu
The X-Powers AXP15060 is a PMIC seen on Starfive Visionfive 2 board. Add relative compatible item and CPUSLDO support and disables DC-DC frequency setting for it.
---
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
- Disables DC-DC frequency setting (Andre Przywara)Changes since v1:
- Move cpusldo before drivevbus (Krzysztof Kozlowski)
Quoted 7 lines
[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>--- Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
(not sure if I've sent this before or not, but just to make sure):
Applied, thanks
Signature · 1 line
Lee Jones [李琼斯]
PATCH v3 2/3 mfd: axp20x: Add support for AXP15060 PMIC
In reply to a message not in the archiveThe AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
- Add axp_regulator_only_cells rather than directly using axp806_cells for cases that IRQ line isn't connected.
Changes since v1:
- Nothing
[1] https://lore.kernel.org/linux-sunxi/[email protected]/
--- drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)
drivers/mfd/axp20x-i2c.c +2 -0
@@ -66,6 +66,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = { { .compatible = "x-powers,axp313a", .data = (void *)AXP313A_ID }, { .compatible = "x-powers,axp803", .data = (void *)AXP803_ID }, { .compatible = "x-powers,axp806", .data = (void *)AXP806_ID }, + { .compatible = "x-powers,axp15060", .data = (void *)AXP15060_ID }, { }, };MODULE_DEVICE_TABLE (of, axp20x_i2c_of_match);
@@ -80,6 +81,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = { { "axp313a", 0 }, { "axp803", 0 }, { "axp806", 0 }, + { "axp15060", 0 }, { }, };MODULE_DEVICE_TABLE (i2c, axp20x_i2c_id);
drivers/mfd/axp20x.c +107 -0
155 lines not on this page · raw message
include/linux/mfd/axp20x.h +85 -0
121 lines not on this page · raw message
Signature · 1 line
2.40.0
Lee Jones
maintainerRe: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Quoted 11 lines · Shengyu Qu
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 5 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
- Addaxp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.
Quoted 7 lines
Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)
I manually added the missing tags for this and the DT patch and applied.
Signature · 1 line
Lee Jones [李琼斯]
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:
Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 11 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
So this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 11 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Quoted 8 lines
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT. I see your tentative R-b: on v2, but with the request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.
So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Cheers,
Andre
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Quoted 56 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 11 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 18 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)
Quoted 6 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.
Best regards,
Krzysztof
Lee Jones
maintainerRe: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Quoted 77 lines · Krzysztof Kozlowski
Quoted 56 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 11 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 18 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 6 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/
Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.
I am using b4, although the version I'm using is quite old (0.9.0).
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
Signature · 1 line
Lee Jones [李琼斯]
Lee Jones
maintainerRe: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Quoted 86 lines · Lee Jones
Quoted 77 lines · Krzysztof Kozlowski
Quoted 56 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 11 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 18 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 6 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.
Quoted 7 lines
I am using b4, although the version I'm using is quite old (0.9.0).
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
FYI, I just upgraded to 0.12.2.
Signature · 1 line
Lee Jones [李琼斯]
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
In reply to Lee JonesHi Lee,
Why there's no news about patch 3 for my series and axp313a series?
It can't work without patch 3. And could we see the fix for patch1/2 in
next RC?
Best regards,
Shengyu
Quoted 86 lines · Krzysztof Kozlowski
Quoted 71 lines · Andre Przywara
Quoted 52 lines
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 10 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 16 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 5 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.I am using b4, although the version I'm using is quite old (0.9.0).
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Quoted 5 lines · Shengyu Qu
Hi Lee,
Why there's no news about patch 3 for my series and axp313a series?
It can't work without patch 3. And could we see the fix for patch1/2 in
You got feedback, didn't you? Patch is broken. Don't ping to apply broken patch, but fix the patch and send a new version.
Best regards,
Krzysztof
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
In reply to Lee JonesQuoted 86 lines · On Mon, 15 May 2023 11:52:29 +0100 Lee Jones <[email protected]> wrote:
Quoted 77 lines · Krzysztof Kozlowski
Quoted 56 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 11 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 18 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 6 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.
Quoted 7 lines
I am using b4, although the version I'm using is quite old (0.9.0).
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
So what are we going to do about the two series now? I guess it's not worthwhile to revert Shengyu's patch, just for the wrong R-b: tag? So does this mean both series should be rebased on top of that and re-sent?
Cheers,
Andre
Lee Jones
maintainerRe: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Quoted 91 lines · Andre Przywara
Quoted 88 lines · On Mon, 15 May 2023 11:52:29 +0100 Lee Jones <[email protected]> wrote:
Quoted 77 lines · Krzysztof Kozlowski
Quoted 56 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 11 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 18 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 6 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.I am using b4, although the version I'm using is quite old (0.9.0).
Quoted 8 lines
Quoted 5 lines
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
So what are we going to do about the two series now? I guess it's not worthwhile to revert Shengyu's patch, just for the wrong R-b: tag?
No, I won't be reverting any patches.
Quoted 1 line
So does this mean both series should be rebased on top of that and re-sent?
Yes please.
Signature · 1 line
Lee Jones [李琼斯]
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
Hi Andre,
Please ping me if your new version of axp313a series is sent, I would update
mine as soon as possible.
Best regards,
Shengyu
Quoted 97 lines · Andre Przywara
Quoted 84 lines
Quoted 80 lines · On Mon, 15 May 2023 11:52:29 +0100 Lee Jones <[email protected]> wrote:
Quoted 70 lines · Krzysztof Kozlowski
Quoted 52 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 10 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 16 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 5 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.I am using b4, although the version I'm using is quite old (0.9.0).
Quoted 7 lines
Quoted 5 lines
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
So what are we going to do about the two series now? I guess it's not worthwhile to revert Shengyu's patch, just for the wrong R-b: tag?
No, I won't be reverting any patches.
Quoted 1 line
So does this mean both series should be rebased on top of that and re-sent?
Yes please.
Re: [PATCH v3 2/3] mfd: axp20x: Add support for AXP15060 PMIC
On Mon, 15 May 2023 23:44:03 +0800
Shengyu Qu <[email protected]> wrote:
Hi Shengyu,
Quoted 2 lines
Please ping me if your new version of axp313a series is sent, I would update mine as soon as possible.
as you have probably seen, I have just sent out a new version, and included the one remaining patch from your series. So there is no need from your side for any further post. I'd just be grateful if you could test the final result.
Cheers,
Andre
Quoted 97 lines
Quoted 97 lines · Andre Przywara
Quoted 84 lines
Quoted 80 lines · On Mon, 15 May 2023 11:52:29 +0100 Lee Jones <[email protected]> wrote:
Quoted 70 lines · Krzysztof Kozlowski
Quoted 52 lines · Andre Przywara
On Wed, 26 Apr 2023 15:27:40 +0100
Lee Jones <[email protected]> wrote:Hi Lee,
I see this patch in Linus' tree, but something must have gone wrong here, can you please check? See below ...
Quoted 13 lines · Shengyu Qu
Quoted 12 lines
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected via an I2C bus.
Describe the regmap and the MFD bits, along with the registers exposed via I2C. Eventually advertise the device using a new compatible string and add support for power off the system.
The driver would disable PEK function if IRQ is not configured in device tree, since some boards (For example, Starfive Visionfive 2) didn't connect IRQ line of PMIC to SOC.
Quoted 10 lines
Quoted 6 lines
GPIO function isn't enabled in this commit, since its configuration operation is different from any existing AXP PMICs and needs logic modification on existing driver. GPIO support might come in later patches.
---
You must not use these above the tags or Git will drop them.
Quoted 2 lines
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branchSo this patch was based on the AXP313a series, but I don't see that in Linus' tree (or in any of your trees, if I have checked correctly). There must have been a conflict, as this [PATCH v3 2/3] diff actually lists the axp313a entry in the context lines.
Quoted 16 lines
Quoted 10 lines
- Add
axp_regulator_only_cellsrather than directly usingaxp806_cellsfor cases that IRQ line isn't connected.Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>---
Put change-logs here instead.
Quoted 4 lines
drivers/mfd/axp20x-i2c.c | 2 + drivers/mfd/axp20x.c | 107 +++++++++++++++++++++++++++++++++++++ include/linux/mfd/axp20x.h | 85 +++++++++++++++++++++++++++++ 3 files changed, 194 insertions(+)Quoted 5 lines
Quoted 1 line
I manually added the missing tags for this and the DT patch and applied.
So this patch doesn't list any tags aside from Shengyu's Signed-off-by. The patch in Linus' tree list a Reviewed-by: from Krzysztof, which I don't see anywhere in the thread, he just reviewed the binding patch, AFAICT.
Yep, I never reviewed this.
Quoted 7 lines
I see your tentative R-b: on v2, but with the
request to rebase and resend, which he did with v3. The applied patch looks like v3, but not on the base commit this was send against.So I am slightly confused, and am also wondering what happened to the AXP313a patches? I see the binding patch merged, but not the MFD part, even though you replied saying so.
Because the patch #1 was broken, see:
https://lore.kernel.org/all/TY3P286MB261177CF7AA2959BD9517DA998609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM/Quoted 6 lines
The SoB and Reviewed-by were after --- and apparently b4 understood it as cover letter and applied everywhere.
Lee,
Do you have the latest b4? If yes, this should be reported as b4 bug, assuming you used it.I am using b4, although the version I'm using is quite old (0.9.0).
Quoted 7 lines
Quoted 5 lines
Also, this was quite some time ago - I have slept since applying this and do not distinctly remember doing so. Thus, the application of your R-b may well have been a mistake on my part. I'll keep an eye for such things in the future and if I see (and remember) an issue, I'll report it.
So what are we going to do about the two series now? I guess it's not worthwhile to revert Shengyu's patch, just for the wrong R-b: tag?
No, I won't be reverting any patches.
Quoted 1 line
So does this mean both series should be rebased on top of that and re-sent?
Yes please.
PATCH v3 3/3 regulator: axp20x: Add AXP15060 support
In reply to a message not in the archiveThe AXP15060 is a typical I2C-controlled PMIC, seen on multiple boards with different default register value. Current driver is tested on Starfive Visionfive 2.
The RTCLDO is fixed, and cannot even be turned on or off. On top of that, its voltage is customisable (either 1.8V or 3.3V). We pretend it's a fixed 1.8V regulator since other AXP driver also do like this. Also, BSP code ignores this regulator and it's not used according to VF2 schematic.
Describe the AXP15060's voltage settings and switch registers, how the voltages are encoded, and connect this to the MFD device via its regulator ID.
---
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
- Fix some whitespace (Andre Przywara)
- Rename swout to sw to keep up with bindings (Andre Przywara)
- Add check for setting DC-DC frequency (Andre Przywara)
Changes since v1:
- Nothing
[1] https://lore.kernel.org/linux-sunxi/[email protected]/
--- drivers/regulator/axp20x-regulator.c | 232 +++++++++++++++++++++++++-- 1 file changed, 223 insertions(+), 9 deletions(-)
drivers/regulator/axp20x-regulator.c +223 -9
@@ -275,6 +275,74 @@#define AXP813_PWR_OUT_DCDC7_MASK BIT_MASK(6) +#define AXP15060_DCDC1_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_DCDC2_V_CTRL_MASK GENMASK(6, 0) +#define AXP15060_DCDC3_V_CTRL_MASK GENMASK(6, 0) +#define AXP15060_DCDC4_V_CTRL_MASK GENMASK(6, 0) +#define AXP15060_DCDC5_V_CTRL_MASK GENMASK(6, 0) +#define AXP15060_DCDC6_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_ALDO1_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_ALDO2_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_ALDO3_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_ALDO4_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_ALDO5_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_BLDO1_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_BLDO2_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_BLDO3_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_BLDO4_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_BLDO5_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_CLDO1_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_CLDO2_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_CLDO3_V_CTRL_MASK GENMASK(4, 0) +#define AXP15060_CLDO4_V_CTRL_MASK GENMASK(5, 0) +#define AXP15060_CPUSLDO_V_CTRL_MASK GENMASK(3, 0) + +#define AXP15060_PWR_OUT_DCDC1_MASK BIT_MASK(0) +#define AXP15060_PWR_OUT_DCDC2_MASK BIT_MASK(1) +#define AXP15060_PWR_OUT_DCDC3_MASK BIT_MASK(2) +#define AXP15060_PWR_OUT_DCDC4_MASK BIT_MASK(3) +#define AXP15060_PWR_OUT_DCDC5_MASK BIT_MASK(4) +#define AXP15060_PWR_OUT_DCDC6_MASK BIT_MASK(5) +#define AXP15060_PWR_OUT_ALDO1_MASK BIT_MASK(0) +#define AXP15060_PWR_OUT_ALDO2_MASK BIT_MASK(1) +#define AXP15060_PWR_OUT_ALDO3_MASK BIT_MASK(2) +#define AXP15060_PWR_OUT_ALDO4_MASK BIT_MASK(3) +#define AXP15060_PWR_OUT_ALDO5_MASK BIT_MASK(4) +#define AXP15060_PWR_OUT_BLDO1_MASK BIT_MASK(5) +#define AXP15060_PWR_OUT_BLDO2_MASK BIT_MASK(6) +#define AXP15060_PWR_OUT_BLDO3_MASK BIT_MASK(7) +#define AXP15060_PWR_OUT_BLDO4_MASK BIT_MASK(0) +#define AXP15060_PWR_OUT_BLDO5_MASK BIT_MASK(1) +#define AXP15060_PWR_OUT_CLDO1_MASK BIT_MASK(2) +#define AXP15060_PWR_OUT_CLDO2_MASK BIT_MASK(3) +#define AXP15060_PWR_OUT_CLDO3_MASK BIT_MASK(4) +#define AXP15060_PWR_OUT_CLDO4_MASK BIT_MASK(5) +#define AXP15060_PWR_OUT_CPUSLDO_MASK BIT_MASK(6) +#define AXP15060_PWR_OUT_SW_MASK BIT_MASK(7) + +#define AXP15060_DCDC23_POLYPHASE_DUAL_MASK BIT_MASK(6) +#define AXP15060_DCDC46_POLYPHASE_DUAL_MASK BIT_MASK(7) + +#define AXP15060_DCDC234_500mV_START 0x00 +#define AXP15060_DCDC234_500mV_STEPS 70 +#define AXP15060_DCDC234_500mV_END \ + (AXP15060_DCDC234_500mV_START + AXP15060_DCDC234_500mV_STEPS) +#define AXP15060_DCDC234_1220mV_START 0x47 +#define AXP15060_DCDC234_1220mV_STEPS 16 +#define AXP15060_DCDC234_1220mV_END \ + (AXP15060_DCDC234_1220mV_START + AXP15060_DCDC234_1220mV_STEPS) +#define AXP15060_DCDC234_NUM_VOLTAGES 88 + +#define AXP15060_DCDC5_800mV_START 0x00 +#define AXP15060_DCDC5_800mV_STEPS 32 +#define AXP15060_DCDC5_800mV_END \ + (AXP15060_DCDC5_800mV_START + AXP15060_DCDC5_800mV_STEPS) +#define AXP15060_DCDC5_1140mV_START 0x21 +#define AXP15060_DCDC5_1140mV_STEPS 35 +#define AXP15060_DCDC5_1140mV_END \ + (AXP15060_DCDC5_1140mV_START + AXP15060_DCDC5_1140mV_STEPS) +#define AXP15060_DCDC5_NUM_VOLTAGES 69 +#define AXP_DESC_IO (_family, _id, _match, _supply, _min, _max, _step, _vreg, \ _vmask, _ereg, _emask, _enable_val, _disable_val) \ [_family##_##_id] = { \
@@ -1048,6 +1116,104 @@ static const struct regulator_desc axp813_regulators[] = { AXP22X_PWR_OUT_CTRL2, AXP22X_PWR_OUT_DC1SW_MASK), }; +static const struct linear_range axp15060_dcdc234_ranges[] = { +REGULATOR_LINEAR_RANGE (500000 , + AXP15060_DCDC234_500mV_START, + AXP15060_DCDC234_500mV_END, +10000 ), +REGULATOR_LINEAR_RANGE (1220000 , + AXP15060_DCDC234_1220mV_START, + AXP15060_DCDC234_1220mV_END, +20000 ), +}; + +static const struct linear_range axp15060_dcdc5_ranges[] = { +REGULATOR_LINEAR_RANGE (800000 , + AXP15060_DCDC5_800mV_START, + AXP15060_DCDC5_800mV_END, +10000 ), +REGULATOR_LINEAR_RANGE (1140000 , + AXP15060_DCDC5_1140mV_START, + AXP15060_DCDC5_1140mV_END, +20000 ), +}; + +static const struct regulator_desc axp15060_regulators[] = { +AXP_DESC (AXP15060 ,DCDC1 ,"dcdc1" ,"vin1" ,1500 ,3400 ,100 , +AXP15060_DCDC1_V_CTRL ,AXP15060_DCDC1_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL1 ,AXP15060_PWR_OUT_DCDC1_MASK ), +AXP_DESC_RANGES (AXP15060 ,DCDC2 ,"dcdc2" ,"vin2" , + axp15060_dcdc234_ranges,AXP15060_DCDC234_NUM_VOLTAGES , +AXP15060_DCDC2_V_CTRL ,AXP15060_DCDC2_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL1 ,AXP15060_PWR_OUT_DCDC2_MASK ), +AXP_DESC_RANGES (AXP15060 ,DCDC3 ,"dcdc3" ,"vin3" , + axp15060_dcdc234_ranges,AXP15060_DCDC234_NUM_VOLTAGES , +AXP15060_DCDC3_V_CTRL ,AXP15060_DCDC3_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL1 ,AXP15060_PWR_OUT_DCDC3_MASK ), +AXP_DESC_RANGES (AXP15060 ,DCDC4 ,"dcdc4" ,"vin4" , + axp15060_dcdc234_ranges,AXP15060_DCDC234_NUM_VOLTAGES , +AXP15060_DCDC4_V_CTRL ,AXP15060_DCDC4_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL1 ,AXP15060_PWR_OUT_DCDC4_MASK ), +AXP_DESC_RANGES (AXP15060 ,DCDC5 ,"dcdc5" ,"vin5" , + axp15060_dcdc5_ranges,AXP15060_DCDC5_NUM_VOLTAGES , +AXP15060_DCDC5_V_CTRL ,AXP15060_DCDC5_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL1 ,AXP15060_PWR_OUT_DCDC5_MASK ), +AXP_DESC (AXP15060 ,DCDC6 ,"dcdc6" ,"vin6" ,500 ,3400 ,100 , +AXP15060_DCDC6_V_CTRL ,AXP15060_DCDC6_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL1 ,AXP15060_PWR_OUT_DCDC6_MASK ), +AXP_DESC (AXP15060 ,ALDO1 ,"aldo1" ,"aldoin" ,700 ,3300 ,100 , +AXP15060_ALDO1_V_CTRL ,AXP15060_ALDO1_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_ALDO1_MASK ), +AXP_DESC (AXP15060 ,ALDO2 ,"aldo2" ,"aldoin" ,700 ,3300 ,100 , +AXP15060_ALDO2_V_CTRL ,AXP15060_ALDO2_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_ALDO2_MASK ), +AXP_DESC (AXP15060 ,ALDO3 ,"aldo3" ,"aldoin" ,700 ,3300 ,100 , +AXP15060_ALDO3_V_CTRL ,AXP15060_ALDO3_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_ALDO3_MASK ), +AXP_DESC (AXP15060 ,ALDO4 ,"aldo4" ,"aldoin" ,700 ,3300 ,100 , +AXP15060_ALDO4_V_CTRL ,AXP15060_ALDO4_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_ALDO4_MASK ), +AXP_DESC (AXP15060 ,ALDO5 ,"aldo5" ,"aldoin" ,700 ,3300 ,100 , +AXP15060_ALDO5_V_CTRL ,AXP15060_ALDO5_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_ALDO5_MASK ), +AXP_DESC (AXP15060 ,BLDO1 ,"bldo1" ,"bldoin" ,700 ,3300 ,100 , +AXP15060_BLDO1_V_CTRL ,AXP15060_BLDO1_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_BLDO1_MASK ), +AXP_DESC (AXP15060 ,BLDO2 ,"bldo2" ,"bldoin" ,700 ,3300 ,100 , +AXP15060_BLDO2_V_CTRL ,AXP15060_BLDO2_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_BLDO2_MASK ), +AXP_DESC (AXP15060 ,BLDO3 ,"bldo3" ,"bldoin" ,700 ,3300 ,100 , +AXP15060_BLDO3_V_CTRL ,AXP15060_BLDO3_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL2 ,AXP15060_PWR_OUT_BLDO3_MASK ), +AXP_DESC (AXP15060 ,BLDO4 ,"bldo4" ,"bldoin" ,700 ,3300 ,100 , +AXP15060_BLDO4_V_CTRL ,AXP15060_BLDO4_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_BLDO4_MASK ), +AXP_DESC (AXP15060 ,BLDO5 ,"bldo5" ,"bldoin" ,700 ,3300 ,100 , +AXP15060_BLDO5_V_CTRL ,AXP15060_BLDO5_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_BLDO5_MASK ), +AXP_DESC (AXP15060 ,CLDO1 ,"cldo1" ,"cldoin" ,700 ,3300 ,100 , +AXP15060_CLDO1_V_CTRL ,AXP15060_CLDO1_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_CLDO1_MASK ), +AXP_DESC (AXP15060 ,CLDO2 ,"cldo2" ,"cldoin" ,700 ,3300 ,100 , +AXP15060_CLDO2_V_CTRL ,AXP15060_CLDO2_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_CLDO2_MASK ), +AXP_DESC (AXP15060 ,CLDO3 ,"cldo3" ,"cldoin" ,700 ,3300 ,100 , +AXP15060_CLDO3_V_CTRL ,AXP15060_CLDO3_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_CLDO3_MASK ), +AXP_DESC (AXP15060 ,CLDO4 ,"cldo4" ,"cldoin" ,700 ,4200 ,100 , +AXP15060_CLDO4_V_CTRL ,AXP15060_CLDO4_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_CLDO4_MASK ), +/* Supply comes from DCDC5 */ +AXP_DESC (AXP15060 ,CPUSLDO ,"cpusldo" ,NULL ,700 ,1400 ,50 , +AXP15060_CPUSLDO_V_CTRL ,AXP15060_CPUSLDO_V_CTRL_MASK , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_CPUSLDO_MASK ), +/* Supply comes from DCDC1 */ +AXP_DESC_SW (AXP15060 ,SW ,"sw" ,NULL , +AXP15060_PWR_OUT_CTRL3 ,AXP15060_PWR_OUT_SW_MASK ), +/* Supply comes from ALDO1 */ +AXP_DESC_FIXED (AXP15060 ,RTC_LDO ,"rtc-ldo" ,NULL ,1800 ), +}; +static int axp20x_set_dcdc_freq (struct platform_device *pdev,u32 dcdcfreq) {struct axp20x_dev *axp20x =dev_get_drvdata (pdev->dev.parent);
@@ -1088,10 +1254,11 @@ static int axp20x_set_dcdc_freq(struct platform_device *pdev, u32 dcdcfreq) step =150 ;break ;case AXP313A_ID : +case AXP15060_ID :/* The DCDC PWM frequency seems to be fixed to 3 MHz. */ if (dcdcfreq !=0 ) {dev_err (&pdev->dev, -"DCDC frequency on AXP313a is fixed to 3 MHz.\n" ); +"DCDC frequency on this PMIC is fixed to 3 MHz.\n" );return -EINVAL ; }
@@ -1201,6 +1368,15 @@ static int axp20x_set_dcdc_workmode(struct regulator_dev *rdev, int id, u32 work workmode <<= id -AXP813_DCDC1 ;break ; +case AXP15060_ID : + reg =AXP15060_DCDC_MODE_CTRL2 ; +if (id <AXP15060_DCDC1 || id >AXP15060_DCDC6 ) +return -EINVAL ; + + mask =AXP22X_WORKMODE_DCDCX_MASK (id -AXP15060_DCDC1 ); + workmode <<= id -AXP15060_DCDC1 ; +break ; +default :/* should not happen */ WARN_ON (1 );
@@ -1220,7 +1396,7 @@ static bool axp20x_is_polyphase_slave(struct axp20x_dev *axp20x, int id)/* * Currently in our supported AXP variants, only AXP803, AXP806, -* and AXP813 have polyphase regulators. +* AXP813 and AXP15060 have polyphase regulators. */ switch (axp20x->variant) {case AXP803_ID :
@@ -1252,6 +1428,17 @@ static bool axp20x_is_polyphase_slave(struct axp20x_dev *axp20x, int id) }break ; +case AXP15060_ID : +regmap_read (axp20x->regmap,AXP15060_DCDC_MODE_CTRL1 , ®); + +switch (id) { +case AXP15060_DCDC3 : +return !!(reg &AXP15060_DCDC23_POLYPHASE_DUAL_MASK ); +case AXP15060_DCDC6 : +return !!(reg &AXP15060_DCDC46_POLYPHASE_DUAL_MASK ); + } +break ; +default :return false; }
@@ -1273,6 +1460,7 @@ static int axp20x_regulator_probe(struct platform_device *pdev)u32 workmode;const char *dcdc1_name = axp22x_regulators[AXP22X_DCDC1 ].name;const char *dcdc5_name = axp22x_regulators[AXP22X_DCDC5 ].name; +const char *aldo1_name = axp15060_regulators[AXP15060_ALDO1 ].name;bool drivevbus = false;switch (axp20x->variant) {
@@ -1312,6 +1500,10 @@ static int axp20x_regulator_probe(struct platform_device *pdev) drivevbus =of_property_read_bool (pdev->dev.parent->of_node,"x-powers,drive-vbus-en" );break ; +case AXP15060_ID : + regulators = axp15060_regulators; + nregulators =AXP15060_REG_ID_MAX ; +break ;default :dev_err (&pdev->dev,"Unsupported AXP variant: %ld\n" , axp20x->variant);
@@ -1338,8 +1530,9 @@ static int axp20x_regulator_probe(struct platform_device *pdev)continue ;/* -* Regulators DC1SW and DC5LDO are connected internally, -* so we have to handle their supply names separately. +* Regulators DC1SW, DC5LDO and RTCLDO on AXP15060 are +* connected internally, so we have to handle their supply +* names separately. * * We always register the regulators in proper sequence, * so the supply names are correctly read. See the last
@@ -1348,7 +1541,8 @@ static int axp20x_regulator_probe(struct platform_device *pdev)*/ if ((regulators == axp22x_regulators && i ==AXP22X_DC1SW ) || (regulators == axp803_regulators && i ==AXP803_DC1SW ) || - (regulators == axp809_regulators && i ==AXP809_DC1SW )) { + (regulators == axp809_regulators && i ==AXP809_DC1SW ) || + (regulators == axp15060_regulators && i ==AXP15060_SW )) { new_desc =devm_kzalloc (&pdev->dev,sizeof (*desc),GFP_KERNEL );if (!new_desc)
@@ -1360,7 +1554,8 @@ static int axp20x_regulator_probe(struct platform_device *pdev) }if ((regulators == axp22x_regulators && i ==AXP22X_DC5LDO ) || - (regulators == axp809_regulators && i ==AXP809_DC5LDO )) { + (regulators == axp809_regulators && i ==AXP809_DC5LDO ) || + (regulators == axp15060_regulators && i ==AXP15060_CPUSLDO )) { new_desc =devm_kzalloc (&pdev->dev,sizeof (*desc),GFP_KERNEL );if (!new_desc)
@@ -1371,6 +1566,18 @@ static int axp20x_regulator_probe(struct platform_device *pdev) desc = new_desc; } + +if (regulators == axp15060_regulators && i ==AXP15060_RTC_LDO ) { + new_desc =devm_kzalloc (&pdev->dev,sizeof (*desc), +GFP_KERNEL ); +if (!new_desc) +return -ENOMEM ; + + *new_desc = regulators[i]; + new_desc->supply_name = aldo1_name; + desc = new_desc; + } + rdev =devm_regulator_register (&pdev->dev, desc, &config);if (IS_ERR (rdev)) { dev_err(&pdev->dev, "Failed to register %s\n",
@@ -1389,19 +1596,26 @@ static int axp20x_regulator_probe(struct platform_device *pdev) }/* -* Save AXP22X DCDC1 / DCDC5 regulator names for later. +* Save AXP22X DCDC1 / DCDC5 / AXP15060 ALDO1 regulator names for later. */ if ((regulators == axp22x_regulators && i ==AXP22X_DCDC1 ) || - (regulators == axp809_regulators && i ==AXP809_DCDC1 )) + (regulators == axp809_regulators && i ==AXP809_DCDC1 ) || + (regulators == axp15060_regulators && i ==AXP15060_DCDC1 ))of_property_read_string (rdev->dev.of_node,"regulator-name" , &dcdc1_name);if ((regulators == axp22x_regulators && i ==AXP22X_DCDC5 ) || - (regulators == axp809_regulators && i ==AXP809_DCDC5 )) + (regulators == axp809_regulators && i ==AXP809_DCDC5 ) || + (regulators == axp15060_regulators && i ==AXP15060_DCDC5 ))of_property_read_string (rdev->dev.of_node,"regulator-name" , &dcdc5_name); + +if (regulators == axp15060_regulators && i ==AXP15060_ALDO1 ) +of_property_read_string (rdev->dev.of_node, +"regulator-name" , + &aldo1_name); }if (drivevbus) {
Signature · 1 line
2.40.0
Re: [PATCH v3 3/3] regulator: axp20x: Add AXP15060 support
Quoted 3 lines · Shengyu Qu
The AXP15060 is a typical I2C-controlled PMIC, seen on multiple boards with different default register value. Current driver is tested on Starfive Visionfive 2.
Re: [PATCH v3 3/3] regulator: axp20x: Add AXP15060 support
In reply to Shengyu QuQuoted 21 lines · Shengyu Qu
The AXP15060 is a typical I2C-controlled PMIC, seen on multiple boards with different default register value. Current driver is tested on Starfive Visionfive 2.
The RTCLDO is fixed, and cannot even be turned on or off. On top of that, its voltage is customisable (either 1.8V or 3.3V). We pretend it's a fixed 1.8V regulator since other AXP driver also do like this. Also, BSP code ignores this regulator and it's not used according to VF2 schematic.
Describe the AXP15060's voltage settings and switch registers, how the voltages are encoded, and connect this to the MFD device via its regulator ID.
---
Changes since v2:
- Rebase to AXP313a series v10 [1] + newest (20230420) -next branch
- Fix some whitespace (Andre Przywara)
- Rename swout to sw to keep up with bindings (Andre Przywara)
- Add check for setting DC-DC frequency (Andre Przywara)
Quoted 6 lines
Changes since v1:
- Nothing[1] https://lore.kernel.org/linux-sunxi/[email protected]/
Signed-off-by Shengyu Qu <[email protected]>
This was not applied, so you can still fix it.
Broken patch trailer / SoB.
Best regards,
Krzysztof