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 5D06AEB64DC for ; Thu, 6 Jul 2023 10:41:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A629786202; Thu, 6 Jul 2023 12:41:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20221208.gappssmtp.com header.i=@baylibre-com.20221208.gappssmtp.com header.b="1Mwd4mOF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 14AD086309; Thu, 6 Jul 2023 12:41:04 +0200 (CEST) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (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 284B786261 for ; Thu, 6 Jul 2023 12:41:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jpanis@baylibre.com Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fb7589b187so697434e87.1 for ; Thu, 06 Jul 2023 03:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1688640059; x=1691232059; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=v6HbGbO5GsGJrcw2oriDdnlGPF4Is3ZAwhKKNY6gPy8=; b=1Mwd4mOFd7urYPyfEl67TK1MFfrG8dvGdLdJW48odJhBiuaAtb1M34Rlt/YwRYyiXI UTZH+mXaL5O/X2mhqYzgb4U8w3HIWhI7GAef6WJgsFv5kaaQTP9o7J7J04W37AHZPKpw R++e0qwWtjuUdRIYN56E/mn9YcseXFp2YjrRN7kcjj5UW5ECc6dX/Gh4gLXK+TwrBzZp Ha5dGc1iunawHdDub/Xw8/3/fCEbyrUHC0RZRZKh1+iUzs2xZjbcV7zKclu1cr48QpCo UfySYmKEMbK21YTkcFnpdlnTCuu1kFYzu0yh9Qf09gWHGVF3OaNAtFqRovqfy2c4V2Hc 6xzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688640059; x=1691232059; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v6HbGbO5GsGJrcw2oriDdnlGPF4Is3ZAwhKKNY6gPy8=; b=lfeEQvy+FEaRvX7w13pzGNPhtZF5S6BN31LJsZpbAckQ24MxnYp0ZlGUoalSc9AGH7 XvEn8qBuGJCt+OCo+SmWL4w77jCJ1XPZP8/bgz2srnEXG5O2OhYSxqgx30YpP2WuRiii Z6BRDHJNFVL9m7EGFoOSejetjxmcVWJSOzqKppq8jGHP2CwgTKL8iSjdze2lKhrGFpYZ Na52skpOstA8xW9dtfry0IFY/aeOHy8bwrI775lB4Sn8lhjLD/ki1O3DvOeyUdPkodVI 9wkV8BijZhBPf2L86Obzkq9GECkscZMA5FQCJOcWANExM2vXKqT9/pscGUhP92/2yFTT eYQw== X-Gm-Message-State: ABy/qLYdjTX4WvbpfUsFfapirRAsoMXM0r77C014Dk36xvebcmD47L55 bfbZH6Y/58CoY9AQSVpcb9ipLA== X-Google-Smtp-Source: APBJJlHmp1pyuO1PoDkKSUcCVy3a1t6zVZeqpauYq6Tis83Ii3UYmTtdcoF6SnkhSu65JBmTa/omvQ== X-Received: by 2002:a05:6512:a8b:b0:4f9:69e9:4fa6 with SMTP id m11-20020a0565120a8b00b004f969e94fa6mr1184451lfu.23.1688640059300; Thu, 06 Jul 2023 03:40:59 -0700 (PDT) Received: from [127.0.1.1] ([77.205.21.154]) by smtp.gmail.com with ESMTPSA id l5-20020a1ced05000000b003fbb346279dsm1716033wmh.38.2023.07.06.03.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 03:40:59 -0700 (PDT) From: Julien Panis Date: Thu, 06 Jul 2023 12:40:22 +0200 Subject: [PATCH v4 1/2] musb-new: ti-musb: Handle usb dual-role feature as peripheral MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230621-fix_usb_ether_init-v4-1-5f4977bb7678@baylibre.com> References: <20230621-fix_usb_ether_init-v4-0-5f4977bb7678@baylibre.com> In-Reply-To: <20230621-fix_usb_ether_init-v4-0-5f4977bb7678@baylibre.com> To: u-boot@lists.denx.de, Marek Vasut , trini@konsulko.com, tony@atomide.com, rogerq@kernel.org Cc: vigneshr@ti.com, nm@ti.com, Julien Panis X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688640056; l=750; i=jpanis@baylibre.com; s=20230526; h=from:subject:message-id; bh=Zys2V8nzzIQhBhPungRsN3i1zglNzXLNEu4RpPXL4HA=; b=GhsDqEOXCpysFBjdzi3s77XiQkMPPIof+E7+M7Om5quC+Jd7mBBgcdHYGaoVbkWGzMG4GciS8 AUdOTs+i0uZDcjtaZvzTMuztRBSzLubVxP+YXcBDqTwr+pOUjQXJ0pp X-Developer-Key: i=jpanis@baylibre.com; a=ed25519; pk=8eSM4/xkiHWz2M1Cw1U3m2/YfPbsUdEJPCWY3Mh9ekQ= 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 This prevents from getting some 'No USB device found' error, in usb_ether_init() function for instance. Signed-off-by: Julien Panis --- drivers/usb/musb-new/ti-musb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c index 3be3f93dd85d..44697dc31387 100644 --- a/drivers/usb/musb-new/ti-musb.c +++ b/drivers/usb/musb-new/ti-musb.c @@ -302,6 +302,7 @@ static int ti_musb_wrapper_bind(struct udevice *parent) dr_mode = usb_get_dr_mode(node); switch (dr_mode) { case USB_DR_MODE_PERIPHERAL: + case USB_DR_MODE_OTG: /* Bind MUSB device */ ret = device_bind_driver_to_node(parent, "ti-musb-peripheral", -- 2.37.3