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: 732925 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B4AD10A3E for ; Tue, 10 Oct 2023 07:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="OVGqOL1D" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49030B0; Tue, 10 Oct 2023 00:48:42 -0700 (PDT) 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: 731589 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B438FBFA for ; Tue, 10 Oct 2023 07:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="iykzSL08" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 785949F; Tue, 10 Oct 2023 00:48:42 -0700 (PDT) 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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;