Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4191396pxj; Tue, 11 May 2021 23:17:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZP9LejrEp0mIkh1RpiF1GekJPb0/7QMa0VxWgBKV07UK/XMhRir3ccXtVMBsKjs/qJUqX X-Received: by 2002:a17:906:b03:: with SMTP id u3mr35155216ejg.381.1620800233842; Tue, 11 May 2021 23:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620800233; cv=none; d=google.com; s=arc-20160816; b=yrmfVb8iH2shi5MvttepWuxKtgiTKVUglM4EiiIH9iAC7rlPmLNOTEJWVG1W87t0CL RyCR8ZbqPdMcI1vBHuqFYYusSUD4eCM3J7czQbjvjc1yjjpTWoBTM4LqkPEQakc6pHC1 f7yM3irB2pwISnv1Hxvyz+JmTcFWfak3HlMUhM6z9RY8Tx66eXOE0qC116iyD6E7dUSE 9iqELklW3NS9ngEawK9kthdeAV3iWVCRYoG5cB80kb1e8qf6w33qYKzMunhnZMHeLlb2 LUz4Xq1/3cKHyQr4y/USWc0QgWrSVEJJge/wtBDObV2DnIHNhs5kYlgu7ugAFMWvCYe8 13MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=uceVbhfaJjx0O2N9w7XGDNIpr1kKZ9NmWaJE9/XErrg=; b=zi+8ukzJVZh5SqAT3XIaz7mTU2EPxUuf/E0IOCLFGBzTUyQsGqPhOo88OQAumdKMlJ aPMUkYVOro4zYhsxlrh7XvuOkr9ameMCGdNqXYXmoh0CU92gew8v2TbYBsOhzLOwpSSB eTfG4NNq8hVOThyEUjc95I96aR/2jkd5eQiW2o4e52lG0TtPV7L/6jlDQ/mFjW8uuamY XB50RLl8BUP8lwr8qXTkMV5JNM323mvFgt1sS2IJj8Bmh/hvaU9NyZ6K1G+2USQdgs4Y pLvuLbnRmEuigk6MpciuEQLk0gX1w4o6eHLzv7TFQw/L3vUD59jJyYVxhe1JE50dSbZq 8/bQ== ARC-Authentication-Results: i=1; mx.google.com; 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 ia21si16202983ejc.441.2021.05.11.23.16.50; Tue, 11 May 2021 23:17:13 -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; 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 S230236AbhELGQe (ORCPT + 99 others); Wed, 12 May 2021 02:16:34 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:53424 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbhELGQ2 (ORCPT ); Wed, 12 May 2021 02:16:28 -0400 Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 11 May 2021 23:15:21 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 11 May 2021 23:15:18 -0700 X-QCInternal: smtphost Received: from c-skakit-linux.ap.qualcomm.com (HELO c-skakit-linux.qualcomm.com) ([10.242.51.242]) by ironmsg01-blr.qualcomm.com with ESMTP; 12 May 2021 11:44:40 +0530 Received: by c-skakit-linux.qualcomm.com (Postfix, from userid 2344709) id E013F4F44; Wed, 12 May 2021 11:44:38 +0530 (IST) From: satya priya To: Dmitry Torokhov , Rob Herring , Andy Gross , Bjorn Andersson , Sebastian Reichel Cc: David Collins , kgunda@codeaurora.org, linux-input@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul , Andy Yan , satya priya Subject: [PATCH V4 5/5] dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml Date: Wed, 12 May 2021 11:44:13 +0530 Message-Id: <1620800053-26405-6-git-send-email-skakit@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620800053-26405-1-git-send-email-skakit@codeaurora.org> References: <1620800053-26405-1-git-send-email-skakit@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert qcom PON binding from .txt to .yaml format. Signed-off-by: satya priya Reviewed-by: Rob Herring --- Changes in V2: - As per Rob's comments, converted the main PON binding and added in V2. Dropped example here to have one full example in qcom,pm8941-pwrkey.yaml Changes in V3: - As per Sebastian's comments, added allOf to refer reboot-mode.yaml and used unevaluatedProperties = false. Added maxItems for reg. Changes in V4: - Added the example back. Removed it in qcom,pm8941-pwrkey.yaml .../devicetree/bindings/power/reset/qcom,pon.txt | 49 ------------- .../devicetree/bindings/power/reset/qcom,pon.yaml | 80 ++++++++++++++++++++++ 2 files changed, 80 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/reset/qcom,pon.txt create mode 100644 Documentation/devicetree/bindings/power/reset/qcom,pon.yaml diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.txt b/Documentation/devicetree/bindings/power/reset/qcom,pon.txt deleted file mode 100644 index 0c0dc3a..0000000 --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.txt +++ /dev/null @@ -1,49 +0,0 @@ -Qualcomm PON Device - -The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey -and resin along with the Android reboot-mode. - -This DT node has pwrkey and resin as sub nodes. - -Required Properties: --compatible: Must be one of: - "qcom,pm8916-pon" - "qcom,pms405-pon" - "qcom,pm8998-pon" - --reg: Specifies the physical address of the pon register - -Optional subnode: --pwrkey: Specifies the subnode pwrkey and should follow the - qcom,pm8941-pwrkey.txt description. --resin: Specifies the subnode resin and should follow the - qcom,pm8xxx-pwrkey.txt description. - -The rest of the properties should follow the generic reboot-mode description -found in reboot-mode.txt - -Example: - - pon@800 { - compatible = "qcom,pm8916-pon"; - - reg = <0x800>; - mode-bootloader = <0x2>; - mode-recovery = <0x1>; - - pwrkey { - compatible = "qcom,pm8941-pwrkey"; - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = ; - }; - - resin { - compatible = "qcom,pm8941-resin"; - interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; - debounce = <15625>; - bias-pull-up; - linux,code = ; - }; - }; diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml new file mode 100644 index 0000000..353f155 --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm PON Device + +maintainers: + - Vinod Koul + +description: | + The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey + and resin along with the Android reboot-mode. + + This DT node has pwrkey and resin as sub nodes. + +allOf: + - $ref: reboot-mode.yaml# + +properties: + compatible: + enum: + - qcom,pm8916-pon + - qcom,pms405-pon + - qcom,pm8998-pon + + reg: + maxItems: 1 + + pwrkey: + type: object + $ref: "../../input/qcom,pm8941-pwrkey.yaml#" + + resin: + type: object + $ref: "../../input/qcom,pm8941-pwrkey.yaml#" + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + spmi_bus: spmi@c440000 { + reg = <0x0c440000 0x1100>; + #address-cells = <2>; + #size-cells = <0>; + pmk8350: pmic@0 { + reg = <0x0 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + pmk8350_pon: pon_hlos@1300 { + reg = <0x1300>; + compatible = "qcom,pm8998-pon"; + + pwrkey { + compatible = "qcom,pm8941-pwrkey"; + interrupts = < 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH >; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + + resin { + compatible = "qcom,pm8941-resin"; + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; + debounce = <15625>; + bias-pull-up; + linux,code = ; + }; + }; + }; + }; +... -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation