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 59E57C4332F for ; Wed, 14 Dec 2022 14:45:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF47F852BD; Wed, 14 Dec 2022 15:45:30 +0100 (CET) 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.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="UY4exXYp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4B0C685176; Wed, 14 Dec 2022 15:45:29 +0100 (CET) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 06DF3852BD for ; Wed, 14 Dec 2022 15:45:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mkorpershoek@baylibre.com Received: by mail-wr1-x432.google.com with SMTP id h12so19514786wrv.10 for ; Wed, 14 Dec 2022 06:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=3TZVQl7d/D/SUk1I8FMM3c3Zg3nxbD1rvpMwMiwIkTc=; b=UY4exXYp+s562C5FtAK5KlQruJSSt/z9mWKXjYI1E6aNEUE92jRAHdi7KTv6vCg+5H IS7JSLish+XI7/nV0olgZYsiR4LBxIbgrM0RKf0EZ3bNe8oVR6M7MCnI+ZhlxRTYpY0w eLkxN3FVvmnVhYX2ezW9v+gVDR3mvFQ+/U4E8WtoFlBDHkpIh/Tg8Bi4elW47h5E7DKk igjr5S0e6+fg/LnxsSs1MoW+yaxLR3cx/BT3tT2Qz6+LY1nReFHqFayTL39FNgnEC/06 aDOjOCJtvbsVdtF0yLZHPUUIi+7RY4bj4qnlkqjFVqlSo7cEuyZaUou1phIjLcgfsyKx /PnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3TZVQl7d/D/SUk1I8FMM3c3Zg3nxbD1rvpMwMiwIkTc=; b=zcH3uSr9i32fO5DBKaBzYRtpR9purBcm1Kq4DcxPPU3Ps0Qkfhnen2ahwQ4YXhlWoi aB2QC+yz9PCKIgBlizfstkyKw6twomDJCfOdT2nDew7qLCSSxrubdFp9BqcLu4CADur2 e7o3Uw4xK/l5+KGfeR6k7X78yOdW+pXI6d4gm38uTRq54iycWU+ARN/fwQgrCg69dcZf xEdCui328UtAkH/jysPseFXN8a1kLe3dC4ADHebwQBo6Q9otBSgKqGf5nlirCOI55FM1 ODdWh9xDFUcKlFJ1Nc41bFM5GUJcrRhVhDp1QwXEFWT6MhJk5b2mRexXUSkV4HqcSn3o sXRw== X-Gm-Message-State: ANoB5pl4+VYv1cOuR0T2tpzlDM9VDUwjHJTd7M117D+2AyEI6EHIcnv+ 8/aIfIxY2MZR60hEYQxHJNCC3w== X-Google-Smtp-Source: AA0mqf5NOEE2za1qz4IkDXZI4GWD+8qSxeHK9mzcPJrwJXiqydSQkw98L+oP97KF+IiPhOgC6yj9VQ== X-Received: by 2002:a5d:4b06:0:b0:242:73d2:20fb with SMTP id v6-20020a5d4b06000000b0024273d220fbmr14141667wrq.4.1671029124427; Wed, 14 Dec 2022 06:45:24 -0800 (PST) Received: from localhost ([2a01:cb19:85e6:1900:2bf7:7388:731d:c4e1]) by smtp.gmail.com with ESMTPSA id r11-20020a5d498b000000b00241d2df4960sm3058681wrq.17.2022.12.14.06.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 06:45:23 -0800 (PST) From: Mattijs Korpershoek To: neil.armstrong@linaro.org, Christian Hewitt Cc: u-boot@lists.denx.de, Marek Vasut , u-boot-amlogic@groups.io Subject: Re: [PATCH 0/2] mach-meson: port dwc2_otg usage to CONFIG_DM_USB_GADGET=y In-Reply-To: <55e46ad9-63cb-ff2c-d087-ab9af41d20ea@linaro.org> References: <20221024-meson-dm-usb-v1-0-2ab077a503b9@baylibre.com> <55e46ad9-63cb-ff2c-d087-ab9af41d20ea@linaro.org> Date: Wed, 14 Dec 2022 15:45:12 +0100 Message-ID: <87cz8mcadj.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain 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.6 at phobos.denx.de X-Virus-Status: Clean Hi Neil, On Thu, Nov 24, 2022 at 10:34, Neil Armstrong wrote: > Hi Mattijs, > > On 23/11/2022 16:42, Mattijs Korpershoek wrote: >> While working on some USB bugs on the VIM3L board, we stumbled upon the fact >> that mach-meson still uses legacy board_usb_*() functions instead of using DM [1] >> >> This series aim to switch the g12a based boards to use CONFIG_DM_USB_GADGET and >> removes the board_usb_*() logic. >> >> * The first patch adds mode switching in the dwc3-meson-g12a glue driver whenever >> the dwc2 otg driver is probed()/removed(). >> >> * The second patch enables the config option and cleans up all board_usb_*(). >> >> This has been mainly tested with khadas-vim3l_android_defconfig using fastboot: >> >> => fastboot usb 0 >> >> => # hit Ctrl-c >> >> Other tests: >> * ums 0 mmc 2 # can list / mount partitions from host >> * usb start; usb storage # list usb thumb drive >> * all defconfigs have been build tested >> >> [1] https://lore.kernel.org/u-boot/938b9439-9014-5ee8-1627-16af508bface@linaro.org/ >> Signed-off-by: Mattijs Korpershoek > > I'll run some tests on other G12 boards but so far this looks very good, thanks ! I got my hands on an odroid-c4 board and I also tested: => fastboot usb 0 => # hit Ctrl-c # disconnection is ok And tested "usb start" and could list a usb thumb drive. Any other tests you would like me to do? > > Neil > >> >> --- >> Mattijs Korpershoek (2): >> usb: dwc3-meson-g12a: force mode on child add/removal >> ARM: meson: g12a: switch dwc2 otg to DM >> >> arch/arm/mach-meson/board-g12a.c | 127 ------------------------------ >> configs/bananapi-m5_defconfig | 1 + >> configs/beelink-gsking-x_defconfig | 1 + >> configs/beelink-gtking_defconfig | 1 + >> configs/beelink-gtkingpro_defconfig | 1 + >> configs/khadas-vim3_android_ab_defconfig | 1 + >> configs/khadas-vim3_android_defconfig | 1 + >> configs/khadas-vim3_defconfig | 1 + >> configs/khadas-vim3l_android_ab_defconfig | 1 + >> configs/khadas-vim3l_android_defconfig | 1 + >> configs/khadas-vim3l_defconfig | 1 + >> configs/odroid-c4_defconfig | 1 + >> configs/odroid-hc4_defconfig | 1 + >> configs/odroid-n2_defconfig | 1 + >> configs/radxa-zero_defconfig | 1 + >> configs/sei510_defconfig | 1 + >> configs/sei610_defconfig | 1 + >> configs/u200_defconfig | 1 + >> drivers/usb/dwc3/dwc3-meson-g12a.c | 18 +++++ >> 19 files changed, 35 insertions(+), 127 deletions(-) >> --- >> base-commit: 7b70f68977578360d9c47bb25d6d1937075153b4 >> change-id: 20221024-meson-dm-usb-60e413696519 >> >> Best regards,