Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Serge Semin <Sergey.Semin@baikalelectronics.ru>
To: Rob Herring <robh@kernel.org>
Cc: Serge Semin <fancer.lancer@gmail.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
	Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Manu Gautam <mgautam@codeaurora.org>,
	Roger Quadros <rogerq@ti.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>, <linux-usb@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 01/18] dt-bindings: usb: usb-hcd: Convert generic USB properties to DT schema
Date: Tue, 13 Oct 2020 17:00:45 +0300
Message-ID: <20201013140045.aznrmrop3z3ujdss@mobilestation> (raw)
In-Reply-To: <20201013121441.GA3269269@bogus>

On Tue, Oct 13, 2020 at 07:14:41AM -0500, Rob Herring wrote:
> On Sun, Oct 11, 2020 at 01:41:04AM +0300, Serge Semin wrote:
> > The generic USB HCD properties have been described in the legacy bindings
> > text file: Documentation/devicetree/bindings/usb/generic.txt . Let's
> > convert it' content into the USB HCD DT schema properties so all USB DT
> > nodes would be validated to have them properly utilized.
> > 
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > ---
> >  .../devicetree/bindings/usb/generic.txt       | 57 -------------
> >  .../devicetree/bindings/usb/usb-hcd.yaml      | 84 +++++++++++++++++++
> >  2 files changed, 84 insertions(+), 57 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/usb/generic.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/usb/generic.txt b/Documentation/devicetree/bindings/usb/generic.txt
> > deleted file mode 100644
> > index ba472e7aefc9..000000000000
> > --- a/Documentation/devicetree/bindings/usb/generic.txt
> > +++ /dev/null
> > @@ -1,57 +0,0 @@
> > -Generic USB Properties
> > -
> > -Optional properties:
> > - - maximum-speed: tells USB controllers we want to work up to a certain
> > -			speed. Valid arguments are "super-speed-plus",
> > -			"super-speed", "high-speed", "full-speed" and
> > -			"low-speed". In case this isn't passed via DT, USB
> > -			controllers should default to their maximum HW
> > -			capability.
> > - - dr_mode: tells Dual-Role USB controllers that we want to work on a
> > -			particular mode. Valid arguments are "host",
> > -			"peripheral" and "otg". In case this attribute isn't
> > -			passed via DT, USB DRD controllers should default to
> > -			OTG.
> > - - phy_type: tells USB controllers that we want to configure the core to support
> > -			a UTMI+ PHY with an 8- or 16-bit interface if UTMI+ is
> > -			selected. Valid arguments are "utmi" and "utmi_wide".
> > -			In case this isn't passed via DT, USB controllers should
> > -			default to HW capability.
> > - - otg-rev: tells usb driver the release number of the OTG and EH supplement
> > -			with which the device and its descriptors are compliant,
> > -			in binary-coded decimal (i.e. 2.0 is 0200H). This
> > -			property is used if any real OTG features(HNP/SRP/ADP)
> > -			is enabled, if ADP is required, otg-rev should be
> > -			0x0200 or above.
> > - - companion: phandle of a companion
> > - - hnp-disable: tells OTG controllers we want to disable OTG HNP, normally HNP
> > -			is the basic function of real OTG except you want it
> > -			to be a srp-capable only B device.
> > - - srp-disable: tells OTG controllers we want to disable OTG SRP, SRP is
> > -			optional for OTG device.
> > - - adp-disable: tells OTG controllers we want to disable OTG ADP, ADP is
> > -			optional for OTG device.
> > - - usb-role-switch: boolean, indicates that the device is capable of assigning
> > -			the USB data role (USB host or USB device) for a given
> > -			USB connector, such as Type-C, Type-B(micro).
> > -			see connector/usb-connector.yaml.
> > - - role-switch-default-mode: indicating if usb-role-switch is enabled, the
> > -			device default operation mode of controller while usb
> > -			role is USB_ROLE_NONE. Valid arguments are "host" and
> > -			"peripheral". Defaults to "peripheral" if not
> > -			specified.
> > -
> > -
> > -This is an attribute to a USB controller such as:
> > -
> > -dwc3@4a030000 {
> > -	compatible = "synopsys,dwc3";
> > -	reg = <0x4a030000 0xcfff>;
> > -	interrupts = <0 92 4>
> > -	usb-phy = <&usb2_phy>, <&usb3,phy>;
> > -	maximum-speed = "super-speed";
> > -	dr_mode = "otg";
> > -	phy_type = "utmi_wide";
> > -	otg-rev = <0x0200>;
> > -	adp-disable;
> > -};
> > diff --git a/Documentation/devicetree/bindings/usb/usb-hcd.yaml b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> > index 7263b7f2b510..815de24127db 100644
> > --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> > +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> > @@ -22,9 +22,93 @@ properties:
> >      description:
> >        Name specifier for the USB PHY
> >  
> > +  maximum-speed:
> > +   description: |
> 

