From patchwork Mon Oct 12 06:23:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Fan X-Patchwork-Id: 317614 Delivered-To: patch@linaro.org Received: by 2002:a92:d603:0:0:0:0:0 with SMTP id w3csp4324774ilm; Sun, 11 Oct 2020 22:58:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo0iCjwraWqNDoqJF/qXh9p3BTHBU/J4ZtgxcQl2Gngt9ZK4R3DSXWxX2dP3g4hB5Zh260 X-Received: by 2002:a50:fd83:: with SMTP id o3mr12665025edt.17.1602482336226; Sun, 11 Oct 2020 22:58:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1602482336; cv=pass; d=google.com; s=arc-20160816; b=DqAHsmj9ncyZ4vGmiGF/B2XH4HnR7l3tDou3LifGctxL0gw0iQ4O71y1zr9kQodr4l WscShGYApR8fOBY9hP/lsC6peaOLPaH1Lst/bjCfFI+ZOWD7y5okrRcfAU6LOPXA0SDY Xpxsqchrc9s5l7WSJqmAcQpY58bUfBF5yrpNiL6t+8sM6fBPByFK60uPT788RV7XNC6o umYun472/7z2VsRgrn0SUuxL5vlxzFaMuY9FjOgkQLnrm8Ormj6Le87hi23b6RFvrtg1 9+tP7+UK187C4P1nkNlF5556x0sOgKp3SK6qDFwI54DKuGTm1i8bXb6SzqQYhOMUpT6N YKBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=RBSfrLxaENedGynAlH4/+QL9ZxYupvtB6bdmqWhBVBY=; b=PqnX8mKeWSX9slGAlLQyt3EVx4SyBE/S5jIyzpWQVWcqtoxTcke3y5hoRgxTt4btyz ICMXHM0bRXemKbu4CUfJAuhBLhBltujmR65zYUMuiGDetx3jIu3P7oU4rSIoX27ob44x JMQvRLXcH2ENmkL8D4hta6HGBuCcvatnPluDnmff9zm3PDls0j/gunW9ugmb+9F9gx+V YGzgh2yIgPprYyxRSNIXk1HYbBGtPNkpaRzLMsQMej2KqVX8L+WpM9TVyxovOnszVKjy ZqCkGDEHpmO9cg4CI4Xg/AE2Q7DjHgZUlchkBGsuf4aGQChLvk5yVgBSjjppjzs59wDg irmw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=nZALoCPA; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id l91si10358616edl.566.2020.10.11.22.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Oct 2020 22:58:56 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=nZALoCPA; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0A3F824D8; Mon, 12 Oct 2020 07:57:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="nZALoCPA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2109824C7; Mon, 12 Oct 2020 07:57:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1376A824C7 for ; Mon, 12 Oct 2020 07:57:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l06uViiueRUyHhTyww4w95QGmP0ipsMqiioiXurwefSZgETi189TRO/olLHivfU4sG0ClwQov9YF6sqdOGxXSMvaGi0MmEDAXbGbJTw9fg8zy/y0VSOje8vaOcwiilPCGxfaM73h0qQiV00wd8YQAdoSjGXbb1vM/kuRoVmLlv3vfuVEnVZPuCg7mq6FbQrWSEyxEl28nEqfCFNKaAtBhVVLnYPwr6g5ORlQgHBXYgRvLM3tq9LNdtpE1uni9O/DOXCmQYZXWLOhxkHuE8EuiKbHoRUc+adeElxBBO7+SQ+k1x6qYGcZ6jlez104EcEPZhjWmiYj7BETqNbYGIUwWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RBSfrLxaENedGynAlH4/+QL9ZxYupvtB6bdmqWhBVBY=; b=MmO0lvBG0Bmm/Z5Jp7KVP8bnp0vuQUbGbGLSfkasLFXNxXgXB3L6l2EuDEhmdqkZFAIRPKtPK0x2Jtb88UH1Sr/YXYNgDEyNw1lltloL3qdLNoDACzX5Lrqet15GWW5a1f3FRTG87u5t9VuT6dKyTaNqZDFejpMC3uHsW8rRxEiTurcY6riCL3QAOHA4k914tD/0WsUglTOfJXvGV0mJEaCPYZNtWZGRXLxDnmvnLXRxLRu4m8AxJAxbtzn80IVoFFDdIgNfIc1UhufenJynRr0fWnC/gakf9TS5bmMcfDQjsYkyphT/AkoqriRmlfldyPIAZze8C7f35OGU5A3v+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RBSfrLxaENedGynAlH4/+QL9ZxYupvtB6bdmqWhBVBY=; b=nZALoCPA2wwnoJ2JE9BJMafGh+Iy0xElgF9QJYpd7qT88kasowIfF+0oR7fe2aqyMd1av22AaoL9WvYVmvJm56ZbAn1obU/vssUxNAJj3unTbsw2r5mZUudawJmIlnfVuwcF6e2ksGNxL/A9HekD7ivgl+gq+PkU02p4sGb9GSs= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none;denx.de; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4235.eurprd04.prod.outlook.com (2603:10a6:5:22::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.26; Mon, 12 Oct 2020 05:57:37 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::35c5:8c71:91f3:6bc6%12]) with mapi id 15.20.3455.029; Mon, 12 Oct 2020 05:57:37 +0000 From: Peng Fan To: sbabic@denx.de, festevam@gmail.com, marex@denx.de, lukma@denx.de Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH 8/8] imx8mm_evk: add fastboot support Date: Mon, 12 Oct 2020 14:23:54 +0800 Message-Id: <20201012062354.3743-9-peng.fan@nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012062354.3743-1-peng.fan@nxp.com> References: <20201012062354.3743-1-peng.fan@nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR01CA0105.apcprd01.prod.exchangelabs.com (2603:1096:3:15::31) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR01CA0105.apcprd01.prod.exchangelabs.com (2603:1096:3:15::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22 via Frontend Transport; Mon, 12 Oct 2020 05:57:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4a3a9617-251b-469f-97b6-08d86e73b81d X-MS-TrafficTypeDiagnostic: DB7PR04MB4235: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:67; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Zvv9kVDIRuNx5e891hrtq7q+s4AdEQJ94XEu7k/uvctqDqvWPsQIKosDfwPIuXj4lYtrnDQ5yhtj+EZ4FWrHoydh1G610PolLPbhuIyDC92my/v9mvkyvWDt8tIpX/7FHIQbPBFhQUYkPV42b0QpnHdC2bTzSPk3JW3PVsKkC8qO4/tv94vj9NjngwaYmY943rHBm+gLE6W0xANenFRFfE8Ow3s+AkYwNEhlpe55e52moZP9XeYKeSP6qt0y4jEF9rppxia/BYgywpZlzZjv3tXc7pvu/aC3mY8DkO/09uHqmThb8qewkwO0NG8vr3Gm X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(376002)(346002)(366004)(136003)(52116002)(83380400001)(8936002)(6506007)(4326008)(8676002)(44832011)(6512007)(1076003)(6486002)(86362001)(5660300002)(6666004)(66476007)(66946007)(66556008)(316002)(36756003)(2616005)(956004)(2906002)(186003)(26005)(478600001)(16526019); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1JH8ghDB8eQHlGJgaNGCdbkMW2TObCBhqYZtaaLC5l/cUaHgti/D7frrT6Qn6X3+qO+Owelu66kUGCNLkVXHkzRWUD5ku7152aGC4KClZw0vs5fujXUMFrRMzNrgSEWT9ObKUxL3+N27ZOGjMfEzoZVTCzyX8c2ZcxTJJ3EzkXNi3FW7qQpXsuzZ0jsgYuwHobBY7FsuNgAGgVaFUa6bGz6XR8KTo3evlBOcs9bhvRz0JpIts8Lg/Dxv2Nwmt9gBKh7HsuBWQeMrq49JYLJwOmHCk7jIn5MAigCNjIhFqhrWnNlkXWr/WLl+oYBbqYCg9nK4XmKtc4buUP69YkKL7qKjVIZN7FJrRFbMgMysWsf+zBvIUy7qmwP0dHxxKnm/8Cv/1DMVw8itH0I0+EyOi3rHvwmxZ3oovJ05WnNLoG55BVFGqz0rk1Vjuyfu1wSwkx3Qf98k2S1FBrszheODSbJjgLbFiQOJ5R4Kkj2Xy3oVfrgTVNzMF/Ef3qkYHB4vEcqSGIqJKahHtblQxKyg4ZDBGwrBfYPnuiuwBdTQWvgeRtbJ0uD2MioTeg2Lf0Y6bU5HzWZS/opR32LxTG+8jbSnVXTI+OK/vgT81vg/ozW7ddXZOaFt5FRKgeVWusV5Vf+3tvrGE1vSyoWWtWQ6oQ== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4a3a9617-251b-469f-97b6-08d86e73b81d X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2020 05:57:36.4325 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 21AgX0ODUYrdXIgz2Xh92Z4jxAfH7T3G/oGeawRThDG4gf9493i3NrS5aJ1lbXomx0Cw9X1WHGHS+7pPzqGxwg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4235 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Add fastboot support for U-Boot proper Signed-off-by: Peng Fan --- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 17 +++++++++++++++++ configs/imx8mm_evk_defconfig | 13 ++++++++++++- include/configs/imx8mm_evk.h | 14 ++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/arch/arm/dts/imx8mm-evk-u-boot.dtsi b/arch/arm/dts/imx8mm-evk-u-boot.dtsi index 241dfd656f..d85fe7e17a 100644 --- a/arch/arm/dts/imx8mm-evk-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-evk-u-boot.dtsi @@ -6,6 +6,8 @@ / { aliases { + usbgadget0 = &usbg1; + usbgadget1 = &usbg2; usb0 = &usbotg1; usb1 = &usbotg2; }; @@ -15,6 +17,21 @@ wdt = <&wdog1>; u-boot,dm-spl; }; + + usbg1: usbg1 { + compatible = "fsl,imx27-usb-gadget"; + dr_mode = "peripheral"; + chipidea,usb = <&usbotg1>; + status = "okay"; + }; + + usbg2: usbg2 { + compatible = "fsl,imx27-usb-gadget"; + dr_mode = "peripheral"; + chipidea,usb = <&usbotg2>; + status = "okay"; + }; + }; &{/soc@0} { diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig index 10e95d8d5c..19560bdb7e 100644 --- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -19,7 +19,6 @@ CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_SPL=y CONFIG_DEFAULT_DEVICE_TREE="imx8mm-evk" -CONFIG_ANDROID_BOOT_IMAGE=y CONFIG_FIT=y CONFIG_FIT_EXTERNAL_OFFSET=0x3000 CONFIG_SPL_LOAD_FIT=y @@ -64,6 +63,11 @@ CONFIG_SPL_CLK_COMPOSITE_CCF=y CONFIG_CLK_COMPOSITE_CCF=y CONFIG_SPL_CLK_IMX8MM=y CONFIG_CLK_IMX8MM=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x42800000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=1 CONFIG_MXC_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_MXC=y @@ -95,8 +99,15 @@ CONFIG_DM_THERMAL=y CONFIG_USB=y CONFIG_DM_USB=y # CONFIG_SPL_DM_USB is not set +CONFIG_DM_USB_GADGET=y CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_MX7 is not set CONFIG_USB_EHCI_IMX=y CONFIG_USB_STORAGE=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_SDP_LOADADDR=0x40400000 CONFIG_IMX_WATCHDOG=y diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 5e865f0bef..f6dccaaa15 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -148,4 +148,18 @@ #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_FASTBOOT_USB_DEV 0 + +/* USB configs */ +#ifndef CONFIG_SPL_BUILD +#define CONFIG_USBD_HS + +#define CONFIG_CMD_USB_MASS_STORAGE +#define CONFIG_USB_GADGET_MASS_STORAGE +#define CONFIG_USB_FUNCTION_MASS_STORAGE + +#endif + +#define CONFIG_USB_GADGET_VBUS_DRAW 2 + #endif