Skip to contentSkip to conversation

spi: dt-bindings: octeon: Convert to DT schema

PATCH Superseded Ninad Naik 3 participants 6 messages Jun 7 – Jun 9

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Ninad Naik

author
#0 lore raw

PATCH 1/1 spi: dt-bindings: octeon: Convert to DT schema

Convert octeon-3010 to DT schema

---
 .../bindings/spi/cavium,octeon-3010-spi.yaml  | 67 +++++++++++++++++++
 .../devicetree/bindings/spi/spi-octeon.txt    | 33 ---------
 2 files changed, 67 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-octeon.txt
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +67 -0
new file mode 100644
index 000000000000..3dbbb4f3c104
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/cavium,octeon-3010-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cavium, Inc. OCTEON SoC SPI master controller
+
+description:
+  The Cavium OCTEON SPI controller is an SPI master controller found in
+  OCTEON SoCs.
+
+maintainers:
+  - Mark Brown <[email protected]>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    const: cavium,octeon-3010-spi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    / {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        intc: interrupt-controller {
+            interrupt-controller;
+            #interrupt-cells = <2>;
+        };
+
+        spi@1070000001000 {
+            compatible = "cavium,octeon-3010-spi";
+            reg = <0x10700 0x00001000 0x0 0x100>;
+            interrupt-parent = <&intc>;
+            interrupts = <0 58>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            eeprom@0 {
+                compatible = "st,m95256", "atmel,at25";
+                reg = <0>;
+                spi-max-frequency = <5000000>;
+                spi-cpha;
+                spi-cpol;
+                pagesize = <64>;
+                size = <32768>;
+                address-width = <16>;
+            };
+        };
+    };
+...
Documentation/devicetree/bindings/spi/spi-octeon.txt deleted +0 -33
deleted file mode 100644
index 431add192342..000000000000
@@ -1,33 +0,0 @@
-Cavium, Inc. OCTEON SOC SPI master controller.
-
-Required properties:
-- compatible : "cavium,octeon-3010-spi"
-- reg : The register base for the controller.
-- interrupts : One interrupt, used by the controller.
-- #address-cells : <1>, as required by generic SPI binding.
-- #size-cells : <0>, also as required by generic SPI binding.
-
-Child nodes as per the generic SPI binding.
-
-Example:
-
-	spi@1070000001000 {
-		compatible = "cavium,octeon-3010-spi";
-		reg = <0x10700 0x00001000 0x0 0x100>;
-		interrupts = <0 58>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		eeprom@0 {
-			compatible = "st,m95256", "atmel,at25";
-			reg = <0>;
-			spi-max-frequency = <5000000>;
-			spi-cpha;
-			spi-cpol;
-
-			pagesize = <64>;
-			size = <32768>;
-			address-width = <16>;
-		};
-	};
-
Signature · 1 line
2.54.0
#1 lore raw
Quoted 10 lines · Ninad Naik

Convert octeon-3010 to DT schema

---
 .../bindings/spi/cavium,octeon-3010-spi.yaml  | 67 +++++++++++++++++++
 .../devicetree/bindings/spi/spi-octeon.txt    | 33 ---------
 2 files changed, 67 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-octeon.txt

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/spi/cavium,octeon-3010-spi.example.dtb: /: 'compatible' is a required property
from schema $id: http://devicetree.org/schemas/root-node.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.example.dtb: /: 'model' is a required property
from schema $id: http://devicetree.org/schemas/root-node.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/[email protected]

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.

maintainer
#2 lore raw
In reply to Ninad Naik
Quoted 20 lines · Ninad Naik

Convert octeon-3010 to DT schema

---
 .../bindings/spi/cavium,octeon-3010-spi.yaml  | 67 +++++++++++++++++++
 .../devicetree/bindings/spi/spi-octeon.txt    | 33 ---------
 2 files changed, 67 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-octeon.txt
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +4 -0
new file mode 100644
index 000000000000..3dbbb4f3c104
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/cavium,octeon-3010-spi.yaml#

Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml line 14

