Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3315085pxa; Tue, 18 Aug 2020 11:58:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv5UIF9cpWN3CA1JxoXgKlqN4utmo/4yILUAVCxT06aP3YO/38KvcCTBLd/flCEvM+luZi X-Received: by 2002:a17:906:6004:: with SMTP id o4mr22465524ejj.411.1597777086935; Tue, 18 Aug 2020 11:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597777086; cv=none; d=google.com; s=arc-20160816; b=v5lQHxADP8XXg4aYkXTx9yczNGnrv9VQdfRPno/r8F+l24M3TCr2kfzFlea91fpqGa yVDmjqxgmfz1N3xNMgSHV3qlL3u1D/bJJ5HL8VXUYEtfe53WskXfa+EqQIblAw1G1Fkg wnS43uBLUN01EZUDbuyD84LpzyAw02Zv3GEBC7fccO4D0jnVGYIwTa2JD30F6is+QgvE Sxg8XVOA8K8GtWTE9LUBS5q6e8I0hS3j08O5VfWNo5vDcyGn8E+PHWvncZly5azznuuE yC18QVmkqX86N5/ATRLjUoc8vVObsiEMCJ+ZMo/pvMXw4VAd1YCIn9vNXxRMC0T/zej0 uZ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=pURV5QFpmLy38X5gYC0uGHz0Zw0P/0cot7hAuBA4Ty0=; b=OYDqMbGJfZowt98q0b2+9fm1Ug+xnbg0+VKfF6nKlwehglfg7MG3dZYIdV9Yd3mWrj DrhkwRjUS2Ez3Mt+rD9xZVlsDHOdiK1Rz+5XOOLjcMbgAJobY5Sq2AVckHs2YW+ixtPu 75gP5eDY4agXJjxmTY5OMJVfLzPrz5bBN+SGcoUeZ1lvIZhoRg94D7MgXsIK0VAVRLbZ mCtwmsgpKzGvGnLb7Hjsmg68BFXtpYPmPfGlZQuFsiMCOk6ibqhZHvE5dti39GG6/CJb ZK0gczjc/527Tj+GFUQApuGVOzoHEc4Xa8skEtqabWzW3ey29Zm/hrqGwsuijsbj48T8 dpzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=mJsT7qNC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si13975513ejm.385.2020.08.18.11.57.43; Tue, 18 Aug 2020 11:58:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=mJsT7qNC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbgHRSyw (ORCPT + 99 others); Tue, 18 Aug 2020 14:54:52 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:25544 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbgHRSyq (ORCPT ); Tue, 18 Aug 2020 14:54:46 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597776886; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=pURV5QFpmLy38X5gYC0uGHz0Zw0P/0cot7hAuBA4Ty0=; b=mJsT7qNCtulV1l7oDsEXq2T6ErrTtxkU4o/2j3yrUS6R+P2fBsSaMiznWVadGduquTiR7gIF MKFMfAyf77Q+QEUO3VEDweNgUiU6kg7gRCm+gtMg5d3YZzmHlJT0bZ+72OhGmPX7Exz8ScKQ fNqOLMpa8C1xl5Qm05V9ZdmMB9A= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n09.prod.us-east-1.postgun.com with SMTP id 5f3c23e2cbcd42bdeed5335e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 18 Aug 2020 18:54:26 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4D16FC4339C; Tue, 18 Aug 2020 18:54:25 +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, URIBL_BLOCKED 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 51BA7C433C6; Tue, 18 Aug 2020 18:54:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 51BA7C433C6 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 , Andy Gross , Rob Herring Cc: Elliot Berman , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Trilok Soni , Prasad Sodagudi Subject: [RESEND PATCH v1 2/4] dt-bindings: power: reset: Add alternate reboot mode format Date: Tue, 18 Aug 2020 11:54:14 -0700 Message-Id: <1597776856-12014-3-git-send-email-eberman@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597776856-12014-1-git-send-email-eberman@codeaurora.org> References: <1597776856-12014-1-git-send-email-eberman@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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>; + }; ... -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project