[{"id":1773485,"web_url":"http://patchwork.ozlabs.org/comment/1773485/","msgid":"<20170922081440.u377tlsatzsc34jw@flea.lan>","list_archive_url":null,"date":"2017-09-22T08:14:40","subject":"Re: [U-Boot] [PATCH 4/9] sunxi: Switch MUSB to gadget mode on the\n\tBananapi M3","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Fri, Sep 22, 2017 at 07:26:30AM +0000, Chen-Yu Tsai wrote:\n> The Bananapi M3 has a micro-USB OTG port. It supports both host and\n> gadget mode. Having the OTG port operate in gadget mode is more useful,\n> as we can use it for fastboot or Ethernet over USB.\n> \n> The board has 2 other USB host ports that are supported. These can be\n> used for connecting peripherals.\n> \n> Signed-off-by: Chen-Yu Tsai <wens@csie.org>\n> ---\n>  configs/Sinovoip_BPI_M3_defconfig | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig\n> index f321d94e04eb..e48983fc3310 100644\n> --- a/configs/Sinovoip_BPI_M3_defconfig\n> +++ b/configs/Sinovoip_BPI_M3_defconfig\n> @@ -27,5 +27,5 @@ CONFIG_AXP_DCDC5_VOLT=1200\n>  CONFIG_AXP_DLDO3_VOLT=2500\n>  CONFIG_AXP_SW_ON=y\n>  CONFIG_USB_EHCI_HCD=y\n> -CONFIG_USB_MUSB_HOST=y\n> +CONFIG_USB_MUSB_GADGET=y\n\nI wonder whether this could become the default.\n\nAs far as I can see, having it as host can only be useful on the\ntablets we support.\n\nMaybe we can add a config option for tablets device, and if it's set,\nenable in host mode, and if not defaults to gadget.\n\nEventually, we could move all the options that are not really useful\non anything but a tablet that we currently select, like USB_KEYBOARD\n\nMaxime","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xz9nY1HXCz9sNw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 21:13:05 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid DDF0DC21F90; Fri, 22 Sep 2017 11:11:45 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 88BACC21FDC;\n\tFri, 22 Sep 2017 11:10:53 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 18E8CC21E0E; Fri, 22 Sep 2017 11:10:49 +0000 (UTC)","from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54])\n\tby lists.denx.de (Postfix) with ESMTP id 4D6BBC21E16\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 11:10:49 +0000 (UTC)","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 72226209A3; Fri, 22 Sep 2017 13:10:48 +0200 (CEST)","from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 49763208ED;\n\tFri, 22 Sep 2017 13:10:48 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0","Date":"Fri, 22 Sep 2017 10:14:40 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Chen-Yu Tsai <wens@csie.org>","Message-ID":"<20170922081440.u377tlsatzsc34jw@flea.lan>","References":"<20170922072635.32105-1-wens@csie.org>\n\t<20170922072635.32105-5-wens@csie.org>","MIME-Version":"1.0","In-Reply-To":"<20170922072635.32105-5-wens@csie.org>","User-Agent":"NeoMutt/20170914 (1.9.0)","Cc":"u-boot@lists.denx.de, Jagan Teki <jagan@openedev.com>,\n\tJoe Hershberger <joe.hershberger@ni.com>","Subject":"Re: [U-Boot] [PATCH 4/9] sunxi: Switch MUSB to gadget mode on the\n\tBananapi M3","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============7539007834329961595==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1773494,"web_url":"http://patchwork.ozlabs.org/comment/1773494/","msgid":"<CAGb2v64194uGZvYNCOmiuLqrsdTqFf8CSAatQ6dNu1MN2hZSSw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-22T11:20:10","subject":"Re: [U-Boot] [PATCH 4/9] sunxi: Switch MUSB to gadget mode on the\n\tBananapi M3","submitter":{"id":47154,"url":"http://patchwork.ozlabs.org/api/people/47154/","name":"Chen-Yu Tsai","email":"wens@csie.org"},"content":"On Fri, Sep 22, 2017 at 4:14 PM, Maxime Ripard\n<maxime.ripard@free-electrons.com> wrote:\n> On Fri, Sep 22, 2017 at 07:26:30AM +0000, Chen-Yu Tsai wrote:\n>> The Bananapi M3 has a micro-USB OTG port. It supports both host and\n>> gadget mode. Having the OTG port operate in gadget mode is more useful,\n>> as we can use it for fastboot or Ethernet over USB.\n>>\n>> The board has 2 other USB host ports that are supported. These can be\n>> used for connecting peripherals.\n>>\n>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>\n>> ---\n>>  configs/Sinovoip_BPI_M3_defconfig | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig\n>> index f321d94e04eb..e48983fc3310 100644\n>> --- a/configs/Sinovoip_BPI_M3_defconfig\n>> +++ b/configs/Sinovoip_BPI_M3_defconfig\n>> @@ -27,5 +27,5 @@ CONFIG_AXP_DCDC5_VOLT=1200\n>>  CONFIG_AXP_DLDO3_VOLT=2500\n>>  CONFIG_AXP_SW_ON=y\n>>  CONFIG_USB_EHCI_HCD=y\n>> -CONFIG_USB_MUSB_HOST=y\n>> +CONFIG_USB_MUSB_GADGET=y\n>\n> I wonder whether this could become the default.\n>\n> As far as I can see, having it as host can only be useful on the\n> tablets we support.\n>\n> Maybe we can add a config option for tablets device, and if it's set,\n> enable in host mode, and if not defaults to gadget.\n>\n> Eventually, we could move all the options that are not really useful\n> on anything but a tablet that we currently select, like USB_KEYBOARD\n\nThere are also the cases where the OTG controller is routed to a USB\nhost port. These are likely set top boxes. It would probably be better\nto have the user be able to explicitly set it to gadget mode if they\nwant to do development, but otherwise be in host mode by default.\n\nChenYu","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xz9yT0pHDz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 21:20:49 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid CB9E3C21FDC; Fri, 22 Sep 2017 11:20:45 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 280EFC21E0E;\n\tFri, 22 Sep 2017 11:20:43 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 992C9C21E0E; Fri, 22 Sep 2017 11:20:41 +0000 (UTC)","from smtp.csie.ntu.edu.tw (smtp.csie.ntu.edu.tw [140.112.30.61])\n\tby lists.denx.de (Postfix) with ESMTPS id 34D15C21D56\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 11:20:40 +0000 (UTC)","from mail-wr0-f179.google.com (mail-wr0-f179.google.com\n\t[209.85.128.179])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits))\n\t(No client certificate requested) (Authenticated sender: b93043)\n\tby smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id D3BF2203B0\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 19:20:34 +0800 (CST)","by mail-wr0-f179.google.com with SMTP id m18so698319wrm.2\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 04:20:34 -0700 (PDT)","by 10.223.196.226 with HTTP; Fri, 22 Sep 2017 04:20:10 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_BRBL_LASTEXT,\n\tRCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","X-Gm-Message-State":"AHPjjUicRK4y5IamHGti6f6lXDumysV6c2Ehst/RaFJNc3mqB/5HCK69\n\tVugN1ADNOObbzDfULvOjzXVNmmGKLYqSHOqiYOQ=","X-Google-Smtp-Source":"AOwi7QA5NqQFew/6Af2Xd6zhU6XpuyCywcjiC/+2FGv/oapnExfAiiQdrgZwvuc7keYsTuDofzNV38+HxMKoh5CXV6Q=","X-Received":"by 10.223.147.39 with SMTP id 36mr4320789wro.175.1506079231535; \n\tFri, 22 Sep 2017 04:20:31 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170922081440.u377tlsatzsc34jw@flea.lan>","References":"<20170922072635.32105-1-wens@csie.org>\n\t<20170922072635.32105-5-wens@csie.org>\n\t<20170922081440.u377tlsatzsc34jw@flea.lan>","From":"Chen-Yu Tsai <wens@csie.org>","Date":"Fri, 22 Sep 2017 19:20:10 +0800","X-Gmail-Original-Message-ID":"<CAGb2v64194uGZvYNCOmiuLqrsdTqFf8CSAatQ6dNu1MN2hZSSw@mail.gmail.com>","Message-ID":"<CAGb2v64194uGZvYNCOmiuLqrsdTqFf8CSAatQ6dNu1MN2hZSSw@mail.gmail.com>","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tJagan Teki <jagan@openedev.com>, \n\tJoe Hershberger <joe.hershberger@ni.com>","Subject":"Re: [U-Boot] [PATCH 4/9] sunxi: Switch MUSB to gadget mode on the\n\tBananapi M3","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1773680,"web_url":"http://patchwork.ozlabs.org/comment/1773680/","msgid":"<20170922144052.pokjjck37ox5on5y@flea.lan>","list_archive_url":null,"date":"2017-09-22T14:40:52","subject":"Re: [U-Boot] [PATCH 4/9] sunxi: Switch MUSB to gadget mode on the\n\tBananapi M3","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Fri, Sep 22, 2017 at 11:20:10AM +0000, Chen-Yu Tsai wrote:\n> On Fri, Sep 22, 2017 at 4:14 PM, Maxime Ripard\n> <maxime.ripard@free-electrons.com> wrote:\n> > On Fri, Sep 22, 2017 at 07:26:30AM +0000, Chen-Yu Tsai wrote:\n> >> The Bananapi M3 has a micro-USB OTG port. It supports both host and\n> >> gadget mode. Having the OTG port operate in gadget mode is more useful,\n> >> as we can use it for fastboot or Ethernet over USB.\n> >>\n> >> The board has 2 other USB host ports that are supported. These can be\n> >> used for connecting peripherals.\n> >>\n> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>\n> >> ---\n> >>  configs/Sinovoip_BPI_M3_defconfig | 2 +-\n> >>  1 file changed, 1 insertion(+), 1 deletion(-)\n> >>\n> >> diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig\n> >> index f321d94e04eb..e48983fc3310 100644\n> >> --- a/configs/Sinovoip_BPI_M3_defconfig\n> >> +++ b/configs/Sinovoip_BPI_M3_defconfig\n> >> @@ -27,5 +27,5 @@ CONFIG_AXP_DCDC5_VOLT=1200\n> >>  CONFIG_AXP_DLDO3_VOLT=2500\n> >>  CONFIG_AXP_SW_ON=y\n> >>  CONFIG_USB_EHCI_HCD=y\n> >> -CONFIG_USB_MUSB_HOST=y\n> >> +CONFIG_USB_MUSB_GADGET=y\n> >\n> > I wonder whether this could become the default.\n> >\n> > As far as I can see, having it as host can only be useful on the\n> > tablets we support.\n> >\n> > Maybe we can add a config option for tablets device, and if it's set,\n> > enable in host mode, and if not defaults to gadget.\n> >\n> > Eventually, we could move all the options that are not really useful\n> > on anything but a tablet that we currently select, like USB_KEYBOARD\n> \n> There are also the cases where the OTG controller is routed to a USB\n> host port. These are likely set top boxes. It would probably be better\n> to have the user be able to explicitly set it to gadget mode if they\n> want to do development, but otherwise be in host mode by default.\n\nI don't know, maybe I'm heavily (confirmation) biased, but I've seen\nfar more people using the micro USB as a gadget (or at least, not as a\nhost, just powering the board), than people using it as hosts.\n\nActually, apart from the boards that are wiring it to an USB-A\nconnector, I haven't seen anyone use that kind of setup, ever.\n\nFor the tablets where it's your only option to interact with the\ndevice since you don't have any UARTs, it makes sense. Same thing for\nthe ones that wire it to a USB-A connector. But for all the boards out\nthere with a micro or mini USB connector that can power them, I really\nfeel like the default should be to a gadget.\n\nMaxime","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xzGPh07NKz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 00:41:11 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 9EB7EC220A1; Fri, 22 Sep 2017 14:40:59 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id C99D1C21F55;\n\tFri, 22 Sep 2017 14:40:55 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid F007EC220C6; Fri, 22 Sep 2017 14:40:53 +0000 (UTC)","from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54])\n\tby lists.denx.de (Postfix) with ESMTP id 71D6BC2208A\n\tfor <u-boot@lists.denx.de>; Fri, 22 Sep 2017 14:40:53 +0000 (UTC)","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 8A9CE209FB; Fri, 22 Sep 2017 16:40:52 +0200 (CEST)","from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 63575209EB;\n\tFri, 22 Sep 2017 16:40:52 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0","Date":"Fri, 22 Sep 2017 16:40:52 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Chen-Yu Tsai <wens@csie.org>","Message-ID":"<20170922144052.pokjjck37ox5on5y@flea.lan>","References":"<20170922072635.32105-1-wens@csie.org>\n\t<20170922072635.32105-5-wens@csie.org>\n\t<20170922081440.u377tlsatzsc34jw@flea.lan>\n\t<CAGb2v64194uGZvYNCOmiuLqrsdTqFf8CSAatQ6dNu1MN2hZSSw@mail.gmail.com>","MIME-Version":"1.0","In-Reply-To":"<CAGb2v64194uGZvYNCOmiuLqrsdTqFf8CSAatQ6dNu1MN2hZSSw@mail.gmail.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","Cc":"U-Boot Mailing List <u-boot@lists.denx.de>,\n\tJagan Teki <jagan@openedev.com>, \n\tJoe Hershberger <joe.hershberger@ni.com>","Subject":"Re: [U-Boot] [PATCH 4/9] sunxi: Switch MUSB to gadget mode on the\n\tBananapi M3","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============5380766463518535832==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]