linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: bus: add palmbus device tree bindings
@ 2021-10-15 19:17 Sergio Paracuellos
  2021-10-15 21:45 ` Rob Herring
  2021-10-16 14:24 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Sergio Paracuellos @ 2021-10-15 19:17 UTC (permalink / raw)
  To: devicetree; +Cc: robh, john, neil, linux-kernel

Add device tree bindings for palmbus controller present in all the MIPS
ralink based SoCs.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../devicetree/bindings/bus/palmbus.yaml      | 81 +++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/palmbus.yaml

diff --git a/Documentation/devicetree/bindings/bus/palmbus.yaml b/Documentation/devicetree/bindings/bus/palmbus.yaml
new file mode 100644
index 000000000000..d5159a4f3cf8
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/palmbus.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/palmbus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Ralink PalmBus Device Tree Bindings
+
+maintainers:
+  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
+
+description: |
+  The ralink palmbus controller can be found in all ralink MIPS
+  SoCs. It provides an external bus for connecting multiple
+  external devices to the SoC.
+
+properties:
+  $nodename:
+    pattern: "^palmbus(@[0-9a-f]+)?$"
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  compatible:
+    const: palmbus
+
+  reg:
+    maxItems: 1
+
+  ranges: true
+
+patternProperties:
+  # All other properties should be child nodes with unit-address and 'reg'
+  "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
+    type: object
+    properties:
+      reg:
+        maxItems: 1
+
+    required:
+      - reg
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+
+additionalProperties: false
+
+examples:
+  - |
+    palmbus@1e000000 {
+        compatible = "palmbus";
+        reg = <0x1e000000 0x100000>
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x1e000000 0x0fffff>;
+
+        syscon@0 {
+            compatible = "mediatek,mt7621-sysc", "syscon";
+            reg = <0x0 0x100>;
+            #clock-cells = <1>;
+            #reset-cells = <1>;
+            ralink,memctl = <&memc>;
+            clock-output-names = "xtal", "cpu", "bus",
+                                 "50m", "125m", "150m",
+                                 "250m", "270m";
+        };
+
+        wdt@100 {
+            compatible = "mediatek,mt7621-wdt";
+            reg = <0x100 0x100>;
+        };
+    };
+
+...
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: bus: add palmbus device tree bindings
  2021-10-15 19:17 [PATCH] dt-bindings: bus: add palmbus device tree bindings Sergio Paracuellos
@ 2021-10-15 21:45 ` Rob Herring
  2021-10-16 14:24 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-10-15 21:45 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: linux-kernel, neil, devicetree, john

On Fri, 15 Oct 2021 21:17:41 +0200, Sergio Paracuellos wrote:
> Add device tree bindings for palmbus controller present in all the MIPS
> ralink based SoCs.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
>  .../devicetree/bindings/bus/palmbus.yaml      | 81 +++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/bus/palmbus.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/bus/palmbus.example.dts:22.13-14 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:385: Documentation/devicetree/bindings/bus/palmbus.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1441: dt_binding_check] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1541885

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: bus: add palmbus device tree bindings
  2021-10-15 19:17 [PATCH] dt-bindings: bus: add palmbus device tree bindings Sergio Paracuellos
  2021-10-15 21:45 ` Rob Herring
@ 2021-10-16 14:24 ` Rob Herring
  2021-10-16 20:24   ` Sergio Paracuellos
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2021-10-16 14:24 UTC (permalink / raw)
  To: Sergio Paracuellos; +Cc: devicetree, john, neil, linux-kernel

On Fri, Oct 15, 2021 at 09:17:41PM +0200, Sergio Paracuellos wrote:
> Add device tree bindings for palmbus controller present in all the MIPS
> ralink based SoCs.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
>  .../devicetree/bindings/bus/palmbus.yaml      | 81 +++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/bus/palmbus.yaml
> 
> diff --git a/Documentation/devicetree/bindings/bus/palmbus.yaml b/Documentation/devicetree/bindings/bus/palmbus.yaml
> new file mode 100644
> index 000000000000..d5159a4f3cf8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/bus/palmbus.yaml
> @@ -0,0 +1,81 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/bus/palmbus.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ralink PalmBus Device Tree Bindings
> +
> +maintainers:
> +  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
> +
> +description: |
> +  The ralink palmbus controller can be found in all ralink MIPS
> +  SoCs. It provides an external bus for connecting multiple
> +  external devices to the SoC.
> +
> +properties:
> +  $nodename:
> +    pattern: "^palmbus(@[0-9a-f]+)?$"
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +  compatible:
> +    const: palmbus
> +
> +  reg:
> +    maxItems: 1
> +
> +  ranges: true
> +
> +patternProperties:
> +  # All other properties should be child nodes with unit-address and 'reg'
> +  "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":

The node name pattern is already checked elsewhere. You only need to 
define the unit-address part which should be lowercase hex. So just:

'@[0-9a-f]+$'

> +    type: object
> +    properties:
> +      reg:
> +        maxItems: 1
> +
> +    required:
> +      - reg
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#address-cells"
> +  - "#size-cells"
> +  - ranges
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    palmbus@1e000000 {
> +        compatible = "palmbus";
> +        reg = <0x1e000000 0x100000>
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        ranges = <0x0 0x1e000000 0x0fffff>;
> +
> +        syscon@0 {
> +            compatible = "mediatek,mt7621-sysc", "syscon";
> +            reg = <0x0 0x100>;
> +            #clock-cells = <1>;
> +            #reset-cells = <1>;
> +            ralink,memctl = <&memc>;
> +            clock-output-names = "xtal", "cpu", "bus",
> +                                 "50m", "125m", "150m",
> +                                 "250m", "270m";
> +        };
> +
> +        wdt@100 {
> +            compatible = "mediatek,mt7621-wdt";
> +            reg = <0x100 0x100>;
> +        };
> +    };
> +
> +...
> -- 
> 2.33.0
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dt-bindings: bus: add palmbus device tree bindings
  2021-10-16 14:24 ` Rob Herring
