From patchwork Thu Dec 5 14:08:09 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pascal Paillet
X-Patchwork-Id: 11274835
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 2A8376C1
for ;
Thu, 5 Dec 2019 14:08:27 +0000 (UTC)
Received: from bombadil.infradead.org (bombadil.infradead.org
[198.137.202.133])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id 079BD24651
for ;
Thu, 5 Dec 2019 14:08:27 +0000 (UTC)
Authentication-Results: mail.kernel.org;
dkim=pass (2048-bit key) header.d=lists.infradead.org
header.i=@lists.infradead.org header.b="K88FpmCH";
dkim=fail reason="signature verification failed" (2048-bit key)
header.d=st.com header.i=@st.com header.b="cpTsspLd"
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 079BD24651
Authentication-Results: mail.kernel.org;
dmarc=fail (p=none dis=none) header.from=st.com
Authentication-Results: mail.kernel.org;
spf=none
smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20170209; h=Sender:
Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:
List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To
:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:
List-Owner; bh=Cghw6ywK/5aqE3eONC0eET4z78Hkuxw7rMplw7e1D4U=; b=K88FpmCHLTSg7G
IA6CSI+EcTn+9zXPz/+vRpCtB2ojsfU3qT5GdBDizMOuDhemb7bQ7dV0dTcH3Vv1HzcsFt8DkdkPf
sLOIYJ4hcD1KaVgiGNtWNUbMJSYh5JmFug9SG5db3wYRnrNFzlClQOwfsAg2n9PYi4Q2p3iW0OWhU
nTbcGaeiZ+nnlvtwybkmV7oeBFhJX8CR2QdaXuOZp7xrGU1/8Xww/+MuSpJPGa+F/Oegrm93OOD0h
wgCltQ8CzIV983LGvmrQ5O0ubdWP9g6CDRGWRZ6dcbLpwcGYX96OIxTYnRdhH5tzm400m2j4BVqVu
bHmZ5K8OPo41cAP830YQ==;
Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
id 1icrns-0005Ld-0J; Thu, 05 Dec 2019 14:08:24 +0000
Received: from mx08-00178001.pphosted.com ([91.207.212.93]
helo=mx07-00178001.pphosted.com)
by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
id 1icrno-0005L4-Oz
for linux-arm-kernel@lists.infradead.org; Thu, 05 Dec 2019 14:08:22 +0000
Received: from pps.filterd (m0046661.ppops.net [127.0.0.1])
by mx08-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id
xB5DvoKD026399; Thu, 5 Dec 2019 15:08:11 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com;
h=from : to : cc : subject
: date : message-id : mime-version : content-type; s=STMicroelectronics;
bh=ZunBs5XNBGkzdynuEgHyci3GLZOhq0qbk3yNCy97EIA=;
b=cpTsspLdKyQwhA+MWFENbPsldOdIketC9u9kVm8fQl7+LCNhXWy4CgpMOuhjYTmPYX19
qGd3Ple5TB0eIsGW4c+6FkKLK7EA48eBNKb0ooHeR4OAXZSUwqtN69kr4KwjoZRWA2l2
x4bk3z/XYandsjXaQG7J/RQUD0iPzQOMefc9WPzUMm2+0r3YA1rSWSZ7e1yjADswDyS4
Wi7XgiUF6PnbqXG3J493N3M35nmKP6+h75aTIJC3UZ0/ylK5ONhqVKhd37pPPjLzekbm
iN2mvqcZxPXC3Wxw23yPOKruNtnDMJOHhoAgGTJ7k6aUuES1Rkbz0M7qBN9jTsRrRnxL hw==
Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35])
by mx08-00178001.pphosted.com with ESMTP id 2wkg6ku5yn-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Thu, 05 Dec 2019 15:08:11 +0100
Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20])
by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6C89F10002A;
Thu, 5 Dec 2019 15:08:10 +0100 (CET)
Received: from Webmail-eu.st.com (sfhdag6node2.st.com [10.75.127.17])
by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 521C42A89F9;
Thu, 5 Dec 2019 15:08:10 +0100 (CET)
Received: from localhost (10.75.127.45) by SFHDAG6NODE2.st.com (10.75.127.17)
with Microsoft SMTP Server (TLS) id 15.0.1347.2;
Thu, 5 Dec 2019 15:08:09 +0100
From: Pascal Paillet
To: Liam Girdwood , Mark Brown , Rob
Herring , Mark Rutland , Maxime
Coquelin , Alexandre Torgue
,
, ,
,
Subject: [PATCH v2] regulator: Convert stm32-pwr regulator to json-schema
Date: Thu, 5 Dec 2019 15:08:09 +0100
Message-ID: <20191205140809.19413-1-p.paillet@st.com>
X-Mailer: git-send-email 2.17.1
MIME-Version: 1.0
X-Originating-IP: [10.75.127.45]
X-ClientProxiedBy: SFHDAG7NODE1.st.com (10.75.127.19) To SFHDAG6NODE2.st.com
(10.75.127.17)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572
definitions=2019-12-05_03:2019-12-04,2019-12-05 signatures=0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20191205_060821_266432_20E175C3
X-CRM114-Status: GOOD ( 15.12 )
X-Spam-Score: -0.9 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
Content analysis details: (-0.9 points)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/,
low trust [91.207.212.93 listed in list.dnswl.org]
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily
valid
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id:
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe:
,
Cc: p.paillet@st.com
Sender: "linux-arm-kernel"
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
Convert the stm32-pwr regulator binding to DT schema format using
json-schema.
Signed-off-by: Pascal Paillet
---
Changes since v1:
- remove a regulator.yaml reference
- add /schemas/types.yaml#/definitions/phandle-array for supply
- fix indent below required
.../regulator/st,stm32mp1-pwr-reg.txt | 43 ------------
.../regulator/st,stm32mp1-pwr-reg.yaml | 66 +++++++++++++++++++
2 files changed, 66 insertions(+), 43 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.txt
create mode 100644 Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
diff --git a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.txt b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.txt
deleted file mode 100644
index e372dd3f0c8a..000000000000
--- a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-STM32MP1 PWR Regulators
------------------------
-
-Available Regulators in STM32MP1 PWR block are:
- - reg11 for regulator 1V1
- - reg18 for regulator 1V8
- - usb33 for the swtich USB3V3
-
-Required properties:
-- compatible: Must be "st,stm32mp1,pwr-reg"
-- list of child nodes that specify the regulator reg11, reg18 or usb33
- initialization data for defined regulators. The definition for each of
- these nodes is defined using the standard binding for regulators found at
- Documentation/devicetree/bindings/regulator/regulator.txt.
-- vdd-supply: phandle to the parent supply/regulator node for vdd input
-- vdd_3v3_usbfs-supply: phandle to the parent supply/regulator node for usb33
-
-Example:
-
-pwr_regulators: pwr@50001000 {
- compatible = "st,stm32mp1,pwr-reg";
- reg = <0x50001000 0x10>;
- vdd-supply = <&vdd>;
- vdd_3v3_usbfs-supply = <&vdd_usb>;
-
- reg11: reg11 {
- regulator-name = "reg11";
- regulator-min-microvolt = <1100000>;
- regulator-max-microvolt = <1100000>;
- };
-
- reg18: reg18 {
- regulator-name = "reg18";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- };
-
- usb33: usb33 {
- regulator-name = "usb33";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-};
diff --git a/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
new file mode 100644
index 000000000000..cc66a7c91260
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/st,stm32mp1-pwr-reg.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/st,stm32mp1-pwr-reg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STM32MP1 PWR voltage regulators
+
+maintainers:
+ - Pascal Paillet
+
+properties:
+ compatible:
+ const: st,stm32mp1,pwr-reg
+
+ reg:
+ maxItems: 1
+
+ vdd-supply:
+ description: Input supply phandle(s) for vdd input
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ vdd_3v3_usbfs-supply:
+ description: Input supply phandle(s) for vdd_3v3_usbfs input
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+patternProperties:
+ "^(reg11|reg18|usb33)$":
+ type: object
+
+ allOf:
+ - $ref: "regulator.yaml#"
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ pwr@50001000 {
+ compatible = "st,stm32mp1,pwr-reg";
+ reg = <0x50001000 0x10>;
+ vdd-supply = <&vdd>;
+ vdd_3v3_usbfs-supply = <&vdd_usb>;
+
+ reg11 {
+ regulator-name = "reg11";
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ };
+
+ reg18 {
+ regulator-name = "reg18";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ usb33 {
+ regulator-name = "usb33";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ };
+...