Linux USB
 help / color / mirror / Atom feed
* [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda
@ 2025-02-12 13:56 Catalin Popescu
  2025-02-12 13:56 ` [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513 Catalin Popescu
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Catalin Popescu @ 2025-02-12 13:56 UTC (permalink / raw)
  To: gregkh, robh, krzk+dt, conor+dt, festevam
  Cc: linux-usb, devicetree, linux-kernel, m.felsch,
	bsp-development.geo, Catalin Popescu

Microchip hub USB2514 has one 3V3 digital power supply and one 3V3
analog power supply. Add support for analog power supply vdda.

Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
---
v2:
- merge "if" with "allOf" and move the whole after patternProperties
  section
---
 .../bindings/usb/microchip,usb2514.yaml       | 21 ++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
index b14e6f37b298..aeffdf0362c2 100644
--- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
+++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
@@ -9,9 +9,6 @@ title: Microchip USB2514 Hub Controller
 maintainers:
   - Fabio Estevam <festevam@gmail.com>
 
-allOf:
-  - $ref: usb-device.yaml#
-
 properties:
   compatible:
     enum:
@@ -28,6 +25,9 @@ properties:
   vdd-supply:
     description: 3.3V power supply.
 
+  vdda-supply:
+    description: 3.3V analog power supply.
+
   clocks:
     description: External 24MHz clock connected to the CLKIN pin.
     maxItems: 1
@@ -43,6 +43,20 @@ patternProperties:
     $ref: /schemas/usb/usb-device.yaml
     additionalProperties: true
 
+allOf:
+  - $ref: usb-device.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: usb424,2514
+    then:
+      properties:
+        vdda-supply: true
+    else:
+      properties:
+        vdda-supply: false
+
 unevaluatedProperties: false
 
 examples:
@@ -60,6 +74,7 @@ examples:
             clocks = <&clks IMX6QDL_CLK_CKO>;
             reset-gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
             vdd-supply = <&reg_3v3_hub>;
+            vdda-supply = <&reg_3v3a_hub>;
             #address-cells = <1>;
             #size-cells = <0>;
 

base-commit: df5d6180169ae06a2eac57e33b077ad6f6252440
prerequisite-patch-id: 0000000000000000000000000000000000000000
-- 
2.34.1


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

* [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513
  2025-02-12 13:56 [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Catalin Popescu
@ 2025-02-12 13:56 ` Catalin Popescu
  2025-02-12 19:13   ` Conor Dooley
  2025-02-12 13:56 ` [PATCH next v2 3/3] usb: misc: onboard_dev: add vdda support for Microchip USB2514 Catalin Popescu
  2025-02-12 19:14 ` [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Conor Dooley
  2 siblings, 1 reply; 6+ messages in thread
From: Catalin Popescu @ 2025-02-12 13:56 UTC (permalink / raw)
  To: gregkh, robh, krzk+dt, conor+dt, festevam
  Cc: linux-usb, devicetree, linux-kernel, m.felsch,
	bsp-development.geo, Catalin Popescu

Extend support to Microchip hubs USB2512 & USB2513 which are identical
to USB2514 but offer less downstream ports (i.e. respectively 2 and 3
ports).

Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
---
v2:
- remove needless "items" keyword from "oneOf"
---
 .../bindings/usb/microchip,usb2514.yaml          | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
index aeffdf0362c2..dcbd4bd116b0 100644
--- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
+++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
@@ -11,11 +11,17 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - usb424,2412
-      - usb424,2417
-      - usb424,2514
-      - usb424,2517
+    oneOf:
+      - enum:
+          - usb424,2412
+          - usb424,2417
+          - usb424,2514
+          - usb424,2517
+      - items:
+          - enum:
+              - usb424,2512
+              - usb424,2513
+          - const: usb424,2514
 
   reg: true
 
-- 
2.34.1


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

* [PATCH next v2 3/3] usb: misc: onboard_dev: add vdda support for Microchip USB2514
  2025-02-12 13:56 [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Catalin Popescu
  2025-02-12 13:56 ` [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513 Catalin Popescu
@ 2025-02-12 13:56 ` Catalin Popescu
  2025-02-12 19:14 ` [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Conor Dooley
  2 siblings, 0 replies; 6+ messages in thread
From: Catalin Popescu @ 2025-02-12 13:56 UTC (permalink / raw)
  To: gregkh, robh, krzk+dt, conor+dt, festevam
  Cc: linux-usb, devicetree, linux-kernel, m.felsch,
	bsp-development.geo, Catalin Popescu

This hub is powered by digital and analog 3V3 power rails, so provide
the possibility to use different regulators for digital (vdd) and analog
(vdda) power rails.

Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
---
v2:
- no change
---
 drivers/usb/misc/onboard_usb_dev.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/misc/onboard_usb_dev.h b/drivers/usb/misc/onboard_usb_dev.h
index 317b3eb99c02..933797a7e084 100644
--- a/drivers/usb/misc/onboard_usb_dev.h
+++ b/drivers/usb/misc/onboard_usb_dev.h
@@ -23,6 +23,13 @@ static const struct onboard_dev_pdata microchip_usb424_data = {
 	.is_hub = true,
 };
 
+static const struct onboard_dev_pdata microchip_usb2514_data = {
+	.reset_us = 1,
+	.num_supplies = 2,
+	.supply_names = { "vdd", "vdda" },
+	.is_hub = true,
+};
+
 static const struct onboard_dev_pdata microchip_usb5744_data = {
 	.reset_us = 0,
 	.power_on_delay_us = 10000,
@@ -96,7 +103,7 @@ static const struct onboard_dev_pdata xmos_xvf3500_data = {
 
 static const struct of_device_id onboard_dev_match[] = {
 	{ .compatible = "usb424,2412", .data = &microchip_usb424_data, },
-	{ .compatible = "usb424,2514", .data = &microchip_usb424_data, },
+	{ .compatible = "usb424,2514", .data = &microchip_usb2514_data, },
 	{ .compatible = "usb424,2517", .data = &microchip_usb424_data, },
 	{ .compatible = "usb424,2744", .data = &microchip_usb5744_data, },
 	{ .compatible = "usb424,5744", .data = &microchip_usb5744_data, },
-- 
2.34.1


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

* Re: [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513
  2025-02-12 13:56 ` [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513 Catalin Popescu
@ 2025-02-12 19:13   ` Conor Dooley
  0 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2025-02-12 19:13 UTC (permalink / raw)
  To: Catalin Popescu
  Cc: gregkh, robh, krzk+dt, conor+dt, festevam, linux-usb, devicetree,
	linux-kernel, m.felsch, bsp-development.geo

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

On Wed, Feb 12, 2025 at 02:56:48PM +0100, Catalin Popescu wrote:
> Extend support to Microchip hubs USB2512 & USB2513 which are identical
> to USB2514 but offer less downstream ports (i.e. respectively 2 and 3
> ports).
> 
> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda
  2025-02-12 13:56 [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Catalin Popescu
  2025-02-12 13:56 ` [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513 Catalin Popescu
  2025-02-12 13:56 ` [PATCH next v2 3/3] usb: misc: onboard_dev: add vdda support for Microchip USB2514 Catalin Popescu
@ 2025-02-12 19:14 ` Conor Dooley
  2025-02-13  9:41   ` POPESCU Catalin
  2 siblings, 1 reply; 6+ messages in thread
From: Conor Dooley @ 2025-02-12 19:14 UTC (permalink / raw)
  To: Catalin Popescu
  Cc: gregkh, robh, krzk+dt, conor+dt, festevam, linux-usb, devicetree,
	linux-kernel, m.felsch, bsp-development.geo

[-- Attachment #1: Type: text/plain, Size: 1874 bytes --]

On Wed, Feb 12, 2025 at 02:56:47PM +0100, Catalin Popescu wrote:
> Microchip hub USB2514 has one 3V3 digital power supply and one 3V3
> analog power supply. Add support for analog power supply vdda.
> 
> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
> ---
> v2:
> - merge "if" with "allOf" and move the whole after patternProperties
>   section
> ---
>  .../bindings/usb/microchip,usb2514.yaml       | 21 ++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
> index b14e6f37b298..aeffdf0362c2 100644
> --- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
> +++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
> @@ -9,9 +9,6 @@ title: Microchip USB2514 Hub Controller
>  maintainers:
>    - Fabio Estevam <festevam@gmail.com>
>  
> -allOf:
> -  - $ref: usb-device.yaml#
> -
>  properties:
>    compatible:
>      enum:
> @@ -28,6 +25,9 @@ properties:
>    vdd-supply:
>      description: 3.3V power supply.
>  
> +  vdda-supply:
> +    description: 3.3V analog power supply.
> +
>    clocks:
>      description: External 24MHz clock connected to the CLKIN pin.
>      maxItems: 1
> @@ -43,6 +43,20 @@ patternProperties:
>      $ref: /schemas/usb/usb-device.yaml
>      additionalProperties: true
>  
> +allOf:
> +  - $ref: usb-device.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: usb424,2514
> +    then:
> +      properties:
> +        vdda-supply: true
> +    else:
> +      properties:
> +        vdda-supply: false

Hmm, the then: here isn't needed, you can just invert the original if
with a "not:". Sorry for not noticing that last time.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda
  2025-02-12 19:14 ` [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Conor Dooley
@ 2025-02-13  9:41   ` POPESCU Catalin
  0 siblings, 0 replies; 6+ messages in thread
From: POPESCU Catalin @ 2025-02-13  9:41 UTC (permalink / raw)
  To: Conor Dooley
  Cc: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, festevam@gmail.com,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, m.felsch@pengutronix.de,
	GEO-CHHER-bsp-development

On 12/02/2025 20:14, Conor Dooley wrote:
> On Wed, Feb 12, 2025 at 02:56:47PM +0100, Catalin Popescu wrote:
>> Microchip hub USB2514 has one 3V3 digital power supply and one 3V3
>> analog power supply. Add support for analog power supply vdda.
>>
>> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
>> ---
>> v2:
>> - merge "if" with "allOf" and move the whole after patternProperties
>>    section
>> ---
>>   .../bindings/usb/microchip,usb2514.yaml       | 21 ++++++++++++++++---
>>   1 file changed, 18 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
>> index b14e6f37b298..aeffdf0362c2 100644
>> --- a/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
>> +++ b/Documentation/devicetree/bindings/usb/microchip,usb2514.yaml
>> @@ -9,9 +9,6 @@ title: Microchip USB2514 Hub Controller
>>   maintainers:
>>     - Fabio Estevam <festevam@gmail.com>
>>   
>> -allOf:
>> -  - $ref: usb-device.yaml#
>> -
>>   properties:
>>     compatible:
>>       enum:
>> @@ -28,6 +25,9 @@ properties:
>>     vdd-supply:
>>       description: 3.3V power supply.
>>   
>> +  vdda-supply:
>> +    description: 3.3V analog power supply.
>> +
>>     clocks:
>>       description: External 24MHz clock connected to the CLKIN pin.
>>       maxItems: 1
>> @@ -43,6 +43,20 @@ patternProperties:
>>       $ref: /schemas/usb/usb-device.yaml
>>       additionalProperties: true
>>   
>> +allOf:
>> +  - $ref: usb-device.yaml#
>> +  - if:
>> +      properties:
>> +        compatible:
>> +          contains:
>> +            const: usb424,2514
>> +    then:
>> +      properties:
>> +        vdda-supply: true
>> +    else:
>> +      properties:
>> +        vdda-supply: false
> Hmm, the then: here isn't needed, you can just invert the original if
> with a "not:". Sorry for not noticing that last time.

Sure, no problem.
BR,


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

end of thread, other threads:[~2025-02-13  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 13:56 [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Catalin Popescu
2025-02-12 13:56 ` [PATCH next v2 2/3] dt-bindings: usb: microchip,usb2514: add support for USB2512/USB2513 Catalin Popescu
2025-02-12 19:13   ` Conor Dooley
2025-02-12 13:56 ` [PATCH next v2 3/3] usb: misc: onboard_dev: add vdda support for Microchip USB2514 Catalin Popescu
2025-02-12 19:14 ` [PATCH next v2 1/3] dt-bindings: usb: microchip,usb2514: add support for vdda Conor Dooley
2025-02-13  9:41   ` POPESCU Catalin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox