Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1783640ybl; Thu, 5 Dec 2019 07:00:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwiBtc4aBvzU95xgkLb3HDW9dsTU50/ogUv9Z85qqKWIVy+krt/xyUsLDSN+ndxpBImjr8b X-Received: by 2002:a05:6830:60f:: with SMTP id w15mr6898143oti.225.1575558011986; Thu, 05 Dec 2019 07:00:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575558011; cv=none; d=google.com; s=arc-20160816; b=iQUUFDfu31NGROgg5/pLU54kIVN21+JfrJND/+TlqLZYPTeqBd0HrsT7qd5VQA9NNm VPb2myWYqaQkIGDXOsAxJdrV3+5OWfoULAYdumIbmMoJ+TwDd2zpsbXaWkH0zBS83gPU SImkvWOIQjAJzP2oNs+h041eXGKK3pu3g2CL47/hoXgvIbg6Qr0Em8B1zJWFh6ZG61s4 zqjsx9Cit7N2LY1Y+NDKCCptAcjllDbJmB48tMikGvBJ46I3OM6uKDwh4NPYEq6vWVWu khbqZ/48x4aM6TQtH4VGAf4nWeKJitR4NV0jKv7tDn+zbzlCm19puWoO+71LQ7MptoNx ZSag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yML/O2kFHMTRf1c7RkJFX51KDog/nA4wh+/QM3z//5A=; b=rXzaHYm2bE0KmvSUiwxUW52hgtbd14q8ufTnovSdMAd6c9ASZbFrfLoytyz/N9cXxJ 7FjWWJUPve3Dc1WlJKFRcfSrPsr4rYWvmp53dqE2fZCRiyEaR4A/VuiB5nOoXfgsRTV+ R3uX5sP93c57XO4LJDIZtK+CIz5RF0jeQb75NuCPtQCSM97GMi4Qp44cLTliUCuLDTvt PqBkx1hvbFMqMeavovQQ57DaXSXd51r72iqHaoCfraviOVtJKXTtU+owRK+rTid4O6GP q0QpgSjghZQjb54TOfBGBSDmVKAXVolSYs8leUmnDyey0ZKPU0W9B0P5js/TgOkJLtlp qpqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pXVarShP; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s128si4866597oib.249.2019.12.05.06.59.59; Thu, 05 Dec 2019 07:00:11 -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=@kernel.org header.s=default header.b=pXVarShP; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729640AbfLEO6X (ORCPT + 99 others); Thu, 5 Dec 2019 09:58:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:53192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729099AbfLEO6X (ORCPT ); Thu, 5 Dec 2019 09:58:23 -0500 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D181B2464F; Thu, 5 Dec 2019 14:58:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575557902; bh=AuxIhNzVenY1YORsvEg+wFXj6r70v48oXJ1iiIrdDFA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pXVarShPWA1HkuNKryg4YeaoV53ibXTtwYDPHUfdv+ET3MXVauHJJenM6X4SNL8vU wB4/Nyaq8Ri/tLoAs0p9NTyaCSHmAazwJ/d0oqvoMTO88+dX1B6NGF4N1OL/Z0kUS8 sor0Wy2wU8tM/inVIX3LopV2IyAvHmviAXXFJhws= Received: by mail-qk1-f170.google.com with SMTP id a10so3535922qko.9; Thu, 05 Dec 2019 06:58:21 -0800 (PST) X-Gm-Message-State: APjAAAWIVPWDpU9pHKBLE+by3d6JJXUXunNrJ4rqMt8Qs+FgpyNd1Ugn i2aZgjupmLBFoD1hSoTYZaj/Rk/wpmBPOLtW2g== X-Received: by 2002:a05:620a:1eb:: with SMTP id x11mr9028132qkn.254.1575557900890; Thu, 05 Dec 2019 06:58:20 -0800 (PST) MIME-Version: 1.0 References: <20191205140809.19413-1-p.paillet@st.com> In-Reply-To: <20191205140809.19413-1-p.paillet@st.com> From: Rob Herring Date: Thu, 5 Dec 2019 08:58:09 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] regulator: Convert stm32-pwr regulator to json-schema To: Pascal Paillet Cc: Liam Girdwood , Mark Brown , Mark Rutland , Maxime Coquelin , Alexandre Torgue , "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 5, 2019 at 8:08 AM Pascal Paillet wrote: > > 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 Why? That's wrong as *-supply already has a type definition. > - 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 >