From patchwork Tue Oct 10 07:48:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 13414934 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA0EECD68F5 for ; Tue, 10 Oct 2023 07:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aMnRqkXfiKWAdJtNhx/ABR9qL1kpmHZ3UH6UjqbGJPw=; b=UZDeaG63BsFIW1 fMdaOrW0Rw100eruTlUkerYeHZKVFFpN10u5mpc7+7sB5YvWy7zN8FAtXH0ihtG0j6ag2TvE3rF7e scCeC978zEZt82kWtdtKPOixWBQZ4iFH8kEfgTGHMiF1QXEWAu3huCmJQIMk1OieJszXqtsbCDozv 349N18KpxNktj/MsKJuf5naC2xZYS4mKd91Af/BTXgW5xbVxDzeTxBlYd1HeYLEOnX0HqT6ZyJtr7 SswtUoTccQJjreggiFT/X6sbTTz4l6wQpCCI15QfW4qAByesl5Ziz+mSZrgp+g+GFRwWvCobuJamK dt6wXGM1dOb2uYnXkG6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq7U2-00Cjtb-1X; Tue, 10 Oct 2023 07:48:50 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq7Tu-00CjpK-1r; Tue, 10 Oct 2023 07:48:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1696924120; bh=ln9yaefbuYCFpEUdZH05ypyuihDVslY8QNysNZk0VAI=; h=From:To:Cc:Subject:Date:References:From; b=OVGqOL1D2lPuYKrJV5D3YzES4tLaB0CMn+21BQdQenid+125weodPr02i4cV7vn3y dLu+rDxnClYX1bzea7W0JNg9N2KCyVlxzEz1Kp7HzH3OyPYVXg/cdlww/rfI97A9IP TNVvyQjgtV3nwaipHvX9juVS+ASsCO/CQGaX+vRk= From: =?utf-8?q?Ond=C5=99ej_Jirman?= To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Ondrej Jirman , Sebastian Reichel , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings: mfd: rk806: Allow rockchip,system-power-controller property Date: Tue, 10 Oct 2023 09:48:20 +0200 Message-ID: <20231010074826.1791942-2-megi@xff.cz> In-Reply-To: <20231010074826.1791942-1-megi@xff.cz> References: <20231010074826.1791942-1-megi@xff.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_004843_070856_A9A13748 X-CRM114-Status: UNSURE ( 7.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ondrej Jirman Declare support for this property. Signed-off-by: Ondrej Jirman --- Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml index cf2500f2e9a0..e8c9f17f6ea8 100644 --- a/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml @@ -29,6 +29,11 @@ properties: '#gpio-cells': const: 2 + rockchip,system-power-controller: + type: boolean + description: + Telling whether or not this PMIC is controlling the system power. + vcc1-supply: description: The input supply for dcdc-reg1. From patchwork Tue Oct 10 07:48:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 13414932 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99DABCD68F6 for ; Tue, 10 Oct 2023 07:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AsZQiHTNi3A1HyGDzn3THflITRq7pyuY4bJy1YwSKKo=; b=ZUtoCCrC+i/FB2 ozF5J/HFQ6ZCMQHMqNXIj8DS/1i9MDh4cP9SCyQnNaztBPKtEYLFbR3mIXHvP2Z70AkI3wu5y5Lvq NSFpiSShmms7FrWhLW8X6XYdAjg1mozE8+icvW6l2oBzaqa75DkZoMRFNyoMNHyezWFVKJwzMlTkl mp5IhyVYuT27UEvKVXuj9N3iqEWtXa4zmdPTVLfPB65gs4/SLVaBCYQ+8dVe16kmqaLm0eCNyXe3w ocBrOpoeFhh+0nvQPhpF7eycjtLtO4BFreND5MG73pR/17V1djyh+02bsH7g1wzhclKDNqA9N+p4c oTKlT2hBY484lXmPmQIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qq7Tx-00Cjqi-2z; Tue, 10 Oct 2023 07:48:45 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qq7Tu-00CjpM-1r; Tue, 10 Oct 2023 07:48:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1696924121; bh=Oeh6nlfOFEb81ECTeuiFVe+RiXroufThNyW8kszAkWE=; h=From:To:Cc:Subject:Date:References:From; b=iykzSL08pBwXXvl8U0BqPnUfZKyTMHw4OTo3BBZdqKIFsfkWi8vrBf/6FinlQdeTH Rs2Ij79mOqlTKf1l1ErhwEjHdOxpjPzbvi2Czf1IJPQ1IZnHn8kgPUyxB4XxlDhwTa +JQqT29EAdjYcSHUR4Swkecr4BwciutFDaNBp4mA= From: =?utf-8?q?Ond=C5=99ej_Jirman?= To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Ondrej Jirman , Sebastian Reichel , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] mfd: rk8xx: Add support for RK806 power off Date: Tue, 10 Oct 2023 09:48:21 +0200 Message-ID: <20231010074826.1791942-3-megi@xff.cz> In-Reply-To: <20231010074826.1791942-1-megi@xff.cz> References: <20231010074826.1791942-1-megi@xff.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231010_004843_067889_6781FA2B X-CRM114-Status: UNSURE ( 9.25 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ondrej Jirman Use DEV_OFF bit to power off the PMIC, when rockchip,system-power-controller is selected in DTS. Signed-off-by: Ondrej Jirman --- drivers/mfd/rk8xx-core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c index 11a831e92da8..ef40050f1169 100644 --- a/drivers/mfd/rk8xx-core.c +++ b/drivers/mfd/rk8xx-core.c @@ -525,6 +525,10 @@ static int rk808_power_off(struct sys_off_data *data) reg = RK805_DEV_CTRL_REG; bit = DEV_OFF; break; + case RK806_ID: + reg = RK806_SYS_CFG3; + bit = DEV_OFF; + break; case RK808_ID: reg = RK808_DEVCTRL_REG, bit = DEV_OFF_RST;