From patchwork Fri May 20 08:26:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1967 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 785683F03D for ; Fri, 20 May 2022 10:26:28 +0200 (CEST) Received: by mail-ej1-f71.google.com with SMTP id sc20-20020a1709078a1400b006f4a358c817sf3673358ejc.16 for ; Fri, 20 May 2022 01:26:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035188; cv=pass; d=google.com; s=arc-20160816; b=Weci/eo3ZUML6KeGG92l6t/nfNtBwrAvMHb62pFRa9C5ODSp+xieTpnzsUc3vQ4GYH gNDi5peQ4J/7USq+64KMpT6WkMczS3Zr3nMPFYP8GjcglkCCJujQXgaVCZA+XSniwkFZ RwusWBFZSr+nyVJUTSP9YihmAhUAEM5c5Sb+YOSTdQHViQzPpfLUhJDoEoz3oJmGUoyw jDkg+ej4et7HRjj5MH9+6oUcXUCE1P2jlZnHZNWOVw5+EH8qARwLBJaSrj6b8shAESe0 GZyIYlSERxqX4BvtceAqK59W1DgIl7zneH64rxZFlBBeeXihLEn/dQuEQ20HFjUgrJcE zfOA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ToXDyzsTbfULNScGtlg4GXW555YYpBn5vn7VAGoMPjQ=; b=kfPNGixYz8GZP7N8YI2suOhfDKaffdIgtkZ+OArkczjXLx6aT/YeyjG2+rPgkt0qrK bvZ2zcChrfqVfd/aySy5wFVR7Xikn5Ob/swMjiUmEL7l+GnDZQUZXd3oukFLWaZ25ZT3 7M/QS+d9hI2djAZk5tcYy/kX74k1W852Uracal5vZ0H6Gw8+ZdkIm4yDLomRpBj4mV3e yNOPZbMSkA4a3L91Hgp8faCvOLEGsLZEltDZHTovhSW5YVh9tNg2dkUHYHDYohRs/r4G GafWPgxx27hBms1KizlfQVEYjapfLsn6lPiSQbG+cBkyP7A5vHhbjkvofXe/MH2F/3+3 4cWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gnPPfmkt; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ToXDyzsTbfULNScGtlg4GXW555YYpBn5vn7VAGoMPjQ=; b=pbr4msU1mHrAgiiUv1Ggry9QmByx70sk+n6/v0K381F3MxayrICvIymN2pkxh2cDeC OlLmBlM7wAHAg8P/wXQ6+Geh8pkHnXRmM1FywWVOxc18RL3nsnfUNQL6KdaakN6t6nl9 NZKAbnWknyihuENjo5PrEgX5UnBflVgjFH//s= 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:in-reply-to :references: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=ToXDyzsTbfULNScGtlg4GXW555YYpBn5vn7VAGoMPjQ=; b=ia1oHyzC5Da15oAFkhlNAGykxpjcA2V3OxqSbkbrqfCO0aDYkR8gUHUA7VEUmzXuWA ggM2CCFs0LYU9cN2XxChDG1TUma93MqaWKdvrT0jUPhkeI+/pRLIShwD9yHiBmMXRnnT u1I1xnCOuAaCJB2GH3bOjau3Rm1phS9KZS22QgbizPx1WsF1oukDMnnbCAp6lsG6QMQ6 sw+Ll1DhyQwE0h6DclMt4qDr8BrjDQ3BMhwQU51RrKC0e2g87hhkASPNP7HOnYXOUxpx EoR28c4C4RmA7z4EfNT72iJI6AQX8oIjHZwVpoaGMYp0M0XwE2VPHK0EiEqYdcixs3Sf 5hdA== X-Gm-Message-State: AOAM530k4qdjXmiyguql+Wxm272rusZOWV9dV6TR+ulW2dKMy9Xb5Gct 9uy/SZYkUBdfNh22628Y8a2wG7ef X-Google-Smtp-Source: ABdhPJyEbW6T6b877VfqKgvPwz1q4JJYzIAsYHhejFSbyVjjokdYCs5KsIu2bt3AkcdH9b4mzZj/cw== X-Received: by 2002:a05:6402:d75:b0:42a:c493:3736 with SMTP id ec53-20020a0564020d7500b0042ac4933736mr9497781edb.381.1653035188298; Fri, 20 May 2022 01:26:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:7ea2:b0:6f4:dcbc:baa9 with SMTP id qb34-20020a1709077ea200b006f4dcbcbaa9ls2778305ejc.2.gmail; Fri, 20 May 2022 01:26:27 -0700 (PDT) X-Received: by 2002:a17:907:2d10:b0:6f4:a700:6970 with SMTP id gs16-20020a1709072d1000b006f4a7006970mr7837532ejc.108.1653035187137; Fri, 20 May 2022 01:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035187; cv=none; d=google.com; s=arc-20160816; b=K70AhjINrSKmjJdko3TDcCae/u7IC+NUIkWpt7mQ3smgaDjxj6Xazoi60Ycf4YwRj4 ByVa8OQDzLRIK07AV0r+sLHKCstsNSrYQ5nLKI3FIwqKVGBy9QJn6I0oMZW98V9Nazfd qEumgy+Hs2epczAL5ckTK3pWOQilSPKfsueMIfQGYiovcYIZrUGetzfM4eGFndP8OXYg x7YC1Ufc286X3u01Mn7nzROwniqAVuEM/ItpxVPaDp2w+BHa1URlzVMOJoukKjuRnwqA +T2I5xoG9aNXI6b4idpL0+haNxphlhpaP9+6xYJ3/PMdzvsOCbCVwhKFsID9/0PpP1pZ 65WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=+TzQOQ/9DMthLzAhylwsdlAkZdMpvvdZjAEPs3U1/Z4=; b=rsbxAwn2OIXExuk5+sZDSUIb/5DZV7zuPJSVXuYD+zFKC1ed/jJ5M4n8lq7D4CaaIi ago/1k0t8y+/K4TfpY3JCW46a4SNu1/oMQsONq0YbrssQ0kN02Xolh3LHHcEJ1YgGs9m PicutoMp0XNNxXN+fqbEKmF/eZMVWfFt0Kw4Rwa7yi2h06vk4VFtDTwqrfxOTDWI8MSD MxioLY+D60D51mcVTABHdlqID6uE6kEil5R00dPSIn2ND8KdtXRRaLQd8cJ/xezguKqD 1I7eygBWC0O5ZGdAYb5MDRNJFShxS7R5IOC2JS0hJmkeLFg+n1xeCRBDLH/3gh0UYZid 6ebw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=gnPPfmkt; 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 u3-20020a170906108300b006e88734e54asor3562415eju.11.2022.05.20.01.26.27 for (Google Transport Security); Fri, 20 May 2022 01:26:27 -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:a17:907:6287:b0:6e1:6ac:c769 with SMTP id nd7-20020a170907628700b006e106acc769mr7826129ejc.388.1653035186746; Fri, 20 May 2022 01:26:26 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:26 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai Subject: [PATCH 1/8] configs: imx8mm: imx8mm-evk: add usb defines necessary for ehci-hcd usb driver Date: Fri, 20 May 2022 10:26:16 +0200 Message-Id: <20220520082623.1788887-2-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=gnPPfmkt; 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: , Add necessary defines for ehci-hcd usb driver into imx8mm_evk config file. Signed-off-by: Tommaso Merciai --- include/configs/imx8mm_evk.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 42b78485cf..2489bc1ef3 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -39,6 +39,12 @@ #include #endif +/* USB Configs */ +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 + /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ From patchwork Fri May 20 08:26:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1968 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 24E8D3F039 for ; Fri, 20 May 2022 10:26:29 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id g10-20020a056402180a00b0042ab515d6c5sf5162953edy.13 for ; Fri, 20 May 2022 01:26:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035189; cv=pass; d=google.com; s=arc-20160816; b=MVWbmGtavEhm5nrdCbUFWe0XsgSi+UChM9M63hKDdVyEUAvjfadACWNWeXf3UwiSlP w8ueCDwG/e785lZ/rPqr7TdTgyeJWlZUEy3MEAGDczgS8E/1V3G9Ve+EUZwosJ84DCrp n/Yrl+zv4S7H3eNwNeXF8XdWw/mdF61rXNb6YYZSEUnbkm+OiIYlkCdpCP3UYaAkA4KT XRNWcvHqohvNiYumY6yvZDrVjx3gTruu5l/Z1B6LbeMPCMk8YRLYoZLEnLLis5KWEn8e ubLk73B9ODRjuK5E6R0wIJw8lbrzCXPmeItDuR9KEV8N/NIiQWzxNsTbDKdSAtco2XHw 8Atg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=JebRROMLthUzbcqom+SbF2WsPd2vrQjECW7uKXBLV9s=; b=d6dcSthyMqqtETebCffIEROVssHM+RrKq5WP0Ozsa+dlfP92WV/VVuXHCQSW3bgzmC JqDOI0XaafilVKjo4PLTAj3viH595Cdsd3FGMTv+/O47HZaQrn29ykocjsMYsenCAVcd R6GzkuJ0pZDeVwaIlf75oegK2nOTt4GfHuuOX16C8wdYkvYafHtU3WVXMMf1UyNE2Os/ gaOIijQhPQK+QoVXMpwTwygX2NvYgfSfaF33uqw9CAYE1mCHCR/tJ88gh8FjYWZoN2Br Nlqz4anj3kLItMTG9PKM1WwJ4yOLv0m7YpDSkKGdZvb82IaI8ofTf0a3V6yCtmPMAgLo z3jQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qH28LJi+; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JebRROMLthUzbcqom+SbF2WsPd2vrQjECW7uKXBLV9s=; b=QsTymZDPIcsQfOFCzZUXfiZYINnGzPVYoyTrvb3vgagm+5OhpfFJG3hGnwylRDhQGZ RDrzjxmMr8nb0xrIUQloN/km6dZ/T+bBRdOMqla8f3yT0C8Mr5HUR+baInFr7ymHkhFV 1mcSxRYkKoJAOVGN5rrTWHmkz4SfyBjH06IaU= 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:in-reply-to :references: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=JebRROMLthUzbcqom+SbF2WsPd2vrQjECW7uKXBLV9s=; b=wVavO2+tOb0ANKjYTndzz3jx6zoASqU2UmwPMOYdoAPMpZ8ITWHKJito0L/YwukW9l IeB7y558lq6f7uoOjy64+TcyrSduIpyM8tikV3v2hF6g9CI01a2YhGIj4DZ22WU+0b4C odjW2hLvm8oH/+9rOPiDcrAT946IPUej+I9coGKrMNFC5OUN/EjHbP8ksRgyg6Bv3CE0 XOcCarNmIooNx0zKKO1IffTsRq3iL8mkBI1rzc8vgp1KLhZmCMNE6er0U3ckRyU0EGs9 iuYNnKkFnUi+hXdRnEqFA0DabO9rNRp9x9r5uFbx17QQquFMXVBFz3omUiJptOSgkfZe deug== X-Gm-Message-State: AOAM530jNCVqEZdqRkTj+v+ngd8ctjNWBue2s0f+4vsMYT+XZ6LeztJR u+D3DFBDTAuE8mikkotpdUbBJwYS X-Google-Smtp-Source: ABdhPJwBdBDy1Gx+4+WtDeBN6oZzq7eZ1k4JTVjDgKz4sJVdhroTpdqy6prHSuqXNqjEyAVfb5z+5w== X-Received: by 2002:a17:906:730b:b0:6fe:b3a0:1af2 with SMTP id di11-20020a170906730b00b006feb3a01af2mr765735ejc.509.1653035188971; Fri, 20 May 2022 01:26:28 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:294a:b0:42b:31b9:2087 with SMTP id ed10-20020a056402294a00b0042b31b92087ls388470edb.2.gmail; Fri, 20 May 2022 01:26:28 -0700 (PDT) X-Received: by 2002:a05:6402:520c:b0:428:25e3:a1e4 with SMTP id s12-20020a056402520c00b0042825e3a1e4mr9692574edd.198.1653035187918; Fri, 20 May 2022 01:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035187; cv=none; d=google.com; s=arc-20160816; b=wQ8aFbLNvDr4dmtDxHVwihDPOL3y/n21+6GvxLb7fLVezv8NK39nDmYmfnvJC99QrF PD1ylqzRCZDFRtqfgs5qejRLeG1/5tGdqk7yd4HratdIeoOR6s0NMW55RYPG+2d520ah CsLaH4rN7f5QFnG2YM7HkLecFBzDvFR+krco7z2+RWld/7aNhZ4hh7iBiUXJy5Ga8IU2 Ix55ZvMNU1v5Zc1FL5m423pG55nIDtXlIkpsk8QublW0ufkY4Y9n05M4hUpSGiDsxAg7 I2TYnmn8u6RUVbXKVK9hv97sCcBfvf8uTDaRFrvEjWYbhVMXO3ALnJv97g8EJcUSstXN wj1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1KLyWUfplHhPRXSDS9C42O2Ys/U1rrI2U9y4ZKyJvR4=; b=hwwlaZ9zGAvO6Ds+4SeS3qcR1jctFhWqTNT/VT366rbVibCwXN5wPnezZzV4S6gy2c WlBAZQIdegAL8fBuUQNdFxjw1TJpgN5n5lrHOuDc3JIjPR79D7GvzL2EDjaL02+qCjdf gRKXBoxLubUFXkrGH2LyQnjEmwsPjWCCClpdp+b7S7BY8h5PSU4weyUwm5sohS4HWNqg uYl/mYz1ea65IpliD+kbeZhnclaOiRPOcW+RvqEc+WxliZXESz1PzAlJa4ZYqOCetMOi 7/T8VL+w/n2aJ0Dsw3kRTlbaPt1OPG5AAsRF5DVz2N2e5xg0IqGENhhfEY43Cds/rETo i3Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=qH28LJi+; 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 e22-20020a17090658d600b006fe9445c22bsor2373214ejs.113.2022.05.20.01.26.27 for (Google Transport Security); Fri, 20 May 2022 01:26:27 -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:a17:906:4fd5:b0:6f8:5784:fddb with SMTP id i21-20020a1709064fd500b006f85784fddbmr7937939ejw.161.1653035187528; Fri, 20 May 2022 01:26:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:27 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Frieder Schrempf , Fabio Estevam Subject: [PATCH 2/8] imx8mm: Fix USB reg addresses for i.MX8MM Date: Fri, 20 May 2022 10:26:17 +0200 Message-Id: <20220520082623.1788887-3-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=qH28LJi+; 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: , The i.MX8MM register addresses differ from i.MX8M in many ways. One thing to fix is the USB addresses. Signed-off-by: Frieder Schrempf Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- arch/arm/include/asm/arch-imx8m/imx-regs.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm/include/asm/arch-imx8m/imx-regs.h b/arch/arm/include/asm/arch-imx8m/imx-regs.h index b2a8ad77ae..9652466bb9 100644 --- a/arch/arm/include/asm/arch-imx8m/imx-regs.h +++ b/arch/arm/include/asm/arch-imx8m/imx-regs.h @@ -51,6 +51,28 @@ #define TZASC_BASE_ADDR 0x32F80000 +#ifdef CONFIG_IMX8MM +#define USB1_BASE_ADDR 0x32E40000 +#define USB2_BASE_ADDR 0x32E50000 +#else +#define USB1_BASE_ADDR 0x38100000 +#define USB2_BASE_ADDR 0x38200000 +#endif +#define USB_BASE_ADDR USB1_BASE_ADDR +#define USB1_PHY_BASE_ADDR 0x381F0000 +#define USB2_PHY_BASE_ADDR 0x382F0000 + +#ifdef CONFIG_IMX8MM +#define USB1_BASE_ADDR 0x32E40000 +#define USB2_BASE_ADDR 0x32E50000 +#else +#define USB1_BASE_ADDR 0x38100000 +#define USB2_BASE_ADDR 0x38200000 +#endif +#define USB_BASE_ADDR USB1_BASE_ADDR +#define USB1_PHY_BASE_ADDR 0x381F0000 +#define USB2_PHY_BASE_ADDR 0x382F0000 + #define MXS_LCDIF_BASE IS_ENABLED(CONFIG_IMX8MQ) ? \ 0x30320000 : 0x32e00000 From patchwork Fri May 20 08:26:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1969 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 141553F039 for ; Fri, 20 May 2022 10:26:30 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id y1-20020a056402170100b0042aa8f679fdsf5239653edu.1 for ; Fri, 20 May 2022 01:26:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035189; cv=pass; d=google.com; s=arc-20160816; b=osW5fx7A3KW5cKvJGPrBCIRih1KNuNHLDLYxzFBWnewWiTdoRu1ZnUqoHS/rE9jx56 uqm9M50hBvyob651JECaZmwpeH+QK5tPGXqA4UxsRS6C6Ws61a7YK8J+KLQbgaQlNEDD GYhzJlBafmtT9Jc/EORJIiA/xMbRMfUxvlNpTUe7rMaeLbZnQNW0wy1FREhhZlriakhH nYvNHIscWy+oZ+UpxFO14eHaR/4/IWA2Obry/QElnjFEA0WuurG+DdrmWUJ8DynH4HRH h2qY55CAjFhU0LWMy+wEckQExHaI6Vjh28mbuMmmfQDfLQ9cI/YTEyWkHH85rAGOKx/I ZLzw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=r6VC6nWktwlT1ZfJej/y35P4KlaMo1GTM1dmp0MIgY4=; b=P4g4Cq51bcxeUK8OKZtU1z/ZjbxGf3/f8jhvVsc4HgvgHBYyI+/ZgBk2Uad/nZ7v05 doLXf1Xpknq0Zp+NecchYU+qXwOCLhqFoMoiPDyD71E797+HHZjeIAIlX23oCVshAFJr D3MdvfBCZVCkL8LNK/5x8JRIH6ACDhBG2lCmWGFMj25xjtHWrPVEHxKnhOJTIKlTZdiz P0jCcEAjy4elIum+Bv6rZKNuKuiYqcLQLLvWY8+3fic6WAgdR/VBa5UVa3PewTBEZgbh lj84sTnljaK6x1PVixYvShzjMbLWJ99c4k7pIardh/8UMuy84EReLw9d72RH2ZXdo1Ly nInA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=q66PBwno; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=r6VC6nWktwlT1ZfJej/y35P4KlaMo1GTM1dmp0MIgY4=; b=ezjnvFmHQxgyvvDTiK6LHq6iObP20TGfbJo4nPmO6AU1XM4uYiS5smObe8BY6IcxRy OEpHlOvWiC5pcluI5z77oHv5EdGsQyb3LFYMd/8bNP2StYNFd50rxK7mA3i98W6QMK/K 86f1oGL0bKaiLaI0t5LDzsvioEG3dSg6CaHM8= 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:in-reply-to :references: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=r6VC6nWktwlT1ZfJej/y35P4KlaMo1GTM1dmp0MIgY4=; b=5ftbJBu899nKPJyV3DhhdTsZitIMiiWi+oMCvmdzQ70E3bWQiwjDTl7H9Sqx8rNYL+ ymSMFcQh4oGz8MuKfnq8JaUIFZgyn01q8s2+QTKLppWMhpBj3oI3nOPAN4ptTjyJhx4K SAWKYmipGolirieItN3QA2UdzAWXuAnKcc5Gr/EymBkJsWA3XRcY86lZyveuuTh0I+sN mwOK/1nBrT4wPXc4vyr+UD1NdKKUE3Hm9B9xSUN0ApJPTg8d5tsQk7Z/g2cM+ZvlmviG 39y9HVYMJ5L6mM0odlVoMWINFBYNkNawdq7JdNxnSC4BljPUc5MwFA2/Y12FRtk4z3Ac CYPQ== X-Gm-Message-State: AOAM531EqnYkOIfvsPmw2J3CQ3bAq5SHPs6Z1kLSZEGLxS50+JLdYOSB OvH7DhfSU/WNeo3ROYjS5nmzppRS X-Google-Smtp-Source: ABdhPJzEJ1OoFEYmPcfli0tQPD8Kft0W/g1naJCBSDhPuG1BBlffryqhP8ToiJ/y3WIXUdxT42rjXA== X-Received: by 2002:a17:907:a407:b0:6f4:3f14:7707 with SMTP id sg7-20020a170907a40700b006f43f147707mr7688511ejc.351.1653035189903; Fri, 20 May 2022 01:26:29 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:8a10:b0:6f4:91cc:ac07 with SMTP id sc16-20020a1709078a1000b006f491ccac07ls468938ejc.0.gmail; Fri, 20 May 2022 01:26:28 -0700 (PDT) X-Received: by 2002:a17:906:4fc6:b0:6f4:da16:4a09 with SMTP id i6-20020a1709064fc600b006f4da164a09mr7630730ejw.599.1653035188735; Fri, 20 May 2022 01:26:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035188; cv=none; d=google.com; s=arc-20160816; b=boXG4i4diInun9KLHZV8yIf27nFPWJ4XNxRFY7xDnqV4uWjVPBpo+KvD35Tr4C0M5P ZB1lXvLkk4XX8bLmljnHkbSvO1+aSnuCYrcZNEgTj8rwjC4gaRkWwZMeotQyRnSBUzaf KF/xqKkyeNiHt3DfscGsGr+t4Z0S49aRXJYqyc0z/2LrHTcLA1qao8D9fVMctOnVGb1m s7x4C2ANEuuU4AfQxnJftuhqgETk6fdX3TJ08IxwbihemI9hRjZmTTPt4aBPpNKBNdCu 9eWtEyyy5ZW1VBq+hbTe3p+qhG3HK0GWYqMwwN1V7ZfFngXfAGVfPGmfyHUClx2UtwHf 9W0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=AMsyJlRVUobMnY77yXtLou/Y/5t22m/ig+/2/tQ9bGQ=; b=AX7g2zg2V6oluK6Ux6M/7Ar3xDFUaskPAKxD4XALrkQ7csCbumo7hAFw1mBx/alnKU DraT/PYghfd/gx3FM8vfR2Ne28MiGC8GjM+p4mP7YgLlLd+/lcTJ8NgR9aFbvSYsYYyN gAkqmC1lS3pThEOpU3gFaEUGjA96N9Kkt6mhtMuxq25aWb5moN4mvv+HUu6zBml2dmkF N3PiZPtL8S7a/IgQeBeYEwqxSHamOPQh3/iWKJ5SCZc3p2AaFMeGCVDNr8RLFpx8L1yX nexFuXEUVgx2YpRGuM1MxhR2XldDx7XgSw/iWZnS/DQChtLtTjPE6FDlZwrGOzsUEtnw 1maA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=q66PBwno; 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 s3-20020a05640217c300b0042ab7d12ce3sor4468434edy.7.2022.05.20.01.26.28 for (Google Transport Security); Fri, 20 May 2022 01:26:28 -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:a05:6402:294e:b0:425:f016:24e7 with SMTP id ed14-20020a056402294e00b00425f01624e7mr9437603edb.111.1653035188346; Fri, 20 May 2022 01:26:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:28 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Frieder Schrempf , Fabio Estevam Subject: [PATCH 3/8] clock_imx8mm: Add enable_usboh3_clk() for i.MX8M Date: Fri, 20 May 2022 10:26:18 +0200 Message-Id: <20220520082623.1788887-4-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=q66PBwno; 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: , Currently we can't use DM_USB in SPL as the ci_udc driver is not ported to DM yet. Signed-off-by: Frieder Schrempf Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- arch/arm/include/asm/arch-imx8m/clock.h | 1 + arch/arm/mach-imx/imx8m/clock_imx8mm.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arch/arm/include/asm/arch-imx8m/clock.h b/arch/arm/include/asm/arch-imx8m/clock.h index e4433763bc..bb93c7c61c 100644 --- a/arch/arm/include/asm/arch-imx8m/clock.h +++ b/arch/arm/include/asm/arch-imx8m/clock.h @@ -278,3 +278,4 @@ int enable_i2c_clk(unsigned char enable, unsigned int i2c_num); int set_clk_enet(enum enet_freq type); int set_clk_eqos(enum enet_freq type); void hab_caam_clock_enable(unsigned char enable); +void enable_usboh3_clk(unsigned int enable); diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c index 4db55f8608..4b891c6a94 100644 --- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c +++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c @@ -298,6 +298,22 @@ int intpll_configure(enum pll_clocks pll, ulong freq) return 0; } +void enable_usboh3_clk(unsigned int enable) +{ + if (enable) { + clock_enable(CCGR_USB_MSCALE_PL301, 0); + /* 500M */ + clock_set_target_val(USB_BUS_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(1)); + /* 100M */ + clock_set_target_val(USB_CORE_REF_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(1)); + /* 100M */ + clock_set_target_val(USB_PHY_REF_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(1)); + clock_enable(CCGR_USB_MSCALE_PL301, 1); + } else { + clock_enable(CCGR_USB_MSCALE_PL301, 0); + } +} + void init_uart_clk(u32 index) { /* From patchwork Fri May 20 08:26:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1970 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CA9843F039 for ; Fri, 20 May 2022 10:26:30 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id s9-20020aa7c549000000b0042ab6ab62f0sf5182334edr.14 for ; Fri, 20 May 2022 01:26:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035190; cv=pass; d=google.com; s=arc-20160816; b=yhLtbnNKAaQ3/Oo9IDFB4WLbBktx5LtebXhdvt4zVni8kIKSRsnaUrZqMmCkQRwrzL LkqT68kTu/uvH7DoEdjtgBeGjCUIL/3ROEzoIn3Pkl3zTaU8RfCAmQ0S2IU+lT01uSBU CmBkwDU9STS0/Nnkt28Ko1TpD6Uve1FGN1DR44WMVa0K+OLZIE7tOiA5YnjKOhyqGGYR gUioF5d5VQGBIRqJ9YLpA8nGudL6AapDb1hxKDaCcDKTslT2kwm2iDPN5uoInt5YAah8 A72LLfcTkyQYe5fNyMTgG4zLLMgtngCbDE0ZdpZn3CDDeX1805P40c1zceEf5UdoOvQw PXZg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YwgjA0YJfzby9ew3dpBe5MSY30kYTaBST7IF5i3isT4=; b=R195FP6UlOpvMIDLsydLIl1rOJSrojfOQW3Dr0/qalxE+jmNXWyNO2zvLQC9QR/jEv FlZl/w5VLGyySjEkeb6FCY+Hh7yXMzJ15X8ccIt7J2iHVhWZpxx2ZfzEDVaWkZ2NQ8Ej xd1fCVKZljceaoQHWuVEL9h+pgDt0S2C0dkPzGBckGJ5vEBGB6Ijehs5YhITYDRnS6YR cntyUTzSGb9bv0V3Z3MWyb+80WjEnNulS9W0soo8UAf5kFIol+Ce3XXcK8oJAUgTpcbl QCr3vdV0GSsw9jl/J+iWVzYiOCtVfByE3lmZQ6ipYNEjoJPXd6GAWxf3u70rZPFf/WMH Kqxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YXX8zGMs; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=YwgjA0YJfzby9ew3dpBe5MSY30kYTaBST7IF5i3isT4=; b=fjxWoFrfShF2EQrzQghx56+Jvm1sAYKuLTEdrU29T9nV37RQFqcz+tnZ+zOQXrXdee bGstse/r57jxXjGGqJMzJO64plHBeqcnqXVQwJ2X6dmaxWpYZh9me+MxVpplGgu0Mndi dCZLopIMG84xx5qYLQLiEZAspPoQT1DyuDNrE= 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:in-reply-to :references: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=YwgjA0YJfzby9ew3dpBe5MSY30kYTaBST7IF5i3isT4=; b=Rchv2h/GTZnTV7BspSWu2YSBgsVZLwyS9dzi+SbRNrb6VUbKwMjsdADwOJkQcyr65S dvm2GEEf79IPWRvh/KtRnjLHAVNTLx0TaCHRR4yox206bw46jL4arNDZQiSnGURwIQxf nMAxvH9/ewdF5NbCHN05ywP/x/aYzd7rPO5FyFNZ7lKaZIW0ohtNVwUp4pHaPBUaSqqI pyNEQ5p9SoLoap3mWVlbR5ZWSQmhQLt88mOwBgg+fgYQpy1HipijKN8+FjUki4uMWFlD MOddWTJ97KX8gjq0YchgCSrtrrRSgHbqb9O5errtoVBD5eTGAPwmZix5bQOkYQ73C8Ug duUQ== X-Gm-Message-State: AOAM533LjZRlq66khv3qpe5SoPo6rMvx2vDRahUZk4fD44Z6c4WD19CV CAuXP3J3VVIvWQfJdl4kLsOhMX4J X-Google-Smtp-Source: ABdhPJx/GHPSiTXmUxoc9hC814OpMNElUq+C809IJbThLxhHJiKbBsaraXAqPE+uKIumWxPQrpAaaQ== X-Received: by 2002:aa7:dd48:0:b0:42a:f46f:6b0d with SMTP id o8-20020aa7dd48000000b0042af46f6b0dmr9116473edw.406.1653035190529; Fri, 20 May 2022 01:26:30 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5415:b0:42b:305b:5501 with SMTP id ev21-20020a056402541500b0042b305b5501ls389180edb.0.gmail; Fri, 20 May 2022 01:26:29 -0700 (PDT) X-Received: by 2002:a05:6402:3047:b0:42a:fbe9:4509 with SMTP id bs7-20020a056402304700b0042afbe94509mr8157711edb.159.1653035189578; Fri, 20 May 2022 01:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035189; cv=none; d=google.com; s=arc-20160816; b=dPyav39gi1jIO0dIPmgUbYWZR67sV6OAL8hYICBSl/zfrubyARh23fJ2CdI8yQu2/m KK4z87hHIjWb6y+slbu9eijUkYqxr7ryz0ZQc4cNmtllZ1wyP0F4owj0I9AyBSguQip3 zaA8P8EZuqmZH+dJ/wb3B4h5XX3Js+mxicbqrjxjg4YDMRP5msxzD8lQIQf6VbngHhWp vQvHMvbrqKktKbba8gPl5Z7X9Yerqx9KiIRM6gBMOb0RYWtXs1KzXaibsdF04IcEXRUu R/WbfUFTrNPbVKvSxFy/Galt0Qzm2s6+OSBp9x8y14LRhaArnE5Ec5ldWhs3QvTjQVyU yJ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hAHSsNvUqbNUYQ0Y8NZEjI+qsjsGuEZqaEMymiT7LZA=; b=QS38d5dQ0tfgs2BP6ddROb4/9GMN3mnpcQBjGPFmcKzZgaDV5disahVV1aKWMuyggb rfL1e8MnNYyhl44bdB1RyWHmiHvG6hbbAvAx0yUxbgFdb0N5EAAgEjNJJXwXscMJPg+e FQ78m4c20U7QkZWguWrsM3Muh3jVvJ8GiwQ7zx112ShBBbhWbZTTR2+3IqBU5wfT6EIF F99vhtWmXWm/jwUZBM1dVhjVmLZP4cgogUd3TbX3BtQGJn0wXz1DPeZAg+92Gk0X9LD/ KUOXiIOIdgtn6jK77aTDzPp9YeqAzVpM/JVZdYCMc22TvdF6PKVbiQebyId6Rh+k9uwd RubQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YXX8zGMs; 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 26-20020a170906025a00b006e84005c098sor3752170ejl.17.2022.05.20.01.26.29 for (Google Transport Security); Fri, 20 May 2022 01:26:29 -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:a17:907:3e0e:b0:6fe:b42f:db81 with SMTP id hp14-20020a1709073e0e00b006feb42fdb81mr640408ejc.516.1653035189129; Fri, 20 May 2022 01:26:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:28 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Tim Harvey , Fabio Estevam Subject: [PATCH 4/8] usb: ehci-mx6: move mode set/detect to probe Date: Fri, 20 May 2022 10:26:19 +0200 Message-Id: <20220520082623.1788887-5-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=YXX8zGMs; 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: , There is no need to set and/or detect mode in of_to_plat and accessing phy registers at that point before device power domain and clock are enabled will cause hangs on platforms such as IMX8M Mini. Move the mode set/detect from of_to_plat into the probe and remove the unnecessary of_to_plat. Signed-off-by: Tim Harvey Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- drivers/usb/host/ehci-mx6.c | 49 ++++++++++--------------------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 060b02accc..1b6dc19a01 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -559,27 +559,6 @@ static int ehci_usb_phy_mode(struct udevice *dev) return 0; } -static int ehci_usb_of_to_plat(struct udevice *dev) -{ - struct usb_plat *plat = dev_get_plat(dev); - enum usb_dr_mode dr_mode; - - dr_mode = usb_get_dr_mode(dev_ofnode(dev)); - - switch (dr_mode) { - case USB_DR_MODE_HOST: - plat->init_type = USB_INIT_HOST; - break; - case USB_DR_MODE_PERIPHERAL: - plat->init_type = USB_INIT_DEVICE; - break; - default: - plat->init_type = USB_INIT_UNKNOWN; - }; - - return 0; -} - static int mx6_parse_dt_addrs(struct udevice *dev) { #if !defined(CONFIG_PHY) @@ -641,7 +620,6 @@ static int ehci_usb_probe(struct udevice *dev) struct usb_plat *plat = dev_get_plat(dev); struct usb_ehci *ehci = dev_read_addr_ptr(dev); struct ehci_mx6_priv_data *priv = dev_get_priv(dev); - enum usb_init_type type = plat->init_type; struct ehci_hccr *hccr; struct ehci_hcor *hcor; int ret; @@ -659,7 +637,6 @@ static int ehci_usb_probe(struct udevice *dev) return ret; priv->ehci = ehci; - priv->init_type = type; priv->phy_type = usb_get_phy_mode(dev_ofnode(dev)); #if CONFIG_IS_ENABLED(CLK) @@ -676,19 +653,20 @@ static int ehci_usb_probe(struct udevice *dev) mdelay(1); #endif - /* - * If the device tree didn't specify host or device, - * the default is USB_INIT_UNKNOWN, so we need to check - * the register. For imx8mm and imx8mn, the clocks need to be - * running first, so we defer the check until they are. - */ - if (priv->init_type == USB_INIT_UNKNOWN) { + switch (usb_get_dr_mode(dev_ofnode(dev))) { + case USB_DR_MODE_HOST: + plat->init_type = USB_INIT_HOST; + break; + case USB_DR_MODE_PERIPHERAL: + plat->init_type = USB_INIT_DEVICE; + break; + case USB_DR_MODE_OTG: + case USB_DR_MODE_UNKNOWN: ret = ehci_usb_phy_mode(dev); if (ret) - goto err_clk; - else - priv->init_type = plat->init_type; - } + return ret; + }; + priv->init_type = plat->init_type; #if CONFIG_IS_ENABLED(DM_REGULATOR) ret = device_get_supply_regulator(dev, "vbus-supply", @@ -713,7 +691,7 @@ static int ehci_usb_probe(struct udevice *dev) #if CONFIG_IS_ENABLED(DM_REGULATOR) if (priv->vbus_supply) { ret = regulator_set_enable(priv->vbus_supply, - (type == USB_INIT_DEVICE) ? + (priv->init_type == USB_INIT_DEVICE) ? false : true); if (ret && ret != -ENOSYS) { printf("Error enabling VBUS supply (ret=%i)\n", ret); @@ -798,7 +776,6 @@ U_BOOT_DRIVER(usb_mx6) = { .name = "ehci_mx6", .id = UCLASS_USB, .of_match = mx6_usb_ids, - .of_to_plat = ehci_usb_of_to_plat, .probe = ehci_usb_probe, .remove = ehci_usb_remove, .ops = &ehci_usb_ops, From patchwork Fri May 20 08:26:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1971 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 93F6C3F039 for ; Fri, 20 May 2022 10:26:31 +0200 (CEST) Received: by mail-ej1-f71.google.com with SMTP id x2-20020a1709065ac200b006d9b316257fsf3693915ejs.12 for ; Fri, 20 May 2022 01:26:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035191; cv=pass; d=google.com; s=arc-20160816; b=keYuAFckGj8rZyjJqMWkCAxGK0xaOJCIaXmhwoCmxVNZ5ADnTsQoqRxh3aNEz01Kxn LDD3qpu/ffnPhFAkUBjK+kUS+WMLeNRAvAb+c/fMEOI7rAp1wJNyYGwuzZsB33x0B1z0 zAMpMn06EDGjNB8HzJyW5hzIF2znpkmPlpRBsSL8dQZ6m8v7X1Ej+8irR6s2VbyzN3FL k/QWNm70Kh8cmMoSqgaUUDqCFAUFfZJhn/cbXcmZDYD9ud5eXvo7xnq/tSDKjSlFhLmT RalQd8lFO/GkNpnaVJ5sPAsBSGCeqLM3D4+QqYvSQYCct9Z7hYBECSz9uKEUGpm6xiBN B81g== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XurY2olXpplXLAlYH2lzJMgDpooMqNGtKq/IyCFDtyQ=; b=ZDCBJoSG+sHsB94xeS+duInvTVZxbU5thxZs8Uu85d9Ea9nON2CiKpoDCzkKzhCZte N8pSYUKAvWLm7w0aErB06LkFviBTHOk1r9Jjk5CJkz8mXFXs97rLzO4+t42I8uH5kvez Wj/5iob7ps6OpeM7xNi7F74CZ43KfVFKYOsOwy9CPeDeCSRZZ7GF+2hl9Ra/VyEb/BzB MfvPoyUt8a3QkhMoOZTwO7YqUAD3bZkWqisL9Wokdr7NV94BMgVPmhd28wNa2UQldxc8 CQrmE9E/MO4mOfgwK5SwwGl75Xf8Vucd4CZZYLAlHksD0Xjyid3Yr7VyiraOgeTUZjmP v0rA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Bf/ET2bR"; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=XurY2olXpplXLAlYH2lzJMgDpooMqNGtKq/IyCFDtyQ=; b=SLmon01BpYee3Ul0xsJCXmgsSKsPDgLeIVS6huR+uhalg+YFqBf4pxe1OB+zwIJG1x ZTwcVmMMgzUqyP7JxrLKNnme0EBDRiOJgrOh7tI//D7l5Om7OzWIHlZBlA/vYusuKcV0 IlT4iXZY5BUiOwReV65g99o3zasA2uzvYGf3Q= 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:in-reply-to :references: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=XurY2olXpplXLAlYH2lzJMgDpooMqNGtKq/IyCFDtyQ=; b=KiajzuQScwcLNV2gViUXgrvQx0r95OuJz56QsCtB9fHOg0HBazyQqHP1pOqXteXLX/ xoJOGLHLmN9Rv8O1g3lWVrFctNnTgCl9sz2RIOmTW0Dhte3y+fJUVDfp4zRVBbcAA5PS RxCJXeuKpQ2uaSt2kOsOtTUfxoDtt1I23rducG9oBItQ7bPZT8zML0HHGeD3uIgvWCpK mTRIb5eRinuMqCwBmeLZssa55LgrzjH8AiqeY2kK1jqzTljZ59TdIFHv/Acee1NX4qE9 wsx7s63ZVXKe4Ir6bBSQaGyWMdXC8O70m35l/jAPECj6m2jxmAsHmvJIzttE+Z5QgpVK l+zg== X-Gm-Message-State: AOAM532MuToMFFSROwdJm6k3m1RmQq51Hf81kp1cKuPbX+t/VAovPOlV 23dxZZFFUxRZg2OaD2YHP6vws9q7 X-Google-Smtp-Source: ABdhPJwktLIuvytuNOyzUJhmu8Ssf/eS1Acm7dxHbebmGFyEFicRl5BwU7GMGj4kdw4besvDZcE4Lw== X-Received: by 2002:a17:907:7f91:b0:6f3:d6bc:cd5b with SMTP id qk17-20020a1709077f9100b006f3d6bccd5bmr8103830ejc.460.1653035191416; Fri, 20 May 2022 01:26:31 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2741:b0:41f:7eee:e393 with SMTP id z1-20020a056402274100b0041f7eeee393ls388149edd.3.gmail; Fri, 20 May 2022 01:26:30 -0700 (PDT) X-Received: by 2002:a05:6402:190e:b0:427:bb26:7337 with SMTP id e14-20020a056402190e00b00427bb267337mr9644847edz.294.1653035190365; Fri, 20 May 2022 01:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035190; cv=none; d=google.com; s=arc-20160816; b=H/vmOW6VIHynRPO6BNS0+m2ZzCGrClE3LYpuiC8ygpWdIeEVqg5/yivW4jS4GAdRnP UVf1rL5nxkoG8qL/4T7ABTGnJFtjSMvsJmoxFKoHzhAi1Dp3LAUuFhL5I8gBlgB0FpQF yolqJjsDuApo6pPACpz4WoaTWhE4HngeLr9FowXuA6ZXcxfY+ogegi7lYyy0MXK/qET5 9TtFFNmd+T7fCa7SX2SrMncutJgaS67+4gCVS2gGk9ncCF7n8WxGi6je7hCxhujOTGDw jTWJOr9lvupOg4OLf4+D6KwWNkXsii0U0N8yLx4sSJxhGJ6Hij5Te/RysS5XSAV/SPnS gdcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=GvpNPYdiD58z5hTIGYwCYt/TzYk6ZgMCQ6KEeP26wTA=; b=cCNKyQdPTQDQbdR2tC+o2Sqopw5KyIU5KAmQd03xM7e1kc2Hwrq9mYdir+x6W5q8Ni KFCaRAqLr+OpxhBdXVwFXLxtPnybq5e4W3S0D6FVhxt+nJ2YePvZWGts5H1y9Jw46bqf sKIYkyXtquCDNBKgzKm+BAiY+cBC0f5+oK67qCy4ghZ6l7G4LwinG0oRtboE0WJHwXlN Z5ncK4W9jmbYiWxzw+wiCVfrLeSszOleK7bQgtgQCiNDu3GOssTvJQ5jGaT5k8yjP/ln tIUuBUAED3+r/tb9s1Uzs22GpTY4k+UqSSVPm2nVLl69JCfu9C+K8H3TYrJwR9BtFD/F Opvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Bf/ET2bR"; 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 bo4-20020a0564020b2400b0042aa9bfa654sor4404590edb.43.2022.05.20.01.26.30 for (Google Transport Security); Fri, 20 May 2022 01:26:30 -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:a05:6402:4410:b0:427:ab6f:a39a with SMTP id y16-20020a056402441000b00427ab6fa39amr9769423eda.120.1653035189960; Fri, 20 May 2022 01:26:29 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:29 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Fabio Estevam Subject: [PATCH 5/8] usb: ehci-mx6: Allow building SDP for imx8mm Date: Fri, 20 May 2022 10:26:20 +0200 Message-Id: <20220520082623.1788887-6-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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="Bf/ET2bR"; 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: , After selecting USB SDP support for i.MX8MM, there are some build errors and warnings. Make the necessary adjustments for fixing the build. Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- drivers/usb/host/ehci-mx6.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 1b6dc19a01..09bd2e0236 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -142,12 +142,12 @@ static void __maybe_unused usb_power_config_mx6(void *anatop, int anatop_bits_index) { } #endif -#if defined(CONFIG_MX7) && !defined(CONFIG_PHY) +#if (defined(CONFIG_MX7) || defined(CONFIG_IMX8M)) && !defined(CONFIG_PHY) static void usb_power_config_mx7(struct usbnc_regs *usbnc) { void __iomem *phy_cfg2 = (void __iomem *)(&usbnc->phy_cfg2); - if (!is_mx7()) + if (!is_mx7() || !is_imx8mm() || is_imx8mn()) return; /* @@ -249,10 +249,10 @@ int usb_phy_mode(int port) return USB_INIT_HOST; } -#elif defined(CONFIG_MX7) +#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) int usb_phy_mode(int port) { - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR + (0x10000 * port) + USBNC_OFFSET); void __iomem *status = (void __iomem *)(&usbnc->phy_status); u32 val; @@ -347,9 +347,9 @@ int ehci_hcd_init(int index, enum usb_init_type init, (struct anatop_regs __iomem *)ANATOP_BASE_ADDR; struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET); -#elif defined(CONFIG_MX7) +#elif defined(CONFIG_MX7) || defined(CONFIG_IMX8M) u32 controller_spacing = 0x10000; - struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + + struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR + (0x10000 * index) + USBNC_OFFSET); #elif defined(CONFIG_MX7ULP) u32 controller_spacing = 0x10000; @@ -358,7 +358,7 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct usbnc_regs *usbnc = (struct usbnc_regs *)(USB_BASE_ADDR + (0x10000 * index) + USBNC_OFFSET); #endif - struct usb_ehci *ehci = (struct usb_ehci *)(USB_BASE_ADDR + + struct usb_ehci *ehci = (struct usb_ehci *)(uintptr_t)(USB_BASE_ADDR + (controller_spacing * index)); int ret; @@ -385,13 +385,15 @@ int ehci_hcd_init(int index, enum usb_init_type init, #if defined(CONFIG_MX6) || defined(CONFIG_IMXRT) usb_power_config_mx6(anatop, index); -#elif defined (CONFIG_MX7) +#elif defined (CONFIG_MX7) || defined(CONFIG_IMX8M) usb_power_config_mx7(usbnc); #elif defined (CONFIG_MX7ULP) usb_power_config_mx7ulp(usbphy); #endif +#if !defined(CONFIG_PHY) usb_oc_config(usbnc, index); +#endif #if defined(CONFIG_MX6) || defined(CONFIG_MX7ULP) || defined(CONFIG_IMXRT) if (index < ARRAY_SIZE(phy_bases)) { From patchwork Fri May 20 08:26:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1972 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3AA3F3F039 for ; Fri, 20 May 2022 10:26:32 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id o10-20020aa7c7ca000000b0042a4f08405fsf5194630eds.22 for ; Fri, 20 May 2022 01:26:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035192; cv=pass; d=google.com; s=arc-20160816; b=ZDlrfUiusVpKZLl/XCoEKUgjZE4zEq3yPSrGKmALajAmKhi8fDOX17BYl7CrM/m/Sw nf0gMRc0NQFzK0HJJtEvQAXkOEP2bRybCaNkCoeMjVkVXc+lQuxSo5v/5KdWqDlWcKwZ LN+KFSld/0xWhaMH3zVs3+kfGsxD7BkU/3ByEoWA3mKHTQDhFRzBN8sCRjSomd3f/uPe Rsol53vnUuMlVHWmCrxBzEhtBjUdHCdEmmkSzWOS4xxfy5utuvZ5ZtGJ0CCTK9j/sF27 Guu/YdZr8kYw7FwQKqHzQ14ntFshJ/joRTb1FMdYWjosv6W093nYiiMmojG44IafoEk+ wBtw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=PYnpjj9aTb15BYKJpTDuqwERNzh1xsAxPFU8X/08JsU=; b=xMYkk3t23CNc6498ytw/4UOiEYXP5sA2x1YrTc1QxJhw/mx0fcCXWGXspSj9edvtvC VefTytLPCzS88XDrnHGEJpug+Q9cJ1IMYrLv+iIt9asnDvpcp+4Ot3Lj6YZ5UxyGx0mQ TO3Gw22/mODJsOEpsMN/aBCvVR6QBi6/fDxM/rZ5QbMratL7oeU7YkWnRJrvn52C2q1u nkihdMJcLOUMAbte2m/NN4vm1/cxBgTnCrsultIDNp31Z+VC3uqerf1tTBLQQWis5J0o 6JN5QwVes0iNBjTuFXZVANIhyG2wKuZeiVHJBFC6uUp+vha+liMoHfRSDC7RXkt/oVdh LVkw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FdOZIH6y; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=PYnpjj9aTb15BYKJpTDuqwERNzh1xsAxPFU8X/08JsU=; b=K0ovRmdzaXzQz9LJLpBX06EPnur6TOjj9EOWzerSwm6jVDcEWGpYMLWKPQ3qKXTbvx 5aebB7qYZw9X1NaD9fIplX6cWzey3ABY4/4zM2BoiTJIXKfNZOOeHx/+l0spE/W2i09T 1CRTeCx/wvyQCPEJ6oI6Uy1Q5sVQwWi/EF1tA= 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:in-reply-to :references: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=PYnpjj9aTb15BYKJpTDuqwERNzh1xsAxPFU8X/08JsU=; b=WP21PnVtGMJVufM/HG3MlvwbB0JeNYxNJxHqtydaJpzTzR+pLWOrdfPrn4HmAGOOAP 8Zk66zYZysDhvY9KytiYfjA2gLjet2CkglZESFPELUPLew2xXM5n5K5P/mCXUpTOLZFp ZSkB1bk/QzdJtibrjCF6ss9RYwhBsjKrkehTUOfm7FUYBM/B06I4c+aSWu6X/BIikbbS fZKzN8fSdBg/FWr+h++H7+X5tmhp3WKZ0IlvjDxp1TV6f9USNSWXasK9RO4wf06AJ6b6 YvhpSfr9vb64YNKgj4DqCc4ozugMikPWeDclz7dFly7kw/t2y0o7dI1asm5Pwf6rOcxW hMIA== X-Gm-Message-State: AOAM531KNgG/a1d72ZUMW1Bu8Z34NsQBUq25JXd0y8zzYsiPuatA1fe1 oDohrilfji+gUQflYYVcouOdH5Vc X-Google-Smtp-Source: ABdhPJzaxjIuBcRpbVG8JYZVgkf9hw/xQKLt85uy/c0v6VWwmmO2wM5oPoGpxW+qiMmQZlJFZ84fVA== X-Received: by 2002:a17:906:c142:b0:6f5:2632:adb7 with SMTP id dp2-20020a170906c14200b006f52632adb7mr7764026ejc.637.1653035192077; Fri, 20 May 2022 01:26:32 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:8a10:b0:6f4:91cc:ac07 with SMTP id sc16-20020a1709078a1000b006f491ccac07ls468976ejc.0.gmail; Fri, 20 May 2022 01:26:31 -0700 (PDT) X-Received: by 2002:a17:906:6a0b:b0:6f4:d4d7:7c83 with SMTP id qw11-20020a1709066a0b00b006f4d4d77c83mr7720504ejc.667.1653035191142; Fri, 20 May 2022 01:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035191; cv=none; d=google.com; s=arc-20160816; b=p2GzOZXvkttP6HjdWhC0s+0a5F8takfPXXpqm+l5W5h1mYLSaUSlMGZjLHlflU985u P7TDfuGuZjH0arnqCbQozkhjFw9b2ErYwmmgCev8JDX0rxC1/NZQBe86yNRH2Tddx+ab QeLrBeG9UvN8UHbnuHMnZdDERR01y3hEGZjdZizcRg3YAAavrZIm7kgpjl3R08iapv+9 1czJKaeJdcXSkc6qtQksrNuPs8AIqL6+Re+2hGp5mHN7pHF4dkPUzs1JXnkJptimN1aS 9sEItRa+KyMBmAU4GQE0DrJ0iXQxvikUsaKeNdKHjaaFaysZwjiMLzNdszrupQ+yz7IK Rx0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hdVd9UW4XRRImpNCnWkWosTRRCBXJ0bcYcL5qzII9dY=; b=CY4eFSVVDFFk0f99T1JCDdjda/KRUVAjKR63SXM1cZ9LcqHTV/genRJO6ttrDhEDD8 mXTPTm9mzxS9u0EjiiqvPqpGSUXMYCQU5kzY9FqSFaps0TDnIXRR3zMQ9HLFriR8UAVN fpCdx4XESwYT2cpB7z/xuyOJrIKjz7bwVl53rMdwF77PHOO5IEYtt/2ocvxnLdAwL8ZR ckM1T85tFJ/8VXSp928oPKwwP/MtRuWmNfsh4xUnkAVKbjvzivdO+1goMBt1SsopbHjc +JTRzOGotTBBual5m5/K+6N60AxgQC5cNTVzuXZOq+3ehcAEeq1DsT6GvQ2p7xRhR7mM 5LVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FdOZIH6y; 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 f8-20020a1709063f4800b006f3a96bb6d9sor3503330ejj.2.2022.05.20.01.26.31 for (Google Transport Security); Fri, 20 May 2022 01:26:31 -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:a17:906:9e83:b0:6fe:9f59:a4a4 with SMTP id fx3-20020a1709069e8300b006fe9f59a4a4mr4826758ejc.163.1653035190733; Fri, 20 May 2022 01:26:30 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:30 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Fabio Estevam Subject: [PATCH 6/8] imx8mm_evk: Add an entry for USB boot Date: Fri, 20 May 2022 10:26:21 +0200 Message-Id: <20220520082623.1788887-7-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=FdOZIH6y; 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: , Add an entry for USB boot so that U-Boot could be loaded via the Serial Download Protocol. Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- board/freescale/imx8mm_evk/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c index 7eeec6c485..a92a12a511 100644 --- a/board/freescale/imx8mm_evk/spl.c +++ b/board/freescale/imx8mm_evk/spl.c @@ -33,6 +33,8 @@ DECLARE_GLOBAL_DATA_PTR; int spl_board_boot_device(enum boot_device boot_dev_spl) { switch (boot_dev_spl) { + case USB_BOOT: + return BOOT_DEVICE_BOARD; case SD2_BOOT: case MMC2_BOOT: return BOOT_DEVICE_MMC1; From patchwork Fri May 20 08:26:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1973 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2BE933F039 for ; Fri, 20 May 2022 10:26:33 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id bc17-20020a056402205100b0042aa0e072d3sf5209744edb.17 for ; Fri, 20 May 2022 01:26:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035193; cv=pass; d=google.com; s=arc-20160816; b=RcxYiaDCw55ijdtTwli2p+BsSJO/Ci/6ueUE5DWBgRQqxMvsCCALu0UZEmYFwhcrzc /4h2/RBOUBu6kbIN7x+nzcOHNr6ETGuJdw+z9lirMdL7KIA3u/GQYSr2PpqCQeVxrefh j4gy7oxSvW6hVj1kKX2xkv1CHTn2tD1h30g5AljTd4vI7nc+/Ym9gKu55SP9BqgCx6FT sW0pSUOVFaiqxzcXBhKpxqS0F0fqTtqL4eMBaHk4ENqiy1VAkSDQGrpxtSi6WY8397N2 q3Opj+xDt3p9HLdoQtuQYer/sYYg88QLQpc+6zJdZb3TN3o2XALztnwW5DtCwaZDJkfB 04yQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=my0dhoGXTUKBrCrGOy8DvhVtVzSaJAyI21o2Dj3Ynto=; b=lAPqnScutyJ0qp2ulujQt2pYL/MT1lz88qzkaPxR8SH7464hcv0dCMSngnK1Nbwogt 37pCNpxCRZ+qMRPPLQWkmf/YRpsNfZCOVn/Aw4zZJ8MMogtXbZx8okK3uhXKZL6Q3i9k YIjcoV2Sw9ijtg2RULUZxSjCMTAxb5dBImDD5sf8SFJDmomRI8Dqs+0YxUZrVvxKLj91 VNoWpDZNLT7WCrzjppoyqXY3xCUTrNSXoi7eAOj9uVg3KLKRvYfrtAT6yzVSq0vs37B0 cA9bxBOs2CzpP2JTaRQNRNzlmCI59HmXuu74f2CZedBp9NwbDDpFJCTbZyeGVY7iDMuM eBdQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZSvI+hD+; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=my0dhoGXTUKBrCrGOy8DvhVtVzSaJAyI21o2Dj3Ynto=; b=YAgMBslU/0Pv2t+WDI9CmeGXd0mS1udggw7ENlntSme1qkIYp/UPPTvjgVjL0OGvXd /tBwm+wKRai1jCtBkitN1GpTe1knePCu1dCWICqOx8dkYdWrANyPyGZJK5l7i7KEO3de 3FROJjRsDYxnDt8RW2VWrSg1LNFvCL2HV1G/Y= 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:in-reply-to :references: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=my0dhoGXTUKBrCrGOy8DvhVtVzSaJAyI21o2Dj3Ynto=; b=e4bItjJohEzt7HD087zRHmG8Dp9cmUvjKt871aESNa1NyPc0mCNi/Wf30BMm26YEQV qkYzO4pPOEjugxL1C+HNI88JhBqxXBnDy1IfJGi4HnMOguCNBzoUBcvxLC8VOY74Rwxl K17O43Qh5hYKNunY3xm7Z9Z0QDXCYkj0YuaeqNY5C4ddAq5gHIodzDbCNBKBFi/luA7i E3S8AD3NfoZ3dj3MVX2RFcBXwLU0XFZqSC96QyGqr+GdEvlOQI54q0vrBGVXzuYjZjbI gs+T80fod8w2o79RL1RG/h3h7LB1OQnls7LtktRcBXq196+QVG7hRrw1ks4DNoK8+3/I wVUQ== X-Gm-Message-State: AOAM531bRCoyLY0TmhmBcqSaDBVe/oNK4LK6h9iNRTAtXhNFofcOl44b xWT8w7p/ufPdDNGgAuskDIf+Tj7T X-Google-Smtp-Source: ABdhPJzWMDhOpwMbQOXbHhL4yew9xuKpyFbkeTiQVeCkL3cniaEZjQ77ABkyleE/Pzw/Hl+gRtI36A== X-Received: by 2002:a17:906:2a19:b0:6fa:7525:45d8 with SMTP id j25-20020a1709062a1900b006fa752545d8mr7503345eje.768.1653035193003; Fri, 20 May 2022 01:26:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:907:3f8a:b0:6f4:31e5:5c0 with SMTP id hr10-20020a1709073f8a00b006f431e505c0ls2775598ejc.4.gmail; Fri, 20 May 2022 01:26:32 -0700 (PDT) X-Received: by 2002:a17:906:49d4:b0:6d6:e5ec:9a23 with SMTP id w20-20020a17090649d400b006d6e5ec9a23mr7882637ejv.79.1653035191837; Fri, 20 May 2022 01:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035191; cv=none; d=google.com; s=arc-20160816; b=X36y9Yr+i3Edmvr+6GwwKYewsis3Cn5uA1HY4IJt1EMPvsVrsTw/lmaITPIfmKAUMN KSviZ9eTbk/jS/oJHfEGSZb4Ash3g+F08eIh7REVF8i+9K5ZgmUbUC6xpmToU2i2HlQR I69xsu71vL51453Ha++p1Tnsljo2ZIO1YD/p2XjBQMgwpN1alTRzq/K49/PAWqLmyHhf sHgCn2FQZyUKh9TsyyMfYHCARYq7xcezp24/jcB/AW7hthFt/l57lV4sHxAIhVM48BSw YBZy/qu0R79kz2eu77+ejIsKvfITYwJXpSX3HKK+T0C56cv3+Vz6I56g4AqKQDwZb7N7 HsCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=DWFu2hVi+Im/U/9fV2ScyJ6C1u+OP24Sc1wsMKGi6Yk=; b=WufoNnm0tPfgmlVjRGzDu1kFAfeGIpWc8nidRvIq7kcytDHjgTSnXRtOePidWW+Sm7 2/OEnlzSWUOUHx4wdVuhd4DrXqE5l3GavblRvp/jE2okORlU7jP3bVKfFvtn11CcL4RC DadMZf5dvsbOtU7i3z0BO3pYK6kJxJteeLta02rE8kL8ljbxMn99+Qd2TJbXaH6JVgRG cbYQph80bQdOLodvGC63pKeHj4uTjzpCq2cX5aUWX0CxrlHBqBaKJnpn/0fW+5UhNTwy myaE1BiNx+OqHz+eFmFyREIRQsqxvYCS/e/4tEXlA24VGBECLWwkyItteyjg6ka+P4Is p20Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZSvI+hD+; 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 v20-20020aa7cd54000000b0042ac483fd6fsor4516358edw.68.2022.05.20.01.26.31 for (Google Transport Security); Fri, 20 May 2022 01:26:31 -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:a05:6402:849:b0:427:edfe:1b7e with SMTP id b9-20020a056402084900b00427edfe1b7emr9557260edz.355.1653035191478; Fri, 20 May 2022 01:26:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:31 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Fabio Estevam Subject: [PATCH 7/8] imx8mm_evk: Add Serial Download Protocol support Date: Fri, 20 May 2022 10:26:22 +0200 Message-Id: <20220520082623.1788887-8-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=ZSvI+hD+; 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: , Add Serial Download Protocol support as it is a useful method to load flash.bin and u-boot.itb via 'uuu' and use "ums 0 mmc 2" to flash the eMMC. Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- configs/imx8mm_evk_defconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configs/imx8mm_evk_defconfig b/configs/imx8mm_evk_defconfig index ec3206bd64..f0e2831205 100644 --- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -87,3 +87,24 @@ CONFIG_SYSRESET_PSCI=y CONFIG_SYSRESET_WATCHDOG=y CONFIG_DM_THERMAL=y CONFIG_IMX_WATCHDOG=y +CONFIG_SPL_USB_HOST=y +CONFIG_SPL_USB_HOST_SUPPORT=y +CONFIG_SPL_USB_GADGET=y +CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_CMD_USB=y +CONFIG_CMD_USB_SDP=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_POWER_DOMAIN=y +CONFIG_IMX8M_POWER_DOMAIN=y +CONFIG_USB=y +CONFIG_DM_USB=y +# CONFIG_SPL_DM_USB is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_MXC_USB_OTG_HACTIVE=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_USB_GADGET_DOWNLOAD=y +CONFIG_SDP_LOADADDR=0x40400000 \ No newline at end of file From patchwork Fri May 20 08:26:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tommaso Merciai X-Patchwork-Id: 1974 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CBCD93F039 for ; Fri, 20 May 2022 10:26:33 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id p13-20020aa7c4cd000000b0042ab847aba8sf5230386edr.0 for ; Fri, 20 May 2022 01:26:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653035193; cv=pass; d=google.com; s=arc-20160816; b=YXrGx4hqM9u6ZM1WvczCoLODhKMd5ZW2sZZfUGIyVcO9wykUPQPjYbdGl18WThFhmX 1ZWiom44yDpta98P1PYCUMd3FTBURI5XKVXNoJtdCXpAnmcTbCRUHzLRTluEqurKFkL6 LYxw5s0Td5vkvLTwDZ7+N3NTe9LOtwr33+ap2F3kBS92JlDxDRe6RUU8kDmHw4Q2/8r9 JYc0ROjbQR8j19hX+2JUm9dsmlrJ3ENs4FSNCxFTBQwYRRhFzqFQSEyAdupcyfwU43Qd pMaZb+DFd+xJcXr8ULXcaYqIJbjdJhg5WLB7etnX4es1NP1NzEKTVZq/zx8oPrPL4BaM UQwg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wULe+23DL5Q7W7fc/XIWGLZaD/6qjH/rRYEI7rOlvAA=; b=CWnBrAAMJUByrPTD2b1ktFbMYHmH2sqvc6tIDV6lgLYpllNh54VxlfSnFaX01e2y32 7lQXrAs/x2J2q6z4FMcPBykkR80ouHsiS+OqBGF7mz0Epv3zwZCISLWt7hTsI5kEslMN /FdzXxqZ3pzWTZ1bqxFCyKE4iUjQwx72ZmeiAWJV4HwjR6VxqMYYjVFCKsl3B/id9R/T l+iZQP4JKcyy0CtSbeOu8rW2lTan4SSWxH8JTkB/aUwVSObeuBPbUJXR/tfX7BqnQq3W hZZ/dXjArFZNn7MTd5SOuVKO0OQxIwHVMTtE49pyXBbpjDyfv1FPLvu5ULJo230RUUoO GC0A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DcGKR9Z1; 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:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wULe+23DL5Q7W7fc/XIWGLZaD/6qjH/rRYEI7rOlvAA=; b=SQZlJGNspjPf5vBk/uYQXUE/pzAGpghHO/pr4V7Q8LBTCbcy1aQEU6a0cFs9vHk8m8 N/VPu5izOzlYhM+o3aibAF17c5tOBbQgkqsS6Ojb38QCl81A9pnpY25E64AuNAFBojmB zLLSWoxZ3LIq0ox+suj72/DriXN7GM5oYMgKE= 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:in-reply-to :references: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=wULe+23DL5Q7W7fc/XIWGLZaD/6qjH/rRYEI7rOlvAA=; b=Ee0UpCmFvNqC8Zfu11RkHCUMej0eNRN2R/liVukf28N0fMh+M+RmmxLCPLq4VM9jj0 uaIOHkml6OqlFw4R0pCh9b0bPeeFeizqWS6RtXwZvmeuR8E4vhidHUPY53lVDAKF8JPL fUaL21b0XQobOhSFzEBVYKVUznfuSsuqCN6M6SCg6hZ3IWfe7bmc5Ult0Se5yzQHdadV xCP+Ozl77RUr/q/9b8Oza7Ni2UABqv5hHmlv4g3JIK433P2dRAnxhCRRMa9op4aEaGOR i97h/MB0RY22otuaJ4Qh2se1szVWa4FqaV3fj4+T4xZ3p05mWTDcjrWLoU0eVltkb/yo 9t1w== X-Gm-Message-State: AOAM531qSFH1ecaU0hfTBsP66Cauqg4I2Tdlbh7ju7gsh61wTvvLu+XR GMf5zMjJ0DPbeTpFdCcASIORfzEw X-Google-Smtp-Source: ABdhPJzgMmE1etvUyAGfCeMlNedUlYil5IkIqzlsAsD8mV4LgrPhHTnGpJL2AMj75KP1QQZHDhUqWg== X-Received: by 2002:a17:907:7f25:b0:6f4:c553:c73c with SMTP id qf37-20020a1709077f2500b006f4c553c73cmr7580412ejc.119.1653035193676; Fri, 20 May 2022 01:26:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5205:b0:42a:c2bb:3d7f with SMTP id s5-20020a056402520500b0042ac2bb3d7fls388765edd.1.gmail; Fri, 20 May 2022 01:26:32 -0700 (PDT) X-Received: by 2002:aa7:d817:0:b0:42a:fc10:7f89 with SMTP id v23-20020aa7d817000000b0042afc107f89mr7670335edq.417.1653035192571; Fri, 20 May 2022 01:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653035192; cv=none; d=google.com; s=arc-20160816; b=a/3Nigs4IdkUCSvaAW8GQHsoexOdQehu2YGMeN7aQoGu52emT4LhyrrtdYv+DQL/qQ QaGu3h29xdHVPjd3H5YE6AtmGOu+fWmKvMRYx+6ZTxnMO4sFb5YAyS3aBSK+2mluJ+Ga eBup5oK9sP2xsX5DJmZSfZS22WPc+nqdq2HJyBk6s9+jU9NfeJ+VtKflD+2CQ9DTu6mv 8JIuk/0II9bFJvu8S8xZ9lOz11jUvQha148Op+yYoBti78N16SVAMKUohxmnSyP8nToT fVSpZall2CHU4evEASUM5bcvVzHA4lkC0BdDfRirtMgo2o124BiMklaxHwNnWsX8EwCk 0E6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=YQ/d+Vybd7TxwqLVsTkrjDrdrI2kC6DCgDAhlq+BWYQ=; b=R1yu24WowvxRHKShBhcDwTQjhar+b8Oai+dR6T/d0x2kspnQiPyzYmiIFr1lt9uEz6 /pYT9QHLsCl7Cu+4MaOhHHmRa8VIFsM4CaGJ1DF+OIfqNGSTk/LohMgjzf2W5dElnsbH poxqHrbxy3yhAKKdUoKdAa+LklSHx10V7mWm9WW/WPCmQUfj/G2dn/cfBH54/LgVQhmH EHoaDOZX/o4plJ6S0cPrdElD4yto0nS8P9ZMYyWN+Ygqh/TTXjU5cvYkaQ7tJW4NN0H9 lC9jApSl6F5jJXAUNTan3zbSmh8g7XtTKSZXfiSs9476fwGjCsXw+twdB4RK6C7+fsBp PqlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DcGKR9Z1; 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 y7-20020a50eb87000000b00425e6e44fe7sor4407593edr.2.2022.05.20.01.26.32 for (Google Transport Security); Fri, 20 May 2022 01:26:32 -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:aa7:d3c5:0:b0:42a:ab58:1e50 with SMTP id o5-20020aa7d3c5000000b0042aab581e50mr9384583edr.320.1653035192176; Fri, 20 May 2022 01:26:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 01:26:31 -0700 (PDT) From: Tommaso Merciai To: Cc: linux-amarula@amarulasolutions.com, Tommaso Merciai , Fabio Estevam Subject: [PATCH 8/8] doc: imx8mm_evk: Add instructions for eMMC boot Date: Fri, 20 May 2022 10:26:23 +0200 Message-Id: <20220520082623.1788887-9-tommaso.merciai@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> References: <20220520082623.1788887-1-tommaso.merciai@amarulasolutions.com> 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=DcGKR9Z1; 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: , Improve the readme by adding instructions on how to load U-Boot via USB and flash the eMMC. Signed-off-by: Fabio Estevam Signed-off-by: Tommaso Merciai --- doc/board/nxp/imx8mm_evk.rst | 42 ++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/doc/board/nxp/imx8mm_evk.rst b/doc/board/nxp/imx8mm_evk.rst index b9e67b954f..7c233be8a4 100644 --- a/doc/board/nxp/imx8mm_evk.rst +++ b/doc/board/nxp/imx8mm_evk.rst @@ -44,12 +44,46 @@ Build U-Boot $ make imx8mm_evk_defconfig $ make -Burn the flash.bin to MicroSD card offset 33KB: +Booting from the SD card +------------------------ + +Burn the flash.bin to MicroSD card offset 33KB and u-boot.itb to +offset 384kB. .. code-block:: bash $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=notrunc -Boot ----- -Set Boot switch to SD boot +Booting from the eMMC +--------------------- + +Power off the board and put the boot mode switches +to Download Mode. + +Connect a USB cable between the TypeC port 1 and the host PC. + +Load flash.bin via the 'uuu' tool: + +.. code-block:: bash + + $ sudo uuu flash.bin + +Load u-boot.itb via the 'uuu' tool: + +.. code-block:: bash + + $ sudo uuu SDPV: write -f u-boot.itb -addr 0x42000000 + $ sudo uuu SDPV: jump -addr 0x42000000 + +Then U-Boot will be launched. + +Run the ums tool to flash the eMMC: + +.. code-block:: bash + + => ums 0 mmc 2 + => sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33; sync + => sudo dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384; sync + +Power off the board. Put the boot switches to eMMC boot mode +and power it on.