Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C9EC6C001DB for ; Thu, 3 Aug 2023 19:59:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E4DED868DA; Thu, 3 Aug 2023 21:59:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se 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=kwiboo.se header.i=@kwiboo.se header.b="Ci/Rk3CK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4631186795; Thu, 3 Aug 2023 21:59:19 +0200 (CEST) Received: from wfbtzhsw.outbound-mail.sendgrid.net (wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) (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 DFC8D86362 for ; Thu, 3 Aug 2023 21:59:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=DVCy6n4e+DjzlAKd4ZHrjs6oG5BjD6ltg6lJqNyyUfQ=; b=Ci/Rk3CKvyg7yrrOVQ1D+OM4E28jo5F6a7g4W5mYH+xaE/VxVpMibzvuV0RycHy70NXT FH3QJ238dTnreFktAZW7JJ07Gr+6D//FjI5ZaXZVAjnU8bRIwzEE+I6XnIouWARmyD0RAy wMCGW/NBcuPdL1JONCrHdo7MFeBhizD87d6gZjMhHE/WuxYeaKyAkkGTe2sFX5H9SY5kPU vKdmJH0xwODd2TFxawZN1PgclZvM/USHYSaMhjKnVxdKERgWkRi0TQLJDX/uZAL+iSwToJ /ngRp65xslcSIyvVTO3eRVBLRVFUwJ5LXVJIN5L7Ye07BKVt9uASZ0vGufGezA+g== Received: by filterdrecv-65f68489c8-zmlx4 with SMTP id filterdrecv-65f68489c8-zmlx4-1-64CC05DD-4D 2023-08-03 19:54:06.014928665 +0000 UTC m=+7330686.150729114 Received: from bionic.localdomain (unknown) by geopod-ismtpd-2 (SG) with ESMTP id 3Ce3bkvlSPyNsprTFwbP8w Thu, 03 Aug 2023 19:54:05.642 +0000 (UTC) From: Jonas Karlman Subject: [PATCH] rockchip: rk356x: Enable poweroff command Date: Thu, 03 Aug 2023 19:54:06 +0000 (UTC) Message-ID: <20230803195403.3971702-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h3JWWim54MSr3Aano?= =?us-ascii?Q?YRo9OMXVVuxYMmG=2FLNaKB90ja4Eq26BWc5M8VBI?= =?us-ascii?Q?NzNQUUvZ+7D96hcap7C5yMLcx6soppDAccu5t=2Fz?= =?us-ascii?Q?=2Fp3IsFz4bRqjqYe3mdZqBXTVFc3yyNC59mwReOe?= =?us-ascii?Q?xTZURH+f3fUL6MLnAEOhe1xOMOqsIB3K99kr4w?= To: Kever Yang , Simon Glass , Philipp Tomsich , Nicolas Frattaroli , Jonas Karlman , Akash Gajjar , Jaehoon Chung Cc: u-boot@lists.denx.de X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii 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 With PMIC_RK8XX, SYSRESET and CMD_POWEROFF options enabled it is possible to power down a board using the poweroff command and turn the board back on using a power button. Enable the poweroff command on RK356x boards that have a button wired to PMIC pwron. Also update to use PMIC poweroff when PMIC_RK8XX is enabled to avoid also having to enable the SYSRESET_CMD_POWEROFF option. Signed-off-by: Jonas Karlman --- configs/quartz64-a-rk3566_defconfig | 1 + configs/quartz64-b-rk3566_defconfig | 1 + configs/rock-3a-rk3568_defconfig | 1 + configs/soquartz-model-a-rk3566_defconfig | 1 + drivers/power/pmic/Kconfig | 1 + 5 files changed, 5 insertions(+) diff --git a/configs/quartz64-a-rk3566_defconfig b/configs/quartz64-a-rk3566_defconfig index d55b224feacd..6853cd6c44b4 100644 --- a/configs/quartz64-a-rk3566_defconfig +++ b/configs/quartz64-a-rk3566_defconfig @@ -52,6 +52,7 @@ CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y +CONFIG_CMD_POWEROFF=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_PMIC=y diff --git a/configs/quartz64-b-rk3566_defconfig b/configs/quartz64-b-rk3566_defconfig index b98c81f9dcef..aa29fff14643 100644 --- a/configs/quartz64-b-rk3566_defconfig +++ b/configs/quartz64-b-rk3566_defconfig @@ -50,6 +50,7 @@ CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y +CONFIG_CMD_POWEROFF=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_PMIC=y diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig index 44ff054df665..409aa95acf06 100644 --- a/configs/rock-3a-rk3568_defconfig +++ b/configs/rock-3a-rk3568_defconfig @@ -49,6 +49,7 @@ CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y +CONFIG_CMD_POWEROFF=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_PMIC=y diff --git a/configs/soquartz-model-a-rk3566_defconfig b/configs/soquartz-model-a-rk3566_defconfig index c3958579db73..a0884a797d58 100644 --- a/configs/soquartz-model-a-rk3566_defconfig +++ b/configs/soquartz-model-a-rk3566_defconfig @@ -43,6 +43,7 @@ CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y +CONFIG_CMD_POWEROFF=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_PMIC=y diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig index 176fb07c651a..4a6f0ce093ad 100644 --- a/drivers/power/pmic/Kconfig +++ b/drivers/power/pmic/Kconfig @@ -233,6 +233,7 @@ config PMIC_QCOM config PMIC_RK8XX bool "Enable support for Rockchip PMIC RK8XX" + select SYSRESET_CMD_POWEROFF if SYSRESET && CMD_POWEROFF ---help--- The Rockchip RK808 PMIC provides four buck DC-DC convertors, 8 LDOs, an RTC and two low Rds (resistance (drain to source)) switches. It is -- 2.41.0