Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2528683ybk; Mon, 18 May 2020 01:07:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVhXPcCUErRGGINKA4NQUP2YEH2vZEm18kw9pxXjT0yAvF2uFMr9nWXvLnsSdZKhUbHIgW X-Received: by 2002:a05:6402:d0a:: with SMTP id eb10mr12105041edb.60.1589789250567; Mon, 18 May 2020 01:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589789250; cv=none; d=google.com; s=arc-20160816; b=OiqL+5nOYGLRIdrsLJjqXzkj94DV1Xy+5Zu5otxTHCxT2asN1CoMP3d1yXECSp5CtD gMOsIACRiqRZPvc89iXR7DHRtOZe3AsJaU00aOIL+Rci0ereoY2zZdoBhT31vX8S5xc+ MfBMyH0wGW+BFmI5zMKxALXmCsCwYgDAAJW1hz1jPQK+Yp5A9SqJ8H1I6ODq5u5llQzB o1vDAi7gg6Kkf8+kRDKfHyHO5zZzH3mY2xRU5iaG7L+aKbqeX9NglVU+4bHnpe9wqk11 yuagtzDAKu0IYwNJIMofVwzneikLUbJZUkO2oXTv9SLtql+F39Sd6UV/TKCBN2xmQpiw /lgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=p9KDO7tTXj8IIx/6LSdJidhfj9rJrw2bV51otC3BN8Y=; b=EdPsQbAWHxQwzHkRYMhGjOpCdnGHPa/Cy23U8BcPqaZd5vr+0pH2H2K3PiQiaosXmx SSf+E1slcLX2JlYBvv9AhEQohc/puPKv+5ANQubX/ZWdZXZlz7o+w+HsWemOs/3LuFtC OrpUKNho2cJyt6uQaWAwPIsGqTO0GmAhSIvFk+fXPheYvReEQHMZXnoq9LZRa1cN/G+W +TD8f0tWiQn36gOCeRxKv5fCPVj3xiRh8OjhB7/8bY2q1T/6918ZYrP+Dj7zu2wi0YOV GMa1PBcfoOWdn2WFw5fATahPB5iUPD/sotFO7jomPEZzRGK+NE4J6TY/XdoVuc8ewGPF a0wQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si5886974ejx.250.2020.05.18.01.07.06; Mon, 18 May 2020 01:07:30 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727922AbgERIEr (ORCPT + 99 others); Mon, 18 May 2020 04:04:47 -0400 Received: from inva021.nxp.com ([92.121.34.21]:40212 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726828AbgERIEr (ORCPT ); Mon, 18 May 2020 04:04:47 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1CD4420096C; Mon, 18 May 2020 10:04:45 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id CEA28200977; Mon, 18 May 2020 10:04:41 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id AC46C402B4; Mon, 18 May 2020 16:04:37 +0800 (SGT) From: Anson Huang To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, paul.liu@linaro.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] dt-bindings: regulator: Convert anatop regulator to json-schema Date: Mon, 18 May 2020 15:55:05 +0800 Message-Id: <1589788505-18024-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the anatop regulator binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- .../bindings/regulator/anatop-regulator.txt | 40 --------- .../bindings/regulator/anatop-regulator.yaml | 94 ++++++++++++++++++++++ 2 files changed, 94 insertions(+), 40 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/anatop-regulator.txt create mode 100644 Documentation/devicetree/bindings/regulator/anatop-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt b/Documentation/devicetree/bindings/regulator/anatop-regulator.txt deleted file mode 100644 index a3106c7..0000000 --- a/Documentation/devicetree/bindings/regulator/anatop-regulator.txt +++ /dev/null @@ -1,40 +0,0 @@ -Anatop Voltage regulators - -Required properties: -- compatible: Must be "fsl,anatop-regulator" -- regulator-name: A string used as a descriptive name for regulator outputs -- anatop-reg-offset: Anatop MFD register offset -- anatop-vol-bit-shift: Bit shift for the register -- anatop-vol-bit-width: Number of bits used in the register -- anatop-min-bit-val: Minimum value of this register -- anatop-min-voltage: Minimum voltage of this regulator -- anatop-max-voltage: Maximum voltage of this regulator - -Optional properties: -- anatop-delay-reg-offset: Anatop MFD step time register offset -- anatop-delay-bit-shift: Bit shift for the step time register -- anatop-delay-bit-width: Number of bits used in the step time register -- vin-supply: The supply for this regulator -- anatop-enable-bit: Regulator enable bit offset - -Any property defined as part of the core regulator -binding, defined in regulator.txt, can also be used. - -Example: - - regulator-vddpu { - compatible = "fsl,anatop-regulator"; - regulator-name = "vddpu"; - regulator-min-microvolt = <725000>; - regulator-max-microvolt = <1300000>; - regulator-always-on; - anatop-reg-offset = <0x140>; - anatop-vol-bit-shift = <9>; - anatop-vol-bit-width = <5>; - anatop-delay-reg-offset = <0x170>; - anatop-delay-bit-shift = <24>; - anatop-delay-bit-width = <2>; - anatop-min-bit-val = <1>; - anatop-min-voltage = <725000>; - anatop-max-voltage = <1300000>; - }; diff --git a/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml b/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml new file mode 100644 index 0000000..a8c9dd0 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/anatop-regulator.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/anatop-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Anatop Voltage Regulators + +maintainers: + - Ying-Chun Liu (PaulLiu) + +allOf: + - $ref: "regulator.yaml#" + +properties: + compatible: + const: fsl,anatop-regulator + + regulator-name: + $ref: '/schemas/types.yaml#/definitions/string' + description: string used as a descriptive name for regulator outputs + + anatop-reg-offset: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the anatop MFD register offset. + + anatop-vol-bit-shift: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the bit shift for the register. + + anatop-vol-bit-width: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the number of bits used in the register. + + anatop-min-bit-val: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the minimum value of this register. + + anatop-min-voltage: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the minimum voltage of this regulator. + + anatop-max-voltage: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the maximum voltage of this regulator. + + anatop-delay-reg-offset: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the anatop MFD step time register offset. + + anatop-delay-bit-shift: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the bit shift for the step time register. + + anatop-delay-bit-width: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing the number of bits used in the step time register. + + anatop-enable-bit: + $ref: '/schemas/types.yaml#/definitions/uint32' + description: u32 value representing regulator enable bit offset. + + vin-supply: + $ref: '/schemas/types.yaml#/definitions/phandle' + description: input supply phandle. + +required: + - compatible + - regulator-name + - anatop-reg-offset + - anatop-vol-bit-shift + - anatop-vol-bit-width + - anatop-min-bit-val + - anatop-min-voltage + - anatop-max-voltage + +examples: + - | + regulator-vddpu { + compatible = "fsl,anatop-regulator"; + regulator-name = "vddpu"; + regulator-min-microvolt = <725000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + anatop-reg-offset = <0x140>; + anatop-vol-bit-shift = <9>; + anatop-vol-bit-width = <5>; + anatop-delay-reg-offset = <0x170>; + anatop-delay-bit-shift = <24>; + anatop-delay-bit-width = <2>; + anatop-min-bit-val = <1>; + anatop-min-voltage = <725000>; + anatop-max-voltage = <1300000>; + }; -- 2.7.4