Skip to contentSkip to conversation

dt-bindings: mips: add CPU bindings for MIPS architecture

PATCH In review Sergio Paracuellos 3 participants 9 messages Oct 6, 2022 – Nov 21, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v8 cover dt-bindings: mips: add CPU bindings for MIPS architecture

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.

Thomas, are these patches going through the mips git tree?

Thanks,
Sergio Paracuellos

Changes in v8:
- Remove Hauke Mehrtens from brcm/soc.yaml maintainers as per Hauke Mehrtens's requested in v7 response.

Changes in v7:
- Remove Rafał Miłecki from brcm/soc.yaml maintainers as per Rafał Miłecki's requested in v6 response.

Changes in v6:
- Avoid 'convert' in SoC's patch commit message since this is just an addition and nothing is removed in this patch.
- Add Florian Fainelli to maintainers of Broadcom SoC bindings
- Add Florian's Acked-by for broadcom SoC PATCH.
- Collect Rob's Reviewed-by for both patches.

Changes in v5:
- Address Krzysztof comments in v4:
- change BMIPS SoC compatibles into an enum and drop descriptions,
- Add blank line.
- Redo commit message since it is not a conversion to schema.
- Drop 'device tree bindings' from description.
- Properly describe 'mips-hpt-frequency'.
- Review cpus node and add a sample to check schema correctness.

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/[email protected]/T/
v3: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
v4: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
v5: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
v6: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t

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

 .../bindings/mips/brcm/brcm,bmips.txt         |   8 --
 .../devicetree/bindings/mips/brcm/soc.yaml    |  97 +++++++++++++++
 .../devicetree/bindings/mips/cpus.yaml        | 115 ++++++++++++++++++
 .../bindings/mips/ingenic/ingenic,cpu.yaml    |  69 -----------
 4 files changed, 212 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
Signature · 1 line
2.25.1
#1 lore raw

PATCH v8 1/2 dt-bindings: mips: add CPU bindings for MIPS architecture

Add the yaml binding for available CPUs in MIPS architecture.

---
 .../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
Documentation/devicetree/bindings/mips/brcm/brcm,bmips.txt deleted +0 -8
deleted file mode 100644
index 8ef71b4085ca..000000000000
@@ -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.
Documentation/devicetree/bindings/mips/cpus.yaml new file +115 -0

115 lines not on this page · raw message

Documentation/devicetree/bindings/mips/ingenic/ingenic,cpu.yaml deleted +0 -69

69 lines not on this page · raw message

Signature · 1 line
2.25.1
Reviewed-by on v8 1/2
#2 lore raw
Quoted 4 lines · Sergio Paracuellos

Add the yaml binding for available CPUs in MIPS architecture.

Quoted 8 lines
---
  .../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

#3 lore raw
Quoted 15 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Sergio Paracuellos

Add the yaml binding for available CPUs in MIPS architecture.

Quoted 8 lines
---
  .../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

Quoted 1 line

Thanks!

Thomas, are this series going through your tree?

Thanks in advance for clarification.

Best regards,
Sergio Paracuellos

#4 lore raw
Quoted 17 lines · Sergio Paracuellos
Quoted 15 lines · Philippe Mathieu-Daudé
Quoted 12 lines · Sergio Paracuellos

Add the yaml binding for available CPUs in MIPS architecture.

---
  .../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

Quoted 5 lines
Quoted 1 line

Thanks!

Thomas, are this series going through your tree?

I'll take them.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#5 lore raw
Quoted 19 lines · Thomas Bogendoerfer
Quoted 17 lines · Sergio Paracuellos
Quoted 15 lines · Philippe Mathieu-Daudé
Quoted 12 lines · Sergio Paracuellos

Add the yaml binding for available CPUs in MIPS architecture.

---
  .../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

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Thanks!

Thomas, are this series going through your tree?

I'll take them.

Thanks for letting me know!!

Quoted 3 lines

Thomas.

Best regards,
Sergio Paracuellos

Quoted 3 lines

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]

#6 lore raw
Quoted 24 lines · Sergio Paracuellos
Quoted 21 lines · Thomas Bogendoerfer
Quoted 19 lines · Sergio Paracuellos
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Sergio Paracuellos

Add the yaml binding for available CPUs in MIPS architecture.

Quoted 8 lines
---
  .../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

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Thanks!

Thomas, are this series going through your tree?

I'll take them.

Thanks for letting me know!!

