From patchwork Wed Oct 28 09:58:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389205 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Quhx4nPK; dkim-atps=neutral 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkY00rkCz9sVW for ; Wed, 28 Oct 2020 20:58:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2C7A3823E3; Wed, 28 Oct 2020 10:58:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Quhx4nPK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C81DA801D8; Wed, 28 Oct 2020 10:58:22 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 389FE801D8 for ; Wed, 28 Oct 2020 10:58:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lf1-x142.google.com with SMTP id j30so6430653lfp.4 for ; Wed, 28 Oct 2020 02:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=arthCpwVjoHGqHPWnfh454FxzW4lRwW8vxedDVMQg5Q=; b=Quhx4nPK6/x+2oG70kYC+uVq6aOJw2iWeBYBW0TPN4SipRQo/P2wl+rqnUoUK4Dg/O wYzsKLSuJcH0Iza/angz3DPJZwC6TL4fOfMUZvw+UGNM8W6nz/sbwy37mmOWBt1QTry8 2HCnJECmSbtOM5OALbUGr5pIYAWzPhjsfZeaiALn4/FEPMKtRBGMfutNSZfutC53g5rl KrF/NklGzdiGU8pjNC8uwmtpjHfTt5QDK9x8j9XKcd2fqVNEzfHAMt6DJuL9xOjiDnRR JmKjugQIELSAadD3+o6U7VvfE+oQ2ZWDxqPsmNCF/wHKBSt312E34bq2zd8FZwjA6ydY XV5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=arthCpwVjoHGqHPWnfh454FxzW4lRwW8vxedDVMQg5Q=; b=rNWvtGM3QcGv+23xczN9nkAjiWKmFgBlxxwBGdW2xIc53EiwqOfVTtPi5M+eR8kle1 TIX+79Y44TSI7T46OZHsTSttqCibJgPw6NPcXmtjHzU67tX+dkwehDlhlcBrKqD1vp8R 5dxXWJAwgQ2ZBr92BO+bP4zvvR5tjSjAY3GfYK1HgJ1C535zHUdeu2MEnPUOgpAwGU9W naGafBKOmMuoSHlv+WKObS1K5zrJB4+nGZu8cFPEyM20QKS0kYXmnw6qvytj2wagksFs Xnbjm+9qO87N0L143nBy8e59tHrb5IQFPJR0JHC7ne4MMChZJMDLqDaROsozmcuZ7/lf Kotw== X-Gm-Message-State: AOAM5312kQmzGhqGvyBOqod3kznjEN87g35jJf/vFGXr0+HHg2a4BJCu j0VwBYYfqb3itjmH+zRj1RNcuOyNH6aMZg== X-Google-Smtp-Source: ABdhPJwVSf6w64aefefHqw2DJh17/VZEW6b+1chDKI0ZeDnsTXaYlU9HNyuCRE12Q7bh9Nn6r9mGMg== X-Received: by 2002:a19:c8ca:: with SMTP id y193mr2299705lff.469.1603879099098; Wed, 28 Oct 2020 02:58:19 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id m4sm530935ljg.137.2020.10.28.02.58.17 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:18 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk , Simon Glass Subject: [PATCH v1 1/9] toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus Date: Wed, 28 Oct 2020 11:58:08 +0200 Message-Id: <20201028095816.23906-1-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 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 From: Marcel Ziswiler Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling: 0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT 0059: Verdin iMX8M Mini Quad 2GB IT 0060: Verdin iMX8M Mini DualLite 1GB WB IT 0061: Verdin iMX8M Plus Quad 2GB Rename existing SKU (use correct one): Verdin iMX8M Nano SoloLite 1GB -> Verdin iMX8M Nano Quad 1GB Wi-Fi Signed-off-by: Igor Opaniuk Signed-off-by: Marcel Ziswiler --- board/toradex/common/tdx-cfg-block.c | 42 ++++++++++++++++++++-------- board/toradex/common/tdx-cfg-block.h | 8 ++++-- 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index bf27b2fa66..475abf78a7 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -16,7 +16,8 @@ defined(CONFIG_TARGET_COLIBRI_IMX6) || \ defined(CONFIG_TARGET_COLIBRI_IMX8X) || \ defined(CONFIG_TARGET_VERDIN_IMX8MM) || \ - defined(CONFIG_TARGET_VERDIN_IMX8MN) + defined(CONFIG_TARGET_VERDIN_IMX8MN) || \ + defined(CONFIG_TARGET_VERDIN_IMX8MP) #include #else #define is_cpu_type(cpu) (0) @@ -137,8 +138,12 @@ const char * const toradex_modules[] = { [53] = "Apalis iMX8 QuadXPlus 2GB ECC IT", [54] = "Apalis iMX8 DualXPlus 1GB", [55] = "Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT", - [56] = "Verdin iMX8M Nano SoloLite 1GB", /* not currently on sale */ + [56] = "Verdin iMX8M Nano Quad 1GB Wi-Fi / BT", /* not currently on sale */ [57] = "Verdin iMX8M Mini DualLite 1GB", + [58] = "Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT", + [59] = "Verdin iMX8M Mini Quad 2GB IT", + [60] = "Verdin iMX8M Mini DualLite 1GB WB IT", + [61] = "Verdin iMX8M Plus Quad 2GB", }; const char * const toradex_carrier_boards[] = { @@ -361,21 +366,15 @@ static int get_cfgblock_interactive(void) if (cpu_is_pxa27x()) sprintf(message, "Is the module the 312 MHz version? [y/N] "); -#if !defined(CONFIG_TARGET_VERDIN_IMX8MM) || !defined(CONFIG_TARGET_VERDIN_IMX8MN) - else - sprintf(message, "Is the module an IT version? [y/N] "); - - len = cli_readline(message); - it = console_buffer[0]; -#else else it = 'y'; -#endif #if defined(CONFIG_TARGET_APALIS_IMX8) || \ defined(CONFIG_TARGET_APALIS_IMX8X) || \ defined(CONFIG_TARGET_COLIBRI_IMX6ULL) || \ - defined(CONFIG_TARGET_COLIBRI_IMX8X) + defined(CONFIG_TARGET_COLIBRI_IMX8X) || \ + defined(CONFIG_TARGET_VERDIN_IMX8MM) || \ + defined(CONFIG_TARGET_VERDIN_IMX8MP) sprintf(message, "Does the module have Wi-Fi / Bluetooth? [y/N] "); len = cli_readline(message); wb = console_buffer[0]; @@ -429,7 +428,7 @@ static int get_cfgblock_interactive(void) else if (is_cpu_type(MXC_CPU_IMX8MMDL)) tdx_hw_tag.prodid = VERDIN_IMX8MMDL; else if (is_cpu_type(MXC_CPU_IMX8MN)) - tdx_hw_tag.prodid = VERDIN_IMX8MNSL; + tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; else if (is_cpu_type(MXC_CPU_IMX8QM)) { if (it == 'y' || it == 'Y') { if (wb == 'y' || wb == 'Y') @@ -465,6 +464,25 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid = COLIBRI_IMX8DX; } #endif + } else if (is_cpu_type(MXC_CPU_IMX8MM)) { + if (is_cpu_type(MXC_CPU_IMX8MMDL)) { + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MMDL; + } else { + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; + } + } else if (is_cpu_type(MXC_CPU_IMX8MN)) { + tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; + } else if (is_cpu_type(MXC_CPU_IMX8MP)) { + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MPQ_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MPQ; } else if (!strcmp("tegra20", soc)) { if (it == 'y' || it == 'Y') if (gd->ram_size == 0x10000000) diff --git a/board/toradex/common/tdx-cfg-block.h b/board/toradex/common/tdx-cfg-block.h index 8f91d9aec6..9debd5f046 100644 --- a/board/toradex/common/tdx-cfg-block.h +++ b/board/toradex/common/tdx-cfg-block.h @@ -75,9 +75,13 @@ enum { COLIBRI_IMX8DX, APALIS_IMX8QXP, APALIS_IMX8DXP, - VERDIN_IMX8MMQ_WIFI_BT_IT, - VERDIN_IMX8MNSL, + VERDIN_IMX8MMQ_WIFI_BT_IT, /* 55 */ + VERDIN_IMX8MNQ_WIFI_BT, VERDIN_IMX8MMDL, + VERDIN_IMX8MPQ_WIFI_BT_IT, + VERDIN_IMX8MMQ_IT, + VERDIN_IMX8MMDL_WIFI_BT_IT, /* 60 */ + VERDIN_IMX8MPQ, }; enum { From patchwork Wed Oct 28 09:58:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389206 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=rb5ETn0m; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkY81L5Jz9sVl for ; Wed, 28 Oct 2020 20:58:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73F7682483; Wed, 28 Oct 2020 10:58:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="rb5ETn0m"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EFF8882423; Wed, 28 Oct 2020 10:58:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9CAD8823DD for ; Wed, 28 Oct 2020 10:58:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x244.google.com with SMTP id 2so5302083ljj.13 for ; Wed, 28 Oct 2020 02:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h6iBMsui6s0364DD6K1Cmh6tnzTaplljLEJX5Gyij24=; b=rb5ETn0m4W2sBA8w5Su4gU2QFbIjfkOaqWoc3nrpkWAMulkyetSSBT6M1k1F4SMVFA n3RTdQ6SVtAhG1t5C0VW1CdP//UDeiPu06632LlrzlD3OGCQ5eyd+GWBuUB6cOFAnTYD n588fyvkx1TJdMVnstkTicvDW5meRRINBZqHR8HdKuRie2IfFH0PVHRmQ+lzJ6NP5x2I 144He4b86itOn4elOOp8/udJM0obsHpkwzjhAGLCt/t5Jnt+r0MjAZ7UiiGzC+5tLgXz rur+/PtsQVu3CdcoDVlzasf3gBznBavlTfR8gTThaAKBARAjBwAdWk+EBsT8AdI5SMPE 3IdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h6iBMsui6s0364DD6K1Cmh6tnzTaplljLEJX5Gyij24=; b=aAx+KfsKf8W+9nIqhcg1kx23nL1oRvmXyyYTyRrE6GaL+HWekTr0xMRKxJYWNN6iPF GQNhMoagaqLJEOwTnTC92DjMaFuTE4o/eVKRjmMOzuMgRIY7e8M2hWKo3q1wF1GrxU1W fiA10jCn6sxikYAsDSQnvMereEBuX+NFRfhENXLXJz/qzIOPuRGJ6MmkNjTSkLjxRH/o yETjexmIB0sKlcweABeWelYsb4eNHaew6O6GYoZ9GZLzcelYZuMv00R+qf9gbrqQv7IM mAhEWBQ5fFN8VBLer8PZ8I3muDb2ioerAs3tMaof4usFmAT0rULmfJp7iTiDQKxApy4w Xb9w== X-Gm-Message-State: AOAM5335SFt2yFlCLjayLPm6SzkqBkrFuL5fpCAOuNn6nELsO43Uv3Hd glCn8LeaHsbh9u2gGB6RrBywFWJTV7N8eQ== X-Google-Smtp-Source: ABdhPJwS/AGjOHB1XDGBDnreH1LXELk5zXZNE/pFnMeRUAjehLJc/9AAcZRicVMPC2e2fSEK7v+OLw== X-Received: by 2002:a2e:b61a:: with SMTP id r26mr2988160ljn.166.1603879100699; Wed, 28 Oct 2020 02:58:20 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id v15sm475438lfi.114.2020.10.28.02.58.19 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:20 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Jaehoon Chung , Robin Gong , Simon Glass , Ye Li Subject: [PATCH v1 2/9] pca9450a: fix i2c address Date: Wed, 28 Oct 2020 11:58:09 +0200 Message-Id: <20201028095816.23906-2-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Max Krummenacher The I2C address is 0x25, not 0x35. This according to the datasheet and tests with a PCA9450A. Signed-off-by: Max Krummenacher Reviewed-by: Jaehoon Chung --- drivers/power/pmic/pca9450.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/pmic/pca9450.c b/drivers/power/pmic/pca9450.c index 0c9d9a366e..c7f8b80954 100644 --- a/drivers/power/pmic/pca9450.c +++ b/drivers/power/pmic/pca9450.c @@ -80,7 +80,7 @@ static struct dm_pmic_ops pca9450_ops = { }; static const struct udevice_id pca9450_ids[] = { - { .compatible = "nxp,pca9450a", .data = 0x35, }, + { .compatible = "nxp,pca9450a", .data = 0x25, }, { .compatible = "nxp,pca9450b", .data = 0x25, }, { } }; From patchwork Wed Oct 28 09:58:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389207 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=kzkOyYZ/; dkim-atps=neutral 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkYM2TPTz9sVW for ; Wed, 28 Oct 2020 20:58:47 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8E956824C4; Wed, 28 Oct 2020 10:58:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="kzkOyYZ/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A83DE8246A; Wed, 28 Oct 2020 10:58:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3EB4A801D8 for ; Wed, 28 Oct 2020 10:58:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x243.google.com with SMTP id k25so1053640lji.9 for ; Wed, 28 Oct 2020 02:58:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xw6mxMZ6Sz6ibtRgYAqUalfGxeqPNcnIcM/oNokCJGQ=; b=kzkOyYZ/vZkzF2lYpfGsfuepg8bcaDROy9bUM1Ak7kkny5j87V2RrUcOtCckX3yYHQ H0WaoFYnmjOhFHKNm3x25kjWqm5np85yCGT9jsnq/LLk/ElUE4fXqwWqB/rv5kR4z9ly PD7PvOwA7pKzPypB3Xi4iMr1IR7NEG3Bx52vgwTVeySk+Bj8xHHq/ZEnmBVdBH35vRCE Y7mGpK3zglW/FrEn0/2ZycDl/89lNw9NUU60ipw1LhukGgvrk9amz2wMxz7pJW4V7+BU ZhdehbrO2j/bkHu4gv62clk1A/P0E+KWMX6osbVIwJY5w6N/ievP3FRNMvQ/e6sWAVtJ cjjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Xw6mxMZ6Sz6ibtRgYAqUalfGxeqPNcnIcM/oNokCJGQ=; b=GsePrf4u2UPQ24YPkQ+EX+e4IfASlJ5/LOanqPDlD7PqqIbW5GmUyDPJVPOKlyLEZ0 g0p2fhz3noX1IUr2OQHd7e2tt1ZpknhbPuodkI3aOLOHgTzTXtpCtvKso2XiDCSsUSl7 amZ+MlK4yQO755XSYTAW4gnYDsbvu6bGbf05tSTTlt0xl9gUF/d0gdebsNmcYrUSRUk5 vlDBL2t7lJ26kBf8RmWu8ZXRQ4sjfdvlgRsPz/9GxWOydmldsDKlj/W8rIpNR9I1GT8x XxuzK4qJouACrtgntmWLhQcvZAzEPXNOgR9djt8ghQEjrWuaIs1aBeIn1CDMlzFVf1jd LUsQ== X-Gm-Message-State: AOAM530oi0t7ry3isjFLRKALiBnn/lwc6aPGx9MLFhwEbx3evXvq93s2 qjA84SNm9vLvkh7kxJccPbAEeMfFB5zacA== X-Google-Smtp-Source: ABdhPJzFL6WslipcisbbStLC6cuaY/zhCSEeAXL0tCxuxxWPp/yEPi+U8xGOIOEvnwy3m/l1yjqzJQ== X-Received: by 2002:a05:651c:97:: with SMTP id 23mr2761283ljq.376.1603879102304; Wed, 28 Oct 2020 02:58:22 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id r6sm475076lfm.242.2020.10.28.02.58.21 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:21 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk , Jaehoon Chung , Keerthy , Marek Vasut , Martin Fuzzey , Ye Li Subject: [PATCH v1 3/9] power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig Date: Wed, 28 Oct 2020 11:58:10 +0200 Message-Id: <20201028095816.23906-3-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Igor Opaniuk Add SPL_DM_PMIC_PCA9450 symbol to Kconfig. Signed-off-by: Igor Opaniuk Reviewed-by: Jaehoon Chung --- drivers/power/pmic/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig index a62aa38054..7d51510d1b 100644 --- a/drivers/power/pmic/Kconfig +++ b/drivers/power/pmic/Kconfig @@ -98,6 +98,13 @@ config DM_PMIC_PCA9450 This config enables implementation of driver-model pmic uclass features for PMIC PCA9450. The driver implements read/write operations. +config SPL_DM_PMIC_PCA9450 + bool "Enable Driver Model for PMIC PCA9450" + depends on DM_PMIC + help + This config enables implementation of driver-model pmic uclass features + for PMIC PCA9450 in SPL. The driver implements read/write operations. + config DM_PMIC_PFUZE100 bool "Enable Driver Model for PMIC PFUZE100" depends on DM_PMIC From patchwork Wed Oct 28 09:58:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389208 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=RExz0O9J; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkYX3KDLz9sVD for ; Wed, 28 Oct 2020 20:58:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 28DCF823E3; Wed, 28 Oct 2020 10:58:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RExz0O9J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0C6BA8247D; Wed, 28 Oct 2020 10:58:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D5C8D82434 for ; Wed, 28 Oct 2020 10:58:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x244.google.com with SMTP id 2so5302238ljj.13 for ; Wed, 28 Oct 2020 02:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jUtTk9bzr67y2eSuf84ro488usGvnjcwWf4ikfLNeJY=; b=RExz0O9J3upzA9V7zFz3N6MrDg1HFL97K4/ag4fTaRQ0G9vzTzNhezyVGYcuTPi4KO i97AVvWz7kue4U1gxhA86AO9K/bdu9eLVRjMXqAL+5oDK4lMTO5G2k3bauYjrEU2E9TR v9wF5eD9t8ZAj0hFwAc1njpr41AXfHMl4kO61E8QrZQQg+c9vXOJVF9O4iMciTwPDcpK Syvl80NvtbH+CRlQMdQhvq+fBzmIovERVMMPy8Qoz2crUiLcHlfe+vglpCnR0wUnYKb/ xHWb1MnAhpFtY5/g17vO2EqSOBVCmXLfislng1kfjuNQk7R3MwpFN4d826RnJ3wK1kC7 FGhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=jUtTk9bzr67y2eSuf84ro488usGvnjcwWf4ikfLNeJY=; b=OsXhj4LAcpLvCXr5vrZOZqnH2jCFlzKoCXKnjJoNSQbgnuqd1P88QQU9409t8oo43X qiZmOce62y+Gb2yHwTmhN1js55KYY5s8usraNo4vxMEHY0GkxJN5M0HZ84Pwrx11we4E CbgIs4LlYbBw8HZc/P1Mo6qz0AORbUWMITCbMec+yiCDoTghMj+fGIarPX9S3RiVYjju QVOqXwkrstYASRUxcghdYdGSNuhBYgKdohiU4ckR8APxobZfXopFYToHpaCw/ER9CdtV rAn5DhDYO6XM41Gkm250ReDYswu2KHJ6uNjFgVHdHhNMUdLTO4G/OQefXXnACPCKRG4x Ze6w== X-Gm-Message-State: AOAM5330NfpV37g4uu7GeclKab/YCJ/aZaUR3YvV1XZcnwNfyuY2HA3L DpBO1cYwO+7LevY1+awNCF3kziJIpGhq6A== X-Google-Smtp-Source: ABdhPJzEGt2HjwWduuWOlageKYIbf4iaZrmDdddI01j30GgZJPg2OHpKkHMG3WgBTyBdqnARxqifRA== X-Received: by 2002:a2e:8706:: with SMTP id m6mr2954237lji.129.1603879103808; Wed, 28 Oct 2020 02:58:23 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id r9sm474606lff.216.2020.10.28.02.58.22 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:23 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk , Fabio Estevam , "NXP i.MX U-Boot Team" Subject: [PATCH v1 4/9] ARM: dts: imx8mm-verdin: follow changed pmic Date: Wed, 28 Oct 2020 11:58:11 +0200 Message-Id: <20201028095816.23906-4-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Max Krummenacher The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A. Adjust the device tree accordingly. Remove the old ADC node as the ADC has been changed and has no longer a separate power rail. Signed-off-by: Max Krummenacher Signed-off-by: Igor Opaniuk Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov --- arch/arm/dts/imx8mm-verdin-u-boot.dtsi | 5 +- arch/arm/dts/imx8mm-verdin.dts | 154 +++++++++++++------------ 2 files changed, 80 insertions(+), 79 deletions(-) diff --git a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi index fe6bb9bf03..249b0f8f66 100644 --- a/arch/arm/dts/imx8mm-verdin-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-verdin-u-boot.dtsi @@ -2,7 +2,6 @@ /* * Copyright 2020 Toradex */ - / { wdt-reboot { compatible = "wdt-reboot"; @@ -90,11 +89,11 @@ u-boot,dm-spl; }; -&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b} { +&{/soc@0/bus@30800000/i2c@30a20000/pmic} { u-boot,dm-spl; }; -&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b/regulators} { +&{/soc@0/bus@30800000/i2c@30a20000/pmic/regulators} { u-boot,dm-spl; }; diff --git a/arch/arm/dts/imx8mm-verdin.dts b/arch/arm/dts/imx8mm-verdin.dts index 1c67c08c88..fb0756d6e1 100644 --- a/arch/arm/dts/imx8mm-verdin.dts +++ b/arch/arm/dts/imx8mm-verdin.dts @@ -203,115 +203,123 @@ pinctrl-0 = <&pinctrl_i2c1>; status = "okay"; - pmic@4b { - compatible = "rohm,bd71840", "rohm,bd71837"; - bd71837,pmic-buck2-uses-i2c-dvs; - bd71837,pmic-buck2-dvs-voltage = <1000000>, <900000>, <0>; /* VDD_ARM: Run-Idle */ - gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>; - /* PMIC BD71837 PMIC_nINT GPIO1_IO3 */ + /* Assembled on V1.1 HW and later */ + pmic { + reg = <0x25>; + u-boot,dm-spl; + compatible = "nxp,pca9450a"; + /* PMIC PCA9450 PMIC_nINT GPIO1_IO3 */ pinctrl-0 = <&pinctrl_pmic>; - reg = <0x4b>; - - gpo { - rohm,drv = <0x0C>; /* 0b0000_1100 all gpos with cmos output mode */ - }; + gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>; regulators { - buck1_reg: BUCK1 { - regulator-always-on; - regulator-boot-on; + u-boot,dm-spl; + #address-cells = <1>; + #size-cells = <0>; + + pca9450,pmic-buck2-uses-i2c-dvs; + /* Run/Standby voltage */ + pca9450,pmic-buck2-dvs-voltage = <950000>, <850000>; + + buck1_reg: regulator@0 { + reg = <0>; regulator-compatible = "buck1"; - regulator-max-microvolt = <1300000>; - regulator-min-microvolt = <700000>; - regulator-ramp-delay = <1250>; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <2187500>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <3125>; }; - buck2_reg: BUCK2 { - regulator-always-on; - regulator-boot-on; + buck2_reg: regulator@1 { + reg = <1>; regulator-compatible = "buck2"; - regulator-max-microvolt = <1300000>; - regulator-min-microvolt = <700000>; - regulator-ramp-delay = <1250>; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <2187500>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <3125>; }; - buck5_reg: BUCK5 { - regulator-always-on; + buck3_reg: regulator@2 { + reg = <2>; + regulator-compatible = "buck3"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <2187500>; regulator-boot-on; - regulator-compatible = "buck5"; - regulator-max-microvolt = <1350000>; - regulator-min-microvolt = <700000>; + regulator-always-on; }; - buck6_reg: BUCK6 { - regulator-always-on; + buck4_reg: regulator@3 { + reg = <3>; + regulator-compatible = "buck4"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <3400000>; regulator-boot-on; - regulator-compatible = "buck6"; - regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3000000>; + regulator-always-on; }; - buck7_reg: BUCK7 { - regulator-always-on; + buck5_reg: regulator@4 { + reg = <4>; + regulator-compatible = "buck5"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <3400000>; regulator-boot-on; - regulator-compatible = "buck7"; - regulator-max-microvolt = <1995000>; - regulator-min-microvolt = <1605000>; + regulator-always-on; }; - buck8_reg: BUCK8 { - regulator-always-on; + buck6_reg: regulator@5 { + reg = <5>; + regulator-compatible = "buck6"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <3400000>; regulator-boot-on; - regulator-compatible = "buck8"; - regulator-max-microvolt = <1400000>; - regulator-min-microvolt = <800000>; + regulator-always-on; }; - ldo1_reg: LDO1 { - regulator-always-on; - regulator-boot-on; + ldo1_reg: regulator@6 { + reg = <6>; regulator-compatible = "ldo1"; + regulator-min-microvolt = <1600000>; regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3000000>; + regulator-boot-on; + regulator-always-on; }; - ldo2_reg: LDO2 { - regulator-always-on; - regulator-boot-on; + ldo2_reg: regulator@7 { + reg = <7>; regulator-compatible = "ldo2"; - regulator-max-microvolt = <900000>; - regulator-min-microvolt = <900000>; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1150000>; + regulator-boot-on; + regulator-always-on; }; - ldo3_reg: LDO3 { - regulator-always-on; - regulator-boot-on; + ldo3_reg: regulator@8 { + reg = <8>; regulator-compatible = "ldo3"; + regulator-min-microvolt = <800000>; regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; }; - ldo4_reg: LDO4 { - regulator-always-on; - regulator-boot-on; + ldo4_reg: regulator@9 { + reg = <9>; regulator-compatible = "ldo4"; - regulator-max-microvolt = <1800000>; - regulator-min-microvolt = <900000>; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; }; - ldo5_reg: LDO5 { + ldo5_reg: regulator@10 { + reg = <10>; regulator-compatible = "ldo5"; + regulator-min-microvolt = <800000>; regulator-max-microvolt = <3300000>; - regulator-min-microvolt = <3300000>; }; - ldo6_reg: LDO6 { - regulator-always-on; - regulator-boot-on; - regulator-compatible = "ldo6"; - regulator-max-microvolt = <1800000>; - regulator-min-microvolt = <900000>; - }; }; }; @@ -321,12 +329,6 @@ reg = <0x32>; }; - adc@34 { - compatible = "maxim,max11607"; - reg = <0x34>; - vcc-supply = <&ldo5_reg>; - }; - eeprom_module: eeprom@50 { compatible = "st,24c02", "atmel,24c02", "i2c-eeprom"; pagesize = <16>; From patchwork Wed Oct 28 09:58:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389209 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Y5bggJaA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkYn5YJRz9sVD for ; Wed, 28 Oct 2020 20:59:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A64DF824DE; Wed, 28 Oct 2020 10:58:37 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Y5bggJaA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 05B53824A7; Wed, 28 Oct 2020 10:58:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4E6E1801D8 for ; Wed, 28 Oct 2020 10:58:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x243.google.com with SMTP id p15so5359569ljj.8 for ; Wed, 28 Oct 2020 02:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mJ/QcwJ/Vq7adQRv9Y+YNBr9wnaapky8A36wGBnStC0=; b=Y5bggJaA8UU9AQQSr+IiUUoqhn7ssAJN311lrodVRfrH5o3JDAOpU4PhpJQ/ynuGDo hCPgTcW97O4+rfA+HoHyafs82VafSY5STw1gsqbTkfg6TGIdAPyTumBi2fcLjO0Tcjv5 PAvCG8yFltM2bHwDLWzrsvRzXOwMuMpzGOO/eRMVzXZc88sS5cDaO5FLF8bimkSU/0fF g+fcYHJHCnmNemSjHM6YVQ2dwhSlD7SRbZsvQgbir5jocUEHFr6KkC41xnLNx9oq/4jp 8WhBGa4TGu8s18/QNNA31nfO1YKozDy+k+IAdHRhnmCa4rPS8WJk3kaVAV78Ut3X3rU7 oXVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mJ/QcwJ/Vq7adQRv9Y+YNBr9wnaapky8A36wGBnStC0=; b=qJbqQOp2m1JQaOShmVzBiIN3wtL4w8MNgJaQ93tU/sD9RgumcN/LCw0mRGdCBJzYqy P5pMRdYR34DJNpFBwqqP85EXuiuEidc5TUecpl0TvaSTMnMpN3c6eBNbyntEzJbTP3az RfnNAydapDtwaSFVRd4DD+6jM+SrTjs2fDZerWIEZqHMMBnmcl60784QlBZZZtW8b7Xd FvwOrWZhGs31Tfx0xbtIMw7ojeuUBLi/KnUnO/GoWBLArIRtokM2dv4Bt/WjvCoilmMT VVxZ3YWoRdO672nZfLsOumvjIF+fzyasSIU6zTWsF+h/MbUal56NDD1/8hJPaGI1hBha 8Bgg== X-Gm-Message-State: AOAM531PcG48JnYrDQGnupE6ZcOigtRR7m5lSQ+vfQaHJr1cSOBMLg6z 8pk0N5gshHwcowNpmzT/U0AS5qdX7aO24w== X-Google-Smtp-Source: ABdhPJzgtP7F5+wNBeCE4ItBtM8CCKwQj1cDFvjuHXzVcMzuULVv0vshNILRR03LNeji5Q1DRPqNxA== X-Received: by 2002:a2e:b0e4:: with SMTP id h4mr2697083ljl.119.1603879105328; Wed, 28 Oct 2020 02:58:25 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id c9sm142310ljd.26.2020.10.28.02.58.24 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:24 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk Subject: [PATCH v1 5/9] verdin-imx8mm: spl: switch to pca9450 pmic Date: Wed, 28 Oct 2020 11:58:12 +0200 Message-Id: <20201028095816.23906-5-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Max Krummenacher V1.1A HW switched the PMIC from BD71837 to PCA9450. - Disable combined DVS in PCA9450_BUCK123_DVS. - Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM. - Configure WDOG_B behaviour. Signed-off-by: Max Krummenacher Signed-off-by: Igor Opaniuk Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov --- board/toradex/verdin-imx8mm/spl.c | 42 +++++++++++++++---------------- configs/verdin-imx8mm_defconfig | 2 +- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index cc78c5666b..9562cdeb35 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -21,12 +21,16 @@ #include #include #include +#include #include +#include #include #include DECLARE_GLOBAL_DATA_PTR; +#define I2C_PMIC_BUS_ID 1 + int spl_board_boot_device(enum boot_device boot_dev_spl) { switch (boot_dev_spl) { @@ -101,33 +105,27 @@ int power_init_board(void) struct udevice *dev; int ret; - ret = pmic_get("pmic@4b", &dev); - if (ret == -ENODEV) { - puts("No pmic\n"); - return 0; - } - if (ret != 0) - return ret; + if (IS_ENABLED(CONFIG_SPL_DM_PMIC_PCA9450)) { + ret = pmic_get("pmic", &dev); + if (ret == -ENODEV) { + puts("No pmic found\n"); + return ret; + } - /* decrease RESET key long push time from the default 10s to 10ms */ - pmic_reg_write(dev, BD718XX_PWRONCONFIG1, 0x0); + if (ret != 0) + return ret; - /* unlock the PMIC regs */ - pmic_reg_write(dev, BD718XX_REGLOCK, 0x1); + /* BUCKxOUT_DVS0/1 control BUCK123 output, clear PRESET_EN */ + pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29); - /* increase VDD_SOC to typical value 0.85v before first DRAM access */ - pmic_reg_write(dev, BD718XX_BUCK1_VOLT_RUN, 0x0f); + /* increase VDD_DRAM to 0.975v for 1.5Ghz DDR */ + pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x1c); - /* increase VDD_DRAM to 0.975v for 3Ghz DDR */ - pmic_reg_write(dev, BD718XX_1ST_NODVS_BUCK_VOLT, 0x83); + /* set WDOG_B_CFG to cold reset */ + pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1); -#ifndef CONFIG_IMX8M_LPDDR4 - /* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */ - pmic_reg_write(dev, BD718XX_4TH_NODVS_BUCK_VOLT, 0x28); -#endif - - /* lock the PMIC regs */ - pmic_reg_write(dev, BD718XX_REGLOCK, 0x11); + return 0; + } return 0; } diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig index 7ebfd6792f..d856e3a318 100644 --- a/configs/verdin-imx8mm_defconfig +++ b/configs/verdin-imx8mm_defconfig @@ -91,7 +91,7 @@ CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y CONFIG_DM_PMIC=y -CONFIG_SPL_DM_PMIC_BD71837=y +CONFIG_SPL_DM_PMIC_PCA9450=y CONFIG_DM_PMIC_PFUZE100=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y From patchwork Wed Oct 28 09:58:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389211 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dIf5tbAS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkZ168HWz9sVW for ; Wed, 28 Oct 2020 20:59:21 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 09BF5824EC; Wed, 28 Oct 2020 10:58:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dIf5tbAS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2EB48246A; Wed, 28 Oct 2020 10:58:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BF64F8246A for ; Wed, 28 Oct 2020 10:58:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x242.google.com with SMTP id p15so5359661ljj.8 for ; Wed, 28 Oct 2020 02:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HOzFL19V+f262o5J0VUF2P2aP/PbCc2ehVwS3MHq9eg=; b=dIf5tbASJTnpls8K75uyksZX/LhHORn2R/tB/RVQkLqsUj2tOBES6WUKYiEsTXANei YdCK/2aNXdElNn6BHx+nv/JBjgmFMbZUmIxDlgeTmyvUJYGVeP03C3vSUHbjCoexES0C JXTaH1x6i8UdH55wQZFR9WzlZU7716abj+Zd2LRRiM/11qUi2N9lDDLzOTyrwsN7VuJt eQyWonG4UvSJtzJWcwZK0zKfACE+xQxQmW2CQNbwLwf5gh5tznOVtwDGyfmKmV5EUxph HKyp96mywGnODtvl/92ukzH72QCeDgPZmZytJ6sfYT27Fi4VpMJ7AMYYsAGGmld73NOv 1zSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HOzFL19V+f262o5J0VUF2P2aP/PbCc2ehVwS3MHq9eg=; b=qXQvHFa7H17Q0MU6/tvb1MbwzoHSvKFqZG01rObag76JBess4UVNQvd2/L30RnQglX b1aiJUVMz/yqz3QG1o8W7iwMTaBbfdnWV46SYOmDD4TxKgcaBNIV87uNgPm5ng0WwTUW 6INGdSIn40k3bqqvQTFa1rBZZZJO2oUM/Y2XY3zK1r7ZV1omQHvSs42YfThShXz+jUGO 3WOIXv8aKVJV0zT7Fs5a/CMMofULlSWveBCcns6phGTYutK9oNc2wT1S70uKo+8njFBu MB6AJfysc5zEARnescsAV3GLWFjY5jxFvkw8O71xlEihZH3W76n0YLfs/MpUepyun+wp E37Q== X-Gm-Message-State: AOAM5306dVIhp2iY6RxY/4pkmKD4uDij64Tz1zSZV8YF+55j42Ps6kdj W4osN15zOXJB6u1m0arALU+CzYTchZT6jw== X-Google-Smtp-Source: ABdhPJx7rRYYpHWTU25l3nYPrXUh37mprs0wMF7L4LQgCqqb7gdUk48+lTG88QZYnXwKhyjSFBabDw== X-Received: by 2002:a2e:96d2:: with SMTP id d18mr2783353ljj.407.1603879106796; Wed, 28 Oct 2020 02:58:26 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id m10sm475246lfo.237.2020.10.28.02.58.25 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:26 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk Subject: [PATCH v1 6/9] verdin-imx8mm: implement hardware version detection Date: Wed, 28 Oct 2020 11:58:13 +0200 Message-Id: <20201028095816.23906-6-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Max Krummenacher And select the correct devicetree accordingly by setting the variant environment variable. Signed-off-by: Igor Opaniuk Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler --- board/toradex/verdin-imx8mm/verdin-imx8mm.c | 71 +++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c index 66950ed218..9c6f35e778 100644 --- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c +++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c @@ -8,12 +8,22 @@ #include #include #include +#include #include #include #include +#include "../common/tdx-cfg-block.h" + DECLARE_GLOBAL_DATA_PTR; +#define I2C_PMIC 0 + +enum pcb_rev_t { + PCB_VERSION_1_0, + PCB_VERSION_1_1 +}; + #if IS_ENABLED(CONFIG_FEC_MXC) static int setup_fec(void) { @@ -104,8 +114,69 @@ int board_mmc_get_env_dev(int devno) return devno; } +static enum pcb_rev_t get_pcb_revision(void) +{ + struct udevice *bus; + struct udevice *i2c_dev = NULL; + int ret; + u8 is_bd71837 = 0; + + ret = uclass_get_device_by_seq(UCLASS_I2C, I2C_PMIC, &bus); + if (!ret) + ret = dm_i2c_probe(bus, 0x4b, 0, &i2c_dev); + if (!ret) + ret = dm_i2c_read(i2c_dev, 0x0, &is_bd71837, 1); + + /* BD71837_REV, High Nibble is major version, fix 1010 */ + is_bd71837 = !ret && ((is_bd71837 & 0xf0) == 0xa0); + return is_bd71837 ? PCB_VERSION_1_0 : PCB_VERSION_1_1; +} + +static void select_dt_from_module_version(void) +{ + char variant[32]; + char *env_variant = env_get("variant"); + int is_wifi = 0; + + if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK)) { + /* + * If we have a valid config block and it says we are a + * module with Wi-Fi/Bluetooth make sure we use the -wifi + * device tree. + */ + is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) || + (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT); + } + + switch (get_pcb_revision()) { + case PCB_VERSION_1_0: + printf("Detected a V1.0 module\n"); + if (is_wifi) + strncpy(&variant[0], "wifi", sizeof(variant)); + else + strncpy(&variant[0], "nonwifi", sizeof(variant)); + break; + default: + if (is_wifi) + strncpy(&variant[0], "wifi-v1.1", sizeof(variant)); + else + strncpy(&variant[0], "nonwifi-v1.1", sizeof(variant)); + break; + } + + if (strcmp(variant, env_variant)) { + printf("Setting variant to %s\n", variant); + env_set("variant", variant); + + if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE)) + env_save(); + } +} + int board_late_init(void) { + select_dt_from_module_version(); + return 0; } From patchwork Wed Oct 28 09:58:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389212 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=iFu3fx1b; dkim-atps=neutral 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkZF57Qdz9sVW for ; Wed, 28 Oct 2020 20:59:33 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD052824D6; Wed, 28 Oct 2020 10:58:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iFu3fx1b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D6CD18244F; Wed, 28 Oct 2020 10:58:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3A65F8248E for ; Wed, 28 Oct 2020 10:58:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x244.google.com with SMTP id x16so5401134ljh.2 for ; Wed, 28 Oct 2020 02:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dV+oN+nZas+k0lgTQyezUhjKGgTuHXzR4GbNeR4O8f4=; b=iFu3fx1b/UDsg1EAypuA+U1UqEGNnRrtOIXQKkOTTzzGujxZpuvXIdEykQhb8+5+jO 7CLIu4k1eHQn0SiTess8bO5TB4mV1wDCQUIfHopiguGH15ks7uXv28C9x1Uu+ASw6LQb AZlPGknmIXkWy7+c1fZuO9LfQP9QHD0A4QbChahuEJK2/S6KnMtOxEENfAePcyHRmVC+ fqCsCw3G/oWmg986kGd+bNNESqpnMXxjIxSnOHLmPaC/bRSID9tIpLkEHlMY0mILW6DX XbAjYEQTYSYeRIoLZVULYQZwzTX9N4TbJpc8WiDD591ETO9BMv5tv0eNCFZWc1y2ZaYR aUbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dV+oN+nZas+k0lgTQyezUhjKGgTuHXzR4GbNeR4O8f4=; b=blgVD/wI9Nd803XddnNdAI/dGiglc9736zZRddUohkYHvr7nFcof9dnd4k9Rrwa/WG 6PUBt0wqxYflRNudWy5I7pTYXofQIvEL0L1gpSvz6wmG5IGmwC53TxM+W74QzOntnLiw tD3IwUOZWF7d1GJtZ2/1BYOUm0ExGG3wJ1o0FjqKYh1wr4pi8YYc5QsJa+TfW0z1GZUR 9d6VQ2m+vRtkfkgwKC3PWBkGPZX/H46m2XX+aKcFXDWEmrj7Oq3gzzGecncUt+KpQg6+ MoGOPqYZYPHLbl5+r7v3SEedDfrWZgPdTbrlH0OxFFMP/mf1BT7sHGuz+/HgB3j1vV5N aRbw== X-Gm-Message-State: AOAM532SvxZxVeHfEqJT0wRkupjf3Y6I5LYZojHZucXbIc0+lDyonyRE VFbDAgZu/nkWCEU0ibGAzFGpstp4Isx4Jg== X-Google-Smtp-Source: ABdhPJypnLtPYU550A9EHbwDFDrl7PNRcONHxDqp4ThGlxZffajQPLpAoLZMYA/vSAYhEB/fKG7U1Q== X-Received: by 2002:a2e:2202:: with SMTP id i2mr2669236lji.70.1603879108265; Wed, 28 Oct 2020 02:58:28 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id f20sm476456lfh.69.2020.10.28.02.58.27 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:27 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk Subject: [PATCH v1 7/9] verdin-imx8mm: spl: enable pca9450 i2c level translator Date: Wed, 28 Oct 2020 11:58:14 +0200 Message-Id: <20201028095816.23906-7-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Max Krummenacher Enable PCA9450 i2c level translator, as this is used for the on module ADC. Signed-off-by: Max Krummenacher Acked-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov --- board/toradex/verdin-imx8mm/spl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/toradex/verdin-imx8mm/spl.c b/board/toradex/verdin-imx8mm/spl.c index 9562cdeb35..72e2e09e25 100644 --- a/board/toradex/verdin-imx8mm/spl.c +++ b/board/toradex/verdin-imx8mm/spl.c @@ -124,6 +124,8 @@ int power_init_board(void) /* set WDOG_B_CFG to cold reset */ pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1); + pmic_reg_write(dev, PCA9450_CONFIG2, 0x1); + return 0; } From patchwork Wed Oct 28 09:58:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389215 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=HIoZlUKc; dkim-atps=neutral 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkZS0QfFz9sVl for ; Wed, 28 Oct 2020 20:59:43 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C77D824F7; Wed, 28 Oct 2020 10:58:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HIoZlUKc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 69B348244F; Wed, 28 Oct 2020 10:58:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BC35B824A8 for ; Wed, 28 Oct 2020 10:58:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x243.google.com with SMTP id 2so5302579ljj.13 for ; Wed, 28 Oct 2020 02:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g1CO/MfeI3bPV2f/cmgiYjwcMTKky5BoFcUs9OUFLgY=; b=HIoZlUKcnsCXLPRU9hm8Kl8ufYOha4l5ItplAjpjMhV/BI64CFLfwi7m0m0fEE2hyf eUDoYb9dbLF9uVzzOm24z8whKjzmv4grwV5etTVImzqU7N6iMhmLxLvBtLWmgLmhqAdJ QHu3+8HKkD+k+KyBBuP4aPxGsBLLzgRIjAYykVFrJ40tc/ypbdGAAO6EVidTx24hxpG2 /HOoxWeJuVkOh8vG+kPcSp8SMjgGNZkMPUxmzGyTTFBVC3LVi6UKEUwCoawxEFhL4McV Rvj/p6b/pAKA0ANwCDOxGCnLvYHYLkVR37K3q/x/Rmp3HaviwqZfnt5Ay46efMRVWHYz IomQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=g1CO/MfeI3bPV2f/cmgiYjwcMTKky5BoFcUs9OUFLgY=; b=ioHOMbGQJi/2pSHqIR/QkXzqtLZIokv0lijoxhX60uITujtyWsGZz/ssJW/fadH/XZ 1ZJ/gnqg6I1HuO25/RkiJpoxhDSfdtkJXcntl2LW+XRaAx63q2Xj9sJjQBgbaILEygFn 801mdKhTaIFWgMOENUMJGIVG8/C9ZF+2W1BBEt4QO5kqA07nd+/5+NGBg5YayYS0EwgM 29gfcgOGt5TjG2RH++xZUk/L1846dxlBo8biXFULig4ug4Kz+yEIwo3jS0nH1V9jcWZZ vlLJmVFW6Yh39UpyTNvr9m7xFeG5MJ+aDKaPfExOlScyKDt2RqS79tnxlqW8kZNaUgMb E1Zw== X-Gm-Message-State: AOAM530BX+XBua6Gyl+Lyn9AMBEMP37SkPKpx8FnW4WntGe+A48MCR89 vXVqWUDd6YcCKNZ3v2RbVArzdIHtBjg2oQ== X-Google-Smtp-Source: ABdhPJxGDIe/l1YONUD5DzzwjTgIzvsI+Lwhy7XLe7jzsIKdMiXBKmqBv8UoyexaBaRcq+EPNzPC+g== X-Received: by 2002:a2e:9114:: with SMTP id m20mr2791760ljg.203.1603879109794; Wed, 28 Oct 2020 02:58:29 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id 5sm339014lju.25.2020.10.28.02.58.28 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:29 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk , Simon Glass Subject: [PATCH v1 8/9] toradex: tdx-cfg-clock: fix i.mx 8m mini interactive Date: Wed, 28 Oct 2020 11:58:15 +0200 Message-Id: <20201028095816.23906-8-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Marcel Ziswiler Now with them first Verdin iMX8M Mini DualLite modules in for bring-up we got clarity how is_cpu_type() actually behaves. Signed-off-by: Marcel Ziswiler Reviewed-by: Oleksandr Suvorov --- board/toradex/common/tdx-cfg-block.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/board/toradex/common/tdx-cfg-block.c b/board/toradex/common/tdx-cfg-block.c index 475abf78a7..adab0a0802 100644 --- a/board/toradex/common/tdx-cfg-block.c +++ b/board/toradex/common/tdx-cfg-block.c @@ -423,12 +423,6 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid = COLIBRI_IMX7D; else if (!strcmp("imx7s", soc)) tdx_hw_tag.prodid = COLIBRI_IMX7S; - else if (is_cpu_type(MXC_CPU_IMX8MM)) - tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; - else if (is_cpu_type(MXC_CPU_IMX8MMDL)) - tdx_hw_tag.prodid = VERDIN_IMX8MMDL; - else if (is_cpu_type(MXC_CPU_IMX8MN)) - tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; else if (is_cpu_type(MXC_CPU_IMX8QM)) { if (it == 'y' || it == 'Y') { if (wb == 'y' || wb == 'Y') @@ -464,18 +458,16 @@ static int get_cfgblock_interactive(void) tdx_hw_tag.prodid = COLIBRI_IMX8DX; } #endif + } else if (is_cpu_type(MXC_CPU_IMX8MMDL)) { + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MMDL; } else if (is_cpu_type(MXC_CPU_IMX8MM)) { - if (is_cpu_type(MXC_CPU_IMX8MMDL)) { - if (wb == 'y' || wb == 'Y') - tdx_hw_tag.prodid = VERDIN_IMX8MMDL_WIFI_BT_IT; - else - tdx_hw_tag.prodid = VERDIN_IMX8MMDL; - } else { - if (wb == 'y' || wb == 'Y') - tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; - else - tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; - } + if (wb == 'y' || wb == 'Y') + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_WIFI_BT_IT; + else + tdx_hw_tag.prodid = VERDIN_IMX8MMQ_IT; } else if (is_cpu_type(MXC_CPU_IMX8MN)) { tdx_hw_tag.prodid = VERDIN_IMX8MNQ_WIFI_BT; } else if (is_cpu_type(MXC_CPU_IMX8MP)) { From patchwork Wed Oct 28 09:58:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1389216 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OR3y+GPg; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLkZd43WMz9sVl for ; Wed, 28 Oct 2020 20:59:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 84415824FF; Wed, 28 Oct 2020 10:58:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OR3y+GPg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D615C8244F; Wed, 28 Oct 2020 10:58:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 50B32801D8 for ; Wed, 28 Oct 2020 10:58:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-lj1-x241.google.com with SMTP id d24so5350424ljg.10 for ; Wed, 28 Oct 2020 02:58:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lP+2NR4RNjj+s5qO2BeemvhL91r+8QoewZOmydIQ5qM=; b=OR3y+GPgLBWaojEjA2MvvaGa+Sy497TEa+xmdRAICX199/MBZNgwsDwYd+ofsqgmx4 WU3Pcxu/R6EJDx/LrI9D+whzKFXT+vgMb6vnFhhCB9HXfnSwl8C4UdeDnrThIurPSr+X Noej+z/1o/4NKwb7lmF/rSa5gk0DD4IsBqj20xX/2L8ow4KUKC67A1dr5SEcwPnlwQdV yxPUI2INRiDbMntCGbXEJBmu+KNpO3W/DIoJpf1YMvs3V1S+DxEbBksW1hMlpQ7N0Jr4 4y48MW55wdjpbCka77J/g0RzDzLtUx/TX3bCJg2zuGCDy0nEQV3g1Db3282x5q9Jcaon 8jkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lP+2NR4RNjj+s5qO2BeemvhL91r+8QoewZOmydIQ5qM=; b=U0r6kFkQacVBZ6zYXBoQL3hNDi87jQpHRt8AZYfiu6U94O2+6wgNxgF7NhzqxIo/hf ZtQ4gYVKwuo6PC8fkz1VJCS7uBj2myAKlc5Q/IXTcLf9hkpCIqZ0wlT279OP6uXWxH1A 9yq+EKUiek77AUZ5GjbMQaAIz/Cwd69wPPCbbCIm9dAMdjjmGU6WgpuzrFKmxEQixl3E da94snI7Nwvb+DUjVVuo+eWXKFY2nE78moPZvlCOPjERBdc3LqkuoaPhB1R1c9WHcW6I YkCIPz4PZ8yMdcu8hU8VZNa0B4NUd6/yk+h8dnwPc3Psl5p4DC08BXxk/ygq3O2hIWT+ 7IqQ== X-Gm-Message-State: AOAM5305IABml2pKp8pcZ/zgG22SVpbBY3mGuTztystcKAUO7EbBsx+Y rIqLEwAVRQklNw1hq3myZUvlBUd+l7vZ3g== X-Google-Smtp-Source: ABdhPJx/QzuDwoTi2DB/XdXNItcyK8+mOmqPaLz3wT7Bfb4NAdne75w/XHuRI15+Eov2vxWevyNJaw== X-Received: by 2002:a2e:2202:: with SMTP id i2mr2669291lji.70.1603879111326; Wed, 28 Oct 2020 02:58:31 -0700 (PDT) Received: from localhost ([109.108.76.111]) by smtp.gmail.com with ESMTPSA id i19sm2317ljg.115.2020.10.28.02.58.30 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Oct 2020 02:58:30 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Cc: Marcel Ziswiler , Peng Fan , Oleksandr Suvorov , Philippe Schenker , Max Krummenacher , Stefano Babic , Igor Opaniuk Subject: [PATCH v1 9/9] verdin-imx8mm: automatic ram size detection Date: Wed, 28 Oct 2020 11:58:16 +0200 Message-Id: <20201028095816.23906-9-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201028095816.23906-1-igor.opaniuk@gmail.com> References: <20201028095816.23906-1-igor.opaniuk@gmail.com> 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 From: Marcel Ziswiler Implement board_phys_sdram_size() to automatically detect Verdin iMX8M Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB. Note: This only works if we keep using similar RAM chips! Signed-off-by: Marcel Ziswiler Acked-by: Oleksandr Suvorov --- board/toradex/verdin-imx8mm/verdin-imx8mm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c index 9c6f35e778..7cfae8767c 100644 --- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c +++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c @@ -180,6 +180,16 @@ int board_late_init(void) return 0; } +int board_phys_sdram_size(phys_size_t *size) +{ + if (!size) + return -EINVAL; + + *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); + + return 0; +} + #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, struct bd_info *bd) {