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 C20B0C001DF for ; Mon, 24 Jul 2023 18:13:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06762866AD; Mon, 24 Jul 2023 20:13:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="hq9LvKJF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2CA42867EF; Mon, 24 Jul 2023 20:13:53 +0200 (CEST) Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (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 423DE866AD for ; Mon, 24 Jul 2023 20:13:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-440c5960b58so1481165137.3 for ; Mon, 24 Jul 2023 11:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1690222428; x=1690827228; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=/Lo10U9x9NQdPFIrgmKoyAZ2UjUl1C5SQ/JX0BxSQYE=; b=hq9LvKJF1swBN+HCMV8/WLx4QKvTjGcxYfFokd7LDxr2xIY8j1UoyafW/6VLY3bZTx +rjBefGHrnZUimNSwXDW8TLJ30i13rMtLiJpauy79grb3VZDt3hE4N2V80oclWfX5BX/ uAcjhDzbAkU1DFs7qs+XVhqIBMDIFDrLCO3F8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690222428; x=1690827228; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/Lo10U9x9NQdPFIrgmKoyAZ2UjUl1C5SQ/JX0BxSQYE=; b=XvIX7MYF2ZlsAsoi8vA94lz2Q2OkDGf/yI5TZaDg6vALajsEn7U1M396eMlLZ3CS2v fz9+p5M6mu1NbPab7b3kZqxWM5YH5WhPXmvu56vcrcxoZCOCUE/2G0Iy+JOz6uMzdgYy AN97JSpWE59BkFaRcm8JuQN9LfKS7xQieNPt+BtBQUWOcf+G9KHkL7OSY1gphxNgp9A4 KL75d+5bbhyC19JYVbFna52ysQuq51cqQSA//xt9ulkZTp2IqaKM3DTip5VM+KGBr4PH MEAzZN5Kr92FAWa9MjHf5oPCBz8A+YLr0IP1WnBdck/z7c+yoGOsYXw671G2nKiBCc7i +wmA== X-Gm-Message-State: ABy/qLalgzdsG3o56MCEp6oKCBmmGFaWldbCfnYoYrWj8phVLQx4XwUu vuoxCro4699X7h2CH0ciLrAMWw== X-Google-Smtp-Source: APBJJlFTOrKOiNPYRp0pfzZPQbXRdbYObmeSmVxg6Qo0Aj71UNpbopf0sPnoG9v6Q32ymuDW4qimFw== X-Received: by 2002:a67:e910:0:b0:444:bb6c:1188 with SMTP id c16-20020a67e910000000b00444bb6c1188mr3145735vso.1.1690222427832; Mon, 24 Jul 2023 11:13:47 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-4f8e-955d-9d50-cbb0.res6.spectrum.com. [2603:6081:7b00:6400:4f8e:955d:9d50:cbb0]) by smtp.gmail.com with ESMTPSA id e12-20020a67d80c000000b00437b8d24bcasm1449895vsj.4.2023.07.24.11.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 11:13:47 -0700 (PDT) Date: Mon, 24 Jul 2023 14:13:45 -0400 From: Tom Rini To: Miquel Raynal Cc: Marek Vasut , u-boot@lists.denx.de, Kevin Hilman , Lukasz Majewski , Simon Glass Subject: Re: [PATCH v2 1/4] cmd: bind: Add unbind command with driver filter Message-ID: <20230724181345.GI3630934@bill-the-cat> References: <20230717112137.9139-1-marex@denx.de> <20230723194955.7338144c@xps-13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9WF06RsRu6WDlpVD" Content-Disposition: inline In-Reply-To: <20230723194955.7338144c@xps-13> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean --9WF06RsRu6WDlpVD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 23, 2023 at 07:49:55PM +0200, Miquel Raynal wrote: > Hi Marek, >=20 > marex@denx.de wrote on Mon, 17 Jul 2023 13:21:34 +0200: >=20 > > Extend the driver core to perform lookup by both OF node and driver > > bound to the node. Use this to look up specific device instances to > > unbind from nodes in the unbind command. One example where this is > > needed is USB peripheral controller, which may have multiple gadget > > drivers bound to it. The unbind command has to select that specific > > gadget driver instance to unbind from the controller, not unbind the > > controller driver itself from the controller. > >=20 > > USB ethernet gadget usage looks as follows with this change. Notice > > the extra 'usb_ether' addition in the 'unbind' command at the end. > > " > > bind /soc/usb-otg@49000000 usb_ether >=20 > I don't really get why this is needed? Yes, having proper bind and > unbind methods and having them called internally is relevant, but when > you have a single OTG controller, why is this needed? It basically > breaks the CLI, making bisects more painful and all updates just fail. I think part of the issue here is how usb_ether didn't act like the rest of the gadget do, for example fastboot. > > setenv ethact usb_ether > > setenv loadaddr 0xc2000000 > > setenv ipaddr 10.0.0.2 > > setenv serverip 10.0.0.1 > > setenv netmask 255.255.255.0 > > tftpboot 0xc2000000 10.0.0.1:test.file > > unbind /soc/usb-otg@49000000 usb_ether > > " > >=20 > > Signed-off-by: Marek Vasut > > --- > > Cc: Kevin Hilman > > Cc: Lukasz Majewski > > Cc: Marek Vasut > > Cc: Simon Glass >=20 > I've tested the whole series, unfortunately is does not work on > AM335x/BBBW: >=20 > * Any recovery attempted using the network will now fail in > the SPL, where, AFAIK, there is no way to manually bind: >=20 > U-Boot SPL 2023.07-00806-gac80e6de9cf (Jul 23 2023 - 19:45:51 +0200) > Trying to boot from USB eth > Could not get PHY for eth_cpsw: addr 0 > eth0: eth_cpswusing musb-hdrc, OUT ep1out IN ep1in STATUS ep2in > MAC de:ad:be:ef:00:01 > HOST MAC de:ad:be:ef:00:00 > RNDIS ready > , eth1: usb_ether For testing, what happens if you disable CPSW? Does it both bind (as it shows here) and then use the expected device? > * The bind command was not available on my default configuration, > making it even difficult for people unaware that this command is > now required to fix their common commands. Yes, we'll need to make that default y if USB_ETHER. > * Any command that expects the usb_ether driver will now fail badly > even after the bind call: >=20 > =3D> bind /ocp/usb@47400000/usb@47401000 usb_ether > =3D> fastboot usb 0 =20 > couldn't find an available UDC > g_dnl_register: failed!, error: -19 > exit not allowed from main input shell. > =3D> tftp 0x81000000 zImage > dev_get_priv: null device Well, does it work if you do: bind /ocp/usb@47400000/usb@47401000 usb_ether tftp 0x81000000 zImage ? --=20 Tom --9WF06RsRu6WDlpVD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmS+v1MACgkQFHw5/5Y0 tywmoAwAnkQbvOaclJpynEn34s0y3IfVbAQl1p96EtMsMkUgovtq9aJVy0aMBkTG WAOv7rKThwnmdxmecHtXkpyp0ZpZ3MpyraD9km+cK4Pvwg42307t2po65TfhPQ+i nMMjXLSE0Mm5d8iOOFccZ7wZGXvt4p9cwG4BFHhzXa5ZuZPCSs8gRAb/mSMIc4Gx 1yM3y5Xc98JZqsr+0meLeXTOyllg6pb503ZQ9tYVc38qz71GVqhkkFgEx/IQ59wN OnJ9L5lgZBRIyIBdbuhiUG+KvyfzRYVyp74s/QmJ+PkmAZkgWVZG8wPSddHqvly/ Emwi/tcLNUTdlnVDBoAv5ckTKWpyPt5zQ2jzG8K4flQRmk09IE/5L75FAUO1fH6l GMe0sbAzynM4HRIZRrhxlrHlyZ/4MiNvlMgt8DK7KNotlWTO4Lg/UqTtSD5VU9Z6 Neo2n3yyhUPkjnRVqjrKFLotlLadknf+npX/D9un/UvdmAeULjVy99RJtAdsl1KQ uDdIaO8z =xmI+ -----END PGP SIGNATURE----- --9WF06RsRu6WDlpVD--