From patchwork Thu Apr 13 13:17:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13210293 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9B97C77B7C for ; Thu, 13 Apr 2023 13:17:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230493AbjDMNRY (ORCPT ); Thu, 13 Apr 2023 09:17:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbjDMNRX (ORCPT ); Thu, 13 Apr 2023 09:17:23 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 573B319AB for ; Thu, 13 Apr 2023 06:17:21 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id j16so1038706wms.0 for ; Thu, 13 Apr 2023 06:17:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1681391839; x=1683983839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ezwEzIUFbO/ibyCR5/pMZcXsF9FqrfvEohFgkMV09Iw=; b=KRprAh3DeL1Jc7nUy6FhEObqRosjdbUrDp6a/kOhNPwwLCOL9pPjxfl2rVQ4WgqvQJ DVXIJb2LtEUYCV/FrZsxwEG62SvKFy596HzAVgxmRRBKRIjgpI5kq1EzDbn+RucaX0+a 7KRgo/u/yVa9lFvgY80K/Mp5UIEUtRbNbKlQMQOr+vr4r5qEjrk4OAed3/R8ukU6n2AH 1ZmaEwkxdP2C9sRKHhYixYOx4cEVwjZrad9yzqlU42eshedOESYGmds0Wrn6DSdeR0he IkSWUXOO3T+bProG7oQtR/VUu43EV4xKxg74fZ3QdCc+yiud17Z+o+geepprV5ujCtBn 4POw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681391839; x=1683983839; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ezwEzIUFbO/ibyCR5/pMZcXsF9FqrfvEohFgkMV09Iw=; b=bCqq6anM8sYnr/jaVfq/D+hVd2ruYNv0MThOesT+qVi/zY839o4YvPwhbbj62MczeZ YZXG9MAgkrY0bW2FOM5FQyj1K5Ok+9KSDLzNKd5VvAZpEe+I4lkj7PhpXY+SOp53DMSG umUBEvI0IfHtVhXT9yXomkZXeAN9SvlS07jvvfALKfeBvRXFDTs9iAN2PtAQ3TthQSxU kNMxJePKoR6pea/GVT1wd3rG2/L6we9FAwlpsa317YQMjfhCB88xsTi0zZBdf0BrX+m/ axl7or0Xwr8oNb6sQAdmc/zjxz5ex2RtUjCisNlnhjtbQU894cdGLHSEUjTWpLVwXkaZ +Azw== X-Gm-Message-State: AAQBX9fi9roTYdcslbF7fIIajGq1rqI0y4FPvR7FE0Q6FANi2p9CWMgb Nsh7N7QYKOlrX77J6LLVScZ7/A== X-Google-Smtp-Source: AKy350bWxIfjBDcyPABvkA89eNMTbtHx+VEcdJvuWzTjduVU+no40TpXG4+L1FYXgzlIN1tTfoye9A== X-Received: by 2002:a7b:ce07:0:b0:3f0:373d:c32b with SMTP id m7-20020a7bce07000000b003f0373dc32bmr1788155wmc.30.1681391839664; Thu, 13 Apr 2023 06:17:19 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:814c:fc8a:da02:39ad]) by smtp.gmail.com with ESMTPSA id v3-20020a1cf703000000b003f04646838esm1796400wmh.39.2023.04.13.06.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 06:17:19 -0700 (PDT) From: Bartosz Golaszewski To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , Catalin Marinas , Will Deacon , Arnd Bergmann Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 3/4] dt-bindings: power: reset: convert nvmem-reboot-mode bindings to YAML Date: Thu, 13 Apr 2023 15:17:04 +0200 Message-Id: <20230413131705.3073911-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230413131705.3073911-1-brgl@bgdev.pl> References: <20230413131705.3073911-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Bartosz Golaszewski Convert the DT binding document for nvmem-reboot-mode from .txt to YAML. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski --- .../power/reset/nvmem-reboot-mode.txt | 26 ---------- .../power/reset/nvmem-reboot-mode.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 26 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt create mode 100644 Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt deleted file mode 100644 index 752d6126d5da..000000000000 --- a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.txt +++ /dev/null @@ -1,26 +0,0 @@ -NVMEM reboot mode driver - -This driver gets reboot mode magic value from reboot-mode driver -and stores it in a NVMEM cell named "reboot-mode". Then the bootloader -can read it and take different action according to the magic -value stored. - -Required properties: -- compatible: should be "nvmem-reboot-mode". -- nvmem-cells: A phandle to the reboot mode provided by a nvmem device. -- nvmem-cell-names: Should be "reboot-mode". - -The rest of the properties should follow the generic reboot-mode description -found in reboot-mode.txt - -Example: - reboot-mode { - compatible = "nvmem-reboot-mode"; - nvmem-cells = <&reboot_mode>; - nvmem-cell-names = "reboot-mode"; - - mode-normal = <0xAAAA5501>; - mode-bootloader = <0xBBBB5500>; - mode-recovery = <0xCCCC5502>; - mode-test = <0xDDDD5503>; - }; diff --git a/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml new file mode 100644 index 000000000000..64a7d224c7dd --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic NVMEM reboot mode driver + +maintainers: + - Bartosz Golaszewski + +description: | + This driver gets the reboot mode magic value from the reboot-mode driver + and stores it in the NVMEM cell named "reboot-mode". The bootloader can + then read it and take different action according to the value. + +properties: + compatible: + const: nvmem-reboot-mode + + nvmem-cells: + description: | + A phandle pointing to the nvmem-cells node where the vendor-specific + magic value representing the reboot mode is stored. + maxItems: 1 + + nvmem-cell-names: + items: + - const: reboot-mode + +patternProperties: + "^mode-.+": + $ref: /schemas/types.yaml#/definitions/uint32 + description: Vendor-specific mode value written to the mode register + +additionalProperties: false + +required: + - compatible + - nvmem-cells + - nvmem-cell-names + +examples: + - | + reboot-mode { + compatible = "nvmem-reboot-mode"; + nvmem-cells = <&reboot_reason>; + nvmem-cell-names = "reboot-mode"; + mode-recovery = <0x01>; + mode-bootloader = <0x02>; + }; +...