devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] dt-bindings: mips: add CPU bindings for MIPS architecture
@ 2022-10-01  4:38 Sergio Paracuellos
  2022-10-01  4:38 ` [PATCH v4 1/2] " Sergio Paracuellos
  2022-10-01  4:38 ` [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema Sergio Paracuellos
  0 siblings, 2 replies; 7+ messages in thread
From: Sergio Paracuellos @ 2022-10-01  4:38 UTC (permalink / raw)
  To: devicetree
  Cc: robh+dt, krzysztof.kozlowski+dt, hauke, zajec5, tsbogend,
	zhouyanjie, linux-mips, arinc.unal

Hi all,

This series tries to make the correct thing to represent in schema
all the current documentation related with MIPS CPUs.

Broadcom cpus node is a bit special and need to use the property
'mips-hpt-frequency' in the cpus node. Because of this I have introduced
brcm/soc.yaml schema with current broadcom SoCs and making this property
required as per Rob's v3 review comments.

Ingenic cpus have also its schema already mainlined. To unify things I
have also put this information in this mips/cpus.yaml schema and remove
the 'mips/ingenic/ingenic,cpu.yaml' schema. I have also added current
maintainer as maintainer for this 'mips/cpus.yaml' file.

Changes in v4:
- Address Rob's v3 review comments:
    * Drop PATCH introducing special brcm,cpus.yaml only because properyu
    'mips-hpt-frequency' is required and move this property to brcm/soc.yaml
    schema.
    * Remove 'Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml'
    and add that information to general mips/cpus.yaml schema.
    * Define all properties in mips/cpus.yaml and set 'additionalProperties'
    to false.

Changes in v3:
- cpus.yaml:
    * address Krzysztof comment in v2:
    * add Thomas as maintainer since this is architecture binding.
    * s/cpu/CPU
    * compatible goes first
    * Add compatible 'mips,mips4Kc' as per Thomas request.
- Introduce two new schemas for Broadcom BMIPS:
    * soc.yaml: describing the BRCM SoC's
    * brcm,bmips-cpus.yaml: describing the cpu nodes for this platform.

Previous series:
v1: https://lore.kernel.org/all/CAMhs-H-eUTOHjAXAbywOXQJgc_j5Ex-1sB7eBZU_bWt1fpNVzA@mail.gmail.com/T/
v2: https://lore.kernel.org/all/20220918112245.GA5555@alpha.franken.de/T/
v3: https://lore.kernel.org/linux-devicetree/20220929072004.874795-1-sergio.paracuellos@gmail.com/T/#t

Sergio Paracuellos (2):
  dt-bindings: mips: add CPU bindings for MIPS architecture
  dt-bindings: mips: brcm: convert Broadcom SoCs to schema

 .../bindings/mips/brcm/brcm,bmips.txt         |   8 --
 .../devicetree/bindings/mips/brcm/soc.yaml    | 110 +++++++++++++++++
 .../devicetree/bindings/mips/cpus.yaml        | 115 ++++++++++++++++++
 .../bindings/mips/ingenic/ingenic,cpu.yaml    |  69 -----------
 4 files changed, 225 insertions(+), 77 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
 create mode 100644 Documentation/devicetree/bindings/mips/brcm/soc.yaml
 create mode 100644 Documentation/devicetree/bindings/mips/cpus.yaml
 delete mode 100644 Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml

-- 
2.25.1


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

* [PATCH v4 1/2] dt-bindings: mips: add CPU bindings for MIPS architecture
  2022-10-01  4:38 [PATCH v4 0/2] dt-bindings: mips: add CPU bindings for MIPS architecture Sergio Paracuellos
@ 2022-10-01  4:38 ` Sergio Paracuellos
  2022-10-01  4:38 ` [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema Sergio Paracuellos
  1 sibling, 0 replies; 7+ messages in thread
From: Sergio Paracuellos @ 2022-10-01  4:38 UTC (permalink / raw)
  To: devicetree
  Cc: robh+dt, krzysztof.kozlowski+dt, hauke, zajec5, tsbogend,
	zhouyanjie, linux-mips, arinc.unal

Add the yaml binding for available CPUs in MIPS architecture.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 .../bindings/mips/brcm/brcm,bmips.txt         |   8 --
 .../devicetree/bindings/mips/cpus.yaml        | 115 ++++++++++++++++++
 .../bindings/mips/ingenic/ingenic,cpu.yaml    |  69 -----------
 3 files changed, 115 insertions(+), 77 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
 create mode 100644 Documentation/devicetree/bindings/mips/cpus.yaml
 delete mode 100644 Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml

diff --git a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt b/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
deleted file mode 100644
index 8ef71b4085ca..000000000000
--- a/Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-* Broadcom MIPS (BMIPS) CPUs
-
-Required properties:
-- compatible: "brcm,bmips3300", "brcm,bmips4350", "brcm,bmips4380",
-  "brcm,bmips5000"
-
-- mips-hpt-frequency: This is common to all CPUs in the system so it lives
-  under the "cpus" node.
diff --git a/Documentation/devicetree/bindings/mips/cpus.yaml b/Documentation/devicetree/bindings/mips/cpus.yaml
new file mode 100644
index 000000000000..e991f4c6668d
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/cpus.yaml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mips/cpus.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MIPS CPUs bindings
+
+maintainers:
+  - Thomas Bogendoerfer <tsbogend@alpha.franken.de>
+  - 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
+
+description: |
+  The device tree allows to describe the layout of CPUs in a system through
+  the "cpus" node, which in turn contains a number of subnodes (ie "cpu")
+  defining properties for every CPU.
+
+properties:
+  compatible:
+    enum:
+      - brcm,bmips3300
+      - brcm,bmips4350
+      - brcm,bmips4380
+      - brcm,bmips5000
+      - brcm,bmips5200
+      - ingenic,xburst-mxu1.0
+      - ingenic,xburst-fpu1.0-mxu1.1
+      - ingenic,xburst-fpu2.0-mxu2.0
+      - ingenic,xburst2-fpu2.1-mxu2.1-smt
+      - loongson,gs264
+      - mips,m14Kc
+      - mips,mips4Kc
+      - mips,mips4KEc
+      - mips,mips24Kc
+      - mips,mips24KEc
+      - mips,mips74Kc
+      - mips,mips1004Kc
+      - mti,interaptiv
+      - mti,mips24KEc
+      - mti,mips14KEc
+      - mti,mips14Kc
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  device_type: true
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - ingenic,xburst-mxu1.0
+              - ingenic,xburst-fpu1.0-mxu1.1
+              - ingenic,xburst-fpu2.0-mxu2.0
+              - ingenic,xburst2-fpu2.1-mxu2.1-smt
+    then:
+      required:
+        - device_type
+        - clocks
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    cpus {
+      #size-cells = <0>;
+      #address-cells = <1>;
+
+      cpu@0 {
+        compatible = "mips,mips1004Kc";
+        device_type = "cpu";
+        reg = <0>;
+      };
+
+      cpu@1 {
+        compatible = "mips,mips1004Kc";
+        device_type = "cpu";
+        reg = <1>;
+      };
+    };
+
+  - |
+    // Example 2 (Ingenic CPU)
+    #include <dt-bindings/clock/ingenic,jz4780-cgu.h>
+
+    cpus {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      cpu@0 {
+        compatible = "ingenic,xburst-fpu1.0-mxu1.1";
+        device_type = "cpu";
+        reg = <0>;
+
+        clocks = <&cgu JZ4780_CLK_CPU>;
+      };
+
+      cpu@1 {
+        compatible = "ingenic,xburst-fpu1.0-mxu1.1";
+        device_type = "cpu";
+        reg = <1>;
+
+        clocks = <&cgu JZ4780_CLK_CORE1>;
+      };
+    };
+...
diff --git a/Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml b/Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml
deleted file mode 100644
index b7e7fa715437..000000000000
--- a/Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml
+++ /dev/null
@@ -1,69 +0,0 @@
-# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/mips/ingenic/ingenic,cpu.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Bindings for Ingenic XBurst family CPUs
-
-maintainers:
-  - 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
-
-description:
-  Ingenic XBurst family CPUs shall have the following properties.
-
-properties:
-  compatible:
-    oneOf:
-
-      - description: Ingenic XBurst®1 CPU Cores
-        enum:
-          - ingenic,xburst-mxu1.0
-          - ingenic,xburst-fpu1.0-mxu1.1
-          - ingenic,xburst-fpu2.0-mxu2.0
-
-      - description: Ingenic XBurst®2 CPU Cores
-        enum:
-          - ingenic,xburst2-fpu2.1-mxu2.1-smt
-
-  reg:
-    maxItems: 1
-
-  clocks:
-    maxItems: 1
-
-  device_type: true
-
-required:
-  - device_type
-  - compatible
-  - reg
-  - clocks
-
-additionalProperties: false
-
-examples:
-  - |
-    #include <dt-bindings/clock/ingenic,jz4780-cgu.h>
-
-    cpus {
-        #address-cells = <1>;
-        #size-cells = <0>;
-
-        cpu0: cpu@0 {
-                device_type = "cpu";
-                compatible = "ingenic,xburst-fpu1.0-mxu1.1";
-                reg = <0>;
-
-                clocks = <&cgu JZ4780_CLK_CPU>;
-        };
-
-        cpu1: cpu@1 {
-                device_type = "cpu";
-                compatible = "ingenic,xburst-fpu1.0-mxu1.1";
-                reg = <1>;
-
-                clocks = <&cgu JZ4780_CLK_CORE1>;
-        };
-    };
-...
-- 
2.25.1


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

* [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema
  2022-10-01  4:38 [PATCH v4 0/2] dt-bindings: mips: add CPU bindings for MIPS architecture Sergio Paracuellos
  2022-10-01  4:38 ` [PATCH v4 1/2] " Sergio Paracuellos
@ 2022-10-01  4:38 ` Sergio Paracuellos
  2022-10-01  9:47   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Sergio Paracuellos @ 2022-10-01  4:38 UTC (permalink / raw)
  To: devicetree
  Cc: robh+dt, krzysztof.kozlowski+dt, hauke, zajec5, tsbogend,
	zhouyanjie, linux-mips, arinc.unal

Convert Broadcom cable/DSL/settop platforms to YAML schema.

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

diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.yaml b/Documentation/devicetree/bindings/mips/brcm/soc.yaml
new file mode 100644
index 000000000000..0ddf1fe51802
--- /dev/null
+++ b/Documentation/devicetree/bindings/mips/brcm/soc.yaml
@@ -0,0 +1,110 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mips/brcm/soc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom cable/DSL/settop platforms Device Tree Bindings
+
+maintainers:
+  - Hauke Mehrtens <hauke@hauke-m.de>
+  - Rafał Miłecki <zajec5@gmail.com>
+
+description: |
+    Boards Broadcom cable/DSL/settop SoC shall have the following properties.
+    The experimental -viper variants are for running Linux on the 3384's
+    BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor.
+
+properties:
+  $nodename:
+    const: '/'
+  compatible:
+    oneOf:
+      - description: Boards with Broadcom bcm3368 SoC
+        items:
+          - const: brcm,bcm3368
+
+      - description: Boards with Broadcom bcm3384 SoC
+        items:
+          - const: brcm,bcm3384
+
+      - description: Boards with Broadcom bcm33843 SoC
+        items:
+          - const: brcm,bcm33843
+
+      - description: Boards with Broadcom bcm3384-viper SoC
+        items:
+          - const: brcm,bcm3384-viper
+
+      - description: Boards with Broadcom bcm33843-viper SoC
+        items:
+          - const: brcm,bcm33843-viper
+
+      - description: Boards with Broadcom bcm6328 SoC
+        items:
+          - const: brcm,bcm6328
+
+      - description: Boards with Broadcom bcm6358 SoC
+        items:
+          - const: brcm,bcm6358
+
+      - description: Boards with Broadcom bcm6362 SoC
+        items:
+          - const: brcm,bcm6362
+
+      - description: Boards with Broadcom bcm6368 SoC
+        items:
+          - const: brcm,bcm6368
+
+      - description: Boards with Broadcom bcm63168 SoC
+        items:
+          - const: brcm,bcm63168
+
+      - description: Boards with Broadcom bcm63268 SoC
+        items:
+          - const: brcm,bcm63268
+
+      - description: Boards with Broadcom bcm7125 SoC
+        items:
+          - const: brcm,bcm7125
+
+      - description: Boards with Broadcom bcm7346 SoC
+        items:
+          - const: brcm,bcm7346
+
+      - description: Boards with Broadcom bcm7358 SoC
+        items:
+          - const: brcm,bcm7358
+
+      - description: Boards with Broadcom bcm7360 SoC
+        items:
+          - const: brcm,bcm7360
+
+      - description: Boards with Broadcom bcm7362 SoC
+        items:
+          - const: brcm,bcm7362
+
+      - description: Boards with Broadcom bcm7420 SoC
+        items:
+          - const: brcm,bcm7420
+
+      - description: Boards with Broadcom bcm7425 SoC
+        items:
+          - const: brcm,bcm7425
+
+  cpus:
+    $ref: "/schemas/mips/cpus.yaml#"
+    unevaluatedProperties: false
+
+    properties:
+      mips-hpt-frequency:
+        description: This is common to all CPUs in the system so it lives
+         under the "cpus" node.
+        $ref: /schemas/types.yaml#/definitions/uint32
+
+    required:
+      - mips-hpt-frequency
+
+additionalProperties: true
+
+...
-- 
2.25.1


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

* Re: [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema
  2022-10-01  4:38 ` [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema Sergio Paracuellos
@ 2022-10-01  9:47   ` Krzysztof Kozlowski
  2022-10-01 10:35     ` Sergio Paracuellos
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-01  9:47 UTC (permalink / raw)
  To: Sergio Paracuellos, devicetree
  Cc: robh+dt, krzysztof.kozlowski+dt, hauke, zajec5, tsbogend,
	zhouyanjie, linux-mips, arinc.unal

On 01/10/2022 06:38, Sergio Paracuellos wrote:
> Convert Broadcom cable/DSL/settop platforms to YAML schema.

Where is the conversion? Conversion is remove+add, but there is no
removal here.

> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
>  .../devicetree/bindings/mips/brcm/soc.yaml    | 110 ++++++++++++++++++
>  1 file changed, 110 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mips/brcm/soc.yaml
> 
> diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.yaml b/Documentation/devicetree/bindings/mips/brcm/soc.yaml
> new file mode 100644
> index 000000000000..0ddf1fe51802
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mips/brcm/soc.yaml
> @@ -0,0 +1,110 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mips/brcm/soc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Broadcom cable/DSL/settop platforms Device Tree Bindings

Drop "Device Tree Bindings"

> +
> +maintainers:
> +  - Hauke Mehrtens <hauke@hauke-m.de>
> +  - Rafał Miłecki <zajec5@gmail.com>
> +
> +description: |
> +    Boards Broadcom cable/DSL/settop SoC shall have the following properties.
> +    The experimental -viper variants are for running Linux on the 3384's
> +    BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor.
> +
> +properties:
> +  $nodename:
> +    const: '/'

Blank line.

> +  compatible:
> +    oneOf:
> +      - description: Boards with Broadcom bcm3368 SoC
> +        items:
> +          - const: brcm,bcm3368
> +
> +      - description: Boards with Broadcom bcm3384 SoC
> +        items:
> +          - const: brcm,bcm3384

I don't understand what did you want to achieve here. Either you
document SoC or boards. If boards, where are the actual boards? If SoC,
then why calling it boards, why making it oneOf?


> +
> +      - description: Boards with Broadcom bcm33843 SoC
> +        items:
> +          - const: brcm,bcm33843
> +
> +      - description: Boards with Broadcom bcm3384-viper SoC
> +        items:
> +          - const: brcm,bcm3384-viper
> +
> +      - description: Boards with Broadcom bcm33843-viper SoC
> +        items:
> +          - const: brcm,bcm33843-viper
> +
> +      - description: Boards with Broadcom bcm6328 SoC
> +        items:
> +          - const: brcm,bcm6328
> +
> +      - description: Boards with Broadcom bcm6358 SoC
> +        items:
> +          - const: brcm,bcm6358
> +
> +      - description: Boards with Broadcom bcm6362 SoC
> +        items:
> +          - const: brcm,bcm6362
> +
> +      - description: Boards with Broadcom bcm6368 SoC
> +        items:
> +          - const: brcm,bcm6368
> +
> +      - description: Boards with Broadcom bcm63168 SoC
> +        items:
> +          - const: brcm,bcm63168
> +
> +      - description: Boards with Broadcom bcm63268 SoC
> +        items:
> +          - const: brcm,bcm63268
> +
> +      - description: Boards with Broadcom bcm7125 SoC
> +        items:
> +          - const: brcm,bcm7125
> +
> +      - description: Boards with Broadcom bcm7346 SoC
> +        items:
> +          - const: brcm,bcm7346
> +
> +      - description: Boards with Broadcom bcm7358 SoC
> +        items:
> +          - const: brcm,bcm7358
> +
> +      - description: Boards with Broadcom bcm7360 SoC
> +        items:
> +          - const: brcm,bcm7360
> +
> +      - description: Boards with Broadcom bcm7362 SoC
> +        items:
> +          - const: brcm,bcm7362
> +
> +      - description: Boards with Broadcom bcm7420 SoC
> +        items:
> +          - const: brcm,bcm7420
> +
> +      - description: Boards with Broadcom bcm7425 SoC
> +        items:
> +          - const: brcm,bcm7425
> +
> +  cpus:
> +    $ref: "/schemas/mips/cpus.yaml#"

No need for quotes.

> +    unevaluatedProperties: false
> +
> +    properties:
> +      mips-hpt-frequency:
> +        description: This is common to all CPUs in the system so it lives
> +         under the "cpus" node.

You need to describe what is this. Not where it lives. Because where it
lives, we can easily see from the schema.

> +        $ref: /schemas/types.yaml#/definitions/uint32
> +
> +    required:
> +      - mips-hpt-frequency
> +
> +additionalProperties: true
> +
> +...

Best regards,
Krzysztof


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

* Re: [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema
  2022-10-01  9:47   ` Krzysztof Kozlowski
@ 2022-10-01 10:35     ` Sergio Paracuellos
  2022-10-02  8:03       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Sergio Paracuellos @ 2022-10-01 10:35 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Krzysztof Kozlowski, Hauke Mehrtens, zajec5,
	Thomas Bogendoerfer, zhouyanjie, open list:MIPS,
	Arınç ÜNAL

Hi Krzysztof,

On Sat, Oct 1, 2022 at 11:47 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 01/10/2022 06:38, Sergio Paracuellos wrote:
> > Convert Broadcom cable/DSL/settop platforms to YAML schema.
>
> Where is the conversion? Conversion is remove+add, but there is no
> removal here.

True, removal is in the other patch since removed doc it is more
related with CPUs.
Will redo this commit message.

>
> >
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > ---
> >  .../devicetree/bindings/mips/brcm/soc.yaml    | 110 ++++++++++++++++++
> >  1 file changed, 110 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/mips/brcm/soc.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.yaml b/Documentation/devicetree/bindings/mips/brcm/soc.yaml
> > new file mode 100644
> > index 000000000000..0ddf1fe51802
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mips/brcm/soc.yaml
> > @@ -0,0 +1,110 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/mips/brcm/soc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Broadcom cable/DSL/settop platforms Device Tree Bindings
>
> Drop "Device Tree Bindings"

Understood.

>
> > +
> > +maintainers:
> > +  - Hauke Mehrtens <hauke@hauke-m.de>
> > +  - Rafał Miłecki <zajec5@gmail.com>
> > +
> > +description: |
> > +    Boards Broadcom cable/DSL/settop SoC shall have the following properties.
> > +    The experimental -viper variants are for running Linux on the 3384's
> > +    BMIPS4355 cable modem CPU instead of the BMIPS5000 application processor.
> > +
> > +properties:
> > +  $nodename:
> > +    const: '/'
>
> Blank line.

Ok.

>
> > +  compatible:
> > +    oneOf:
> > +      - description: Boards with Broadcom bcm3368 SoC
> > +        items:
> > +          - const: brcm,bcm3368
> > +
> > +      - description: Boards with Broadcom bcm3384 SoC
> > +        items:
> > +          - const: brcm,bcm3384
>
> I don't understand what did you want to achieve here. Either you
> document SoC or boards. If boards, where are the actual boards? If SoC,
> then why calling it boards, why making it oneOf?

I agree with description should just say "Broadcom bcm3384 SoC", but I
don't understand what is wrong with oneOf here...

>
>
> > +
> > +      - description: Boards with Broadcom bcm33843 SoC
> > +        items:
> > +          - const: brcm,bcm33843
> > +
> > +      - description: Boards with Broadcom bcm3384-viper SoC
> > +        items:
> > +          - const: brcm,bcm3384-viper
> > +
> > +      - description: Boards with Broadcom bcm33843-viper SoC
> > +        items:
> > +          - const: brcm,bcm33843-viper
> > +
> > +      - description: Boards with Broadcom bcm6328 SoC
> > +        items:
> > +          - const: brcm,bcm6328
> > +
> > +      - description: Boards with Broadcom bcm6358 SoC
> > +        items:
> > +          - const: brcm,bcm6358
> > +
> > +      - description: Boards with Broadcom bcm6362 SoC
> > +        items:
> > +          - const: brcm,bcm6362
> > +
> > +      - description: Boards with Broadcom bcm6368 SoC
> > +        items:
> > +          - const: brcm,bcm6368
> > +
> > +      - description: Boards with Broadcom bcm63168 SoC
> > +        items:
> > +          - const: brcm,bcm63168
> > +
> > +      - description: Boards with Broadcom bcm63268 SoC
> > +        items:
> > +          - const: brcm,bcm63268
> > +
> > +      - description: Boards with Broadcom bcm7125 SoC
> > +        items:
> > +          - const: brcm,bcm7125
> > +
> > +      - description: Boards with Broadcom bcm7346 SoC
> > +        items:
> > +          - const: brcm,bcm7346
> > +
> > +      - description: Boards with Broadcom bcm7358 SoC
> > +        items:
> > +          - const: brcm,bcm7358
> > +
> > +      - description: Boards with Broadcom bcm7360 SoC
> > +        items:
> > +          - const: brcm,bcm7360
> > +
> > +      - description: Boards with Broadcom bcm7362 SoC
> > +        items:
> > +          - const: brcm,bcm7362
> > +
> > +      - description: Boards with Broadcom bcm7420 SoC
> > +        items:
> > +          - const: brcm,bcm7420
> > +
> > +      - description: Boards with Broadcom bcm7425 SoC
> > +        items:
> > +          - const: brcm,bcm7425
> > +
> > +  cpus:
> > +    $ref: "/schemas/mips/cpus.yaml#"
>
> No need for quotes.

Understood.

>
> > +    unevaluatedProperties: false
> > +
> > +    properties:
> > +      mips-hpt-frequency:
> > +        description: This is common to all CPUs in the system so it lives
> > +         under the "cpus" node.
>
> You need to describe what is this. Not where it lives. Because where it
> lives, we can easily see from the schema.

I have just copied this from the previous documented bmips text file. I guess
writing the following will be better:

properties:
      mips-hpt-frequency:
        description: MIPS counter high precision timer frequency.
         This is common to all CPUs in the system so it lives
         under the "cpus" node.
        $ref: /schemas/types.yaml#/definitions/uint32

>
> > +        $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > +    required:
> > +      - mips-hpt-frequency
> > +
> > +additionalProperties: true
> > +
> > +...
>
> Best regards,
> Krzysztof
>

Thanks,
    Sergio Paracuellos

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

* Re: [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema
  2022-10-01 10:35     ` Sergio Paracuellos
@ 2022-10-02  8:03       ` Krzysztof Kozlowski
  2022-10-02  8:55         ` Sergio Paracuellos
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-02  8:03 UTC (permalink / raw)
  To: Sergio Paracuellos
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Krzysztof Kozlowski, Hauke Mehrtens, zajec5,
	Thomas Bogendoerfer, zhouyanjie, open list:MIPS,
	Arınç ÜNAL

On 01/10/2022 12:35, Sergio Paracuellos wrote:
>>
>>> +  compatible:
>>> +    oneOf:
>>> +      - description: Boards with Broadcom bcm3368 SoC
>>> +        items:
>>> +          - const: brcm,bcm3368
>>> +
>>> +      - description: Boards with Broadcom bcm3384 SoC
>>> +        items:
>>> +          - const: brcm,bcm3384
>>
>> I don't understand what did you want to achieve here. Either you
>> document SoC or boards. If boards, where are the actual boards? If SoC,
>> then why calling it boards, why making it oneOf?
> 
> I agree with description should just say "Broadcom bcm3384 SoC", but I
> don't understand what is wrong with oneOf here...

If you document SoCs, this should be just an enum because it will take
20% of that lines. Much smaller, easier to read.

In the same time (for documenting SoCs) all the descriptions are
redundant. We know that this is "Broadcom bcm33843 SoC" because
compatible is "brcm,bcm33843".

> 
>>
>>
>>> +
>>> +      - description: Boards with Broadcom bcm33843 SoC
>>> +        items:
>>> +          - const: brcm,bcm33843
>>> +

(...)

> 
>>
>>> +    unevaluatedProperties: false
>>> +
>>> +    properties:
>>> +      mips-hpt-frequency:
>>> +        description: This is common to all CPUs in the system so it lives
>>> +         under the "cpus" node.
>>
>> You need to describe what is this. Not where it lives. Because where it
>> lives, we can easily see from the schema.
> 
> I have just copied this from the previous documented bmips text file. I guess
> writing the following will be better:
> 
> properties:
>       mips-hpt-frequency:
>         description: MIPS counter high precision timer frequency.
>          This is common to all CPUs in the system so it lives
>          under the "cpus" node.
>         $ref: /schemas/types.yaml#/definitions/uint32

Much better, thanks.


Best regards,
Krzysztof


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

* Re: [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema
  2022-10-02  8:03       ` Krzysztof Kozlowski
@ 2022-10-02  8:55         ` Sergio Paracuellos
  0 siblings, 0 replies; 7+ messages in thread
From: Sergio Paracuellos @ 2022-10-02  8:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Rob Herring, Krzysztof Kozlowski, Hauke Mehrtens, zajec5,
	Thomas Bogendoerfer, zhouyanjie, open list:MIPS,
	Arınç ÜNAL

Hi Krzysztof,

On Sun, Oct 2, 2022 at 10:03 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 01/10/2022 12:35, Sergio Paracuellos wrote:
> >>
> >>> +  compatible:
> >>> +    oneOf:
> >>> +      - description: Boards with Broadcom bcm3368 SoC
> >>> +        items:
> >>> +          - const: brcm,bcm3368
> >>> +
> >>> +      - description: Boards with Broadcom bcm3384 SoC
> >>> +        items:
> >>> +          - const: brcm,bcm3384
> >>
> >> I don't understand what did you want to achieve here. Either you
> >> document SoC or boards. If boards, where are the actual boards? If SoC,
> >> then why calling it boards, why making it oneOf?
> >
> > I agree with description should just say "Broadcom bcm3384 SoC", but I
> > don't understand what is wrong with oneOf here...
>
> If you document SoCs, this should be just an enum because it will take
> 20% of that lines. Much smaller, easier to read.
>
> In the same time (for documenting SoCs) all the descriptions are
> redundant. We know that this is "Broadcom bcm33843 SoC" because
> compatible is "brcm,bcm33843".

I see. Ok. I will convert this into an enum and will drop all the descriptions.

>
> >
> >>
> >>
> >>> +
> >>> +      - description: Boards with Broadcom bcm33843 SoC
> >>> +        items:
> >>> +          - const: brcm,bcm33843
> >>> +
>
> (...)
>
> >
> >>
> >>> +    unevaluatedProperties: false
> >>> +
> >>> +    properties:
> >>> +      mips-hpt-frequency:
> >>> +        description: This is common to all CPUs in the system so it lives
> >>> +         under the "cpus" node.
> >>
> >> You need to describe what is this. Not where it lives. Because where it
> >> lives, we can easily see from the schema.
> >
> > I have just copied this from the previous documented bmips text file. I guess
> > writing the following will be better:
> >
> > properties:
> >       mips-hpt-frequency:
> >         description: MIPS counter high precision timer frequency.
> >          This is common to all CPUs in the system so it lives
> >          under the "cpus" node.
> >         $ref: /schemas/types.yaml#/definitions/uint32
>
> Much better, thanks.

Thanks,
    Sergio Paracuellos
>
>
> Best regards,
> Krzysztof
>

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

end of thread, other threads:[~2022-10-02  8:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-01  4:38 [PATCH v4 0/2] dt-bindings: mips: add CPU bindings for MIPS architecture Sergio Paracuellos
2022-10-01  4:38 ` [PATCH v4 1/2] " Sergio Paracuellos
2022-10-01  4:38 ` [PATCH v4 2/2] dt-bindings: mips: brcm: convert Broadcom SoCs to schema Sergio Paracuellos
2022-10-01  9:47   ` Krzysztof Kozlowski
2022-10-01 10:35     ` Sergio Paracuellos
2022-10-02  8:03       ` Krzysztof Kozlowski
2022-10-02  8:55         ` 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).