It’s been a while and this series is still not added to the mips tree… Gentle ping :)

Thanks!!

Best regards,
Sergio Paracuellos

Quoted 12 lines
Quoted 4 lines

Thomas.

Best regards,
Sergio Paracuellos

Quoted 3 lines

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]

#7 lore raw

PATCH v8 2/2 dt-bindings: mips: brcm: add Broadcom SoCs bindings

In reply to Sergio Paracuellos

Add the yaml binding for MIPS Broadcom cable/DSL/settop platforms.

---
 .../devicetree/bindings/mips/brcm/soc.yaml    | 96 +++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mips/brcm/soc.yaml
Documentation/devicetree/bindings/mips/brcm/soc.yaml new file +96 -0
new file mode 100644
index 000000000000..975945ca2888
@@ -0,0 +1,96 @@
+# 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
+
+maintainers:
+  - Florian Fainelli <[email protected]>
+
+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:
+    enum:
+      - brcm,bcm3368
+      - brcm,bcm3384
+      - brcm,bcm33843
+      - brcm,bcm3384-viper
+      - brcm,bcm33843-viper
+      - brcm,bcm6328
+      - brcm,bcm6358
+      - brcm,bcm6362
+      - brcm,bcm6368
+      - brcm,bcm63168
+      - brcm,bcm63268
+      - brcm,bcm7125
+      - brcm,bcm7346
+      - brcm,bcm7358
+      - brcm,bcm7360
+      - brcm,bcm7362
+      - brcm,bcm7420
+      - brcm,bcm7425
+
+  cpus:
+    type: object
+    additionalProperties: false
+    properties:
+      '#address-cells':
+        const: 1
+
+      '#size-cells':
+        const: 0
+
+      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
+
+    patternProperties:
+      "^cpu@[0-9]$":
+        type: object
+        $ref: /schemas/mips/cpus.yaml#
+        unevaluatedProperties: false
+
+    required:
+      - mips-hpt-frequency
+
+additionalProperties: true
+
+examples:
+  - |
+     / {
+         compatible = "brcm,bcm3368";
+         #address-cells = <1>;
+         #size-cells = <1>;
+         model = "Broadcom 3368";
+
+         cpus {
+           #address-cells = <1>;
+           #size-cells = <0>;
+
+           mips-hpt-frequency = <150000000>;
+
+           cpu@0 {
+             compatible = "brcm,bmips4350";
+             device_type = "cpu";
+             reg = <0>;
+           };
+
+           cpu@1 {
+             compatible = "brcm,bmips4350";
+             device_type = "cpu";
+             reg = <1>;
+           };
+         };
+       };
+...
Signature · 1 line
2.25.1
#8 lore raw
In reply to Sergio Paracuellos
Quoted 77 lines · Sergio Paracuellos

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.

Thomas, are these patches going through the mips git tree?

Thanks,
Sergio Paracuellos

Changes in v8:
- Remove Hauke Mehrtens from brcm/soc.yaml maintainers as per Hauke Mehrtens's requested in v7 response.

Changes in v7:
- Remove Rafał Miłecki from brcm/soc.yaml maintainers as per Rafał Miłecki's requested in v6 response.

Changes in v6:
- Avoid 'convert' in SoC's patch commit message since this is just an addition and nothing is removed in this patch.
- Add Florian Fainelli to maintainers of Broadcom SoC bindings
- Add Florian's Acked-by for broadcom SoC PATCH.
- Collect Rob's Reviewed-by for both patches.

Changes in v5:
- Address Krzysztof comments in v4:
- change BMIPS SoC compatibles into an enum and drop descriptions,
- Add blank line.
- Redo commit message since it is not a conversion to schema.
- Drop 'device tree bindings' from description.
- Properly describe 'mips-hpt-frequency'.
- Review cpus node and add a sample to check schema correctness.

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/[email protected]/T/
v3: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
v4: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
v5: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t
v6: https://lore.kernel.org/linux-devicetree/[email protected]/T/#t

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

Quoted 12 lines
 .../bindings/mips/brcm/brcm,bmips.txt         |   8 --
 .../devicetree/bindings/mips/brcm/soc.yaml    |  97 +++++++++++++++
 .../devicetree/bindings/mips/cpus.yaml        | 115 ++++++++++++++++++
 .../bindings/mips/ingenic/ingenic,cpu.yaml    |  69 -----------
 4 files changed, 212 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
Signature · 1 line
2.25.1

series applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]