On Thu, Feb 3, 2022 at 7:09 AM Angus Ainslie <[email protected]> wrote:
>
> The kernel devicetree has definitions for port and hub nodes as subnodes
> to the USB devices. These subnodes don't contain all of the data required
> to properly configure the dwc3. Check the parent nodes if the data is not
> in the port/hub node.
>
> Here's an example from the librem5 kernel dts file
>
> &usb_dwc3_0 {
>         #address-cells = <1>;
>         #size-cells = <0>;
>         dr_mode = "otg";
>         snps,dis_u3_susphy_quirk;
>         status = "okay";
>
>         port@0 {
>                 reg = <0>;
>
>                 typec_hs: endpoint {
>                         remote-endpoint = <&usb_con_hs>;
>                 };
>         };
>
>         port@1 {
>                 reg = <1>;
>
>                 typec_ss: endpoint {
>                         remote-endpoint = <&usb_con_ss>;
>                 };
>         };
> };
>
> &usb_dwc3_1 {
>         dr_mode = "host";
>         status = "okay";
>         #address-cells = <1>;
>         #size-cells = <0>;
>
>         /* Microchip USB2642 */
>         hub@1 {
>                 compatible = "usb424,2640";
>                 reg = <1>;
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>
>                 mass-storage@1 {
>                         compatible = "usb424,4041";
>                         reg = <1>;
>                 };
>         };
> };
>
> Signed-off-by: Angus Ainslie <[email protected]>
> ---
>  drivers/usb/dwc3/dwc3-generic.c | 25 ++++++++++++++++++++-----
>  1 file changed, 20 insertions(+), 5 deletions(-)
>

Reviewed-by: Bin Meng <[email protected]>

Reply via email to