> Drop the '|' if there's no formatting to preserve.

Thanks for noticing this. I should have refreshed my YAML multi-line
knowledge https://yaml-multiline.info/ .) I'll fix it in all the patches of
the series.

> 
> > +     Tells USB controllers we want to work up to a certain speed. In case this
> > +     isn't passed via DT, USB controllers should default to their maximum HW
> > +     capability.
> > +   $ref: /schemas/types.yaml#/definitions/string
> > +   enum: ["low-speed", "full-speed", "high-speed", "super-speed",
> > +          "super-speed-plus"]
> 

> One per line and drop the quotes.

Ok.

-Sergey

> 
> > +
> > +  dr_mode:
> > +    description: |
> > +      Tells Dual-Role USB controllers that we want to work on a particular
> > +      mode. In case this attribute isn't passed via DT, USB DRD controllers
> > +      should default to OTG.
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    enum: ["host", "peripheral", "otg"]
> > +
> > +  phy_type:
> > +    description: |
> > +      Tells USB controllers that we want to configure the core to support a
> > +      UTMI+ PHY with an 8- or 16-bit interface if UTMI+ is selected. In case
> > +      this isn't passed via DT, USB controllers should default to HW
> > +      capability.
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    enum: ["utmi", "utmi_wide"]
> > +
> > +  otg-rev:
> > +    description: |
> > +      Tells usb driver the release number of the OTG and EH supplement with
> > +      which the device and its descriptors are compliant, in binary-coded
> > +      decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
> > +      features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
> > +      0x0200 or above.
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +
> > +  companion:
> > +    description: Phandle of a companion device
> > +    $ref: /schemas/types.yaml#/definitions/phandle
> > +
> > +  hnp-disable:
> > +    description: |
> > +      Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
> > +      basic function of real OTG except you want it to be a srp-capable only B
> > +      device.
> > +    type: boolean
> > +
> > +  srp-disable:
> > +    description: |
> > +      Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
> > +      device.
> > +    type: boolean
> > +
> > +  adp-disable:
> > +    description: |
> > +      Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
> > +      device.
> > +    type: boolean
> > +
> > +  usb-role-switch:
> > +    description: |
> > +      Indicates that the device is capable of assigning the USB data role
> > +      (USB host or USB device) for a given USB connector, such as Type-C,
> > +      Type-B(micro). See connector/usb-connector.yaml.
> > +
> > +  role-switch-default-mode:
> > +    description: |
> > +      Indicates if usb-role-switch is enabled, the device default operation
> > +      mode of controller while usb role is USB_ROLE_NONE.
> > +    $ref: /schemas/types.yaml#/definitions/string
> > +    enum: ["host", "peripheral"]
> > +    default: "peripheral"
> > +
> >  examples:
> >    - |
> >      usb {
> >          phys = <&usb2_phy1>, <&usb3_phy1>;
> >          phy-names = "usb";
> >      };
> > +  - |
> > +    usb@4a030000 {
> > +        compatible = "snps,dwc3";
> > +        reg = <0x4a030000 0xcfff>;
> > +        interrupts = <0 92 4>;
> > +        usb-phy = <&usb2_phy>, <&usb3_phy>;
> > +        maximum-speed = "super-speed";
> > +        dr_mode = "otg";
> > +        phy_type = "utmi_wide";
> > +        otg-rev = <0x0200>;
> > +        adp-disable;
> > +    };
> > -- 
> > 2.27.0
> > 

  reply index

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10 22:41 [PATCH 00/18] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 " Serge Semin
2020-10-10 22:41 ` [PATCH 01/18] dt-bindings: usb: usb-hcd: Convert generic USB properties to " Serge Semin
2020-10-13 12:14   ` Rob Herring
2020-10-13 14:00     ` Serge Semin [this message]
2020-10-10 22:41 ` [PATCH 02/18] dt-bindings: usb: usb-hcd: Add "wireless" maximum-speed property value Serge Semin
2020-10-11 14:42   ` Greg Kroah-Hartman
2020-10-11 17:53     ` Serge Semin
2020-10-12 15:41       ` Greg Kroah-Hartman
2020-10-12 21:19         ` Serge Semin
2020-10-10 22:41 ` [PATCH 03/18] dt-bindings: usb: usb-hcd: Add "otg-rev" property restriction Serge Semin
2020-10-10 22:41 ` [PATCH 04/18] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types Serge Semin
2020-10-11  8:49   ` Sergei Shtylyov
2020-10-11 18:03     ` Serge Semin
2020-10-10 22:41 ` [PATCH 05/18] dt-bindings: usb: usb-hcd: Add "tpl-support" property Serge Semin
2020-10-11  8:47   ` Sergei Shtylyov
2020-10-11 18:05     ` Serge Semin
2020-10-11 18:06     ` Serge Semin
2020-10-10 22:41 ` [PATCH 06/18] dt-bindings: usb: usb-hcd: Add generic "usb-phy" property Serge Semin
2020-10-10 22:41 ` [PATCH 07/18] dt-bindings: usb: Convert xHCI bindings to DT schema Serge Semin
2020-10-13 12:30   ` Rob Herring
2020-10-13 14:29     ` Serge Semin
2020-10-10 22:41 ` [PATCH 08/18] dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device Serge Semin
2020-10-10 22:41 ` [PATCH 09/18] dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file Serge Semin
2020-10-10 22:41 ` [PATCH 10/18] dt-bindings: usb: Convert DWC USB3 bindings to DT schema Serge Semin
2020-10-13 12:36   ` Rob Herring
2020-10-13 15:16     ` Serge Semin
2020-10-10 22:41 ` [PATCH 11/18] dt-bindings: usb: dwc3: Add interrupt-names property support Serge Semin
2020-10-11  8:53   ` Sergei Shtylyov
2020-10-11 18:09     ` Serge Semin
2020-10-10 22:41 ` [PATCH 12/18] dt-bindings: usb: dwc3: Add synopsys,dwc3 compatible string Serge Semin
2020-10-10 22:41 ` [PATCH 13/18] dt-bindings: usb: dwc3: Add Tx De-emphasis restrictions Serge Semin
2020-10-11  8:56   ` Sergei Shtylyov
2020-10-11 18:14     ` Serge Semin
2020-10-10 22:41 ` [PATCH 14/18] dt-bindings: usb: dwc3: Add Frame Length Adj restrictions Serge Semin
2020-10-13 12:38   ` Rob Herring
2020-10-13 15:45     ` Serge Semin
2020-10-10 22:41 ` [PATCH 15/18] dt-bindings: usb: meson-g12a-usb: Discard FL-adj property Serge Semin
2020-10-12  7:54   ` Neil Armstrong
2020-10-12 14:22     ` Serge Semin
2020-10-12 15:01       ` Neil Armstrong
2020-10-12 15:13         ` Serge Semin
2020-10-12 15:29           ` Neil Armstrong
2020-10-10 22:41 ` [PATCH 16/18] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes Serge Semin
2020-10-12  7:38   ` Neil Armstrong
2020-10-13 12:42   ` Rob Herring
2020-10-13 15:50     ` Serge Semin
2020-10-10 22:41 ` [PATCH 17/18] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node Serge Semin
2020-10-11  9:04   ` Sergei Shtylyov
2020-10-11 18:18     ` Serge Semin
2020-10-10 22:41 ` [PATCH 18/18] dt-bindings: usb: qcom,dwc3: " Serge Semin

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=20201013140045.aznrmrop3z3ujdss@mobilestation \
    --to=sergey.semin@baikalelectronics.ru \
    --cc=Alexey.Malahov@baikalelectronics.ru \
    --cc=Pavel.Parkhomenko@baikalelectronics.ru \
    --cc=agross@kernel.org \
    --cc=balbi@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mgautam@codeaurora.org \
    --cc=narmstrong@baylibre.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=rogerq@ti.com \
    --cc=yoshihiro.shimoda.uh@renesas.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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git