@ 2021-10-16 20:24   ` Sergio Paracuellos
  0 siblings, 0 replies; 4+ messages in thread
From: Sergio Paracuellos @ 2021-10-16 20:24 UTC (permalink / raw)
  To: Rob Herring
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	John Crispin, NeilBrown, linux-kernel

On Sat, Oct 16, 2021 at 4:25 PM Rob Herring <robh@kernel.org> wrote:
>
> On Fri, Oct 15, 2021 at 09:17:41PM +0200, Sergio Paracuellos wrote:
> > Add device tree bindings for palmbus controller present in all the MIPS
> > ralink based SoCs.
> >
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > ---
> >  .../devicetree/bindings/bus/palmbus.yaml      | 81 +++++++++++++++++++
> >  1 file changed, 81 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/bus/palmbus.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/bus/palmbus.yaml b/Documentation/devicetree/bindings/bus/palmbus.yaml
> > new file mode 100644
> > index 000000000000..d5159a4f3cf8
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/bus/palmbus.yaml
> > @@ -0,0 +1,81 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/bus/palmbus.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Ralink PalmBus Device Tree Bindings
> > +
> > +maintainers:
> > +  - Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > +
> > +description: |
> > +  The ralink palmbus controller can be found in all ralink MIPS
> > +  SoCs. It provides an external bus for connecting multiple
> > +  external devices to the SoC.
> > +
> > +properties:
> > +  $nodename:
> > +    pattern: "^palmbus(@[0-9a-f]+)?$"
> > +
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 1
> > +
> > +  compatible:
> > +    const: palmbus
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  ranges: true
> > +
> > +patternProperties:
> > +  # All other properties should be child nodes with unit-address and 'reg'
> > +  "^[a-zA-Z][a-zA-Z0-9,+\\-._]{0,63}@[0-9a-fA-F]+$":
>
> The node name pattern is already checked elsewhere. You only need to
> define the unit-address part which should be lowercase hex. So just:
>
> '@[0-9a-f]+$'

Ok, thanks. Changed and send v4.

Best regards,
     Sergio Paracuellos

>
> > +    type: object
> > +    properties:
> > +      reg:
> > +        maxItems: 1
> > +
> > +    required:
> > +      - reg
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - "#address-cells"
> > +  - "#size-cells"
> > +  - ranges
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    palmbus@1e000000 {
> > +        compatible = "palmbus";
> > +        reg = <0x1e000000 0x100000>
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +        ranges = <0x0 0x1e000000 0x0fffff>;
> > +
> > +        syscon@0 {
> > +            compatible = "mediatek,mt7621-sysc", "syscon";
> > +            reg = <0x0 0x100>;
> > +            #clock-cells = <1>;
> > +            #reset-cells = <1>;
> > +            ralink,memctl = <&memc>;
> > +            clock-output-names = "xtal", "cpu", "bus",
> > +                                 "50m", "125m", "150m",
> > +                                 "250m", "270m";
> > +        };
> > +
> > +        wdt@100 {
> > +            compatible = "mediatek,mt7621-wdt";
> > +            reg = <0x100 0x100>;
> > +        };
> > +    };
> > +
> > +...
> > --
> > 2.33.0
> >
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-16 20:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 19:17 [PATCH] dt-bindings: bus: add palmbus device tree bindings Sergio Paracuellos
2021-10-15 21:45 ` Rob Herring
2021-10-16 14:24 ` Rob Herring
2021-10-16 20:24   ` Sergio Paracuellos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).