From patchwork Tue May 9 14:32:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1778994 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=YOkFkXCr; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=sb0RbLZ1; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QG0yH4zgDz20ff for ; Wed, 10 May 2023 00:33:26 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFAF285BFB; Tue, 9 May 2023 16:33:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642794; bh=7CJaWEVk/gFgoyXnAy6oqoPgKMgVYKT7bx7uReCY9p0=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=YOkFkXCrtR0hj0EVkenWyvcAAe+TSVwyoEh9ct+giEXR+uVXcIzcNMG6qX+zWmF5H WLXlYcvm9djVgdFv4PsVdGkBWdVau7suE5dm/HScmbHTPcKem99HYxe9wRfX9Nig0d qUueOc06KXgTZrieQYcPC2MABY7D7G/j4yh9JJ8DAFyiUZ41u2CtTShyK50xcxDH7c XLgJh7L+FwfObsWFDZjROZBaU6wumpssuJXLF1xd+SZoM1NCLNWqmCUcusFmeH5zqC fQxnIuSKHasYzF8BkFj4pblt6v9wkenuKvNfVf63NBvcAV4MYsUsHBnyKn5M57DlE2 VL0Tzd4ViRQfQ== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id CC89585B08; Tue, 9 May 2023 16:33:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642793; bh=7CJaWEVk/gFgoyXnAy6oqoPgKMgVYKT7bx7uReCY9p0=; h=From:To:Cc:Subject:Date:From; b=sb0RbLZ1cOV5cRknjCPApDlM1T+FVmdvjpoXLOazoH9rGA6+N4u1msuh595e81HH3 OA108TsDdqcRGivBrC5YLOLetsCwRoUzmVRYV2pTb+9KeL83bZL5YkX12QXCZqwAY/ gwLj6DcWn3Wi5t1GrGrp43XWiy2zGVL/HY8ZA1X28YYT4K6X6XmTQSYiQZrfJdLJdB +lQj4XJGpPWBd0uErmg7HWpADAJQr9+1wwYiYjYa/pUoIcAD3aP6cXfpj4QLw50JHj D1sj/0FQdW3W96HWo97ueucOmj6HcNJeRLzoEeNBtweXcmczagOJSwJUHuqFUUAzgW 97XeggQ+POQZQ== From: Lukasz Majewski To: U-Boot Mailing List Cc: Stefano Babic , Peng Fan , Peng Fan , Fabio Estevam , "'NXP i . MX U-Boot Team'" , Marek Vasut , Lukasz Majewski Subject: [PATCH 1/5] arm: mxs: Provide Kconfig option to to not use VDD5V as IMX28 PMU source Date: Tue, 9 May 2023 16:32:39 +0200 Message-Id: <20230509143243.1523791-1-lukma@denx.de> X-Mailer: git-send-email 2.30.2 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.8 at phobos.denx.de X-Virus-Status: Clean This option sets the current limit for 5V source to zero, so all the PMU outputs are primarily powered from battery source (DCDC_BAT). This option may be set on systems, where the 5V is NOT supposed to be in any scenario powering the system - for example on systems where DCDC_BAT is connected to fixed and regulated 4.2V source (so the "battery" is not present). Signed-off-by: Lukasz Majewski --- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 4 ++++ arch/arm/mach-imx/mxs/Kconfig | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index c33170f06d..9965810ac2 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -752,6 +752,10 @@ static void mxs_batt_boot(void) POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK, 0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET); + if (CONFIG_IS_ENABLED(MXS_PMU_MINIMAL_VDD5V_CURRENT)) + setbits_le32(&power_regs->hw_power_5vctrl, + POWER_5VCTRL_ILIMIT_EQ_ZERO); + mxs_power_enable_4p2(); } diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig index b2026a3758..3232b0fb67 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -51,6 +51,14 @@ endchoice config SYS_SOC default "mxs" +config SPL_MXS_PMU_MINIMAL_VDD5V_CURRENT + bool "Force minimal current draw from VDD5V by MX28 PMU" + default n + help + After setting this option, the current drawn from VDD5V + by the PMU is reduced to zero - the DCDC_BATT is used as + the main power source for PMU. + source "board/freescale/mx28evk/Kconfig" source "board/liebherr/xea/Kconfig" From patchwork Tue May 9 14:32:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1778995 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=mWAjsXtW; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=n8jt+o/G; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QG0yV2JrDz20ff for ; Wed, 10 May 2023 00:33:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CA9285C77; Tue, 9 May 2023 16:33:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642796; bh=JBpC1QHvmKwhru/+nJzJvCPtziUQsdgdiV8Ve1cK//Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mWAjsXtW37dlklRVkDT8Jc8QWmKjfv6OHrmzGsizyZsfcCP4sqFcA2YcbESUgRx8k oT6/MshgVczWFEnVPf2h98SfocqNXJNmpg5Lb+Hbt/NQYD/A90Q7kKoESj5IV346Jz v75AGYtisTYe2i4m0/RnslxOOqOAwGKrKbkY4ARxAX5CmTDF69C65gnfp205/snzly I0IaoxVTegUgWgOllstc6GMTJ9e6KdXDxcl8zlrELVHIbCWfno99rsOp3vm1iZ3Jr+ a4TjLY4/AXmjfOErikWkhSmDPtQ3Ehctzwgkm/WwmyL8yawr8ieok4IMPusA5FyXF0 50g24STDRG0pQ== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 324D785B96; Tue, 9 May 2023 16:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642793; bh=JBpC1QHvmKwhru/+nJzJvCPtziUQsdgdiV8Ve1cK//Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n8jt+o/GiaGuDlVVt/kdbMjExUbJOrIaDiFgobKh3c8tbSxl5e/saMOdhpYaT3D8M cOH3HruqyKApV/Q2uUMxKCsTQTGBfA7qEZ4VeStzbsi4/CwPJcoHjb50l/CI8JPdAg 66oH5hwPng8LsfaO8PX7ieL0XdcxrSvoaU5ZnlhhP9gZtg+ClZOp0OMKMGQ88g9thI 3vh5wN0bRKd9F/ykQAZrQdmefVtankNDX8BbpjKUP8DE1H4Lv2QIYGZUbQFeVXExDt f4mP7YOLBwSQyAVPOJc9UO4i84DZaDAfHyonOwqie0euzqg2+IHhrd5QZy9m3H2rYV juzBK7dowdjlw== From: Lukasz Majewski To: U-Boot Mailing List Cc: Stefano Babic , Peng Fan , Peng Fan , Fabio Estevam , "'NXP i . MX U-Boot Team'" , Marek Vasut , Lukasz Majewski Subject: [PATCH 2/5] arm: mxs: Provide Kconfig option to disable battery charging at IMX28 PMU Date: Tue, 9 May 2023 16:32:40 +0200 Message-Id: <20230509143243.1523791-2-lukma@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230509143243.1523791-1-lukma@denx.de> References: <20230509143243.1523791-1-lukma@denx.de> 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.8 at phobos.denx.de X-Virus-Status: Clean This new Kconfig option allows disabling the in-PMU battery charging block. This may be required when DCDC_BAT source is powered not from battery, but from already regulated, good quality source. Signed-off-by: Lukasz Majewski --- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 7 +++++++ arch/arm/mach-imx/mxs/Kconfig | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 9965810ac2..7c584db27c 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -756,6 +756,13 @@ static void mxs_batt_boot(void) setbits_le32(&power_regs->hw_power_5vctrl, POWER_5VCTRL_ILIMIT_EQ_ZERO); + if (CONFIG_IS_ENABLED(MXS_PMU_DISABLE_BATT_CHARGE)) { + writel(POWER_CHARGE_PWD_BATTCHRG, + &power_regs->hw_power_charge_set); + writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK, + &power_regs->hw_power_5vctrl_set); + } + mxs_power_enable_4p2(); } diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig index 3232b0fb67..f5e45ae846 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -59,6 +59,10 @@ config SPL_MXS_PMU_MINIMAL_VDD5V_CURRENT by the PMU is reduced to zero - the DCDC_BATT is used as the main power source for PMU. +config SPL_MXS_PMU_DISABLE_BATT_CHARGE + bool "Disable Battery Charging in MX28 PMU" + default n + source "board/freescale/mx28evk/Kconfig" source "board/liebherr/xea/Kconfig" From patchwork Tue May 9 14:32:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1778996 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=Q0J+UAwU; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=PSViYJZ3; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QG0ym14RGz20ff for ; Wed, 10 May 2023 00:33:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 778A185CC6; Tue, 9 May 2023 16:33:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642797; bh=+byCCyHsEJxEkmzYPHgD3/JF05efOT3skxFt6fEQULQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Q0J+UAwUFI5gDtPdz9hZYD+ijNFGcq5a47cQFh5isPEE6J32NAjAqyVzVe8md7DoN tzv9pp5LNYNorW4fh0KQWdtOwVb7NNG4EYUeS3rCdELCwvIrtOAUbvp1N3ouOj8AkE OAFtOaGZZ3hUEpacvWa4AGpfkSwlqVmUDb7K7SjwBAAR/jAyoPV7lZ9uUSRFTs5bOK mD/+qtzsh7XgDNBreagJgo9RIHN1c3oB1B87dX5e1tqAvWEP+xu+Eckkyyb9O7yhxJ b1hDl3KXVFE7vXg/4vzCJpXU7QxFxu+SRZ828Ds3QmLGfUwMzsk98XxWic64OapcSN xFfkXmj4NLIjg== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 873CC85BBE; Tue, 9 May 2023 16:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642793; bh=+byCCyHsEJxEkmzYPHgD3/JF05efOT3skxFt6fEQULQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PSViYJZ39wg2UdpuvoS4ieizFH/U59RFtuEvd883m2v2IoY4ummJcquQ7S3fzU7KK yin6taYQZSqrvYBsSz2DWZn3VeAPxL6Af98n8PGGHwrG4cniflZzpOZ7TAHsZCjmJi 6HWlN1hS6WRotjPPoAJjuYvidRQ4rf1gZ3H8rPQdT2EYrKbbhQyTxnAkGpDNCURhqZ 6LhLRLcdBL7KuaOau8BfRTmYu+JpvPMKVwfNGbUtCYkmoT80fQLStCzB6GxhO5VJH+ XNwRnOgOK7y0BYCojrOLc42RydlUT/wW3p9VN+ZQ4g6Eb8HFBSgEvKxbdNWriM4Gw9 2DZ98MVcIegNg== From: Lukasz Majewski To: U-Boot Mailing List Cc: Stefano Babic , Peng Fan , Peng Fan , Fabio Estevam , "'NXP i . MX U-Boot Team'" , Marek Vasut , Lukasz Majewski Subject: [PATCH 3/5] arm: mxs: Provide Kconfig option to not enable 4P2 regulator in IMX28 PMU Date: Tue, 9 May 2023 16:32:41 +0200 Message-Id: <20230509143243.1523791-3-lukma@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230509143243.1523791-1-lukma@denx.de> References: <20230509143243.1523791-1-lukma@denx.de> 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.8 at phobos.denx.de X-Virus-Status: Clean The IMX28 PMU (Power Management Unit) has a dedicated Linear Regulator to produce (by default) 4.2V output - available outside the chip as VDD_4P2. When system is supposed to not use VDD5V as a main power source - instead the DCDC_BATT is used; it is safe to disable this regulator. As the in-PMU DCDC switching regulator (from which DCDC_VDDA, DCDC_VDDIO and DCDC_VDDD are generated) can be driven from DCDC_BATT or output of this 4P2 regulator - by disabling the latter the use of the DCDC_BATT is forced. To be more specific - according to NXP's AN4199 the DCDC_BATT source is preferred (over VDD5V), as more efficient and stable source for industrial applications. Signed-off-by: Lukasz Majewski --- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 3 ++- arch/arm/mach-imx/mxs/Kconfig | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 7c584db27c..24f61b4b56 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -763,7 +763,8 @@ static void mxs_batt_boot(void) &power_regs->hw_power_5vctrl_set); } - mxs_power_enable_4p2(); + if (CONFIG_IS_ENABLED(MXS_PMU_ENABLE_4P2_LINEAR_REGULATOR)) + mxs_power_enable_4p2(); } /** diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig index f5e45ae846..5cffc26103 100644 --- a/arch/arm/mach-imx/mxs/Kconfig +++ b/arch/arm/mach-imx/mxs/Kconfig @@ -63,6 +63,13 @@ config SPL_MXS_PMU_DISABLE_BATT_CHARGE bool "Disable Battery Charging in MX28 PMU" default n +config SPL_MXS_PMU_ENABLE_4P2_LINEAR_REGULATOR + bool "Enable the 4P2 linear regulator in MX28 PMU" + default y + help + This option enables the 4P2 linear regulator (derived + from VDD5V) - so the VDD4P2 power source is operational. + source "board/freescale/mx28evk/Kconfig" source "board/liebherr/xea/Kconfig" From patchwork Tue May 9 14:32:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1778997 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=AIHgebix; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=rmNlObb+; 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QG0z34zVMz20ff for ; Wed, 10 May 2023 00:34:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8DD3085CF8; Tue, 9 May 2023 16:33:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642798; bh=/LfpoMmuBozyVbMLaxn58DTpUPLvQo1QW317f893Z9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AIHgebixtBLeSqcFpDC9yrkT2i7YBCm1fHTUKTHkgwl1qltAAoCv3PW/ju+7GgtzS wdu4nIX3I/YLsI7fnI0nuVlx5nvOUy4PWIdb2+16IjgAro1mbgtNey9Ndnl2nKH8sa 5vUg9Ok+UuX6mIwZfuikoHudMjd2D0cv8YD9ww2XXjAQVfd4enAwSraekOo+XFLIDN M0V0u1yI+5gkjqhbRA4DkeAMVntPuI33OLRDhje6r3oKKsU4MAg+MUggA1rD6J4RZq n7ORRjGqVPPv7jlAFyJAfaONaexp3WBVIxWHcHCpJQsuFzdO5oFpwpG5/jo03+hCRa hViVMwSBpTCQA== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id E3525846EC; Tue, 9 May 2023 16:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642794; bh=/LfpoMmuBozyVbMLaxn58DTpUPLvQo1QW317f893Z9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rmNlObb+ppvNGC+oMIVEg1dj6nocTJpbkLBg6wkGy7jhUXZr6qgOREZdijgb7a40q gD+lzIx9AVb6raxVrx7LLr6FPysiTguBiPRjpzUWwXFUMFOGMpmrMybfwS71cOXpaJ hDDysu/z3MCUoA5FCggYmZcWmrxh23GnfNuaQ5gTo7a+UAvtrq6Yi6XE6dZOsjEdVr DEqYzeAMb+7DCFQ5K7i7d5l2G/sH2rsiAo0pIZP7d5cwJ1MQ1/Ya6V7NLh3tjheImS EUEz8rFnT3017Ix00XZZTYEc5oUy0kFvxCk0RbDpbg5l7R+qUVELYpfvmA/DT7cbOz RqtTiadWpL3Ag== From: Lukasz Majewski To: U-Boot Mailing List Cc: Stefano Babic , Peng Fan , Peng Fan , Fabio Estevam , "'NXP i . MX U-Boot Team'" , Marek Vasut , Lukasz Majewski Subject: [PATCH 4/5] arm: mxs: Add function to dump PMU registers Date: Tue, 9 May 2023 16:32:42 +0200 Message-Id: <20230509143243.1523791-4-lukma@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230509143243.1523791-1-lukma@denx.de> References: <20230509143243.1523791-1-lukma@denx.de> 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.8 at phobos.denx.de X-Virus-Status: Clean This commit provides function, which when debugging output is enabled dumps the IMX28 PMU registers. Signed-off-by: Lukasz Majewski --- arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 24f61b4b56..7ea029e371 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -41,6 +41,29 @@ static void mxs_power_clock2xtal(void) &clkctrl_regs->hw_clkctrl_clkseq_set); } +static void mxs_power_regs_dump(void) +{ + struct mxs_power_regs *power_regs = + (struct mxs_power_regs *)MXS_POWER_BASE; + + debug("ctrl:\t\t 0x%x\n", readl(&power_regs->hw_power_ctrl)); + debug("5vctrl:\t\t 0x%x\n", readl(&power_regs->hw_power_5vctrl)); + debug("minpwr:\t\t 0x%x\n", readl(&power_regs->hw_power_minpwr)); + debug("charge:\t\t 0x%x\n", readl(&power_regs->hw_power_charge)); + debug("vddctrl:\t 0x%x\n", readl(&power_regs->hw_power_vdddctrl)); + debug("vddactrl:\t 0x%x\n", readl(&power_regs->hw_power_vddactrl)); + debug("vddioctrl:\t 0x%x\n", readl(&power_regs->hw_power_vddioctrl)); + debug("vddmemctrl:\t 0x%x\n", readl(&power_regs->hw_power_vddmemctrl)); + debug("dcdc4p2:\t 0x%x\n", readl(&power_regs->hw_power_dcdc4p2)); + debug("misc:\t\t 0x%x\n", readl(&power_regs->hw_power_misc)); + debug("dclimits:\t 0x%x\n", readl(&power_regs->hw_power_dclimits)); + debug("loopctrl:\t 0x%x\n", readl(&power_regs->hw_power_loopctrl)); + debug("sts:\t\t 0x%x\n", readl(&power_regs->hw_power_sts)); + debug("speed:\t\t 0x%x\n", readl(&power_regs->hw_power_speed)); + debug("battmonitor:\t 0x%x\n", + readl(&power_regs->hw_power_battmonitor)); +} + /** * mxs_power_clock2pll() - Switch CPU core clock source to PLL * @@ -1280,6 +1303,7 @@ void mxs_power_init(void) POWER_CTRL_DCDC4P2_BO_IRQ, &power_regs->hw_power_ctrl_clr); writel(POWER_5VCTRL_PWDN_5VBRNOUT, &power_regs->hw_power_5vctrl_set); + mxs_power_regs_dump(); early_delay(1000); } From patchwork Tue May 9 14:32:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1778998 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=klntIh5d; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=QOq5gQq7; 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QG0zL41wrz20ff for ; Wed, 10 May 2023 00:34:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEF4585D68; Tue, 9 May 2023 16:33:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642799; bh=jKo7AjtKvBSW5AHdZw15aZD1vLE+j8OPZp/lLit67A8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=klntIh5dDURnlCgKdJlVaP7fewNto/UyXLhAEM38OpWGWXn/4yJB6aX3AZKC7Sd1t TjBVAkUSKRd6XhG0DL8s52R1IF01FaYe9rdFRatkviqEffg7z97CrxCkWk2fvvk+az Q54xga+4T6C5NxMGBXfngDgJBWaqbHiIRwdGWBJsGDwcGHMtkGE5BeLgoxks4xbAx+ ONEL3cZhaLqt6Kv9wGyzxhJG642Ns6UrPK00UH3QemmICfA7VD7/u7xjI5aB3qMcEF 96lp89HESss2qKQWQ/QF2p0s5AC9eASsClEKqDYsFVGuqPl6YNgSw58CvHIRyxl4IH F2kjSbU0vly2A== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4337084765; Tue, 9 May 2023 16:33:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683642794; bh=jKo7AjtKvBSW5AHdZw15aZD1vLE+j8OPZp/lLit67A8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QOq5gQq7XQDRMCn+84VR9C2F9XqjsKvUlq5qx7TkrT7NUI9yTPAsd7Tz/k8Ttokhr E3ciDq3f/um4BWffSb6QFN8g5oW0M06/0VxXOcrnIC5+PYC8QCknfZh5H77IcedoUo h/q6/oLmOE5d5B+9W/dCO8RK+yXP1neqr2dxQw62a6KRTbUI0d2GmKnj06gQ8+5KVO +y9Ja1T8u8Dpk0AJoA8y29H9OkctVCz6R/0QU1OYCOOxE1DwRg28cuVw4SmxValpAx vC2+RQChmwQaFvxtkvNQiIL6Axr5wJaYs4/6VXUDFL3KkshcTQOEzbPIdT3+WWtwlc lE8ORwDuqjHkQ== From: Lukasz Majewski To: U-Boot Mailing List Cc: Stefano Babic , Peng Fan , Peng Fan , Fabio Estevam , "'NXP i . MX U-Boot Team'" , Marek Vasut , Lukasz Majewski Subject: [PATCH 5/5] arm: config: Adjust imx287 based XEA board PMU configuration Date: Tue, 9 May 2023 16:32:43 +0200 Message-Id: <20230509143243.1523791-5-lukma@denx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230509143243.1523791-1-lukma@denx.de> References: <20230509143243.1523791-1-lukma@denx.de> 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.8 at phobos.denx.de X-Virus-Status: Clean This patch adjusts XEA's PMU setup as this board is supposed to be mainly powered from DCDC_BATT source. Moreover, in this HW design the VDD_4P2 is not used as well. Signed-off-by: Lukasz Majewski --- configs/imx28_xea_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/imx28_xea_defconfig b/configs/imx28_xea_defconfig index 579545f4ed..3d92a06999 100644 --- a/configs/imx28_xea_defconfig +++ b/configs/imx28_xea_defconfig @@ -13,6 +13,9 @@ CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="imx28-xea" CONFIG_SPL_TEXT_BASE=0x1000 CONFIG_TARGET_XEA=y +CONFIG_SPL_MXS_PMU_MINIMAL_VDD5V_CURRENT=y +CONFIG_SPL_MXS_PMU_DISABLE_BATT_CHARGE=y +# CONFIG_SPL_MXS_PMU_ENABLE_4P2_LINEAR_REGULATOR is not set CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_SPL_STACK=0x20000