From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>,
Rob Herring <robh@kernel.org>,
Kevin Hilman <khilman@baylibre.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Andy Gross <agross@kernel.org>,
linux-snps-arc@lists.infradead.org, devicetree@vger.kernel.org,
Mathias Nyman <mathias.nyman@intel.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>,
Rob Herring <robh+dt@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Roger Quadros <rogerq@ti.com>, Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
linux-usb@vger.kernel.org, linux-mips@vger.kernel.org,
Serge Semin <fancer.lancer@gmail.com>,
linux-kernel@vger.kernel.org,
Manu Gautam <mgautam@codeaurora.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v3 01/16] dt-bindings: usb: usb-hcd: Convert generic USB properties to DT schema
Date: Wed, 21 Oct 2020 11:00:36 +0800 [thread overview]
Message-ID: <1603249236.31607.9.camel@mhfsdcap03> (raw)
In-Reply-To: <20201020112101.19077-2-Sergey.Semin@baikalelectronics.ru>
On Tue, 2020-10-20 at 14:20 +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
^ its?
> nodes would be validated to have them properly utilized.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Reviewed-by: Rob Herring <robh@kernel.org>
>
> ---
>
> Changelog v2:
> - Discard '|' in all the new properties, since we don't need to preserve
> the text formatting.
> - Convert abbreviated form of the "maximum-speed" enum restriction into
> the multi-lined version of the list.
> - Drop quotes from around the string constants.
> ---
> .../devicetree/bindings/usb/generic.txt | 57 ------------
> .../devicetree/bindings/usb/usb-hcd.yaml | 88 +++++++++++++++++++
Do we need change the file name or modify it's title?
the title is "Generic USB Host Controller Device Tree Bindings", but
some generic properties, such as, dr_mode, usb-role-switch, otg related
ones, are usually used by DRD controller, this may cause some confusion.
> 2 files changed, 88 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..ee7ea205c71d 100644
> --- a/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> +++ b/Documentation/devicetree/bindings/usb/usb-hcd.yaml
> @@ -22,9 +22,97 @@ properties:
> description:
> Name specifier for the USB PHY
>
> + maximum-speed:
> + description:
> + 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
> +
> + 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;
> + };
next prev parent reply other threads:[~2020-10-21 3:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 11:20 [PATCH v3 00/16] dt-bindings: usb: Add generic USB HCD, xHCI, DWC USB3 DT schema Serge Semin
2020-10-20 11:20 ` [PATCH v3 01/16] dt-bindings: usb: usb-hcd: Convert generic USB properties to " Serge Semin
2020-10-21 3:00 ` Chunfeng Yun [this message]
2020-10-21 15:46 ` Serge Semin
2020-10-26 16:46 ` Serge Semin
2020-11-10 15:05 ` Serge Semin
2020-10-20 11:20 ` [PATCH v3 02/16] dt-bindings: usb: usb-hcd: Add "otg-rev" property restriction Serge Semin
2020-10-20 11:20 ` [PATCH v3 03/16] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types Serge Semin
2020-10-20 11:20 ` [PATCH v3 04/16] dt-bindings: usb: usb-hcd: Add "tpl-support" property Serge Semin
2020-10-20 11:20 ` [PATCH v3 05/16] dt-bindings: usb: usb-hcd: Add generic "usb-phy" property Serge Semin
2020-10-20 19:34 ` Martin Blumenstingl
2020-10-20 11:20 ` [PATCH v3 06/16] dt-bindings: usb: Convert xHCI bindings to DT schema Serge Semin
2020-10-20 11:20 ` [PATCH v3 07/16] dt-bindings: usb: xhci: Add Broadcom STB v2 compatible device Serge Semin
2020-10-20 11:20 ` [PATCH v3 08/16] dt-bindings: usb: renesas-xhci: Refer to the usb-xhci.yaml file Serge Semin
2020-10-20 11:20 ` [PATCH v3 09/16] dt-bindings: usb: Convert DWC USB3 bindings to DT schema Serge Semin
2020-10-20 15:40 ` Rob Herring
2020-10-20 11:20 ` [PATCH v3 10/16] dt-bindings: usb: dwc3: Add interrupt-names property support Serge Semin
2020-10-20 11:20 ` [PATCH v3 11/16] dt-bindings: usb: dwc3: Add Tx De-emphasis constraints Serge Semin
2020-10-20 11:20 ` [PATCH v3 12/16] dt-bindings: usb: dwc3: Add Frame Length Adj constraints Serge Semin
2020-10-20 11:20 ` [PATCH v3 13/16] dt-bindings: usb: meson-g12a-usb: Fix FL-adj property value Serge Semin
2020-10-20 11:20 ` [PATCH v3 14/16] dt-bindings: usb: meson-g12a-usb: Validate DWC2/DWC3 sub-nodes Serge Semin
2020-10-20 11:21 ` [PATCH v3 15/16] dt-bindings: usb: keystone-dwc3: Validate DWC3 sub-node Serge Semin
2020-10-20 11:21 ` [PATCH v3 16/16] 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=1603249236.31607.9.camel@mhfsdcap03 \
--to=chunfeng.yun@mediatek.com \
--cc=Alexey.Malahov@baikalelectronics.ru \
--cc=Pavel.Parkhomenko@baikalelectronics.ru \
--cc=Sergey.Semin@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=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mathias.nyman@intel.com \
--cc=mgautam@codeaurora.org \
--cc=narmstrong@baylibre.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh+dt@kernel.org \
--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
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).