Quoted 10 lines
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +10 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cavium, Inc. OCTEON SoC SPI master controller
+
+description:
+  The Cavium OCTEON SPI controller is an SPI master controller found in
+  OCTEON SoCs.
+
+maintainers:
+  - Mark Brown <[email protected]>

This should be someone with this h/w. But there doesn't appear to be any OCTEON maintainer. There isn't any .dts using the compatible either. Perhaps this driver and binding can just be removed?

Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml line 38

Quoted 7 lines
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +5 -0
+  compatible:
+    const: cavium,octeon-3010-spi
 
 
+examples:
+  - |
+    / {

Drop. You don't need the root node.

Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml line 45

Quoted 7 lines
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +7 -0
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        intc: interrupt-controller {
+            interrupt-controller;
+            #interrupt-cells = <2>;
+        };

Drop. Examples don't need providers.

Rob

maintainer
#3 lore raw
Quoted 27 lines · Rob Herring
Quoted 26 lines · Ninad Naik

Convert octeon-3010 to DT schema

---
 .../bindings/spi/cavium,octeon-3010-spi.yaml  | 67 +++++++++++++++++++
 .../devicetree/bindings/spi/spi-octeon.txt    | 33 ---------
 2 files changed, 67 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml
 delete mode 100644 Documentation/devicetree/bindings/spi/spi-octeon.txt
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +10 -0
new file mode 100644
index 000000000000..3dbbb4f3c104
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/cavium,octeon-3010-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cavium, Inc. OCTEON SoC SPI master controller
+
+description:
+  The Cavium OCTEON SPI controller is an SPI master controller found in
Quoted 8 lines

Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml line 14

Quoted 4 lines
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +4 -0
+  OCTEON SoCs.
+
+maintainers:
+  - Mark Brown <[email protected]>

This should be someone with this h/w. But there doesn't appear to be any OCTEON maintainer. There isn't any .dts using the compatible either. Perhaps this driver and binding can just be removed?

Maybe not. Seems this is used on newer Octeon platforms like cn7130 which aren't that old. Some Ubiquiti devices use it and run 5.4 kernel with OpenWRT:

https://openwrt.org/toh/ubiquiti/edgerouter_4

Rob

author
#4 lore raw
Quoted 35 lines · Rob Herring
Quoted 26 lines · Rob Herring
Quoted 25 lines · Ninad Naik

Convert octeon-3010 to DT schema

---
  .../bindings/spi/cavium,octeon-3010-spi.yaml  | 67 +++++++++++++++++++
  .../devicetree/bindings/spi/spi-octeon.txt    | 33 ---------
  2 files changed, 67 insertions(+), 33 deletions(-)

create mode 100644 Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml delete mode 100644 Documentation/devicetree/bindings/spi/spi-octeon.txt

Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +9 -0
new file mode 100644
index 000000000000..3dbbb4f3c104
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/cavium,octeon-3010-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cavium, Inc. OCTEON SoC SPI master controller
+
+description:
Quoted 8 lines

Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml line 14

Quoted 5 lines
Documentation/devicetree/bindings/spi/cavium,octeon-3010-spi.yaml new file +5 -0
+  The Cavium OCTEON SPI controller is an SPI master controller found in
+  OCTEON SoCs.
+
+maintainers:
+  - Mark Brown <[email protected]>

This should be someone with this h/w. But there doesn't appear to be any OCTEON maintainer. There isn't any .dts using the compatible either. Perhaps this driver and binding can just be removed?

Quoted 7 lines

Maybe not. Seems this is used on newer Octeon platforms like cn7130 which aren't that old. Some Ubiquiti devices use it and run 5.4 kernel with OpenWRT:

https://openwrt.org/toh/ubiquiti/edgerouter_4

Rob

Hi Rob,

In this case, should I keep Mark as the maintainer?

Thanks,
Ninad Naik

maintainer
#5 lore raw
Quoted 7 lines · Ninad Naik
Quoted 3 lines · Rob Herring

Maybe not. Seems this is used on newer Octeon platforms like cn7130 which aren't that old. Some Ubiquiti devices use it and run 5.4 kernel with OpenWRT:

In this case, should I keep Mark as the maintainer?

Whoever originally upstreamed the bindings or driver is probably a better candidate.