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: 82959 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1031633vqo; Thu, 13 Apr 2023 06:23:10 -0700 (PDT) X-Google-Smtp-Source: AKy350aQvlBPhIb99V6PXRXDFRrcvbJWzxWZOrrWx6MerDcdnOW3q1YQA0o91MyjHJDFoPpjcumA X-Received: by 2002:a17:903:11d2:b0:1a0:7156:f8d1 with SMTP id q18-20020a17090311d200b001a07156f8d1mr2655130plh.19.1681392190677; Thu, 13 Apr 2023 06:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681392190; cv=none; d=google.com; s=arc-20160816; b=BouinnxunhBh8xuk3oOVfLhdo4prTypxjl5A9uUosvwsrYqQWCQCkimUhH66R32q7W UOIpJNZqjpvZfQt0KHH/y6UGqOah4rxnKE7wZghOxPCfaA3+y0XCNgri5FHY9CzEyBGU X7OANiisgLwbGrd4iJdsqvuVHTZ+4kJaEOuMscmYM9saJZYTPsYAj/NguHAlIDr56Vn7 XM/5EUB0x71/4JAHxdIAqoRsKx2OssusLbOiV2LDe0iWN/1DywobdxaqRDz/OKWx/098 GJhPaGB/B8QBxl93ElSh+T3syifXqiiQs0YODNhf01Ccq3P6DCcnYPymBqxcN5yj0gAX cmiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ezwEzIUFbO/ibyCR5/pMZcXsF9FqrfvEohFgkMV09Iw=; b=qUx1Hv4PYxtwFlNwQaDZViRfGT3Dk+ohUxLcHsSzRWHYhu+pDtxn1s2bOiPOYxjHpC IwhUUbcxKzuOtPPbaZ7d35bsfz6ZHZOeaZe2RIQD7Ee9uF+6n3aueQS16b1+KUKWAxCN XSk9fR4R2Mme4rd2TFy074DDm4w0wPF7VZHz7OIUg6G7DrhwUFzKI7ZV9OlxfHNQXyRs QsI+PRDRVBwqaM+fNSsbxFEe6C9w6oPqV3cMbIgPCDjm635IUo/z2CpfResOSZRMBsK+ ZQxEQQMFa5ct/X65tKzzD14HP+WeCDKQhLgjiHhiu6buo5pFelogm0CfenD2ziJrlXsN joYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=KRprAh3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 67-20020a630746000000b0050bee8d3e4bsi2257770pgh.691.2023.04.13.06.22.55; Thu, 13 Apr 2023 06:23:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=KRprAh3D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbjDMNRb (ORCPT + 99 others); Thu, 13 Apr 2023 09:17:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230469AbjDMNRW (ORCPT ); Thu, 13 Apr 2023 09:17:22 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 571A5114 for ; Thu, 13 Apr 2023 06:17:21 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id n19-20020a05600c501300b003f064936c3eso13076220wmr.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=aFKZITCdUBuhQoXvQv5FD0rpyAA34zzK9FVAyb9IXyv83dhZECKles6+JqKZ5Oz+iu 8h9hnDHjrCn8ES2NRCoTFqo1KG5hLAsrDtXb4AmC8yLf/xaLc49fEfX+4oe+LxibhXPv hdNXIXq4BMulTQ1UuZze7kG0DIjeyhCU+pmrzbzOO7bjxVGFa8FmNJvGwypDELIpa67E Ghlq5YPKUp+wh18I5z5Ny0+LJHNbV4pi0dXsuhjLI9e2mD92HkXFBKkBAgFbVwlWjhjB 8A2b4Ub0z1efqAR3uefLzGyNXDPbnnZliRfFqxL9aV+f/aXTY4cegjKG20+sKM1PH6bL Ww6g== X-Gm-Message-State: AAQBX9e9ltW8dJpnaXpGZ9WprLhkSekh36FKkxknkr6A25p0JDQYDU6w pWyPCM0+tAmrbh055UYM50T1UA== 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763067497720333514?= X-GMAIL-MSGID: =?utf-8?q?1763067497720333514?= 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>; + }; +...