From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49AEEC4338F for ; Sun, 8 Aug 2021 18:24:48 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81904600CD for ; Sun, 8 Aug 2021 18:24:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 81904600CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A512183280; Sun, 8 Aug 2021 20:22:17 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="TTLGgWKZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8AE5982DA1; Sun, 8 Aug 2021 20:21:44 +0200 (CEST) Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (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 3D47A82D9A for ; Sun, 8 Aug 2021 20:21:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22f.google.com with SMTP id r5so9864142oiw.7 for ; Sun, 08 Aug 2021 11:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BewucgVdOV4KhurqRvVPHVVjF56LW2CrR+P6lM+1QSk=; b=TTLGgWKZy3dVSpps7WUhOpVP14guugZ9LWcb04YeKrkzYnQAWaEyZUVN/0FNCqppqP 6rH21kti9qFCXl8SJ90swZv7LdT3RUOodkNIP0RpVj+k93J/SMiWuq2bFUA/Wf5Jr/aQ pOoeW+f47GawRd0ZsOGPEususY8T9idjrRtfw= 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:mime-version:content-transfer-encoding; bh=BewucgVdOV4KhurqRvVPHVVjF56LW2CrR+P6lM+1QSk=; b=gZt+zQtuAJUuGTJJRwV5490AKq8PyxAxDhJP8JM4jPPF/+vEkxBPPwXhdOBZNzstWX 0dgsTwrB8mJjvO1ZmRl9ZeUvzG9OtHeptkQY3aw3jf2uBUxFKJPM8GqG5VfDQGt86dco WfJo/G6LjHuS9TLrrjBeAYkK9VSTIXKGlobViNI0Vm6y/5PGdBFB/SmIgVSzUzTCkcAV Bq2nyAr0BZ6uhNuxtJUN3xsqw/dmEC3JrrMkclVGrCueJh2i0cAsQwwMw281yFqKyJzT JuwNDTZVnzennAfIXIIkxSdMze2K3XHvXhPeZbZ+nAMyd7/z2mi31fOHpLcUADV4hFLu /lIg== X-Gm-Message-State: AOAM530BsflzCascWtMEfMARoyOSMHLySAasCDvDGMMsOpY/6EGW4cfG J23AVfldOzeTzfmbMnQXgYP6mJkYq1idp0gr X-Google-Smtp-Source: ABdhPJyy/TalBqdzeTFr5roq1ZM+RvrjNssSRSuEtf9CQa6LtG2GeZzaHr8wlOERRAsV3mXBfQTi+Q== X-Received: by 2002:a05:6808:18a9:: with SMTP id bi41mr4625812oib.76.1628446859401; Sun, 08 Aug 2021 11:20:59 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id bc42sm2257147oob.39.2021.08.08.11.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Aug 2021 11:20:59 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heiko Schocher Subject: [PATCH 19/23] i2c: Convert CONFIG_POWER_I2C et al to Kconfig Date: Sun, 8 Aug 2021 12:20:27 -0600 Message-Id: <20210808182031.3747270-20-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210808182031.3747270-1-sjg@chromium.org> References: <20210808182031.3747270-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean This converts the following to Kconfig: CONFIG_POWER_I2C CONFIG_POWER_LEGACY They are handled at the same time due to a dependency between them. Update the Makefile rule to use legacy power only in U-Boot proper. Unfortunately a separate rule is needed in SPL to be able to build legacy power. All of this can be cleaned up when boards are migrated or removed. Signed-off-by: Simon Glass --- configs/cl-som-imx7_defconfig | 2 + configs/cm_t43_defconfig | 2 + configs/gwventana_emmc_defconfig | 2 + configs/gwventana_gw5904_defconfig | 2 + configs/gwventana_nand_defconfig | 2 + configs/hikey_defconfig | 1 + configs/imx8mp_evk_defconfig | 2 + configs/imx8mq_evk_defconfig | 2 + configs/ls1046ardb_emmc_defconfig | 2 + configs/ls1046ardb_qspi_SECURE_BOOT_defconfig | 2 + configs/ls1046ardb_qspi_defconfig | 2 + configs/ls1046ardb_qspi_spl_defconfig | 2 + .../ls1046ardb_sdcard_SECURE_BOOT_defconfig | 2 + configs/ls1046ardb_sdcard_defconfig | 2 + configs/ls1046ardb_tfa_SECURE_BOOT_defconfig | 2 + configs/ls1046ardb_tfa_defconfig | 2 + configs/mx51evk_defconfig | 1 + configs/mx53loco_defconfig | 2 + configs/mx6sabreauto_defconfig | 2 + configs/mx6sabresd_defconfig | 2 + configs/novena_defconfig | 2 + configs/phycore-imx8mp_defconfig | 2 + configs/pico-dwarf-imx7d_defconfig | 2 + configs/pico-hobbit-imx7d_defconfig | 2 + configs/pico-imx7d_bl33_defconfig | 2 + configs/pico-imx7d_defconfig | 2 + configs/pico-nymph-imx7d_defconfig | 2 + configs/pico-pi-imx7d_defconfig | 2 + configs/udoo_neo_defconfig | 2 + configs/vining_2000_defconfig | 2 + configs/warp_defconfig | 2 + drivers/power/Kconfig | 39 +++++++++++++++++++ drivers/power/Makefile | 2 +- include/configs/am43xx_evm.h | 4 -- include/configs/cl-som-imx7.h | 2 - include/configs/cm_t43.h | 2 - include/configs/el6x_common.h | 2 - include/configs/gw_ventana.h | 2 - include/configs/hikey.h | 1 - include/configs/imx8mp_evk.h | 2 - include/configs/imx8mq_evk.h | 2 - include/configs/imx8mq_phanbell.h | 3 -- include/configs/ls1046ardb.h | 4 -- include/configs/mx51evk.h | 1 - include/configs/mx53loco.h | 2 - include/configs/mx6sabreauto.h | 2 - include/configs/mx6sabresd.h | 2 - include/configs/novena.h | 2 - include/configs/phycore_imx8mp.h | 2 - include/configs/pico-imx7d.h | 2 - include/configs/pico-imx8mq.h | 3 -- include/configs/tqma6.h | 2 - include/configs/udoo_neo.h | 2 - include/configs/vining_2000.h | 2 - include/configs/warp.h | 2 - scripts/config_whitelist.txt | 2 - 56 files changed, 100 insertions(+), 51 deletions(-) diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig index a65dd4993a7..64cc4e5061c 100644 --- a/configs/cl-som-imx7_defconfig +++ b/configs/cl-som-imx7_defconfig @@ -77,7 +77,9 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHYLIB=y CONFIG_PHY_ATHEROS=y CONFIG_MII=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig index 682c07fad02..0563886d64e 100644 --- a/configs/cm_t43_defconfig +++ b/configs/cm_t43_defconfig @@ -77,6 +77,8 @@ CONFIG_SPI_FLASH_WINBOND=y CONFIG_PHY_ATHEROS=y CONFIG_MII=y CONFIG_DRIVER_TI_CPSW=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_DM_SERIAL=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig index 7679fbd6ac4..a9d6383cd95 100644 --- a/configs/gwventana_emmc_defconfig +++ b/configs/gwventana_emmc_defconfig @@ -93,8 +93,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig index 36de1007598..4ec707bc06e 100644 --- a/configs/gwventana_gw5904_defconfig +++ b/configs/gwventana_gw5904_defconfig @@ -97,8 +97,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig index 2515eb5d834..8fb05f34b87 100644 --- a/configs/gwventana_nand_defconfig +++ b/configs/gwventana_nand_defconfig @@ -99,8 +99,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=2 CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig index 0ec1ed78a0b..31cf83704a5 100644 --- a/configs/hikey_defconfig +++ b/configs/hikey_defconfig @@ -24,6 +24,7 @@ CONFIG_SYS_MMC_ENV_PART=2 CONFIG_MMC_DW=y CONFIG_MMC_DW_K3=y CONFIG_DM_ETH=y +CONFIG_POWER_LEGACY=y CONFIG_CONS_INDEX=4 CONFIG_USB=y CONFIG_USB_DWC2=y diff --git a/configs/imx8mp_evk_defconfig b/configs/imx8mp_evk_defconfig index d63a3a4f32f..11f9cb28f55 100644 --- a/configs/imx8mp_evk_defconfig +++ b/configs/imx8mp_evk_defconfig @@ -80,9 +80,11 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig index 6a8e105dbd4..c62d335b00c 100644 --- a/configs/imx8mq_evk_defconfig +++ b/configs/imx8mq_evk_defconfig @@ -48,11 +48,13 @@ CONFIG_PHY=y CONFIG_PHY_IMX8MQ_USB=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_LEGACY=y CONFIG_POWER_DOMAIN=y CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_POWER_I2C=y CONFIG_DM_RESET=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig index 614597ef824..9a7a82d1b22 100644 --- a/configs/ls1046ardb_emmc_defconfig +++ b/configs/ls1046ardb_emmc_defconfig @@ -70,6 +70,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig index edb20e7e9f8..88ae9cc077c 100644 --- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig @@ -52,6 +52,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig index 087c17bb613..b8f1e284175 100644 --- a/configs/ls1046ardb_qspi_defconfig +++ b/configs/ls1046ardb_qspi_defconfig @@ -56,6 +56,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_qspi_spl_defconfig b/configs/ls1046ardb_qspi_spl_defconfig index 8ef17ab9e0a..3dc4675f4f3 100644 --- a/configs/ls1046ardb_qspi_spl_defconfig +++ b/configs/ls1046ardb_qspi_spl_defconfig @@ -74,6 +74,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig index efc58918306..abe1f7d15e7 100644 --- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig @@ -69,6 +69,8 @@ CONFIG_FMAN_ENET=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y CONFIG_SYS_NS16550=y CONFIG_SPI=y diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig index faa93e8e38d..11cd51056eb 100644 --- a/configs/ls1046ardb_sdcard_defconfig +++ b/configs/ls1046ardb_sdcard_defconfig @@ -69,6 +69,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y diff --git a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig index bc37699c0a6..8a2b241cd0e 100644 --- a/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_tfa_SECURE_BOOT_defconfig @@ -52,6 +52,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y CONFIG_SPI=y diff --git a/configs/ls1046ardb_tfa_defconfig b/configs/ls1046ardb_tfa_defconfig index 997fa1936e7..2bdeec5c614 100644 --- a/configs/ls1046ardb_tfa_defconfig +++ b/configs/ls1046ardb_tfa_defconfig @@ -58,6 +58,8 @@ CONFIG_NVME=y CONFIG_PCI=y CONFIG_PCIE_LAYERSCAPE_RC=y CONFIG_PCIE_LAYERSCAPE_EP=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_DM_SCSI=y CONFIG_SYS_NS16550=y CONFIG_SPI=y diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig index 6c8b9b62e51..120133c7991 100644 --- a/configs/mx51evk_defconfig +++ b/configs/mx51evk_defconfig @@ -41,6 +41,7 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig index 296886dd6c8..27dc959edbb 100644 --- a/configs/mx53loco_defconfig +++ b/configs/mx53loco_defconfig @@ -42,9 +42,11 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX5=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_USB_EHCI_MX5=y diff --git a/configs/mx6sabreauto_defconfig b/configs/mx6sabreauto_defconfig index 445911336f9..a498770b9c3 100644 --- a/configs/mx6sabreauto_defconfig +++ b/configs/mx6sabreauto_defconfig @@ -84,7 +84,9 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig index 0ce5d93ce8b..e34b5956c6f 100644 --- a/configs/mx6sabresd_defconfig +++ b/configs/mx6sabresd_defconfig @@ -93,8 +93,10 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/novena_defconfig b/configs/novena_defconfig index ac978d827bc..e5902574313 100644 --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@ -62,6 +62,8 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_DM_THERMAL=y CONFIG_IMX_THERMAL=y diff --git a/configs/phycore-imx8mp_defconfig b/configs/phycore-imx8mp_defconfig index 059a81835fe..4b0e682cac3 100644 --- a/configs/phycore-imx8mp_defconfig +++ b/configs/phycore-imx8mp_defconfig @@ -91,9 +91,11 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_LEGACY=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig index 05ae3c8fa11..79b1184ce46 100644 --- a/configs/pico-dwarf-imx7d_defconfig +++ b/configs/pico-dwarf-imx7d_defconfig @@ -65,6 +65,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index aec03ace07b..43983e60814 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -65,6 +65,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig index d9a78efc452..d6108246ebf 100644 --- a/configs/pico-imx7d_bl33_defconfig +++ b/configs/pico-imx7d_bl33_defconfig @@ -59,6 +59,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_CONS_INDEX=4 CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index 212f852dbee..dd1872d15f1 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -65,6 +65,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig index 05ae3c8fa11..79b1184ce46 100644 --- a/configs/pico-nymph-imx7d_defconfig +++ b/configs/pico-nymph-imx7d_defconfig @@ -65,6 +65,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 36f75fe7876..0294e4b0589 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -65,6 +65,8 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX7=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y CONFIG_USB=y diff --git a/configs/udoo_neo_defconfig b/configs/udoo_neo_defconfig index 0f10b865a1c..ae691588f8e 100644 --- a/configs/udoo_neo_defconfig +++ b/configs/udoo_neo_defconfig @@ -46,5 +46,7 @@ CONFIG_RGMII=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_IMX_THERMAL=y diff --git a/configs/vining_2000_defconfig b/configs/vining_2000_defconfig index 639196b5d45..a447094f11c 100644 --- a/configs/vining_2000_defconfig +++ b/configs/vining_2000_defconfig @@ -73,6 +73,8 @@ CONFIG_MII=y CONFIG_PCI=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_PWM_IMX=y CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y diff --git a/configs/warp_defconfig b/configs/warp_defconfig index dce2170354b..5730f113d08 100644 --- a/configs/warp_defconfig +++ b/configs/warp_defconfig @@ -34,6 +34,8 @@ CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1000000 CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y +CONFIG_POWER_LEGACY=y +CONFIG_POWER_I2C=y CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_WATCHDOG_TIMEOUT_MSECS=30000 diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index c5fbf1f832a..73ba145ba83 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -1,5 +1,34 @@ menu "Power" +config POWER_LEGACY + bool "Legacy power support" + help + Note: This is a legacy option. Use DM_PMIC instead. + + Enable support for power control in U-Boot. This includes support + for PMICs (Power-management Integrated Circuits) and some of the + features provided by PMICs. In particular, voltage regulators can + be used to enable/disable power and vary its voltage. That can be + useful in U-Boot to turn on boot peripherals and adjust CPU voltage + so that the clock speed can be increased. This enables the drivers + in drivers/power, drivers/power/pmic and drivers/power/regulator + as part of a build. + +config SPL_POWER_LEGACY + bool "Legacy power support in SPL" + default y if POWER_LEGACY + help + Note: This is a legacy option. Use SPL_DM_PMIC instead. + + Enable support for power control in SPL. This includes support + for PMICs (Power-management Integrated Circuits) and some of the + features provided by PMICs. In particular, voltage regulators can + be used to enable/disable power and vary its voltage. That can be + useful in SPL to turn on boot peripherals and adjust CPU voltage + so that the clock speed can be increased. This enables the drivers + in drivers/power, drivers/power/pmic and drivers/power/regulator + as part of a build. + source "drivers/power/acpi_pmc/Kconfig" source "drivers/power/domain/Kconfig" @@ -297,6 +326,7 @@ config AXP_DLDO4_VOLT default 0 ---help--- Set the voltage (mV) to program the axp pmic dldo4 at, set to 0 to + disable dldo4. config AXP_ELDO1_VOLT @@ -385,4 +415,13 @@ config POWER_MT6323 This adds poweroff driver for mt6323 this pmic is used on mt7623 / Bananapi R2 +config POWER_I2C + bool "I2C-based power control for legacy power" + help + Enable this to use the I2C driver designed for the legacy PMIC + interface. + + Not to be used for new designs and existing ones should be moved to + the new PMIC interface based on driver model. + endmenu diff --git a/drivers/power/Makefile b/drivers/power/Makefile index ab52bc1582c..09fe2a958d0 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -16,7 +16,7 @@ obj-$(CONFIG_TPS6586X_POWER) += tps6586x.o obj-$(CONFIG_TWL4030_POWER) += twl4030.o obj-$(CONFIG_TWL6030_POWER) += twl6030.o obj-$(CONFIG_PALMAS_POWER) += palmas.o -obj-$(CONFIG_POWER_LEGACY) += power_core.o +obj-$(CONFIG_$(SPL_TPL_)POWER_LEGACY) += power_core.o obj-$(CONFIG_DIALOG_POWER) += power_dialog.o obj-$(CONFIG_POWER_FSL) += power_fsl.o obj-$(CONFIG_POWER_I2C) += power_i2c.o diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index febcbf8cf93..15c9a81c3aa 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -26,10 +26,6 @@ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Power */ -#if !CONFIG_IS_ENABLED(DM_I2C) -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C -#endif #define CONFIG_POWER_TPS65218 #define CONFIG_POWER_TPS62362 diff --git a/include/configs/cl-som-imx7.h b/include/configs/cl-som-imx7.h index 652cc2fcfe7..144b4f1b961 100644 --- a/include/configs/cl-som-imx7.h +++ b/include/configs/cl-som-imx7.h @@ -25,8 +25,6 @@ #define IMX_FEC_BASE ENET_IPS_BASE_ADDR /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h index 7b3ff77e1f6..4111219acdb 100644 --- a/include/configs/cm_t43.h +++ b/include/configs/cm_t43.h @@ -50,8 +50,6 @@ #define CONFIG_AM437X_USB2PHY2_HOST /* Power */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_TPS65218 /* Enabling L2 Cache */ diff --git a/include/configs/el6x_common.h b/include/configs/el6x_common.h index 505bff5df72..2e1a36f2ff7 100644 --- a/include/configs/el6x_common.h +++ b/include/configs/el6x_common.h @@ -34,8 +34,6 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h index 8e42388692b..dce93c3883b 100644 --- a/include/configs/gw_ventana.h +++ b/include/configs/gw_ventana.h @@ -74,8 +74,6 @@ /* * PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 #define CONFIG_POWER_LTC3676 diff --git a/include/configs/hikey.h b/include/configs/hikey.h index fdb39a4d3aa..b842e5c3eae 100644 --- a/include/configs/hikey.h +++ b/include/configs/hikey.h @@ -13,7 +13,6 @@ #include -#define CONFIG_POWER_LEGACY #define CONFIG_POWER_HI6553 #define CONFIG_REMAKE_ELF diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h index 30b328a6be6..389322df094 100644 --- a/include/configs/imx8mp_evk.h +++ b/include/configs/imx8mp_evk.h @@ -32,8 +32,6 @@ #undef CONFIG_DM_MMC #undef CONFIG_DM_PMIC_PFUZE100 -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PCA9450 #define CONFIG_SYS_I2C_LEGACY diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index 758c9ce7f5c..c5f55ac5cc0 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -50,8 +50,6 @@ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 #endif diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h index 87e430463cd..add3c23790a 100644 --- a/include/configs/imx8mq_phanbell.h +++ b/include/configs/imx8mq_phanbell.h @@ -46,9 +46,6 @@ #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #endif #define CONFIG_REMAKE_ELF diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h index 1b0cf6de895..e6d97d2a156 100644 --- a/include/configs/ls1046ardb.h +++ b/include/configs/ls1046ardb.h @@ -145,10 +145,6 @@ #define I2C_RETIMER_ADDR 0x18 /* PMIC */ -#define CONFIG_POWER_LEGACY -#ifdef CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C -#endif /* * Environment diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index f6749568523..a599653969d 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -35,7 +35,6 @@ #define CONFIG_MXC_UART_BASE UART1_BASE /* PMIC Controller */ -#define CONFIG_POWER_LEGACY #define CONFIG_POWER_SPI #define CONFIG_POWER_FSL #define CONFIG_FSL_PMIC_BUS 0 diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index a1a7c944a73..24c756261be 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -43,8 +43,6 @@ #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ /* PMIC Controller */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_DIALOG_POWER #define CONFIG_POWER_FSL #define CONFIG_POWER_FSL_MC13892 diff --git a/include/configs/mx6sabreauto.h b/include/configs/mx6sabreauto.h index 905f434ab13..28a6b1dfd4c 100644 --- a/include/configs/mx6sabreauto.h +++ b/include/configs/mx6sabreauto.h @@ -67,8 +67,6 @@ /* DMA stuff, needed for GPMI/MXS NAND support */ /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h index 62ddd98bf38..58250049df0 100644 --- a/include/configs/mx6sabresd.h +++ b/include/configs/mx6sabresd.h @@ -46,8 +46,6 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/novena.h b/include/configs/novena.h index b2679e9f57d..b976dae1785 100644 --- a/include/configs/novena.h +++ b/include/configs/novena.h @@ -80,8 +80,6 @@ #endif /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h index 2821b9a1815..215821114ca 100644 --- a/include/configs/phycore_imx8mp.h +++ b/include/configs/phycore_imx8mp.h @@ -29,8 +29,6 @@ #define CONFIG_SPL_ABORT_ON_RAW_IMAGE -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PCA9450 #define CONFIG_SYS_I2C_LEGACY diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index 73fa6fb1e79..c4a0ba0524b 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -135,8 +135,6 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h index f43d5c6cfc9..16181119e83 100644 --- a/include/configs/pico-imx8mq.h +++ b/include/configs/pico-imx8mq.h @@ -45,9 +45,6 @@ #define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */ #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG - -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #endif #define CONFIG_REMAKE_ELF diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 31e1375a6b5..4985cc50538 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -45,8 +45,6 @@ #define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20 #if !defined(CONFIG_DM_PMIC) -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 #define TQMA6_PFUZE100_I2C_BUS 2 diff --git a/include/configs/udoo_neo.h b/include/configs/udoo_neo.h index 4d9c25b073b..409b2ecb6ea 100644 --- a/include/configs/udoo_neo.h +++ b/include/configs/udoo_neo.h @@ -77,8 +77,6 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE3000 #define CONFIG_POWER_PFUZE3000_I2C_ADDR 0x08 #define PFUZE3000_I2C_BUS 0 diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h index c4826f4f8e1..b6b0a989244 100644 --- a/include/configs/vining_2000.h +++ b/include/configs/vining_2000.h @@ -50,8 +50,6 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08 diff --git a/include/configs/warp.h b/include/configs/warp.h index 172ff44a534..96d2efb88ca 100644 --- a/include/configs/warp.h +++ b/include/configs/warp.h @@ -60,8 +60,6 @@ #define CONFIG_SYS_I2C_SPEED 100000 /* PMIC */ -#define CONFIG_POWER_LEGACY -#define CONFIG_POWER_I2C #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 28fc98ee845..3ad282dbe42 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1143,8 +1143,6 @@ CONFIG_POST_WATCHDOG CONFIG_POWER_FSL CONFIG_POWER_FSL_MC13892 CONFIG_POWER_HI6553 -CONFIG_POWER_I2C -CONFIG_POWER_LEGACY CONFIG_POWER_LTC3676 CONFIG_POWER_LTC3676_I2C_ADDR CONFIG_POWER_MAX77696_I2C_ADDR -- 2.32.0.605.g8dce9f2422-goog