All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
Cc: broonie@kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, andriy.shevchenko@linux.intel.com
Subject: Re: [PATCH v5 7/7] dt-bindings: spi: dw-apb-ssi: Convert bindings to json-schema
Date: Tue, 5 May 2020 14:19:10 -0500	[thread overview]
Message-ID: <20200505191910.GA2970@bogus> (raw)
In-Reply-To: <20200505130618.554-8-wan.ahmad.zainie.wan.mohamad@intel.com>

On Tue, May 05, 2020 at 09:06:18PM +0800, Wan Ahmad Zainie wrote:
> Convert the Synopsis DesignWare dw-apb-ssi binding to DT schema format
> using json-schema.
> 
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
> ---
>  .../bindings/spi/snps,dw-apb-ssi.txt          | 42 -----------
>  .../bindings/spi/snps,dw-apb-ssi.yaml         | 72 +++++++++++++++++++
>  2 files changed, 72 insertions(+), 42 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.txt
>  create mode 100644 Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml


> diff --git a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> new file mode 100644
> index 000000000000..edc1e6fb9993
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
> @@ -0,0 +1,72 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/spi/snps,dw-apb-ssi.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Synopsys DesignWare AMBA 2.0 Synchronous Serial Interface
> +
> +maintainers:
> +  - Wan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
> +
> +allOf:
> +  - $ref: "spi-controller.yaml#"
> +
> +properties:
> +  compatible:
> +    enum:
> +      - mscc,ocelot-spi
> +      - mscc,jaguar2-spi
> +      - amazon,alpine-dw-apb-ssi
> +      - snps,dw-apb-ssi
> +      - snps,dwc-ssi-1.01a
> +      - intel,keembay-ssi

This doesn't match what's in dts files. You have to list out every 
combination.

> +
> +  reg:
> +    minItems: 1
> +    maxItems: 2
> +    items:
> +      - description: The register base for the controller.
> +      - description: For "mscc,<soc>-spi", a second register set is required.
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    minItems: 1
> +    maxItems: 2
> +    items:
> +      - description: The core clock used to generate the external SPI clock.
> +      - description: The interface clock required for register access.
> +
> +  clock-names:
> +    items:
> +      - const: ssi_clk
> +      - const: pclk
> +
> +  reg-io-width:
> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +      - enum: [ 2, 4 ]
> +      - default: 4
> +    description: The I/O register width (in bytes) implemented by this device.
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +
> +examples:
> +  - |
> +    spi@fff00000 {
> +          compatible = "snps,dw-apb-ssi";
> +          reg = <0xfff00000 0x1000>;
> +          interrupts = <0 154 4>;
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +          clocks = <&spi_m_clk>;
> +          num-cs = <2>;
> +          cs-gpios = <&gpio0 13 0>,
> +                     <&gpio0 14 0>;
> +    };
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-05-05 19:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 13:06 [PATCH v5 0/7] spi: dw: Add support for Intel Keem Bay SPI Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 1/7] spi: dw: Fix typo in few registers name Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 2/7] spi: dw: Add update_cr0() callback to update CTRLR0 Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 3/7] spi: dw: Add support for DesignWare DWC_ssi Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 4/7] dt-bindings: spi: dw-apb-ssi: Add compatible string " Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 5/7] spi: dw: Add support for Intel Keem Bay SPI Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 6/7] dt-bindings: spi: dw-apb-ssi: Add Intel Keem Bay support Wan Ahmad Zainie
2020-05-05 13:06 ` [PATCH v5 7/7] dt-bindings: spi: dw-apb-ssi: Convert bindings to json-schema Wan Ahmad Zainie
2020-05-05 19:19   ` Rob Herring [this message]
2020-05-05 14:08 ` [PATCH v5 0/7] spi: dw: Add support for Intel Keem Bay SPI Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200505191910.GA2970@bogus \
    --to=robh@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=wan.ahmad.zainie.wan.mohamad@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.