mbox series

[0/4] usb: misc: adopt onboard hub support on stm32mp1 boards

Message ID 20220722130554.236925-1-fabrice.gasnier@foss.st.com
Headers show
Series usb: misc: adopt onboard hub support on stm32mp1 boards | expand

Message

Fabrice Gasnier July 22, 2022, 1:05 p.m. UTC
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.

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(-)

Comments

Fabrice Gasnier July 22, 2022, 1:05 p.m. UTC | #1
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]+'
Rob Herring July 25, 2022, 11:01 p.m. UTC | #2
On Fri, 22 Jul 2022 15:05:51 +0200, Fabrice Gasnier wrote:
> 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
> 
> 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(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>