* [PATCH v2 0/4] usb: misc: adopt onboard hub support on stm32mp1 boards
@ 2022-07-26 8:07 Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 1/4] dt-bindings: usb: generic-ehci: allow usb-hcd schema properties Fabrice Gasnier
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Fabrice Gasnier @ 2022-07-26 8:07 UTC (permalink / raw)
To: gregkh, robh+dt, mka, alexandre.torgue
Cc: krzysztof.kozlowski+dt, arnd, linux-usb, devicetree,
linux-kernel, linux-stm32, linux-arm-kernel, amelie.delaunay,
fabrice.gasnier
Add support for USB2514B HUB found on stm32mp1 boards:
- Extend the ehci-generic dt-binding to fully use the usb-hcd.yaml, and so
the usb-device.yaml.
- Add usb-device compatible ("usbVID,PID") for the USB2514B USB2.0 HUB to
the onboard_usb_hub driver.
- Add relevant device tree node to stm32mp15 DK boards.
- Enable the onboard_usb_hub driver on multi_v7 platforms.
Changes in v2:
- Follow Matthias review comments
- dt-bindings reviewed by Rob
Fabrice Gasnier (4):
dt-bindings: usb: generic-ehci: allow usb-hcd schema properties
usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub
ARM: dts: stm32: add support for USB2514B onboard hub on
stm32mp15xx-dkx
ARM: multi_v7_defconfig: enable USB onboard HUB driver
Documentation/devicetree/bindings/usb/generic-ehci.yaml | 7 +------
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 8 ++++++++
arch/arm/configs/multi_v7_defconfig | 1 +
drivers/usb/misc/onboard_usb_hub.c | 2 ++
drivers/usb/misc/onboard_usb_hub.h | 1 +
5 files changed, 13 insertions(+), 6 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] dt-bindings: usb: generic-ehci: allow usb-hcd schema properties
2022-07-26 8:07 [PATCH v2 0/4] usb: misc: adopt onboard hub support on stm32mp1 boards Fabrice Gasnier
@ 2022-07-26 8:07 ` Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 2/4] usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub Fabrice Gasnier
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Fabrice Gasnier @ 2022-07-26 8:07 UTC (permalink / raw)
To: gregkh, robh+dt, mka, alexandre.torgue
Cc: krzysztof.kozlowski+dt, arnd, linux-usb, devicetree,
linux-kernel, linux-stm32, linux-arm-kernel, amelie.delaunay,
fabrice.gasnier
Allow properties and usb-device child nodes as defined in usb-hcd.yaml, by
using unevaluatedProperties: false. By the way, remove the "companion"
property as it's redundant with usb-hcd.yaml.
As example, this allows an onboard hub, to be described in generic-ehci
controller node:
usb {
compatible = "generic-ehci";
#address-cells = <1>;
#size-cells = <0>;
/* onboard HUB */
hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&v3v3>;
};
};
Without this, dtbs_check complains on '#address-cells', '#size-cells',
'hub@1' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: ..../generic-ehci.yaml
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
Documentation/devicetree/bindings/usb/generic-ehci.yaml | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/usb/generic-ehci.yaml b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
index 1e84e1b7ab271..e50c1cfaa1972 100644
--- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
@@ -130,11 +130,6 @@ properties:
Set this flag to indicate that the hardware sometimes turns on
the OC bit when an over-current isn't actually present.
- companion:
- $ref: /schemas/types.yaml#/definitions/phandle
- description:
- Phandle of a companion.
-
phys:
minItems: 1
maxItems: 3
@@ -155,7 +150,7 @@ required:
- reg
- interrupts
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub
2022-07-26 8:07 [PATCH v2 0/4] usb: misc: adopt onboard hub support on stm32mp1 boards Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 1/4] dt-bindings: usb: generic-ehci: allow usb-hcd schema properties Fabrice Gasnier
@ 2022-07-26 8:07 ` Fabrice Gasnier
2022-07-26 15:32 ` Matthias Kaehlcke
2022-07-26 8:07 ` [PATCH v2 3/4] ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 4/4] ARM: multi_v7_defconfig: enable USB onboard HUB driver Fabrice Gasnier
3 siblings, 1 reply; 6+ messages in thread
From: Fabrice Gasnier @ 2022-07-26 8:07 UTC (permalink / raw)
To: gregkh, robh+dt, mka, alexandre.torgue
Cc: krzysztof.kozlowski+dt, arnd, linux-usb, devicetree,
linux-kernel, linux-stm32, linux-arm-kernel, amelie.delaunay,
fabrice.gasnier
Add support for Microchip USB2514B USB 2.0 hub to the onboard usb hub
driver. Adopt the generic usb-device compatible ("usbVID,PID").
Some STM32MP1 boards have this hub on-board, with a supply that needs to
be enabled for proper operation.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
Changes in v2:
- Sort vendor ids in alphabetic order as commented by Matthias.
- Sort compatible list in alphanumeric order, e.g. by vendor ids as
commented by Matthias (but keep PIDs grouped for a HUB chip).
- Update commit message to remove earlier reference on usbVID,PID.
---
drivers/usb/misc/onboard_usb_hub.c | 2 ++
drivers/usb/misc/onboard_usb_hub.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c
index 6b9b949d17d30..de3627af3c84a 100644
--- a/drivers/usb/misc/onboard_usb_hub.c
+++ b/drivers/usb/misc/onboard_usb_hub.c
@@ -309,6 +309,7 @@ static struct platform_driver onboard_hub_driver = {
/************************** USB driver **************************/
+#define VENDOR_ID_MICROCHIP 0x0424
#define VENDOR_ID_REALTEK 0x0bda
/*
@@ -383,6 +384,7 @@ static void onboard_hub_usbdev_disconnect(struct usb_device *udev)
}
static const struct usb_device_id onboard_hub_id_table[] = {
+ { USB_DEVICE(VENDOR_ID_MICROCHIP, 0x2514) }, /* USB2514B USB 2.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 */
diff --git a/drivers/usb/misc/onboard_usb_hub.h b/drivers/usb/misc/onboard_usb_hub.h
index d3a5b6938582e..3820669eb98ce 100644
--- a/drivers/usb/misc/onboard_usb_hub.h
+++ b/drivers/usb/misc/onboard_usb_hub.h
@@ -7,6 +7,7 @@
#define _USB_MISC_ONBOARD_USB_HUB_H
static const struct of_device_id onboard_hub_match[] = {
+ { .compatible = "usb424,2514" },
{ .compatible = "usbbda,411" },
{ .compatible = "usbbda,5411" },
{ .compatible = "usbbda,414" },
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx
2022-07-26 8:07 [PATCH v2 0/4] usb: misc: adopt onboard hub support on stm32mp1 boards Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 1/4] dt-bindings: usb: generic-ehci: allow usb-hcd schema properties Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 2/4] usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub Fabrice Gasnier
@ 2022-07-26 8:07 ` Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 4/4] ARM: multi_v7_defconfig: enable USB onboard HUB driver Fabrice Gasnier
3 siblings, 0 replies; 6+ messages in thread
From: Fabrice Gasnier @ 2022-07-26 8:07 UTC (permalink / raw)
To: gregkh, robh+dt, mka, alexandre.torgue
Cc: krzysztof.kozlowski+dt, arnd, linux-usb, devicetree,
linux-kernel, linux-stm32, linux-arm-kernel, amelie.delaunay,
fabrice.gasnier
Add support for USB2514B onboard hub on stm32mp15 DK boards. The HUB
is supplied by a 3v3 PMIC regulator.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
index 333c2af97130a..8b48d3c89a047 100644
--- a/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
@@ -677,6 +677,14 @@ &usart3 {
&usbh_ehci {
phys = <&usbphyc_port0>;
status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ /* onboard HUB */
+ hub@1 {
+ compatible = "usb424,2514";
+ reg = <1>;
+ vdd-supply = <&v3v3>;
+ };
};
&usbotg_hs {
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] ARM: multi_v7_defconfig: enable USB onboard HUB driver
2022-07-26 8:07 [PATCH v2 0/4] usb: misc: adopt onboard hub support on stm32mp1 boards Fabrice Gasnier
` (2 preceding siblings ...)
2022-07-26 8:07 ` [PATCH v2 3/4] ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx Fabrice Gasnier
@ 2022-07-26 8:07 ` Fabrice Gasnier
3 siblings, 0 replies; 6+ messages in thread
From: Fabrice Gasnier @ 2022-07-26 8:07 UTC (permalink / raw)
To: gregkh, robh+dt, mka, alexandre.torgue
Cc: krzysztof.kozlowski+dt, arnd, linux-usb, devicetree,
linux-kernel, linux-stm32, linux-arm-kernel, amelie.delaunay,
fabrice.gasnier
Enable the USB onboard HUB driver, used on STM32MP1 boards.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
---
arch/arm/configs/multi_v7_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index ce9826bce29b3..d0f16b7f682bf 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -861,6 +861,7 @@ CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_ISP1760=y
CONFIG_USB_HSIC_USB3503=y
+CONFIG_USB_ONBOARD_HUB=m
CONFIG_AB8500_USB=y
CONFIG_KEYSTONE_USB_PHY=m
CONFIG_NOP_USB_XCEIV=y
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/4] usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub
2022-07-26 8:07 ` [PATCH v2 2/4] usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub Fabrice Gasnier
@ 2022-07-26 15:32 ` Matthias Kaehlcke
0 siblings, 0 replies; 6+ messages in thread
From: Matthias Kaehlcke @ 2022-07-26 15:32 UTC (permalink / raw)
To: Fabrice Gasnier
Cc: gregkh, robh+dt, alexandre.torgue, krzysztof.kozlowski+dt, arnd,
linux-usb, devicetree, linux-kernel, linux-stm32,
linux-arm-kernel, amelie.delaunay
On Tue, Jul 26, 2022 at 10:07:06AM +0200, Fabrice Gasnier wrote:
> Add support for Microchip USB2514B USB 2.0 hub to the onboard usb hub
> driver. Adopt the generic usb-device compatible ("usbVID,PID").
> Some STM32MP1 boards have this hub on-board, with a supply that needs to
> be enabled for proper operation.
>
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Acked-by: Matthias Kaehlcke <mka@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-26 15:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 8:07 [PATCH v2 0/4] usb: misc: adopt onboard hub support on stm32mp1 boards Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 1/4] dt-bindings: usb: generic-ehci: allow usb-hcd schema properties Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 2/4] usb: misc: onboard-hub: add support for Microchip USB2514B USB 2.0 hub Fabrice Gasnier
2022-07-26 15:32 ` Matthias Kaehlcke
2022-07-26 8:07 ` [PATCH v2 3/4] ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp15xx-dkx Fabrice Gasnier
2022-07-26 8:07 ` [PATCH v2 4/4] ARM: multi_v7_defconfig: enable USB onboard HUB driver Fabrice Gasnier
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).