From patchwork Fri May 20 08:26:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1966 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 50BE83F039 for ; Fri, 20 May 2022 10:26:27 +0200 (CEST) Received: by mail-ej1-f72.google.com with SMTP id gs6-20020a170906f18600b006fe7a9ffacbsf3660057ejb.3 for ; Fri, 20 May 2022 01:26:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035187; cv=pass; d=google.com; s=arc-20160816; b=DUKE5ve/Rar1h2/YXKyRBjqhiYy3OlwNmKVFVjhg8pyK7BUCD3mDZJb3tUtf4u/I85 En0PZN9YuOUh1sUwOIUl42yv4WKEakVD2887aEwXx5Y7B6XHbgl+78sqXtG5vIVEzQ5Z Y2BqF6HeADt1d0gxCGwKT4ZO0yHQY4OvYdrCSOmLp2eNSWkaF6Pi5MgWzqnNNUYeZpS8 A+7tXuSB//TFM4nCEPyFXNT4iDFaCRbEeHla41IDCM/0UjZYuy/fZXdGaRd2e3x5VaQu 9OX6SFMHarcmBBb722Yiw7UZ+XzZy7gNkYhE4NscQjDNZTNZN5bHrJoH56HnidEnzFt8 Nehw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=7b4XB1HC1QQXEn/4X56ua9Rt3gO42tMvfquPqPysRA4=; b=uA381r7lyjbQFXY9rKljUL5IwNo5GHFmwrGIy8Jalll36lD0SO+Hnb+zU3OtoalhoM wX/A6caDPt6YYQQ4R86L5UIVOi/wNlQ/BCPiyHGKav6aZbCiQZLwJ4fuxlEQ2X41pfVH 211tOOz8l9ggQg3wbhj5IKTIgcdfPFhTUbx/YLFZOJp0qJ6vFwgxmrYcfzD4NCqSJ5va HPBTlMRcE642r0A6DTSxGPsKQWlferijo9Qknm/+wqkWGB1ANfpl2bNe6bcP+m7ICscn YXrM3dYlyYknclULbzFvVIENFKssRfEGdB7aCtOLxlUu2AzTHYIG8Cxvlkarq6f1EMTO 2PVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AOlO1mPE; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=7b4XB1HC1QQXEn/4X56ua9Rt3gO42tMvfquPqPysRA4=; b=Ge2vMQcHmzQbyuCzUUrXbT6BsTKCsqGKJgvYkJY7q9YkBuQxb/+Zgu55otaVKqoExx Ip/xCVddov2gi9KNRwckf6TA+9YJikmt3XKm8PsUyp21/OHFL4BM3PhZbNXB2aDT/ls2 9G1BQibAW9l0M7cacawoi+IAsb6QqMfqo7gtY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=7b4XB1HC1QQXEn/4X56ua9Rt3gO42tMvfquPqPysRA4=; b=JzMECbr89XuAb7ATFsjcyznaYghLj24a/FKQ6SoFTcgJrMzScvSYi0aFmNe9K4qG5r 8VOJm05mCk7b12SkFznzEeDGkKSP0+nYJAE0Fn7kFxhvNuBAUs+Xmmjsn+dCO9mS8hhB 8vAK068uqqzyoFVdHKV25feONO2gG/ZPQu3Nmzd5urSUuS+m0UNa1WlN4rIxp56dFBWS mu/H3bT4OYlfpkX4MxL0nW8wRRLh9GOvAdPRTkvFwOLsJrrii5CqOf2vCBEbNQZJRz0Y cf3+n3H/drQnGWBtZ7oJlIukkq35ygJqR0nB5j1bA7aRFMf4Ouy5yr3ZOf4Ctl5/pOAX fWLA== X-Gm-Message-State: AOAM531Umjzst+OjaqSx5puKon0MoVpS7OMzi0ZyzE7bjF0SQURyoD3M ifRuUlVI/1lm+EEll2LXL+ZrkdiJ X-Google-Smtp-Source: ABdhPJxno+kp9jQMOBrl7bINy5wrPV6LE651PBVVUsih77+7GBUqF9jCuAfIAO0s/UA0J+OTNwdxpg== X-Received: by 2002:a17:907:94c6:b0:6f5:287a:2bf2 with SMTP id dn6-20020a17090794c600b006f5287a2bf2mr8065149ejc.124.1653035187047; Fri, 20 May 2022 01:26:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5415:b0:42b:305b:5501 with SMTP id ev21-20020a056402541500b0042b305b5501ls389038edb.0.gmail; Fri, 20 May 2022 01:26:26 -0700 (PDT) X-Received: by 2002:a05:6402:1941:b0:413:2b80:b245 with SMTP id f1-20020a056402194100b004132b80b245mr9596356edz.252.1653035185976; Fri, 20 May 2022 01:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035185; cv=none; d=google.com; s=arc-20160816; b=eqPiqBmufiD63LP5XtPM0Vwzcop7al4KpqdLGJmkYOBLLv2q+OP7sSxaq9IgrPaYF5 s2UzgJpEMATPsig1NkgkvoilfdEH3V//aH4cUA6Z0nO4KBNo98jJZeiuPnpmjUudElvZ psIJNnVcJCqF1MKBLj80hXu2bFLZKwgJ+c6I9TeMKcl+eFAbmPuk+hilpV4UzuIf7V4G ANQHNoGpNxpeClcEECngP1WKa2rgva7ycHm5t+VvUQ6aQu4wnPk2OAlAMci+CIiuSqEu VCc0jLvR8v/piKvXP/v0PbHPEWIlPth626V/hRsWZoZ6cPEzHE0QpBxhVFSQ5p4sypl2 1w4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=BRGcnRv0gYq4ID37XXTx+zNgtAuhWXw6T/s8YfKC06M=; b=PNroGaSNVsBRsUOuz2t7S1OmClcd6KQtn3R4QhGD+mhDru2U+y4xPva/BlzM6eq07A oDGcdwDzff5+VOz6GHEkzMcMtYl9/iEruZLlh9adhr1ayu8ALawv/hFhf7z99f5OfC/g YOVQ5an5RM65t/c+xrvoNpW/93lQdS27e4WLGR3dR9YcbAA9GcZ1t0ZoKwrpzSee0lIJ vAZN8MzBQQbdTF6rXOh5YWSs6d7AmbDOqe6iP2z6WE1MxMvRcjAL6y8zEGNNYXpCs5q5 xfzzb5fyZNAgX3HtKC4i63vGn1+UwpVyB0vLy/dc2x1Xyh/NTPpvs1x3Z52k3bAmAfHn zhXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AOlO1mPE; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id b5-20020a056402138500b0042acf1c6c24sor4451803edv.21.2022.05.20.01.26.25 for (Google Transport Security); Fri, 20 May 2022 01:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a50:a6c8:0:b0:428:5b3a:6c99 with SMTP id f8-20020a50a6c8000000b004285b3a6c99mr9654508edc.222.1653035185589; Fri, 20 May 2022 01:26:25 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i.station (net-188-217-53-154.cust.vodafonedsl.it. [188.217.53.154]) by smtp.gmail.com with ESMTPSA id el9-20020a170907284900b006f3ef214e55sm2896544ejc.187.2022.05.20.01.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:25 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai Subject: [PATCH 0/8] imx8mm: Add serial download support Date: Fri, 20 May 2022 10:26:15 +0200 Message-Id: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: tommaso.merciai@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AOlO1mPE; spf=pass (google.com: domain of tommaso.merciai@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=tommaso.merciai@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series brings USB gadget support for i.MX8MM and allows the usage of the Serial Download Protocol, which is a convenient way for loading U-Boot via the 'uuu' tool and and flashing the eMMC via the U-Boot 'ums' command. Tested on board based on iMX8MM SOC: -------------------------------------------------------------------------------- U-Boot SPL 2022.04-00114-gd04ac0fd3a-dirty (May 20 2022 - 10:12:08 +0200) DEBUG Normal Boot WDT: Started watchdog@30280000 with servicing (60s timeout) Trying to boot from USB SDP SDP: initialize... SDP: handle requests... Downloading file of size 2366576 to 0x40400000... done Jumping to header at 0x40400000 Header Tag is not an IMX image Found header at 0x4041e1a0 NOTICE: BL31: v2.2(release):android-11.0.0_1.2.0-rc2-0-gcb435ee78 NOTICE: BL31: Built : 16:43:13, Feb 1 2022 welcome to lk/MP boot args 0x2000000 0xbe000000 0x2000 0x0 initializing trusty (Built: 12:13:25 Nov 19 2020) Initializing Trusted OS SMC handler avb: Initializing AVB App hwcrypto: Initializing caam_drv: 318: job failed (0x2000055b) trusty_gatekeeper: Initializing hwrng_caam: Init HWRNG service provider hwrng_srv: Start HWRNG service hwcrypto_caam: Init HWCRYPTO service provider hwcrypto_srv: Start HWCRYPTO service hwkey_caam: Init HWKEY service provider hwkey_caam: 183: Invalid magic, unpack key package fail. hwkey_srv: Start HWKEY service hwcrypto: enter main event loop U-Boot 2022.04-00114-gd04ac0fd3a-dirty (May 20 2022 - 10:12:08 +0200) CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz Reset cause: POR Model: FSL i.MX8MM EVK board DRAM: 2 GiB -------------------------------------------------------------------------------- References: - https://patchwork.ozlabs.org/project/uboot/list/?series=251796&state=* - https://www.mail-archive.com/u-boot@lists.denx.de/msg410536.html Tommaso Merciai (8): configs: imx8mm: imx8mm-evk: add usb defines necessary for ehci-hcd usb driver imx8mm: Fix USB reg addresses for i.MX8MM clock_imx8mm: Add enable_usboh3_clk() for i.MX8M usb: ehci-mx6: move mode set/detect to probe usb: ehci-mx6: Allow building SDP for imx8mm imx8mm_evk: Add an entry for USB boot imx8mm_evk: Add Serial Download Protocol support doc: imx8mm_evk: Add instructions for eMMC boot arch/arm/include/asm/arch-imx8m/clock.h | 1 + arch/arm/include/asm/arch-imx8m/imx-regs.h | 22 +++++++ arch/arm/mach-imx/imx8m/clock_imx8mm.c | 16 ++++++ board/freescale/imx8mm_evk/spl.c | 2 + configs/imx8mm_evk_defconfig | 21 +++++++ doc/board/nxp/imx8mm_evk.rst | 42 ++++++++++++-- drivers/usb/host/ehci-mx6.c | 67 ++++++++-------------- include/configs/imx8mm_evk.h | 6 ++ 8 files changed, 129 insertions(+), 48 deletions(-)