Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26268048rwd; Mon, 3 Jul 2023 07:32:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGVIIN9pmmZBqj+IxU2x/0tS9YzdDPcYJsUlfXGG/cQ8DGRETbIT9k5jPSigZX6sv8FEuND X-Received: by 2002:a17:902:bc88:b0:1b3:f5c7:4e75 with SMTP id bb8-20020a170902bc8800b001b3f5c74e75mr7364234plb.58.1688394734699; Mon, 03 Jul 2023 07:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688394734; cv=none; d=google.com; s=arc-20160816; b=NhuYcyr5gBtoiIQuZ0JdXB3D4diqFMw6e4QrE97aaLbdjYcpyY+++jI0M6gCHElFN6 wTaH0lUaq01M4xUyiCtABf4XZ7NIMU3enpWiXeQ4vh/KsVL74TFCoQ9vSz0Dtmk4wGig CFi4HssVEmGonL2dyYcDbez/7Sbr4LKxPjC2/gTf8p6Wcczn5mDJ9MFQQZk0Xj6ChIvi NvYcvUUNe8hsCYsszvDLncuf2aFzZlBSSHmAA04SR7ld9nBMSuLBlmjJSvAZnuZIEFWi tgsIxnJWQPvPdgk7uaRBY+BhbreUfSvoEcleePAmGhzZ+LnnPaHs76944Old8Bo+znUd ejYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=RyceS1YttDjM3IZjfYBUQgEmN60GSkIWDDnpTU52Yck=; fh=ebrY0Rpxu/2DvRhQ+Uc81cPlu/4Rc6yp0cYy6R06Ax8=; b=TH9xir3S626g6lQZYNfNL+NgktM1dX4slKmPSynzLrbx8qmPop3PtxSApsD8j16WrR 1ctC+LAhPoE36ho7+poKH7B0llRXo2HuKiIdZfpWF1y6c4NUqH7AdGCcag42Q6cNz7e3 E7YbX8UeylqHxpj1dBHe2lFQyUetF4hKH7soXgumvaV/y9LXwOYFnUPTMmRdRh/wNEu1 rVOWY9WCtLfM51rhZqr78TVjCcWqprs+7ASJs1YrS9nkIvArmRdbHjoIbMvfJdTKikJQ mDWWSsqjvnzoBqNczy7e/0xY4sXAvucStvuSdpr6z4XYO151Imol+XHdSlP4KgRdeMI7 60jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=QKqbyYWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iz19-20020a170902ef9300b001b7e0039e31si17456201plb.170.2023.07.03.07.31.45; Mon, 03 Jul 2023 07:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=QKqbyYWg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230355AbjGCOPH (ORCPT + 99 others); Mon, 3 Jul 2023 10:15:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbjGCOPG (ORCPT ); Mon, 3 Jul 2023 10:15:06 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E78DE59 for ; Mon, 3 Jul 2023 07:15:02 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31427ddd3fbso3060224f8f.0 for ; Mon, 03 Jul 2023 07:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1688393700; x=1690985700; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RyceS1YttDjM3IZjfYBUQgEmN60GSkIWDDnpTU52Yck=; b=QKqbyYWge/CzSIbqNJ7s43VhCzkCengong+Wjfjgl9eJ4pBd8Sa82RnUNOnt8G4Q4L WHUioevKysa0JpDczaPGkeCnpG5j/hV5g/d6prS3jJYOkVS/XlnC75zPY1/C6uK610y2 oqXqZCInzR8u/Ry4cQY/x9VVC3z3IJOImkhE928K2g6TThzH/hv8ACt4wTj7XjahAj+p aDbdPIAgv+0xRXFHVbpf1RTuJcEF/TAZyAERHwoaboFgNOyBK4tgn+A+CwvYDDEyfd9+ oZ6poyQnRxQwGRX29VRXXQ3QB2UMe33E0LLKmCBQywXE5dfipcpbQh/nkZiIZK1kDaXR OJFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688393700; x=1690985700; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RyceS1YttDjM3IZjfYBUQgEmN60GSkIWDDnpTU52Yck=; b=N4PQc3y4+OUS9S1ZOclSZRTVSNtx3iyWYYY8TMsrdOsR7uQsIeOM6Rtre9XBf1KsYM 9ORASoCz8fFysPmTey/Wb5kX0sg2+OODfVk8FoFHNAmfRMU5achweO87sdGER4N76Op1 pPUiCE9futDco0uekVU3k7a63rccHyoFXExSukJI0J639PAo4kQmQhIW6y9vw4abI3AO MZonYzUuVCtCV+IbT3ap7fKgr10sU62DF93BBIr7q9B6gjCtFozw5psHiKYMDfV9+sug jkvmbtnebE8hENzHHq6jfnDMZv8bEwgLG0Q2qgy20+Dx6t9YCyJU5K24s0oRr5BWEl0F jWTQ== X-Gm-Message-State: ABy/qLZBpgVaA2VjUngC8wIHhRzo9OhRmbkJuKVWFFZNa9oKaktrcfFj YQjmlQz+oIvqG6rXOiVVCNtIBw== X-Received: by 2002:adf:e6cc:0:b0:30a:e9cb:1a2e with SMTP id y12-20020adfe6cc000000b0030ae9cb1a2emr7648315wrm.65.1688393700421; Mon, 03 Jul 2023 07:15:00 -0700 (PDT) Received: from [192.168.35.121] ([77.205.22.13]) by smtp.gmail.com with ESMTPSA id z11-20020adfe54b000000b0031128382ed0sm6661539wrm.83.2023.07.03.07.14.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jul 2023 07:14:59 -0700 (PDT) Message-ID: <6a51d860-2d20-6c35-3935-985d5b41853e@baylibre.com> Date: Mon, 3 Jul 2023 16:14:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 0/3] Configure usb0 as peripheral on am335x boards Content-Language: en-US To: Roger Quadros , Tony Lindgren Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, vigneshr@ti.com, nm@ti.com, Tom Rini References: <20230629-usb0-as-peripheral-v1-0-167f78a11746@baylibre.com> <20230630072047.GK14287@atomide.com> <7f44798b-e2bf-1620-da37-ca13bfd07a21@kernel.org> <9ef45899-c766-e839-522a-3b048f8106f7@kernel.org> From: Julien Panis In-Reply-To: <9ef45899-c766-e839-522a-3b048f8106f7@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/3/23 15:44, Roger Quadros wrote: > > On 03/07/2023 14:56, Julien Panis wrote: >> On 6/30/23 21:40, Roger Quadros wrote: >>> Hi, >>> >>> On 30/06/2023 11:30, Julien Panis wrote: >>>> Hello Tony, >>>> >>>> On 6/30/23 09:20, Tony Lindgren wrote: >>>>> Hi, >>>>> >>>>> * Julien Panis [230629 13:10]: >>>>>> This series configures usb0 dr_mode as 'peripheral' for am335x-evm, >>>>>> am335x-evmsk, and am335x-icev2. This USB port is mainly used for >>>>>> RNDIS and DFU. >>>>> Is this a mini-B connector? Just wondering if it was originally attempted >>>>> to be configured as OTG or how it ended up with a host configuration.. >>>> It's a micro USB-AB connector. >>>> I don't know how it ended up with a host configuration, it looks like an oversight. >>>> Maybe Vignesh or Nishanth can confirm (?) >>> usb0 role should be "otg". >>> It is rightly so in Linux DT. am33xx.dtsi contains "otg" and all AM335x board files inherit from it. >>> >>> So I don't think setting it to "peripheral" in u-boot is the right thing to do. >> This series is for kernel (not for u-boot). >> Why is it a problem to set usb0 as 'peripheral' in kernel for the 3 board dts ? >> >> With usb0 not set as 'peripheral', the 3 boards (am335x-evm, evm-sk, icev2) >> do not boot with uboot 2023.04. This error is returned, with LOG_LEVEL=5: >>     No USB device found >>     USB ether init failed >>     initcall sequence 8ffdbba4 failed at call 808024d9 (err=-19) >>     ### ERROR ### Please RESET the board ### >> This error is also returned with usb0 as 'otg'. > This error is at u-boot correct? This will need further investigation. > > Does it function correctly in Linux when kept as 'otg'? > This error is at u-boot level, indeed. I add Tom Rini to this thread, since he was involved in the discussion here: https://lore.kernel.org/all/20230621-fix_usb_ether_init-v2-0-ff121f0e8d7a@baylibre.com/ If dr_mode is set as 'peripheral' in '-u-boot.dtsi' and kept as 'otg' in linux, it functions correctly in linux.