From patchwork Tue Nov 26 08:35:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1200842 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=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47Mcqm5RkSz9sR5 for ; Tue, 26 Nov 2019 19:43:16 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5FB44C21FC9; Tue, 26 Nov 2019 08:39:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5D22CC21FB9; Tue, 26 Nov 2019 08:39:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4C63AC21FC2; Tue, 26 Nov 2019 08:35:40 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 84E69C21FA4 for ; Tue, 26 Nov 2019 08:35:40 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 47Mcg02gQCz1qqkQ; Tue, 26 Nov 2019 09:35:40 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 47Mcg02HbLz1qt2v; Tue, 26 Nov 2019 09:35:40 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id oTUkvr1Alz76; Tue, 26 Nov 2019 09:35:37 +0100 (CET) X-Auth-Info: 7IaKLmskR0FNJluCbAeWY6FhdbxT7YBTJrkfOd8eXiA= Received: from chi.lan (unknown [62.91.23.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 26 Nov 2019 09:35:37 +0100 (CET) From: Marek Vasut To: u-boot@lists.denx.de Date: Tue, 26 Nov 2019 09:35:32 +0100 Message-Id: <20191126083532.4674-1-marex@denx.de> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Cc: Marek Vasut , Eric Nelson , Fabio Estevam Subject: [U-Boot] [PATCH] ARM: mx6: pmu: Expose PMU LDO configuration interface X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" Make the PMU LDO configuration interface available to board code, so that board code can reconfigure the internal LDOs of the SoC. Signed-off-by: Marek Vasut Cc: Eric Nelson Cc: Fabio Estevam Cc: Stefano Babic Reviewed-by: Eric Nelson --- arch/arm/include/asm/arch-mx6/sys_proto.h | 8 ++++++++ arch/arm/mach-imx/mx6/soc.c | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index 4bf7dff8b4..1e5fa1a75e 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -20,6 +20,14 @@ int imx6_pcie_toggle_power(void); int imx6_pcie_toggle_reset(void); +enum ldo_reg { + LDO_ARM, + LDO_SOC, + LDO_PU, +}; + +int set_ldo_voltage(enum ldo_reg ldo, u32 mv); + /** * iomuxc_set_rgmii_io_voltage - set voltage level of RGMII/USB pins * diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c index 6dccee484c..3560dd7ee7 100644 --- a/arch/arm/mach-imx/mx6/soc.c +++ b/arch/arm/mach-imx/mx6/soc.c @@ -23,12 +23,6 @@ #include #include -enum ldo_reg { - LDO_ARM, - LDO_SOC, - LDO_PU, -}; - struct scu_regs { u32 ctrl; u32 config; @@ -254,7 +248,7 @@ static void clear_ldo_ramp(void) * Possible values are from 0.725V to 1.450V in steps of * 0.025V (25mV). */ -static int set_ldo_voltage(enum ldo_reg ldo, u32 mv) +int set_ldo_voltage(enum ldo_reg ldo, u32 mv) { struct anatop_regs *anatop = (struct anatop_regs *)ANATOP_BASE_ADDR; u32 val, step, old, reg = readl(&anatop->reg_core);