From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04BACC433F5 for ; Tue, 28 Dec 2021 08:52:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CC2C8387A; Tue, 28 Dec 2021 09:52:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="RBwkhveq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9F82183878; Tue, 28 Dec 2021 09:52:23 +0100 (CET) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 910F980FF2 for ; Tue, 28 Dec 2021 09:52:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ot1-x330.google.com with SMTP id i5-20020a05683033e500b0057a369ac614so23590224otu.10 for ; Tue, 28 Dec 2021 00:52:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IJa88ZNcWQwyjqoPkokDZAg4gx2Yipyt8Hc1p5SVheE=; b=RBwkhveqY+uEMXseYYsFqZVZGbMlg0g28nzJL57iI8q9YCEDR8otLyGLNfL2FCpaqm lTgqZJx33TxTcEPkEVgm5Mrz7UBFgOWGyNZ755EXi3HzHYFV20rYXYStx0+mS8Tg1Ye4 ccQjktJFccRIHbCmnMAjWwum4zlXBRWed7WIQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IJa88ZNcWQwyjqoPkokDZAg4gx2Yipyt8Hc1p5SVheE=; b=34PKQY4o7lLDRFLqIi42AKVsNX38iJzWnL83hOTJoglHBjICRBtUl0mMJJByCOZ7pi IhUBw6CRCdBKRhPwuIjPwNy2GZKIR29ZMV+azyFdF7wSSKksn9KXgeCSO/Vxl49aSQ9u 3djShKWoEA+dv2p+U0x4F2tlIkgOxRUGvnlAEzT94X1oBbLMcAwAyPv7dVVgKuFfhuJT 4kanymvQAH4S+SKF71emuDp8/qa9sUCJf2jE/ps9iYxGgZyAJZpxn+BD+u/DlBbw7LBZ 6bPZuWYBLZom4yaD/pHg9e29KsFdh3olnV5N+Y4+aTTJGClajvE+earJ9tT/VD+bwE95 mOqg== X-Gm-Message-State: AOAM533jILqt9xwUgSUjMGsk0/18ZMUtCHLEjVbr4hbnvjzO3P6yDZzm 6UwnHqVqcJzU5lIEoy35defmI/+jtny9BufRFxeJT4LJcIGlG5Ve X-Google-Smtp-Source: ABdhPJzHbOwUbdn3QpFHF9YDPGqKXll7l37/QKILTNgFQpbCXKBeNaSxzghlRxuIbMYPPNE0hBEkKRiOv6dbuaOHlBk= X-Received: by 2002:a9d:24e4:: with SMTP id z91mr14373878ota.11.1640681539068; Tue, 28 Dec 2021 00:52:19 -0800 (PST) MIME-Version: 1.0 References: <321889095.1287351.1639978639867.ref@mail.yahoo.com> <321889095.1287351.1639978639867@mail.yahoo.com> In-Reply-To: <321889095.1287351.1639978639867@mail.yahoo.com> From: Simon Glass Date: Tue, 28 Dec 2021 01:52:08 -0700 Message-ID: Subject: Re: USB device enumeration query To: mahesh mv Cc: "u-boot@lists.denx.de" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Mahesh, On Mon, 20 Dec 2021 at 05:55, mahesh mv wrote: > > Hi all, > We have a board where we plan to connect 2 USB devices of MASS storage c= lass. One of the devices (3) is plugged in all the timebut the other USB is= hotplugged when ever its required. The issue we are facing is the device n= umber is not deterministic acrossreboots with uboot 2021 . Is there a way t= o fix the Device 3 below as the first one all the time in DTS file or some = other mechanism in uboot. > Emerald:> versionU-Boot 2021.07--11625-ge998855ac2-dirty (Dec 07 2021 - 2= 3:22:27 +0530) > aarch64-broadcom-linux-gnu-gcc.br_real (Buildroot 2019.08) 8.3.0GNU ld (G= NU Binutils) 2.31.1 > > Emerald:> usb info 1: Hub, USB Revision 3.0 - U-Boot XHCI Host = Controller - Class: Hub - PacketSize: 512 Configurations: 1 - = Vendor: 0x0000 Product 0x0000 Version 1.0 Configuration: 1 -= Interfaces: 1 Self Powered 0mA Interface: 0 - Alternate = Setting 0, Endpoints: 1 - Class Hub - Endpoint 1 In Inter= rupt MaxPacket 8 Interval 255ms 2: Hub, USB Revision 2.0 - US= B2.0 Hub - Class: Hub - PacketSize: 64 Configurations: 1 - Ven= dor: 0x05e3 Product 0x0608 Version 96.112 Configuration: 1 -= Interfaces: 1 Self Powered Remote Wakeup 100mA Interface: 0 = - Alternate Setting 0, Endpoints: 1 - Class Hub - End= point 1 In Interrupt MaxPacket 1 Interval 12ms 3: Mass Storage, US= B Revision 2.10 - SanDisk Ultra 040122c9e4a887e576fc7d3a05f5898 - C= lass: (from Interface) Mass Storage - PacketSize: 64 Configurations: 1= - Vendor: 0x0781 Product 0x5581 Version 1.0 Configuration: 1 = - Interfaces: 1 Bus Powered 224mA Interface: 0 - Al= ternate Setting 0, Endpoints: 2 - Class Mass Storage, Transp. SCSI= , Bulk only - Endpoint 1 In Bulk MaxPacket 512 - Endpoint= 2 Out Bulk MaxPacket 512 4: Mass Storage, USB Revision 2.0 - = Virtium VTDU31XC008G-A901 P1T65005607903260051 - Class: (from Interface= ) Mass Storage - PacketSize: 64 Configurations: 1 - Vendor: 0x2aaa= Product 0x0100 Version 1.0 Configuration: 1 - Interfaces: 1= Bus Powered 100mA Interface: 0 - Alternate Setting 0, En= dpoints: 2 - Class Mass Storage, Transp. SCSI, Bulk only = - Endpoint 1 In Bulk MaxPacket 512 - Endpoint 1 Out Bulk MaxPacket= 512 The output is a bit garbled. You can add USB devices to the devicetree if you like. See usb_scan_device() which calls usb_find_child() to find such a device. Regards, Simon > > Thanks,Mahesh