linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Chris Brandt <chris.brandt@renesas.com>,
	devicetree@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 5/6] dt-bindings: i2c: renesas,riic: Convert to json-schema
Date: Thu, 6 May 2021 15:56:11 -0500	[thread overview]
Message-ID: <20210506205611.GA785508@robh.at.kernel.org> (raw)
In-Reply-To: <e1bb5790675b6f4a518c6a9cbc22eb7452a2f78c.1620138454.git.geert+renesas@glider.be>

On Tue, May 04, 2021 at 04:51:12PM +0200, Geert Uytterhoeven wrote:
> Convert the Renesas RZ/A I2C Bus Interface (RIIC) Device Tree binding
> documentation to json-schema.
> 
> Document missing properties.
> Update the example to match reality.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  .../devicetree/bindings/i2c/renesas,riic.txt  | 32 -------
>  .../devicetree/bindings/i2c/renesas,riic.yaml | 83 +++++++++++++++++++
>  MAINTAINERS                                   |  2 +-
>  3 files changed, 84 insertions(+), 33 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/i2c/renesas,riic.txt
>  create mode 100644 Documentation/devicetree/bindings/i2c/renesas,riic.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/renesas,riic.txt b/Documentation/devicetree/bindings/i2c/renesas,riic.txt
> deleted file mode 100644
> index e26fe3ad86a9509f..0000000000000000
> --- a/Documentation/devicetree/bindings/i2c/renesas,riic.txt
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -Device tree configuration for Renesas RIIC driver
> -
> -Required properties:
> -- compatible      :
> -	"renesas,riic-r7s72100" if the device is a part of a R7S72100 SoC.
> -	"renesas,riic-r7s9210" if the device is a part of a R7S9210 SoC.
> -	"renesas,riic-rz" for a generic RZ/A compatible device.
> -- reg             : address start and address range size of device
> -- interrupts      : 8 interrupts (TEI, RI, TI, SPI, STI, NAKI, ALI, TMOI)
> -- clock-frequency : frequency of bus clock in Hz
> -- #address-cells  : should be <1>
> -- #size-cells     : should be <0>
> -
> -Pinctrl properties might be needed, too. See there.
> -
> -Example:
> -
> -	i2c0: i2c@fcfee000 {
> -		compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
> -		reg = <0xfcfee000 0x44>;
> -		interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>,
> -			     <0 158 IRQ_TYPE_EDGE_RISING>,
> -			     <0 159 IRQ_TYPE_EDGE_RISING>,
> -			     <0 160 IRQ_TYPE_LEVEL_HIGH>,
> -			     <0 161 IRQ_TYPE_LEVEL_HIGH>,
> -			     <0 162 IRQ_TYPE_LEVEL_HIGH>,
> -			     <0 163 IRQ_TYPE_LEVEL_HIGH>,
> -			     <0 164 IRQ_TYPE_LEVEL_HIGH>;
> -		clock-frequency = <100000>;
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -	};
> diff --git a/Documentation/devicetree/bindings/i2c/renesas,riic.yaml b/Documentation/devicetree/bindings/i2c/renesas,riic.yaml
> new file mode 100644
> index 0000000000000000..e6951bf451d95cff
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/renesas,riic.yaml
> @@ -0,0 +1,83 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/renesas,riic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas RZ/A I2C Bus Interface (RIIC)
> +
> +maintainers:
> +  - Chris Brandt <chris.brandt@renesas.com>
> +  - Wolfram Sang <wsa+renesas@sang-engineering.com>
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:

Don't need oneOf here with only 1 entry. Otherwise,

Reviewed-by: Rob Herring <robh@kernel.org>

