mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Rob Herring <robh@kernel.org>
Cc: "kishon@ti.com" <kishon@ti.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH] dt-bindings: phy: renesas: usb2-phy: convert bindings to json-schema
Date: Tue, 29 Oct 2019 04:14:18 +0000	[thread overview]
Message-ID: <TYAPR01MB4544FD4F09FAA09F7AF79EF0D8610@TYAPR01MB4544.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20191029015708.GA29561@bogus>

Hi Rob,

Thank you for your review!

> From: Rob Herring, Sent: Tuesday, October 29, 2019 10:57 AM
> 
> On Fri, Oct 18, 2019 at 05:38:53PM +0900, Yoshihiro Shimoda wrote:
> > Convert Renesas R-Car generation 3 USB 2.0 PHY bindings documentation
> > to json-schema.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > ---
> >  .../devicetree/bindings/phy/rcar-gen3-phy-usb2.txt |  70 --------------
> >  .../devicetree/bindings/phy/renesas,usb2-phy.yaml  | 106 +++++++++++++++++++++
> >  2 files changed, 106 insertions(+), 70 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb2.txt
> >  create mode 100644 Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
> 
> 
> > diff --git a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
> b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
> > new file mode 100644
> > index 00000000..0f109c2
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
> > @@ -0,0 +1,106 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/phy/renesas,usb2-phy.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Renesas R-Car generation 3 USB 2.0 PHY
> > +
> > +maintainers:
> > +  - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > +
> > +properties:
> > +  compatible:
> > +    oneOf:
> 
> This:

What does the "This:" mean? If I replaced the "oneOf:" with "This:",
the following error happens when "make dt_binding_check":

  SCHEMA  Documentation/devicetree/bindings/processed-schema.yaml
warning: no schema found in file: Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml
[snip]/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml: ignoring, error in schema 'compatible'
Documentation/devicetree/bindings/Makefile:33: recipe for target 'Documentation/devicetree/bindings/processed-schema.yaml' failed
make[1]: *** [Documentation/devicetree/bindings/processed-schema.yaml] Error 255
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2

> > +      - items:
> > +          - enum:
> > +              - renesas,usb2-phy-r8a77470 # RZ/G1C
> 
> You can simplify to just:
> 
>          - const: renesas,usb2-phy-r8a77470 # RZ/G1C

I'll fix it.

> > +      - items:
> > +          - enum:
> > +              - renesas,usb2-phy-r7s9210  # RZ/A2
> > +              - renesas,usb2-phy-r8a774a1 # RZ/G2M
> > +              - renesas,usb2-phy-r8a774b1 # RZ/G2N
> > +              - renesas,usb2-phy-r8a774c0 # RZ/G2E
> > +              - renesas,usb2-phy-r8a7795  # R-Car H3
> > +              - renesas,usb2-phy-r8a7796  # R-Car M3-W
> > +              - renesas,usb2-phy-r8a77965 # R-Car M3-N
> > +              - renesas,usb2-phy-r8a77990 # R-Car E3
> > +              - renesas,usb2-phy-r8a77995 # R-Car D3
> > +          - const: renesas,rcar-gen3-usb2-phy
> > +
> > +  reg:
> > +    # base address and length of the registers block for the PHY.
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    # clock phandle and specifier pair(s).
> > +    minItems: 1
> > +    maxItems: 2
> > +
> > +  clock-names:
> > +    # for RZ/A2
> > +    minItems: 1
> > +    maxItems: 2
> > +    items:
> > +      - const: fck
> > +      - const: usb_x1
> > +
> > +  '#phy-cells':
> > +    # see phy-bindings.txt in the same directory
> 
> Drop this so we don't have to fix later.

I'll drop this.

> > +    enum: [0, 1]  # and 0 is deprecated.
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  resets:
> > +    minItems: 1
> > +    maxItems: 2
> 
> Needs 'items' to define each entry.

I'll add "items:" and two "description:" on the resets property.

> > +
> > +  vbus-supply:
> > +    $ref: /schemas/types.yaml#/definitions/phandle
> 
> Can drop this, *-supply already has a type.

I'll drop it.

> > +    description: |
> > +      Phandle to a regulator that provides power to the VBUS. This regulator
> > +      will be managed during the PHY power on/off sequence.
> > +
> > +  renesas,no-otg-pins:
> > +    $ref: /schemas/types.yaml#/definitions/flag
> > +    description: |
> > +      specify when a board does not provide proper otg pins.
> > +
> > +  dr_mode:
> > +    $ref: /schemas/types.yaml#/definitions/string
> 
> I think we already have a common definition, so just 'true' is enough.

I'll fix it.

Best regards,
Yoshihiro Shimoda


  reply	other threads:[~2019-10-29  4:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  8:38 Yoshihiro Shimoda
2019-10-29  1:57 ` Rob Herring
2019-10-29  4:14   ` Yoshihiro Shimoda [this message]
2019-10-29 20:19     ` Rob Herring
2019-10-30  2:28       ` Yoshihiro Shimoda

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=TYAPR01MB4544FD4F09FAA09F7AF79EF0D8610@TYAPR01MB4544.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®