From patchwork Fri Jul 31 21:14:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 11695477 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF01317C5 for ; Fri, 31 Jul 2020 21:14:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95E9422B43 for ; Fri, 31 Jul 2020 21:14:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="m//sYZu0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728226AbgGaVOa (ORCPT ); Fri, 31 Jul 2020 17:14:30 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:55446 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728213AbgGaVO3 (ORCPT ); Fri, 31 Jul 2020 17:14:29 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1596230068; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=dvwBrEbVERFUgM2LMCV1G2AljSQNPyFfudWmCq32qKw=; b=m//sYZu0ncJ2fumGoxlU5nZp54gRxc5yLummt+tsBu3ECYV5kPDs2/IEQyx3WPcz377cLnh7 mdBy2Chq2Lam32AK7UPGTQ9hmvHenQEOA+Euotbf3fvIg6Fot0kQY28JRb6OgcM/dssfrvsi GGmqBQcUVpk7HQYNOElgTs57EDQ= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI5ZDFmMiIsICJsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n10.prod.us-east-1.postgun.com with SMTP id 5f2489b32c24b37bbe61f178 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 31 Jul 2020 21:14:27 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E31BDC43391; Fri, 31 Jul 2020 21:14:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from eberman-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: eberman) by smtp.codeaurora.org (Postfix) with ESMTPSA id 52773C43391; Fri, 31 Jul 2020 21:14:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 52773C43391 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=eberman@codeaurora.org From: Elliot Berman To: Sebastian Reichel , Andy Yan , Bjorn Andersson Cc: Elliot Berman , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Trilok Soni , Prasad Sodagudi Subject: [PATCH 1/4] dt-bindings: power: reset: Convert reboot-mode to YAML Date: Fri, 31 Jul 2020 14:14:17 -0700 Message-Id: <1596230060-6065-2-git-send-email-eberman@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> References: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Convert reboot-mode bindings to YAML. Signed-off-by: Elliot Berman --- .../bindings/power/reset/reboot-mode.txt | 25 ------------ .../bindings/power/reset/reboot-mode.yaml | 47 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.txt create mode 100644 Documentation/devicetree/bindings/power/reset/reboot-mode.yaml diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/reboot-mode.txt deleted file mode 100644 index de34f27..0000000 --- a/Documentation/devicetree/bindings/power/reset/reboot-mode.txt +++ /dev/null @@ -1,25 +0,0 @@ -Generic reboot mode core map driver - -This driver get reboot mode arguments and call the write -interface to store the magic value in special register -or ram. Then the bootloader can read it and take different -action according to the argument stored. - -All mode properties are vendor specific, it is a indication to tell -the bootloader what to do when the system reboots, and should be named -as mode-xxx = (xxx is mode name, magic should be a none-zero value). - -For example modes common on Android platform: -- mode-normal: Normal reboot mode, system reboot with command "reboot". -- mode-recovery: Android Recovery mode, it is a mode to format the device or update a new image. -- mode-bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device. -- mode-loader: A bootloader mode, it's a mode used to download image on Rockchip platform, - usually used in development. - -Example: - reboot-mode { - mode-normal = ; - mode-recovery = ; - mode-bootloader = ; - mode-loader = ; - } diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml new file mode 100644 index 0000000..a6c9102 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/reboot-mode.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic reboot mode core map + +maintainers: + - Andy Yan + +description: | + This driver get reboot mode arguments and call the write + interface to store the magic value in special register + or ram. Then the bootloader can read it and take different + action according to the argument stored. + + All mode properties are vendor specific, it is a indication to tell + the bootloader what to do when the system reboots, and should be named + as mode-xxx = (xxx is mode name, magic should be a non-zero value). + + For example, modes common Android platform are: + - normal: Normal reboot mode, system reboot with command "reboot". + - recovery: Android Recovery mode, it is a mode to format the device or update a new image. + - bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device. + - loader: A bootloader mode, it's a mode used to download image on Rockchip platform, + usually used in development. + +properties: + mode-normal: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Default value to set on a reboot if no command was provided. + +patternProperties: + "^mode-.*$": + $ref: /schemas/types.yaml#/definitions/uint32 + +examples: + - | + reboot-mode { + mode-normal = <0>; + mode-recovery = <1>; + mode-bootloader = <2>; + mode-loader = <3>; + }; +... From patchwork Fri Jul 31 21:14:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 11695469 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05A73138C for ; Fri, 31 Jul 2020 21:14:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E206222B43 for ; Fri, 31 Jul 2020 21:14:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="D5ZEN2hK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728246AbgGaVO2 (ORCPT ); Fri, 31 Jul 2020 17:14:28 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:33756 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728204AbgGaVO2 (ORCPT ); Fri, 31 Jul 2020 17:14:28 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1596230067; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=pURV5QFpmLy38X5gYC0uGHz0Zw0P/0cot7hAuBA4Ty0=; b=D5ZEN2hK/CFfSMcF96tixzA7zt+lr/qMUQqpa1tZ4WWwR6x/DpmgGrUAb8z4KUTbcpeMBwgQ AbBQBISVCxHPVsdkzCVHWGUxhTX/5/b7/N8v4BN2xlY4wm0W8Ue0kV4IaQ8mMp5Wp7cVLLJZ DcGFLvRRG1hO6rLm3yT7G++waz0= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI5ZDFmMiIsICJsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 5f2489b390893260ddfaaaec (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 31 Jul 2020 21:14:27 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5DBD5C433B6; Fri, 31 Jul 2020 21:14:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from eberman-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: eberman) by smtp.codeaurora.org (Postfix) with ESMTPSA id D4C03C433C9; Fri, 31 Jul 2020 21:14:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D4C03C433C9 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=eberman@codeaurora.org From: Elliot Berman To: Sebastian Reichel , Andy Yan , Bjorn Andersson Cc: Elliot Berman , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Trilok Soni , Prasad Sodagudi Subject: [PATCH 2/4] dt-bindings: power: reset: Add alternate reboot mode format Date: Fri, 31 Jul 2020 14:14:18 -0700 Message-Id: <1596230060-6065-3-git-send-email-eberman@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> References: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Current reboot-mode device tree schema does not support reboot commands with spaces in them [1]. Add an optional new node "reboot-mode-names" and "reboot-mode-magic" which add an array of strings and u32s, respectively which would permit any string in this framework. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/md/dm-verity-target.c?h=v5.5#n255 Signed-off-by: Elliot Berman --- .../devicetree/bindings/power/reset/reboot-mode.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml index a6c9102..4ea6b33 100644 --- a/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml +++ b/Documentation/devicetree/bindings/power/reset/reboot-mode.yaml @@ -19,6 +19,9 @@ description: | the bootloader what to do when the system reboots, and should be named as mode-xxx = (xxx is mode name, magic should be a non-zero value). + reboot-mode-magic and reboot-mode-names may be used in addition/instead of + mode-xxx style. + For example, modes common Android platform are: - normal: Normal reboot mode, system reboot with command "reboot". - recovery: Android Recovery mode, it is a mode to format the device or update a new image. @@ -32,6 +35,14 @@ properties: description: | Default value to set on a reboot if no command was provided. + reboot-mode-names: + $ref: /schemas/types.yaml#/definitions/string-array + description: List of reboot commands, paired with reboot-mode-magic by index + + reboot-mode-magic: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: List of reboot magic, paired with reboot-mode-names by index + patternProperties: "^mode-.*$": $ref: /schemas/types.yaml#/definitions/uint32 @@ -44,4 +55,10 @@ examples: mode-bootloader = <2>; mode-loader = <3>; }; + + - | + reboot-mode { + reboot-mode-names = "normal", "bootloader", "dm-verity device corrupted"; + reboot-mode-magic = <0x0>, <0x1>, <0xf>; + }; ... From patchwork Fri Jul 31 21:14:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 11695483 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E48C4138C for ; Fri, 31 Jul 2020 21:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE32322B43 for ; Fri, 31 Jul 2020 21:14:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="ci8kX4Fv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728266AbgGaVOc (ORCPT ); Fri, 31 Jul 2020 17:14:32 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:26530 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728249AbgGaVOb (ORCPT ); Fri, 31 Jul 2020 17:14:31 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1596230071; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=nh+RSm6RsPXE+qcY152AR0CU4QrxqI5oIYGuVIflNG4=; b=ci8kX4Fv+mB6DFV+/vtt0K2U2URHJxPry6asUGPTGZUMxD747ZZuxnTfWI0fipPS6vIg7EWw esHjfns9MO7/otKpGvSSVeFQ8FKh7K7UyHkFxOYTQH1nruDOF522wzwaXwvLNXQk6eaL9Cdb u+mL04zA4Whn2iLGK9o+yAmljjA= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI5ZDFmMiIsICJsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-east-1.postgun.com with SMTP id 5f2489b3f89b692ba28b0381 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 31 Jul 2020 21:14:27 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 78A7AC433B7; Fri, 31 Jul 2020 21:14:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from eberman-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: eberman) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6080EC433B1; Fri, 31 Jul 2020 21:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6080EC433B1 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=eberman@codeaurora.org From: Elliot Berman To: Sebastian Reichel , Andy Yan , Bjorn Andersson Cc: Elliot Berman , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Trilok Soni , Prasad Sodagudi Subject: [PATCH 3/4] power: reset: Add support for reboot mode alternate properties Date: Fri, 31 Jul 2020 14:14:19 -0700 Message-Id: <1596230060-6065-4-git-send-email-eberman@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> References: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Reboot mode driver does not currently support reboot commands with spaces in them [1]. Add an optional new node "reboot-mode-names" and "reboot-mode-magic" which add an array of strings and u32s, respectively which would permit any string in this framework. Signed-off-by: Elliot Berman --- drivers/power/reset/reboot-mode.c | 42 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot-mode.c index b4076b1..363734d 100644 --- a/drivers/power/reset/reboot-mode.c +++ b/drivers/power/reset/reboot-mode.c @@ -64,8 +64,9 @@ int reboot_mode_register(struct reboot_mode_driver *reboot) struct mode_info *info; struct property *prop; struct device_node *np = reboot->dev->of_node; + const char *mode_name; size_t len = strlen(PREFIX); - int ret; + int ret, count, i; INIT_LIST_HEAD(&reboot->head); @@ -101,6 +102,45 @@ int reboot_mode_register(struct reboot_mode_driver *reboot) list_add_tail(&info->list, &reboot->head); } + count = of_property_count_u32_elems(np, "reboot-mode-magic"); + for (i = 0; i < count; i++) { + info = devm_kzalloc(reboot->dev, sizeof(*info), GFP_KERNEL); + if (!info) { + ret = -ENOMEM; + goto error; + } + + if (of_property_read_string_index(np, "reboot-mode-names", i, + &mode_name)) { + dev_err(reboot->dev, "unable to read reboot-mode-names[%d]\n", + i); + ret = -EINVAL; + goto error; + } + info->mode = kstrdup_const(mode_name, GFP_KERNEL); + if (!info->mode) { + ret = -ENOMEM; + goto error; + } else if (info->mode[0] == '\0') { + dev_err(reboot->dev, "invalid reboot-mode-names[%d]: too short!\n", + i); + kfree_const(info->mode); + ret = -EINVAL; + goto error; + } + + if (of_property_read_u32_index(np, "reboot-mode-magic", i, + &info->magic)) { + dev_err(reboot->dev, "unable to read reboot-mode-magic[%d]\n", + i); + kfree_const(info->mode); + ret = -EINVAL; + goto error; + } + + list_add_tail(&info->list, &reboot->head); + } + reboot->reboot_notifier.notifier_call = reboot_mode_notify; register_reboot_notifier(&reboot->reboot_notifier); From patchwork Fri Jul 31 21:14:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliot Berman X-Patchwork-Id: 11695473 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 344191575 for ; Fri, 31 Jul 2020 21:14:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13D1B22CB2 for ; Fri, 31 Jul 2020 21:14:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="wthPwdZ1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728250AbgGaVO3 (ORCPT ); Fri, 31 Jul 2020 17:14:29 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:26410 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728235AbgGaVO3 (ORCPT ); Fri, 31 Jul 2020 17:14:29 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1596230068; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=6DulG01UloH1B3/zaPlweK3VbZQJuf7WosjBzTW4G7U=; b=wthPwdZ1VUvknLe1CYmOMUBonMCD2vhW6V11/QtWKVhyHhhTvdc1whQn/UT2FDuLdnEaDxc0 wfGN+73fKXLK89+VcVB2fwn6snaTStQfZcyRd77Vjo/xB93OZ4VBTERYdm2SsW0XNDWgubLD A2OcWkTnzf1s0+ApvgLLFEEmScs= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI5ZDFmMiIsICJsaW51eC1wbUB2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-east-1.postgun.com with SMTP id 5f2489b49403087e1054a6e0 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 31 Jul 2020 21:14:28 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 13379C433AF; Fri, 31 Jul 2020 21:14:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from eberman-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: eberman) by smtp.codeaurora.org (Postfix) with ESMTPSA id 01FD1C433A0; Fri, 31 Jul 2020 21:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 01FD1C433A0 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=eberman@codeaurora.org From: Elliot Berman To: Sebastian Reichel , Andy Yan , Bjorn Andersson Cc: Elliot Berman , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Trilok Soni , Prasad Sodagudi Subject: [PATCH 4/4] arm64: dts: qcom: pm8150: Add reboot magic Date: Fri, 31 Jul 2020 14:14:20 -0700 Message-Id: <1596230060-6065-5-git-send-email-eberman@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> References: <1596230060-6065-1-git-send-email-eberman@codeaurora.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add reboot command magic values for pon device. Signed-off-by: Elliot Berman --- arch/arm64/boot/dts/qcom/pm8150.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8150.dtsi b/arch/arm64/boot/dts/qcom/pm8150.dtsi index 1b64069..afd6231 100644 --- a/arch/arm64/boot/dts/qcom/pm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150.dtsi @@ -50,6 +50,11 @@ pon: power-on@800 { compatible = "qcom,pm8916-pon"; reg = <0x0800>; + + reboot-mode-names = "bootloader", "recovery", + "dm-verity device corrupted"; + reboot-mode-magic = <0x1>, <0x2>, <0x4>; + pwrkey { compatible = "qcom,pm8941-pwrkey"; interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;