> +          - enum:
> +              - renesas,riic-r7s72100 # RZ/A1H
> +              - renesas,riic-r7s9210  # RZ/A2M
> +          - const: renesas,riic-rz    # RZ/A
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    items:
> +      - description: Transmit End Interrupt (TEI)
> +      - description: Receive Data Full Interrupt (RI)
> +      - description: Transmit Data Empty Interrupt (TI)
> +      - description: Stop Condition Detection Interrupt (SPI)
> +      - description: Start Condition Detection Interrupt (STI)
> +      - description: NACK Reception Interrupt (NAKI)
> +      - description: Arbitration-Lost Interrupt (ALI)
> +      - description: Timeout Interrupt (TMOI)
> +
> +  clock-frequency:
> +    description:
> +      Desired I2C bus clock frequency in Hz. The absence of this property
> +      indicates the default frequency 100 kHz.
> +
> +  clocks:
> +    maxItems: 1
> +
> +  power-domains:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-frequency
> +  - power-domains
> +  - '#address-cells'
> +  - '#size-cells'
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/r7s72100-clock.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    i2c0: i2c@fcfee000 {
> +            compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
> +            reg = <0xfcfee000 0x44>;
> +            interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 158 IRQ_TYPE_EDGE_RISING>,
> +                         <GIC_SPI 159 IRQ_TYPE_EDGE_RISING>,
> +                         <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
> +            clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
> +            clock-frequency = <100000>;
> +            power-domains = <&cpg_clocks>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c8834d7a1aac0efd..ea519a8ffc6a9356 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15469,7 +15469,7 @@ F:	drivers/thermal/rcar_thermal.c
>  RENESAS RIIC DRIVER
>  M:	Chris Brandt <chris.brandt@renesas.com>
>  S:	Supported
> -F:	Documentation/devicetree/bindings/i2c/renesas,riic.txt
> +F:	Documentation/devicetree/bindings/i2c/renesas,riic.yaml
>  F:	drivers/i2c/busses/i2c-riic.c
>  
>  RENESAS USB PHY DRIVER
> -- 
> 2.25.1
> 

  parent reply	other threads:[~2021-05-06 20:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04 14:35 [PATCH 0/6] dt-bindings: i2c: renesas: Convert to json-schema Geert Uytterhoeven
2021-05-04 14:35 ` [PATCH 1/6] i2c: rcar: Drop "renesas,i2c-rcar" Geert Uytterhoeven
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-05  7:18   ` Wolfram Sang
2021-05-28  7:55   ` Wolfram Sang
2021-05-04 14:35 ` [PATCH 2/6] dt-bindings: i2c: renesas,i2c: " Geert Uytterhoeven
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-05  7:18   ` Wolfram Sang
2021-05-06 20:50   ` Rob Herring
2021-05-28  7:56   ` Wolfram Sang
2021-05-04 14:35 ` [PATCH 3/6] dt-bindings: i2c: renesas,i2c: Convert to json-schema Geert Uytterhoeven
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-06 20:52   ` Rob Herring
2021-05-28  7:56   ` Wolfram Sang
2021-05-04 14:35 ` [PATCH/RFC 4/6] dt-bindings: i2c: renesas,iic: " Geert Uytterhoeven
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-05  7:33   ` Wolfram Sang
2021-05-26 14:47     ` Geert Uytterhoeven
2021-05-28 13:51       ` Wolfram Sang
2021-05-28 14:14         ` Geert Uytterhoeven
2021-05-06 20:54   ` Rob Herring
2021-05-04 14:35 ` [PATCH 5/6] dt-bindings: i2c: renesas,riic: " Geert Uytterhoeven
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-06 20:56   ` Rob Herring [this message]
2021-05-07  6:56     ` Geert Uytterhoeven
2021-05-28  7:56       ` Wolfram Sang
2021-05-04 14:35 ` [PATCH 6/6] dt-bindings: i2c: renesas,iic-emev2: " Geert Uytterhoeven
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-06 20:57   ` Rob Herring
2021-05-28  7:56   ` Wolfram Sang
2021-05-04 14:42 ` [PATCH 0/6] dt-bindings: i2c: renesas: " Rob Herring
2021-05-04 14:51   ` Geert Uytterhoeven
2021-05-04 14:51 ` Geert Uytterhoeven

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=20210506205611.GA785508@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=chris.brandt@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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 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).