2024-04-26 18:34:09

by Patrick Delaunay

[permalink] [raw]
Subject: [PATCH v2 0/2] ARM: st: add new compatible for PWR regulators on STM32MP13


This patchset adds the new PWR regulators compatible for STM32MP13:
"st,stm32mp13-pwr-reg".

As this node is just introduced by [1] and it is is not used by any
board in Linux, it is the good time to introduced this compatible
and update the STM32MP13 SoC dtsi without ABI break.

A new compatible is needed as the content of the PWR_CR3 register,
used by this driver change with new bits on STM32MP13 for SD IO domain:
- bit 23: VDDSD2VALID
- bit 22: VDDSD1VALID
- bit 16: VDDSD2RDY
- bit 15: VDDSD2EN
- bit 14: VDDSD1RDY
- bit 13: VDDSD1EN

I will push a update on STM32MP13 SoC dtsi if this new compatible
is accepted to preserve the bisectability.

[1] commit f798f7079233 ("ARM: dts: stm32: add PWR regulators support on stm32mp131")
https://lore.kernel.org/linux-arm-kernel/[email protected]/


Changes in v2:
- Add new compatible for STM32MP13 and change title after Rob remarks
V1: "ARM: st: use a correct pwr compatible for stm32mp15"

Patrick Delaunay (2):
dt-bindings: regulator: st,stm32mp1-pwr-reg: add compatible for
STM32MP13
regulator: stm32-pwr: add support of STM32MP13

.../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml | 4 +++-
drivers/regulator/stm32-pwr.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)

--
2.25.1



2024-04-26 18:34:09

by Patrick Delaunay

[permalink] [raw]
Subject: [PATCH v2 2/2] regulator: stm32-pwr: add support of STM32MP13

Add support of the new compatible "st,stm32mp13-pwr-reg" for STM32MP13.

Signed-off-by: Patrick Delaunay <[email protected]>
---

Changes in v2:
- Add new compatible for STM32MP13 and change title after Rob remarks
V1: "ARM: st: use a correct pwr compatible for stm32mp15"

drivers/regulator/stm32-pwr.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c
index 85b0102fb9b1..b7aeef6e09e7 100644
--- a/drivers/regulator/stm32-pwr.c
+++ b/drivers/regulator/stm32-pwr.c
@@ -166,6 +166,7 @@ static int stm32_pwr_regulator_probe(struct platform_device *pdev)

static const struct of_device_id __maybe_unused stm32_pwr_of_match[] = {
{ .compatible = "st,stm32mp1,pwr-reg", },
+ { .compatible = "st,stm32mp13-pwr-reg", },
{},
};
MODULE_DEVICE_TABLE(of, stm32_pwr_of_match);
--
2.25.1


2024-04-26 18:34:45

by Patrick Delaunay

[permalink] [raw]
Subject: [PATCH v2 1/2] dt-bindings: regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13

Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family.

Signed-off-by: Patrick Delaunay <[email protected]>
---

Changes in v2:
- update for Rob review, only add compatible for STM32MP13 family

.../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
index c9586d277f41..b0c6c62a84ea 100644
--- a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
+++ b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
@@ -11,7 +11,9 @@ maintainers:

properties:
compatible:
- const: st,stm32mp1,pwr-reg
+ oneOf:
+ - const: st,stm32mp1,pwr-reg
+ - const: st,stm32mp13-pwr-reg

reg:
maxItems: 1
--
2.25.1


2024-04-26 19:24:09

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13


On Fri, 26 Apr 2024 20:32:50 +0200, Patrick Delaunay wrote:
> Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family.
>
> Signed-off-by: Patrick Delaunay <[email protected]>
> ---
>
> Changes in v2:
> - update for Rob review, only add compatible for STM32MP13 family
>
> .../devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml:15:5: [warning] wrong indentation: expected 6 but found 4 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml: properties:compatible:oneOf: [{'const': 'st,stm32mp1,pwr-reg'}, {'const': 'st,stm32mp13-pwr-reg'}] should not be valid under {'items': {'propertyNames': {'const': 'const'}, 'required': ['const']}}
hint: Use 'enum' rather than 'oneOf' + 'const' entries
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240426203245.v2.1.Ia0a99d90acb512aa020a6e7a8cca8cc1b71f1759@changeid

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


2024-04-29 05:11:57

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13

On 26/04/2024 20:32, Patrick Delaunay wrote:
> Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family.
>
> Signed-off-by: Patrick Delaunay <[email protected]>
> ---
>
> Changes in v2:
> - update for Rob review, only add compatible for STM32MP13 family

Please start testing your patches BEFORE sending.

Best regards,
Krzysztof


2024-05-13 09:48:11

by Patrick Delaunay

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13


On 4/29/24 07:11, Krzysztof Kozlowski wrote:
> On 26/04/2024 20:32, Patrick Delaunay wrote:
>> Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family.
>>
>> Signed-off-by: Patrick Delaunay <[email protected]>
>> ---
>>
>> Changes in v2:
>> - update for Rob review, only add compatible for STM32MP13 family
> Please start testing your patches BEFORE sending.


Sorry,

I don't know why I don't see the issue even if I executed

make dt_binding_check SCHEMA_FILES=stm32


I will sent a V3

and I update my way of working to avoid this error

=> clean the output biding directory before to execute again
"dt_binding_check"


>
> Best regards,
> Krzysztof


Regards

Patrick


2024-05-13 11:57:03

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: regulator: st,stm32mp1-pwr-reg: add compatible for STM32MP13

On 13/05/2024 11:46, Patrick DELAUNAY wrote:
>
> On 4/29/24 07:11, Krzysztof Kozlowski wrote:
>> On 26/04/2024 20:32, Patrick Delaunay wrote:
>>> Add new compatible "st,stm32mp13-pwr-reg" for STM32MP13 SoC family.
>>>
>>> Signed-off-by: Patrick Delaunay <[email protected]>
>>> ---
>>>
>>> Changes in v2:
>>> - update for Rob review, only add compatible for STM32MP13 family
>> Please start testing your patches BEFORE sending.
>
>
> Sorry,
>
> I don't know why I don't see the issue even if I executed
>
> make dt_binding_check SCHEMA_FILES=stm32

The code is incorrect, which is easily visible by the diff. dtschema
detects it so, your setup is probably not complete, if you claim you run
it before sending. writing-schema doc has short guide how to setup, but
that's basically only one command - pip install dtschema

Best regards,
Krzysztof