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 E736CC4338F for ; Sun, 8 Aug 2021 18:24:05 +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 14B9160EBB for ; Sun, 8 Aug 2021 18:24:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 14B9160EBB 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 5C5A88323E; Sun, 8 Aug 2021 20:22:04 +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="BUzWM6PZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 80F9283217; Sun, 8 Aug 2021 20:21:38 +0200 (CEST) Received: from mail-ot1-x333.google.com (mail-ot1-x333.google.com [IPv6:2607:f8b0:4864:20::333]) (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 5678082DAD for ; Sun, 8 Aug 2021 20:21:02 +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-ot1-x333.google.com with SMTP id h63-20020a9d14450000b02904ce97efee36so15364140oth.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=OZxfU6obz0ljk1kwXQC11cN6k5Px5eHOsU7JBbICG0M=; b=BUzWM6PZ9iTIR4sgWrd9edI8nH498O2MG98LGwB5f9AdqswzDKuBThEuARYZPglkkj 8GUB735FQHTQtxtAIRAAvOi039O7K2OhsA9US+/xB+0BxatdKQimTuBHUChCuQkdymxl uGnw1hLy5aMKLZzA79ZtR8mrh3ln0P0mlR3KI= 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=OZxfU6obz0ljk1kwXQC11cN6k5Px5eHOsU7JBbICG0M=; b=L9+p9/aXQYS5rjClLfk81hHa6QC5y1KdZHXHxXum0EomFM/8mglF88otyrl9oZ8H/0 6fN2UX9chxVx15+HD0V5mJlaZBWPyuIVg/GBGsZbJr2j6n+rUPbzsvbuwYXNEYsbX/Xj ZYu06ZDQwMUBw+gcYKDP8vMZvfTRa6a2C2sbXpV1Znrip0LZ0OR/4h3UcSd/btKoAzoS zn52uLHnqyW9jvzNSKla9B0mAukKaGJbl2RCyq+RkN7CnZwqzY4rtP5sRRSg6Y0oZBLy iXZQKvuOKRyLxlROkE1KSRGKD7lsMTg0bEO5pXvg8d/DuKggGRdvMgej6YW4H5A9wbG+ fHlQ== X-Gm-Message-State: AOAM532mhuRTE33pBux2uNUoOKarJd6dAYqJi6teovubON//a5po5QuI xXp8//Bygb/3ZViajChnuNzOsLvrlPORWTUZ X-Google-Smtp-Source: ABdhPJzg8WW4XnZ1WONP2Z0YNyERy7XpjtG7BtubokYeQEsNwDbCXCUx1AoeKykGBHbLyW5Wy8kZPg== X-Received: by 2002:a05:6830:2469:: with SMTP id x41mr4454505otr.255.1628446860433; Sun, 08 Aug 2021 11:21:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Aug 2021 11:21:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Lukasz Majewski Subject: [PATCH 20/23] power: Add a POWER config Date: Sun, 8 Aug 2021 12:20:28 -0600 Message-Id: <20210808182031.3747270-21-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 At present we have SPL_POWER but not piain POWER. This works because there is a special build rule in Makefile that always includes the drivers/power directory. It is better to have all driver directories included by drivers/Makefile and there is already a rule in there for this purpose. It just needs a Kconfig for U-Boot proper, so add one. Update the pmic.h header file so that it defines the old pmic struct always, when driver model is not in use. That will avoid build errors for boards which enable POWER but not DM_PMIC. Enable this option always. That seems strange at first sight, but it actually but mimics the current Makefile behaviour. Once we can drop the old PMICs it should be easy enough to rename DM_PMIC to POWWER, or something similar. Signed-off-by: Simon Glass --- configs/mt8183_pumpkin_defconfig | 1 + drivers/power/Kconfig | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configs/mt8183_pumpkin_defconfig b/configs/mt8183_pumpkin_defconfig index a2f06a952ab..ca6fde3daf4 100644 --- a/configs/mt8183_pumpkin_defconfig +++ b/configs/mt8183_pumpkin_defconfig @@ -60,6 +60,7 @@ CONFIG_MMC_MTK=y CONFIG_DM_ETH=y CONFIG_PHY=y CONFIG_PHY_MTK_TPHY=y +# CONFIG_POWER is not set CONFIG_BAUDRATE=921600 CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_ANNOUNCE=y diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 73ba145ba83..11fd8b8f9a8 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -1,4 +1,17 @@ -menu "Power" +menuconfig POWER + bool "Power" + default y + help + 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. + +if POWER config POWER_LEGACY bool "Legacy power support" @@ -424,4 +437,4 @@ config POWER_I2C Not to be used for new designs and existing ones should be moved to the new PMIC interface based on driver model. -endmenu +endif -- 2.32.0.605.g8dce9f2422-goog