[PATCH 1/3] dt-bindings: spi: axiado,ax3000-spi: Add binding for Axiado SPI DB controller

Vladimir Moravcevic posted 3 patches 2 weeks, 3 days ago
There is a newer version of this series
[PATCH 1/3] dt-bindings: spi: axiado,ax3000-spi: Add binding for Axiado SPI DB controller
Posted by Vladimir Moravcevic 2 weeks, 3 days ago
Add documentation for Axiado Digital Block SPI controller.

Signed-off-by: Vladimir Moravcevic <vmoravcevic@axiado.com>
---
 .../devicetree/bindings/spi/axiado,ax3000-spi.yaml | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..18e4b002ac99ecdd70d724680e24f2867c82dd42
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/axiado,ax3000-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Axiado AX3000 SoC SPI controller
+
+maintainers:
+  - Vladimir Moravcevic <vmoravcevic@axiado.com>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - axiado,ax3000-spi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: ref_clk
+      - const: pclk
+
+  clocks:
+    maxItems: 2
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clock-names
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+   #include <dt-bindings/interrupt-controller/irq.h>
+   #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+   soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      spi0: spi@80510000 {
+         compatible = "axiado,ax3000-spi";
+         reg = <0x00 0x80510000 0x00 0x1000>;
+         clock-names = "ref_clk", "pclk";
+         clocks = <&spi_clk &spi_clk>;
+         interrupt-parent = <&gic500>;
+         interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+         num-cs = <1>;
+      };
+   };
+...

-- 
2.25.1
Re: [PATCH 1/3] dt-bindings: spi: axiado,ax3000-spi: Add binding for Axiado SPI DB controller
Posted by Conor Dooley 2 weeks, 2 days ago
On Mon, Sep 15, 2025 at 06:11:55AM -0700, Vladimir Moravcevic wrote:
> Add documentation for Axiado Digital Block SPI controller.
> 
> Signed-off-by: Vladimir Moravcevic <vmoravcevic@axiado.com>
> ---
>  .../devicetree/bindings/spi/axiado,ax3000-spi.yaml | 62 ++++++++++++++++++++++
>  1 file changed, 62 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..18e4b002ac99ecdd70d724680e24f2867c82dd42
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
> @@ -0,0 +1,62 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/axiado,ax3000-spi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Axiado AX3000 SoC SPI controller
> +
> +maintainers:
> +  - Vladimir Moravcevic <vmoravcevic@axiado.com>
> +
> +allOf:
> +  - $ref: spi-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - axiado,ax3000-spi
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: ref_clk

Just call this clock "ref", the _clk is redundant.

> +      - const: pclk
> +
> +  clocks:
> +    maxItems: 2
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clock-names
> +  - clocks
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +   #include <dt-bindings/interrupt-controller/irq.h>
> +   #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +   soc {
> +      #address-cells = <2>;
> +      #size-cells = <2>;
> +
> +      spi0: spi@80510000 {
> +         compatible = "axiado,ax3000-spi";
> +         reg = <0x00 0x80510000 0x00 0x1000>;
> +         clock-names = "ref_clk", "pclk";
> +         clocks = <&spi_clk &spi_clk>;

Why are these both the same? Additionally, please style this as "<&foo>, <&bar>"
with each clock in its own <>.

Cheers,
Conor.

> +         interrupt-parent = <&gic500>;
> +         interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
> +         num-cs = <1>;
> +      };
> +   };
> +...
> 
> -- 
> 2.25.1
>