From: Thierry Reding <thierry.reding@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Chen <peter.chen@freescale.com>,
Nagarjuna Kristam <nkristam@nvidia.com>,
JC Kuo <jckuo@nvidia.com>,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: usb: chipidea: Convert to json-schema
Date: Thu, 16 Dec 2021 17:12:06 +0100 [thread overview]
Message-ID: <YbtlVilOGk556ynR@orome> (raw)
In-Reply-To: <YbpBFKeuSK4v7Fdz@robh.at.kernel.org>
[-- Attachment #1: Type: text/plain, Size: 3825 bytes --]
On Wed, Dec 15, 2021 at 01:25:08PM -0600, Rob Herring wrote:
> On Thu, Dec 09, 2021 at 05:53:36PM +0100, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > Convert the ChipIdea USB2 bindings from the free-form text format to
> > json-schema.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > .../bindings/usb/chipidea,usb2.yaml | 310 ++++++++++++++++++
> > .../devicetree/bindings/usb/ci-hdrc-usb2.txt | 158 ---------
> > 2 files changed, 310 insertions(+), 158 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/usb/chipidea,usb2.yaml
> > delete mode 100644 Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> >
> > diff --git a/Documentation/devicetree/bindings/usb/chipidea,usb2.yaml b/Documentation/devicetree/bindings/usb/chipidea,usb2.yaml
> > new file mode 100644
> > index 000000000000..0e36259f23ba
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/usb/chipidea,usb2.yaml
> > @@ -0,0 +1,310 @@
> > +# SPDX-License-Identifier: GPL-2.0-only
> > +%YAML 1.2
> > +---
> > +$id: "http://devicetree.org/schemas/usb/chipidea,usb2.yaml#"
> > +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> > +
> > +title: USB2 ChipIdea USB controller for ci13xxx
> > +
> > +maintainers:
> > + - Peter Chen <peter.chen@freescale.com>
>
> This should have a reference to usb-drd.yaml I think.
>
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - enum:
> > + - fsl,imx23-usb
> > + - fsl,imx27-usb
> > + - fsl,imx28-usb
> > + - fsl,imx6q-usb
> > + - fsl,imx6sl-usb
> > + - fsl,imx6sx-usb
> > + - fsl,imx6ul-usb
> > + - fsl,imx7d-usb
> > + - fsl,imx7ulp-usb
> > + - lsi,zevio-usb
> > + - qcom,ci-hdrc
> > + - chipidea,usb2
> > + - xlnx,zynq-usb-2.20a
> > + - nvidia,tegra20-udc
> > + - nvidia,tegra30-udc
> > + - nvidia,tegra114-udc
> > + - nvidia,tegra124-udc
> > + - items:
> > + - const: fsl,imx6q-usb
> > + - const: fsl,imx27-usb
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + phy_type:
> > + $ref: /schemas/types.yaml#/definitions/string
> > + description: The type of the PHY connected to the core. Without this property the PORTSC
> > + register won't be touched.
> > + enum:
> > + - utmi
> > + - utmi_wide
> > + - ulpi
> > + - serial
> > + - hsic
> > +
> > + dr_mode:
> > + $ref: /schemas/types.yaml#/definitions/string
> > + description: dual-role mode of the interface
> > + enum:
> > + - host
> > + - peripheral
> > + - otg
> > + default:
> > + const: otg
> > +
> > + clocks:
> > + items:
> > + - description: reference to the USB clock
>
> From the report, i.MX needs 3 clocks.
Okay, I'll look into that.
> > + # USB bus
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 0
>
> Covered by common schema (I think).
Yeah, so this can be both used in peripheral mode and host mode, so it
probably needs usb-hcd.yaml and usb-drd.yaml, and then #address-cells
and #size-cells will get pulled in.
>
> > +
> > +patternProperties:
> > + "^pinctrl-[0-9]+$": true
> > +
> > +additionalProperties:
> > + $ref: usb-device.yaml
>
> This is wrong as usb.device.yaml applies to child nodes.
Originally the idea behind this was that any additionalProperties would
have to be child nodes that represent hard-wired USB devices. Given the
above and that I'm now including usb-hcd.yaml here, this is taken care
of automatically.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-12-16 16:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 16:53 [PATCH 1/4] dt-bindings: usb: chipidea: Convert to json-schema Thierry Reding
2021-12-09 16:53 ` [PATCH 2/4] dt-bindings: usb: tegra: " Thierry Reding
2021-12-09 20:55 ` Rob Herring
2021-12-15 19:27 ` Rob Herring
2021-12-09 16:53 ` [PATCH 3/4] dt-bindings: usb: tegra-xusb: " Thierry Reding
2021-12-09 20:55 ` Rob Herring
2021-12-15 19:48 ` Rob Herring
2021-12-09 16:53 ` [PATCH 4/4] dt-bindings: usb: tegra-xudc: Document interconnects and iommus properties Thierry Reding
2021-12-09 17:14 ` Thierry Reding
2021-12-09 20:55 ` [PATCH 1/4] dt-bindings: usb: chipidea: Convert to json-schema Rob Herring
2021-12-15 19:25 ` Rob Herring
2021-12-16 16:12 ` Thierry Reding [this message]
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=YbtlVilOGk556ynR@orome \
--to=thierry.reding@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jckuo@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nkristam@nvidia.com \
--cc=peter.chen@freescale.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;
as well as URLs for NNTP newsgroup(s).