Thread (12 messages) 12 messages, 4 authors, 2020-02-29

Re: [PATCH 3/3] dt-bingings: pinctrl: Convert UniPhier pin controller to json-schema

From: Masahiro Yamada <masahiroy@kernel.org>
Date: 2020-02-29 04:13:40
Also in: linux-devicetree, linux-gpio, lkml

Hi Linus,

On Sat, Feb 29, 2020 at 7:13 AM Linus Walleij [off-list ref] wrote:
On Fri, Feb 21, 2020 at 3:10 AM Masahiro Yamada
[off-list ref] wrote:
quoted
Convert the UniPhier pin controller binding to DT schema format.

Signed-off-by: Masahiro Yamada <redacted>
Nice!
quoted
In the original .txt file, there is a description:
The UniPhier pinctrl should be a subnode of a "syscon" compatible node

I did not figure out how to represent (or check) it in dt-schema.
I just moved it to a comment line in 'examples'.
If there is a better way, please let me know.
There is no way to do that AFAICT, we are checking nodes from
one node and downwards, never upwards. The syscon needs to
have its own binding file: if it has another specific compatible
such as compatible = "foo", "syscon"; then for the DT bindings
for foo, make sure to add this subnode as optional/compulsory
if you want to tie up the whole thing.

Thanks for your advice.


Documentation/devicetree/bindings/mfd/syscon.yaml

already contains sunxi-specific compatibles, but
I hesitate to add more and more platform-specific stuff
in this file.

Maybe, I can add

Documentation/devicetree/bindings/mfd/socionext,uniphier-soc-glue.yaml

and then, check 'reg' and compulsory sub-nodes.


quoted
-Required properties:
-- compatible: should be one of the following:
-    "socionext,uniphier-ld4-pinctrl"  - for LD4 SoC
-    "socionext,uniphier-pro4-pinctrl" - for Pro4 SoC
-    "socionext,uniphier-sld8-pinctrl" - for sLD8 SoC
-    "socionext,uniphier-pro5-pinctrl" - for Pro5 SoC
-    "socionext,uniphier-pxs2-pinctrl" - for PXs2 SoC
-    "socionext,uniphier-ld6b-pinctrl" - for LD6b SoC
-    "socionext,uniphier-ld11-pinctrl" - for LD11 SoC
-    "socionext,uniphier-ld20-pinctrl" - for LD20 SoC
-    "socionext,uniphier-pxs3-pinctrl" - for PXs3 SoC
But:
quoted
+    soc-glue@5f800000 {
+        compatible = "socionext,uniphier-pro4-soc-glue", "simple-mfd", "syscon";
+        reg = <0x5f800000 0x2000>;
+
+        pinctrl: pinctrl {
+            compatible = "socionext,uniphier-pro4-pinctrl";
+        };
+    };
It looks like you want to check also for "simple-mfd" and "syscon"
following after the enum (two consts)

It seems you want to check that reg is there.

Documentation/devicetree/bindings/mfd/syscon.yaml

already checks the 'reg' by the 'contains syscon' pattern,
but I can repeat it in my yaml file.

Thanks.

It seems the subnode pinctrl is also compulsory.

All of this have examples in example-schema.yaml IIRC.

Yours,
Linus Walleij


-- 
Best Regards
Masahiro Yamada

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help