Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26417964rwd; Mon, 3 Jul 2023 09:22:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HCz2eo+FRCQEEwtQ+kQKOe4TgI6p/sYplnYKcb67RfDqXM8qIC7eIhZGUcAMPzhtxCFsH X-Received: by 2002:a05:6a20:488:b0:126:7d25:b0ce with SMTP id 8-20020a056a20048800b001267d25b0cemr8962531pzc.51.1688401371982; Mon, 03 Jul 2023 09:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688401371; cv=none; d=google.com; s=arc-20160816; b=BS9IKnQ5cDt3TSJUSrH/F9qX3FkREP5gCTJX6jp5HLCv6NcyQEQs8wHmG6mKun14Pt uoPG0q0tWnWoz+Xf3YcZffB8L9b3ltxOdYzAgFNeypqCUemr0vhXWZQCk98WmDHCyLd5 YIqB5AlfesQvn4vMGR2xTyErtgxJ1o1N0vEsLaQnWmP/AmcLC2zZHNnYzJTSuQpUzqqU zzbxAXcnNtKGTZAmOGn9XoKlJKe50H4KzeQg8FI+mY8F6vWsooMNMkjRLvJ44o98ke9c qVr9/d5mNeSDc5cuUh2ZW91vgLgfYWL+h17V/thRj+UeUnoprP944/lH3jOsj4p3B0oq +0KA== 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=nToOaFFb7Yah/0oWYDXxyn35HQ2cDLw7R7eaZRYCDPY=; fh=ebrY0Rpxu/2DvRhQ+Uc81cPlu/4Rc6yp0cYy6R06Ax8=; b=ZDThaeE5ceivUViEahOvIJvrYrQxxxdSvrxpQG8z6Pr/pmudmUx2sEBTm8uOv9HdKV JD43r769K+ypwgc0RQXCx5VYMYwYDiyhQkKNxPvgvri6YExcCbteeIgEoQIoKypD/eA5 Vo36zbp+HbkQh+svNjAAIT9Ma5iDX5rYDyApcT9yLmtwrqzvGa2kANwjKlaad2uKpHri NKwVbRYAamBF42jQPBYGly+7WlyqYovhaN+b0ySQ8ZBzKCLlU+CV7CLNnMpHytShcGdX xDvHigTtMdlefSf9+PvVDAMetKDxUAmyjMDMDWWWXcYO4iLyunZ5sqvBtFFPaNTC2PfG PQeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=YKvDFs2O; 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 u126-20020a627984000000b00666aaa3b271si17249504pfc.10.2023.07.03.09.22.37; Mon, 03 Jul 2023 09:22:51 -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=YKvDFs2O; 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 S230323AbjGCPvK (ORCPT + 99 others); Mon, 3 Jul 2023 11:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbjGCPvJ (ORCPT ); Mon, 3 Jul 2023 11:51:09 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32185C2 for ; Mon, 3 Jul 2023 08:51:07 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3fbc0981756so44137955e9.0 for ; Mon, 03 Jul 2023 08:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1688399465; x=1690991465; 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=nToOaFFb7Yah/0oWYDXxyn35HQ2cDLw7R7eaZRYCDPY=; b=YKvDFs2Oy2TzMYx528oGqvtoNVyHbM1Zjdn/JaUPRNljJJZ3WIW6YsDYQInbhYko2m SUf1e3FDOdR2n6DVhvnM0dMRoWwG6XFQQ9zaX0PuOP14NOJHyck5lUZjBemwCloXNv1Q XhEddi3H1MT7sJw3+rRiVEuQS0scIlwVynCioWUJTtOGCbEmjn9TMBgYsF5cmKso/HGm Uyr6Ll3t1ybwejAKJEN3ii3hlh/53l42G8W/l9/1yLkk4bPkR1GT+7XFrL3Y/6ICFqJM 9iDftsXJV35HvD6Qp4yvskucJWNAsCXEo4yFa4b3CEif+EvuGL4ASytL6i0SQo1iF6lL GO3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688399465; x=1690991465; 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=nToOaFFb7Yah/0oWYDXxyn35HQ2cDLw7R7eaZRYCDPY=; b=AjlRVmQaAqVsDEdDIAVCBRAFl+bJx7ysCk1IzHtZWPF9yJ+iW0jbVDwUYNmKG+B1Zv L9NhIczK79hB4NPDATOwxIznxe90TpDy5xEtmYqOHMACZgMD/j1ATIWEGU0NoqaiF8DW R7oKivUmiYZhzthAUCvyGaps3lGqV1fsndQ8P9RhRh6a+YbG9PAJAABXbT2nk2CUKq75 +mFNzb8JqTR+YrprNyWXrdk4u/KvN0gvzKa1P4xkhaNzk3sO59MA73+zhx6gD/2snBOU Vnr5vu/hAK+gsx5v3BNEo3aGmyFOYoamXFj1UkkfzEgmWLYiqurtbHphzefs1FWzeGbN xxvA== X-Gm-Message-State: AC+VfDyrbFHkH2dyhb3vylNAEKHWk3YAesq+avKmr4C4JdqeRVjk1vZk 111uNzWKCo/H/i6vGw4OuZyrgA== X-Received: by 2002:a05:600c:21d6:b0:3fb:b299:6eba with SMTP id x22-20020a05600c21d600b003fbb2996ebamr7904522wmj.4.1688399465627; Mon, 03 Jul 2023 08:51:05 -0700 (PDT) Received: from [192.168.35.121] ([77.205.21.54]) by smtp.gmail.com with ESMTPSA id z12-20020a1c4c0c000000b003fa9554fb30sm22753833wmf.44.2023.07.03.08.51.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jul 2023 08:51:05 -0700 (PDT) Message-ID: <6d485ee7-9b8a-626e-da8a-bbff37bcde61@baylibre.com> Date: Mon, 3 Jul 2023 17:51:03 +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> <6a51d860-2d20-6c35-3935-985d5b41853e@baylibre.com> <73a4545a-e149-261a-a0c5-a526e8740bd5@kernel.org> From: Julien Panis In-Reply-To: <73a4545a-e149-261a-a0c5-a526e8740bd5@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=ham 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 17:27, Roger Quadros wrote: > > On 03/07/2023 17:14, Julien Panis wrote: >> 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. > OK. > > So NAK for this patch series as we don't want to break 'otg' on Linux. > > u-boot doesn't support 'otg' mode. So we need to force it either to > 'peripheral' or 'host'. > > One solution would be to have 'peripheral' in am335x-*-u-boot.dts? > OK. In other words, we just need to reconsider my previous u-boot series. :-) I was setting usb0 as 'peripheral' in 'am335x-*-u-boot.dts' here: https://lore.kernel.org/all/20230621-fix_usb_ether_init-v2-0-ff121f0e8d7a@baylibre.com/ Julien