usb: misc: onboard-hub: add support for Microchip USB5744
Subsystems (2)
cover usb: misc: onboard-hub: add support for Microchip USB5744
From: Francesco Dolcini <[email protected]>
Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub.
Stefan Eichenberger (2):
dt-bindings: usb: microchip,usb5744: Add second supply
usb: misc: onboard-hub: add support for Microchip USB5744
.../devicetree/bindings/usb/microchip,usb5744.yaml | 7 ++++++- drivers/usb/misc/onboard_usb_hub.c | 2 ++ drivers/usb/misc/onboard_usb_hub.h | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-)
Signature · 1 line
2.25.1
PATCH 1/2 dt-bindings: usb: microchip,usb5744: Add second supply
From: Stefan Eichenberger <[email protected]>
The USB5744 has two power supplies one for 3V3 and one for 1V2. Add the second supply to the USB5744 DT binding.
--- .../devicetree/bindings/usb/microchip,usb5744.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +6 -1
@@ -36,7 +36,11 @@ properties: vdd-supply: description: - VDD power supply to the hub + 3V3 power supply to the hub + + vdd2-supply: + description: + 1V2 power supply to the hub peer-hub: $ref: /schemas/types.yaml#/definitions/phandle
@@ -62,6 +66,7 @@ allOf: properties: reset-gpios: false vdd-supply: false + vdd2-supply: false peer-hub: false i2c-bus: false else:
Signature · 1 line
2.25.1
Re: [PATCH v1 1/2] dt-bindings: usb: microchip,usb5744: Add second supply
Quoted 16 lines · Francesco Dolcini
From: Stefan Eichenberger <[email protected]>
The USB5744 has two power supplies one for 3V3 and one for 1V2. Add the second supply to the USB5744 DT binding.
Signed-off-by Stefan Eichenberger <[email protected]>Signed-off-by Francesco Dolcini <[email protected]>--- .../devicetree/bindings/usb/microchip,usb5744.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +0
-0
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml properties: · line 43
Quoted 9 lines
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +5
-1@@ -36,7 +36,11 @@ properties: vdd-supply: description: - VDD power supply to the hub + 3V3 power supply to the hub + + vdd2-supply: + description: + 1V2 power supply to the hub
How about v1p2-supply?
Quoted 14 lines
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +1
-0peer-hub: $ref: /schemas/types.yaml#/definitions/phandle@@ -62,6 +66,7 @@ allOf: properties: reset-gpios: false vdd-supply: false + vdd2-supply: false peer-hub: false i2c-bus: false else:Signature · 1 line
2.25.1
Re: [PATCH v1 1/2] dt-bindings: usb: microchip,usb5744: Add second supply
Hello Conor,
thanks for the review.
Quoted 18 lines · Conor Dooley
Quoted 17 lines · Francesco Dolcini
From: Stefan Eichenberger <[email protected]>
The USB5744 has two power supplies one for 3V3 and one for 1V2. Add the second supply to the USB5744 DT binding.
Signed-off-by Stefan Eichenberger <[email protected]>Signed-off-by Francesco Dolcini <[email protected]>--- .../devicetree/bindings/usb/microchip,usb5744.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +0
-0@@ -36,7 +36,11 @@ properties:
Quoted 10 lines
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml properties: · line 43
Quoted 8 lines
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +5
-1vdd-supply: description: - VDD power supply to the hub + 3V3 power supply to the hub + + vdd2-supply: + description: + 1V2 power supply to the hubHow about v1p2-supply?
The reason for vdd2 is this
/*
* Use generic names, as the actual names might differ between hubs. If a new
* hub requires more than the currently supported supplies, add a new one here. */
static const char * const supply_names[] = {
"vdd",
"vdd2",
};from drivers/usb/misc/onboard_usb_hub.c.
Francesco
Conor Dooley
Acked-byRe: [PATCH v1 1/2] dt-bindings: usb: microchip,usb5744: Add second supply
Quoted 33 lines · Francesco Dolcini
Hello Conor,
thanks for the review.Quoted 18 lines · Conor Dooley
Quoted 17 lines · Francesco Dolcini
From: Stefan Eichenberger <[email protected]>
The USB5744 has two power supplies one for 3V3 and one for 1V2. Add the second supply to the USB5744 DT binding.
Signed-off-by Stefan Eichenberger <[email protected]>Signed-off-by Francesco Dolcini <[email protected]>--- .../devicetree/bindings/usb/microchip,usb5744.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +0
-0@@ -36,7 +36,11 @@ properties:Quoted 10 lines
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml properties: · line 43
Quoted 8 lines
Documentation/devicetree/bindings/usb/microchip,usb5744.yaml +5
-1vdd-supply: description: - VDD power supply to the hub + 3V3 power supply to the hub + + vdd2-supply: + description: + 1V2 power supply to the hubHow about v1p2-supply?
Quoted 1 line
The reason for vdd2 is this
I see.
Cheers,
Conor.
PATCH 2/2 usb: misc: onboard-hub: add support for Microchip USB5744
In reply to Francesco DolciniFrom: Stefan Eichenberger <[email protected]>
Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub.
The Microchip USB5744 supports two power supplies, one for 1V2 and one for 3V3. According to the datasheet there is no need for a delay between power on and reset, so this value is set to 0.
--- drivers/usb/misc/onboard_usb_hub.c | 2 ++ drivers/usb/misc/onboard_usb_hub.h | 7 +++++++ 2 files changed, 9 insertions(+)
drivers/usb/misc/onboard_usb_hub.c +2 -0
@@ -432,6 +432,8 @@ static const struct usb_device_id onboard_hub_id_table[] = { { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2412) }, /* USB2412 USB 2.0 */ { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.0 */ { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2517) }, /* USB2517 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2744) }, /* USB5744 USB 2.0 */ + { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x5744) }, /* USB5744 USB 3.0 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x0411) }, /* RTS5411 USB 3.1 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x5411) }, /* RTS5411 USB 2.1 */ { USB_DEVICE(VENDOR_ID_REALTEK, 0x0414) }, /* RTS5414 USB 3.2 */
drivers/usb/misc/onboard_usb_hub.h +7 -0
@@ -16,6 +16,11 @@ static const struct onboard_hub_pdata microchip_usb424_data = { .num_supplies = 1, }; +static const struct onboard_hub_pdata microchip_usb5744_data = { + .reset_us =0 , + .num_supplies =2 , +}; +static const struct onboard_hub_pdata realtek_rts5411_data = { .reset_us =0 , .num_supplies =1 ,
@@ -50,6 +55,8 @@ static const struct of_device_id onboard_hub_match[] = { { .compatible = "usb424,2412", .data = µchip_usb424_data, }, { .compatible = "usb424,2514", .data = µchip_usb424_data, }, { .compatible = "usb424,2517", .data = µchip_usb424_data, }, + { .compatible = "usb424,2744", .data = µchip_usb5744_data, }, + { .compatible = "usb424,5744", .data = µchip_usb5744_data, }, { .compatible = "usb451,8140", .data = &ti_tusb8041_data, }, { .compatible = "usb451,8142", .data = &ti_tusb8041_data, }, { .compatible = "usb4b4,6504", .data = &cypress_hx3_data, },
Signature · 1 line
2.25.1
Quoted 10 lines · Francesco Dolcini
From: Stefan Eichenberger <[email protected]>
Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub.
The Microchip USB5744 supports two power supplies, one for 1V2 and one for 3V3. According to the datasheet there is no need for a delay between power on and reset, so this value is set to 0.
Signed-off-by Stefan Eichenberger <[email protected]>Signed-off-by Francesco Dolcini <[email protected]>
The patch is correct based on functionality you want to add. Would be good to also add support for initialization over i2c which will change couple of things.
Thanks,
Michal
Quoted 10 lines · Francesco Dolcini
From: Stefan Eichenberger <[email protected]>
Add support for the Microchip USB5744 USB3.0 and USB2.0 Hub.
The Microchip USB5744 supports two power supplies, one for 1V2 and one for 3V3. According to the datasheet there is no need for a delay between power on and reset, so this value is set to 0.
Signed-off-by Stefan Eichenberger <[email protected]>Signed-off-by Francesco Dolcini <[email protected]>