Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1727085ybl; Thu, 5 Dec 2019 06:10:25 -0800 (PST) X-Google-Smtp-Source: APXvYqymEHt21STTB9clgoK/8E9/33EKwCBuzolnpVf7g2cd7tiiJSkMYyo6DSaYu15wdmn9RfGV X-Received: by 2002:a54:4f8e:: with SMTP id g14mr7082608oiy.144.1575555025513; Thu, 05 Dec 2019 06:10:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575555025; cv=none; d=google.com; s=arc-20160816; b=cBdNFI/N0RgBSi5ajhhYfgGbxfY87Z+Yf4JVEqD+qwsxT7H81tST+5KuxVjUPq1zao MpwfsEk5TaZvoOx2YGPAC1tpglfDiQwXq3Ayssg7AcPAWpsMuq+8eWf7n6hFSreI1PI1 W657BBaBgHDmhu4vCN+0tibqoZV9IX750+MtwG4IOE/WvG630R/DLgRjNWHOOpK9b/15 wNCzOjGB7bLXow2Q7Zf6PIjv3dCGSdlOnndLkEGqgmdq/EIIFodM3tuUTuDXhtn/TvQx vywowGEXUisq50Qksa71qO4iYGCRu40CPvn3sDZvVp2+pSj0cIBD8o1dh3kmFd6wTDD8 RNOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=ZunBs5XNBGkzdynuEgHyci3GLZOhq0qbk3yNCy97EIA=; b=Iaxxa2yXe4tS2NjnmFSqsdu9LyjHMvukVKB7PHhJAguK8Pt7kbUZXgzoqQn4Zh7T+0 8G48V3tjscOmUVERD7mvf5Uq1PCzIy42JiXhfpbKkEFVlGfGAn19fajRxp7PHehHPVI4 ufX8IiFVuu1tOxUEtoIVgyqreyHllBJcCxJDFwsCXb7xuhXegkrul7ziFSnWBf9h+B5U Xl7JKWM91oN/r/KDrP3kLKTjSQlnXV2e9LmlNuzrCgjy7yup6bUUV1pk+pCIXc5q66T4 t8F+/gMdgOivCJEJW9bW0xj6J3b3Q0Q9h+YvMRcjx5j1wzjLRqTz8U/pPRUc2k4x/Rs1 bQFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=cpTsspLd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si4217348otn.301.2019.12.05.06.10.10; Thu, 05 Dec 2019 06:10:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=cpTsspLd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729587AbfLEOI0 (ORCPT + 99 others); Thu, 5 Dec 2019 09:08:26 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:50590 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729187AbfLEOI0 (ORCPT ); Thu, 5 Dec 2019 09:08:26 -0500 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 , , , , CC: 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 Content-Type: text/plain 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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>; + }; + }; +... -- 2.17.1