From patchwork Wed Jul 6 12:15:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 1652973 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=pschenker.ch header.i=@pschenker.ch header.a=rsa-sha256 header.s=20220412 header.b=F+jh+TOJ; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LdJQw01Szz9ryY for ; Wed, 6 Jul 2022 22:15:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE50B83E9F; Wed, 6 Jul 2022 14:15:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=pschenker.ch 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=pschenker.ch header.i=@pschenker.ch header.b="F+jh+TOJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8610D8453E; Wed, 6 Jul 2022 14:15:27 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-bc0b.mail.infomaniak.ch (smtp-bc0b.mail.infomaniak.ch [45.157.188.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6EC41805FE for ; Wed, 6 Jul 2022 14:15:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=pschenker.ch Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dev@pschenker.ch Received: from smtp-2-0000.mail.infomaniak.ch (unknown [10.5.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4LdJQh0s9ZzMppQq; Wed, 6 Jul 2022 14:15:24 +0200 (CEST) Received: from localhost.localdomain (unknown [31.10.206.125]) by smtp-2-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4LdJQg5nGJzlqwrk; Wed, 6 Jul 2022 14:15:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pschenker.ch; s=20220412; t=1657109724; bh=FKdUor0vBYhldYeo3txMJm7qmzO5CM9v+ZNJo7pJPKE=; h=From:To:Cc:Subject:Date:From; b=F+jh+TOJl0yh/z2QvLjFxvmrswC/T3z9sbpmBRniOWhQgLk+dpwJeBvBuOMAP67xA RvdnkIZwhy/loKnvAsg1LveheoRLmfT7zhpFM5aBMy2HgJyMcs90xVrAVcg+wFfjhL m7HXReQHDSrbiiBRvVufSt7jX6YA2u3jCLzAqUbU= From: Philippe Schenker To: u-boot@lists.denx.de Cc: Philippe Schenker , Francesco Dolcini , Denys Drozdov , Marcel Ziswiler , Simon Glass Subject: [PATCH v2] toradex: tdx-cfg-block: add 0068 i.mx 8m mini sku Date: Wed, 6 Jul 2022 14:15:05 +0200 Message-Id: <20220706121505.448579-1-dev@pschenker.ch> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Philippe Schenker Add new i.MX 8M Mini SKU to ConfigBlock handling. 0068: Verdin iMX8M Mini Quad 2GB WB IT No CAN This SKU is identical to 0055 but without CAN. Mention this in the name so those modules can be distinguished. Signed-off-by: Philippe Schenker Reviewed-by: Francesco Dolcini --- Changes in v2: - Added the define to is_wifi detection so the correct devicetree is selected on boot. - Shortened the name so the resulting string printed is no longer than 80 characters. board/toradex/common/tdx-cfg-block.c | 13 ++++++++++++- board/toradex/common/tdx-cfg-block.h | 1 + board/toradex/verdin-imx8mm/verdin-imx8mm.c | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index 6c8cf4592d..112e687ca6 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -145,6 +145,7 @@ const char * const toradex_modules[] = { [65] = "Verdin iMX8M Plus QuadLite 1GB IT", [66] = "Verdin iMX8M Plus Quad 8GB Wi-Fi / BT", [67] = "Apalis iMX8 QuadMax 8GB Wi-Fi / BT IT", + [68] = "Verdin iMX8M Mini Quad 2GB WB IT No CAN", }; const char * const toradex_carrier_boards[] = { @@ -361,6 +362,7 @@ static int get_cfgblock_interactive(void) char it = 'n'; char wb = 'n'; char mem8g = 'n'; + char can = 'y'; int len = 0; /* Unknown module by default */ @@ -387,6 +389,13 @@ static int get_cfgblock_interactive(void) mem8g = console_buffer[0]; } #endif +#if defined(CONFIG_TARGET_VERDIN_IMX8MM) + if (is_cpu_type(MXC_CPU_IMX8MM) && (wb == 'y' || wb == 'Y')) { + sprintf(message, "Does your module have CAN? [y/N] "); + len = cli_readline(message); + can = console_buffer[0]; + } +#endif #endif soc = env_get("soc"); @@ -474,7 +483,9 @@ static int get_cfgblock_interactive(void) else tdx_hw_tag.prodid = VERDIN_IMX8MMDL; } else if (is_cpu_type(MXC_CPU_IMX8MM)) { - if (wb == 'y' || wb == 'Y') + if (can == 'n' || can == 'N') + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN; + else if (wb == 'y' || wb == 'Y') tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; else tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; diff --git a/board/toradex/common/tdx-cfg-block.h b/board/toradex/common/tdx-cfg-block.h index 43e662e41d..9697447158 100644 --- a/board/toradex/common/tdx-cfg-block.h +++ b/board/toradex/common/tdx-cfg-block.h @@ -88,6 +88,7 @@ enum { VERDIN_IMX8MPQL_IT, /* 65 */ VERDIN_IMX8MPQ_8GB_WIFI_BT, APALIS_IMX8QM_8GB_WIFI_BT_IT, + VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN, }; enum { diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c index c51c99b515..7597cd81f9 100644 --- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c +++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c @@ -83,7 +83,8 @@ static void select_dt_from_module_version(void) * device tree. */ is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) || - (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT); + (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT) || + (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN); } switch (get_pcb_revision()) {