diff mbox series

[1/3] dt-bindings: sram: sunxi-sram: Add regulators child

Message ID 20240622150731.1105901-2-wens@kernel.org (mailing list archive)
State Handled Elsewhere
Headers show
Series riscv: allwinner: ClockworkPi and DevTerm devicetrees | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/tests/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/tests/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/tests/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/tests/module_param.sh
conchuod/patch-1-test-11 success .github/scripts/patches/tests/verify_fixes.sh
conchuod/patch-1-test-12 success .github/scripts/patches/tests/verify_signedoff.sh

Commit Message

Chen-Yu Tsai June 22, 2024, 3:07 p.m. UTC
From: Samuel Holland <samuel@sholland.org>

Some sunxi SoCs have in-package regulators controlled by a register in
the system control MMIO block. Allow a child node for this regulator
device in addition to SRAM child nodes.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../allwinner,sun4i-a10-system-control.yaml   | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

Comments

Rob Herring (Arm) June 22, 2024, 4:35 p.m. UTC | #1
On Sat, 22 Jun 2024 23:07:29 +0800, Chen-Yu Tsai wrote:
> From: Samuel Holland <samuel@sholland.org>
> 
> Some sunxi SoCs have in-package regulators controlled by a register in
> the system control MMIO block. Allow a child node for this regulator
> device in addition to SRAM child nodes.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  .../allwinner,sun4i-a10-system-control.yaml   | 28 +++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: syscon@3000000: regulators@3000150: False schema does not allow {'compatible': ['allwinner,sun20i-d1-system-ldos'], 'reg': [[50331984, 4]], 'ldoa': {'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}, 'ldob': {'regulator-name': ['vcc-dram'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[1500000]]}}
	from schema $id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#
Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: /example-1/syscon@3000000/regulators@3000150: failed to match any schema with compatible: ['allwinner,sun20i-d1-system-ldos']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240622150731.1105901-2-wens@kernel.org

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.
Chen-Yu Tsai June 22, 2024, 4:46 p.m. UTC | #2
Hi,

On Sun, Jun 23, 2024 at 12:36 AM Rob Herring (Arm) <robh@kernel.org> wrote:
>
>
> On Sat, 22 Jun 2024 23:07:29 +0800, Chen-Yu Tsai wrote:
> > From: Samuel Holland <samuel@sholland.org>
> >
> > Some sunxi SoCs have in-package regulators controlled by a register in
> > the system control MMIO block. Allow a child node for this regulator
> > device in addition to SRAM child nodes.
> >
> > Signed-off-by: Samuel Holland <samuel@sholland.org>
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  .../allwinner,sun4i-a10-system-control.yaml   | 28 +++++++++++++++++++
> >  1 file changed, 28 insertions(+)
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: syscon@3000000: regulators@3000150: False schema does not allow {'compatible': ['allwinner,sun20i-d1-system-ldos'], 'reg': [[50331984, 4]], 'ldoa': {'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}, 'ldob': {'regulator-name': ['vcc-dram'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[1500000]]}}
>         from schema $id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#
> Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: /example-1/syscon@3000000/regulators@3000150: failed to match any schema with compatible: ['allwinner,sun20i-d1-system-ldos']

I'm not seeing this error locally. The binding in question for
'allwinner,sun20i-d1-system-ldos' was merged in v6.10-rc1 in commit
622bab188484 ("regulator: dt-bindings: Add Allwinner D1 system LDOs").


ChenYu

> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240622150731.1105901-2-wens@kernel.org
>
> 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.
>
Conor Dooley June 23, 2024, 2:28 p.m. UTC | #3
On Sun, Jun 23, 2024 at 12:46:53AM +0800, Chen-Yu Tsai wrote:
> Hi,
> 
> On Sun, Jun 23, 2024 at 12:36 AM Rob Herring (Arm) <robh@kernel.org> wrote:
> >
> >
> > On Sat, 22 Jun 2024 23:07:29 +0800, Chen-Yu Tsai wrote:
> > > From: Samuel Holland <samuel@sholland.org>
> > >
> > > Some sunxi SoCs have in-package regulators controlled by a register in
> > > the system control MMIO block. Allow a child node for this regulator
> > > device in addition to SRAM child nodes.
> > >
> > > Signed-off-by: Samuel Holland <samuel@sholland.org>
> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > > ---
> > >  .../allwinner,sun4i-a10-system-control.yaml   | 28 +++++++++++++++++++
> > >  1 file changed, 28 insertions(+)
> > >
> >
> > My bot found errors running 'make dt_binding_check' on your patch:
> >
> > yamllint warnings/errors:
> >
> > dtschema/dtc warnings/errors:
> > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: syscon@3000000: regulators@3000150: False schema does not allow {'compatible': ['allwinner,sun20i-d1-system-ldos'], 'reg': [[50331984, 4]], 'ldoa': {'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]]}, 'ldob': {'regulator-name': ['vcc-dram'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[1500000]]}}
> >         from schema $id: http://devicetree.org/schemas/sram/allwinner,sun4i-a10-system-control.yaml#
> > Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.example.dtb: /example-1/syscon@3000000/regulators@3000150: failed to match any schema with compatible: ['allwinner,sun20i-d1-system-ldos']
> 
> I'm not seeing this error locally. The binding in question for
> 'allwinner,sun20i-d1-system-ldos' was merged in v6.10-rc1 in commit
> 622bab188484 ("regulator: dt-bindings: Add Allwinner D1 system LDOs").

I only tried on top of linux-next from a few days ago, but it didn't
reproduce for me there. I think you're okay.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
index cf07b8f787a6..d9322704f358 100644
--- a/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
+++ b/Documentation/devicetree/bindings/sram/allwinner,sun4i-a10-system-control.yaml
@@ -56,6 +56,9 @@  properties:
   ranges: true
 
 patternProperties:
+  "^regulators@[0-9a-f]+$":
+    $ref: /schemas/regulator/allwinner,sun20i-d1-system-ldos.yaml#
+
   "^sram@[a-f0-9]+":
     $ref: /schemas/sram/sram.yaml#
     unevaluatedProperties: false
@@ -130,3 +133,28 @@  examples:
         };
       };
     };
+
+  - |
+    syscon@3000000 {
+      compatible = "allwinner,sun20i-d1-system-control";
+      reg = <0x3000000 0x1000>;
+      ranges;
+      #address-cells = <1>;
+      #size-cells = <1>;
+
+      regulators@3000150 {
+        compatible = "allwinner,sun20i-d1-system-ldos";
+        reg = <0x3000150 0x4>;
+
+        reg_ldoa: ldoa {
+          regulator-min-microvolt = <1800000>;
+          regulator-max-microvolt = <1800000>;
+        };
+
+        reg_ldob: ldob {
+          regulator-name = "vcc-dram";
+          regulator-min-microvolt = <1500000>;
+          regulator-max-microvolt = <1500000>;
+        };
+      };
+    };