[PATCH 1/2] usb: dwc3: dwc3-generic: check the parent nodes
Bin Meng
bmeng.cn at gmail.com
Wed Feb 16 08:37:20 CET 2022
On Thu, Feb 3, 2022 at 7:09 AM Angus Ainslie <angus at akkea.ca> 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 at 0 {
> reg = <0>;
>
> typec_hs: endpoint {
> remote-endpoint = <&usb_con_hs>;
> };
> };
>
> port at 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 at 1 {
> compatible = "usb424,2640";
> reg = <1>;
> #address-cells = <1>;
> #size-cells = <0>;
>
> mass-storage at 1 {
> compatible = "usb424,4041";
> reg = <1>;
> };
> };
> };
>
> Signed-off-by: Angus Ainslie <angus at akkea.ca>
> ---
> drivers/usb/dwc3/dwc3-generic.c | 25 ++++++++++++++++++++-----
> 1 file changed, 20 insertions(+), 5 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list