All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation
@ 2021-10-24  0:36 Marek Vasut
  2021-10-25  7:20 ` Fabrice Gasnier
  2021-10-29  2:09 ` Rob Herring
  0 siblings, 2 replies; 5+ messages in thread
From: Marek Vasut @ 2021-10-24  0:36 UTC (permalink / raw)
  To: linux-usb; +Cc: Marek Vasut, Greg Kroah-Hartman, Rob Herring, devicetree

Copy the otg-rev property documentation from usb-drd.yaml into the DWC2
binding document, since some users of the DWC2 IP like STM32MP1 use the
otg-rev property in DT bindings for this controller.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
---
NOTE: Shouldn't this somehow be part of the USB core bindings instead?
---
 Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml
index 10c7d9b6cc53f..254436c19870b 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.yaml
+++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
@@ -120,6 +120,16 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32-array
     description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
 
+  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
+    enum: [0x0100, 0x0120, 0x0130, 0x0200]
+
   snps,need-phy-for-wake:
     $ref: /schemas/types.yaml#/definitions/flag
     description: If present indicates that the phy needs to be left on for 
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation
  2021-10-24  0:36 [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation Marek Vasut
@ 2021-10-25  7:20 ` Fabrice Gasnier
  2021-10-25  8:41   ` Marek Vasut
  2021-10-29  2:09 ` Rob Herring
  1 sibling, 1 reply; 5+ messages in thread
From: Fabrice Gasnier @ 2021-10-25  7:20 UTC (permalink / raw)
  To: Marek Vasut, linux-usb; +Cc: Greg Kroah-Hartman, Rob Herring, devicetree

On 10/24/21 2:36 AM, Marek Vasut wrote:
> Copy the otg-rev property documentation from usb-drd.yaml into the DWC2
> binding document, since some users of the DWC2 IP like STM32MP1 use the
> otg-rev property in DT bindings for this controller.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
> NOTE: Shouldn't this somehow be part of the USB core bindings instead?

Hi Marek,

Yes, this is similar to patch series I sent recently, see [1].

[1]
https://lore.kernel.org/linux-usb/1634133425-25670-1-git-send-email-fabrice.gasnier@foss.st.com/

BR,
Fabrice

> ---
>  Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml
> index 10c7d9b6cc53f..254436c19870b 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.yaml
> +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
> @@ -120,6 +120,16 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/uint32-array
>      description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
>  
> +  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
> +    enum: [0x0100, 0x0120, 0x0130, 0x0200]
> +
>    snps,need-phy-for-wake:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description: If present indicates that the phy needs to be left on for 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation
  2021-10-25  7:20 ` Fabrice Gasnier
@ 2021-10-25  8:41   ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2021-10-25  8:41 UTC (permalink / raw)
  To: Fabrice Gasnier, linux-usb; +Cc: Greg Kroah-Hartman, Rob Herring, devicetree

On 10/25/21 9:20 AM, Fabrice Gasnier wrote:
> On 10/24/21 2:36 AM, Marek Vasut wrote:
>> Copy the otg-rev property documentation from usb-drd.yaml into the DWC2
>> binding document, since some users of the DWC2 IP like STM32MP1 use the
>> otg-rev property in DT bindings for this controller.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> ---
>> NOTE: Shouldn't this somehow be part of the USB core bindings instead?
> 
> Hi Marek,
> 
> Yes, this is similar to patch series I sent recently, see [1].
> 
> [1]
> https://lore.kernel.org/linux-usb/1634133425-25670-1-git-send-email-fabrice.gasnier@foss.st.com/

That looks good, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation
  2021-10-24  0:36 [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation Marek Vasut
  2021-10-25  7:20 ` Fabrice Gasnier
@ 2021-10-29  2:09 ` Rob Herring
  2021-10-31  9:56   ` Marek Vasut
  1 sibling, 1 reply; 5+ messages in thread
From: Rob Herring @ 2021-10-29  2:09 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-usb, Greg Kroah-Hartman, devicetree

On Sun, Oct 24, 2021 at 02:36:52AM +0200, Marek Vasut wrote:
> Copy the otg-rev property documentation from usb-drd.yaml into the DWC2
> binding document, since some users of the DWC2 IP like STM32MP1 use the
> otg-rev property in DT bindings for this controller.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
> NOTE: Shouldn't this somehow be part of the USB core bindings instead?

Yes, usb-drd.yaml IIRC

> ---
>  Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml
> index 10c7d9b6cc53f..254436c19870b 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.yaml
> +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
> @@ -120,6 +120,16 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/uint32-array
>      description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
>  
> +  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
> +    enum: [0x0100, 0x0120, 0x0130, 0x0200]
> +
>    snps,need-phy-for-wake:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description: If present indicates that the phy needs to be left on for 
> -- 
> 2.33.0
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation
  2021-10-29  2:09 ` Rob Herring
@ 2021-10-31  9:56   ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2021-10-31  9:56 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-usb, Greg Kroah-Hartman, devicetree, Fabrice Gasnier

On 10/29/21 4:09 AM, Rob Herring wrote:
> On Sun, Oct 24, 2021 at 02:36:52AM +0200, Marek Vasut wrote:
>> Copy the otg-rev property documentation from usb-drd.yaml into the DWC2
>> binding document, since some users of the DWC2 IP like STM32MP1 use the
>> otg-rev property in DT bindings for this controller.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Cc: Rob Herring <robh+dt@kernel.org>
>> Cc: devicetree@vger.kernel.org
>> ---
>> NOTE: Shouldn't this somehow be part of the USB core bindings instead?
> 
> Yes, usb-drd.yaml IIRC

Right, drop this patch, since the patchset from Fabrice is better and 
does exactly what I was wondering about in the NOTE.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-31  9:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24  0:36 [PATCH] dt-bindings: usb: dwc2: Add otg-rev property documentation Marek Vasut
2021-10-25  7:20 ` Fabrice Gasnier
2021-10-25  8:41   ` Marek Vasut
2021-10-29  2:09 ` Rob Herring
2021-10-31  9:56   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.