Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5231048pxj; Tue, 22 Jun 2021 18:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBZwUqYz2bk0IAY4vnWjaeciIwcTGkTnH+0eY+QDBHlBPrkZJr8n+i9XTw3mVhMcYARkrD X-Received: by 2002:a92:c612:: with SMTP id p18mr142168ilm.54.1624413253290; Tue, 22 Jun 2021 18:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624413253; cv=none; d=google.com; s=arc-20160816; b=ioQ0Hu2naccnfTklw80j66Dr1zKB9RWxcGeuJWptPYxBHUS6d5z5+SO//J2Qkwkte3 9tpk8NshwOWB5ncxhJWNkpd+9l9w/5AIvoHvIeb1KHl8uq0rQnULvMUSyioB5ZnP9p1n mv4NP+QQdXnjRTklKX3ANt1ZFR67VdZW9WKaE9v+9x+RZT1kLLQipwbgfx2PEAPJ/JHL yeADLrgk//xGjt0BYZxfBnmvecVjsvtslE0aO/clogdVS+AbSTFZp617VddZbG/SPsOX q6CWn2A7D9KuopLgMiXn3/+7/H0uzeAduCpRR4CnpuMqC9qzCy63V2Uhgo34ACOQsBe7 MhuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=xWFPt8tL+0Qw+em+t0anFiK1y+RMapjdkC1GtRVUJms=; b=iEApVnoSKGOn0xzJ5sXzb6I5rluLeqHb/Is2NB4z3HmWwYxKZ5aAdIKO4SEGA6xXFx oHvW/EPTRzWElINljyqt4XALjhvRbW40+NviR4jg4XI71dtBW4WTrPf4bj1epzwiqmnJ Dj7dximLkUtHF8Tm4eGLJ3BEqx6sbDLlNck2UN932jWbh1NqmC8fDvYPf/92huTNLmjt 3WMxdcC3js4eWc0CBKV0WoaIwfi3vYcjqokcawSi/R8CG5l73DhZ1QQI7IuV2h+lBsLW k4MoaZ/B56nZ+fgjRV3Z1EMX7n/UAeNsJZbWluiomoGKY+TVj5EMEzXWITCzwC+OkCIb UdcA== 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 p16si22840192ioh.24.2021.06.22.18.53.58; Tue, 22 Jun 2021 18:54: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 S230122AbhFWByt (ORCPT + 99 others); Tue, 22 Jun 2021 21:54:49 -0400 Received: from mx.socionext.com ([202.248.49.38]:17764 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229769AbhFWBys (ORCPT ); Tue, 22 Jun 2021 21:54:48 -0400 Received: from unknown (HELO kinkan2-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 23 Jun 2021 10:52:31 +0900 Received: from mail.mfilter.local (m-filter-2 [10.213.24.62]) by kinkan2-ex.css.socionext.com (Postfix) with ESMTP id 243AF205902A; Wed, 23 Jun 2021 10:52:31 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Wed, 23 Jun 2021 10:52:31 +0900 Received: from plum.e01.socionext.com (unknown [10.212.243.119]) by kinkan2.css.socionext.com (Postfix) with ESMTP id 7523BB62AB; Wed, 23 Jun 2021 10:52:30 +0900 (JST) From: Kunihiko Hayashi To: Liam Girdwood , Mark Brown , Rob Herring Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Masami Hiramatsu , Kunihiko Hayashi Subject: [PATCH] dt-bindings: regulator: Convert UniPhier regulator to json-schema Date: Wed, 23 Jun 2021 10:52:17 +0900 Message-Id: <1624413137-17453-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the UniPhier regulator binding to DT schema format. Signed-off-by: Kunihiko Hayashi --- .../regulator/socionext,uniphier-regulator.yaml | 85 ++++++++++++++++++++++ .../bindings/regulator/uniphier-regulator.txt | 58 --------------- 2 files changed, 85 insertions(+), 58 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/uniphier-regulator.txt diff --git a/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml b/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml new file mode 100644 index 0000000..861d5f3 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/socionext,uniphier-regulator.yaml @@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/socionext,uniphier-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Socionext UniPhier regulator controller + +description: | + This regulator controls VBUS and belongs to USB3 glue layer. Before using + the regulator, it is necessary to control the clocks and resets to enable + this layer. These clocks and resets should be described in each property. + +maintainers: + - Kunihiko Hayashi + +allOf: + - $ref: "regulator.yaml#" + +# USB3 Controller + +properties: + compatible: + enum: + - socionext,uniphier-pro4-usb3-regulator + - socionext,uniphier-pro5-usb3-regulator + - socionext,uniphier-pxs2-usb3-regulator + - socionext,uniphier-ld20-usb3-regulator + - socionext,uniphier-pxs3-usb3-regulator + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + oneOf: + - items: # for Pro4, Pro5 + - const: gio + - const: link + - items: # for others + - const: link + + resets: + minItems: 1 + maxItems: 2 + + reset-names: + oneOf: + - items: # for Pro4, Pro5 + - const: gio + - const: link + - items: + - const: link + +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - resets + - reset-names + +examples: + - | + usb-glue@65b00000 { + compatible = "simple-mfd"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x65b00000 0x400>; + + usb_vbus0: regulators@100 { + compatible = "socionext,uniphier-ld20-usb3-regulator"; + reg = <0x100 0x10>; + clock-names = "link"; + clocks = <&sys_clk 14>; + reset-names = "link"; + resets = <&sys_rst 14>; + }; + }; + diff --git a/Documentation/devicetree/bindings/regulator/uniphier-regulator.txt b/Documentation/devicetree/bindings/regulator/uniphier-regulator.txt deleted file mode 100644 index 94fd38b..0000000 --- a/Documentation/devicetree/bindings/regulator/uniphier-regulator.txt +++ /dev/null @@ -1,58 +0,0 @@ -Socionext UniPhier Regulator Controller - -This describes the devicetree bindings for regulator controller implemented -on Socionext UniPhier SoCs. - -USB3 Controller ---------------- - -This regulator controls VBUS and belongs to USB3 glue layer. Before using -the regulator, it is necessary to control the clocks and resets to enable -this layer. These clocks and resets should be described in each property. - -Required properties: -- compatible: Should be - "socionext,uniphier-pro4-usb3-regulator" - for Pro4 SoC - "socionext,uniphier-pro5-usb3-regulator" - for Pro5 SoC - "socionext,uniphier-pxs2-usb3-regulator" - for PXs2 SoC - "socionext,uniphier-ld20-usb3-regulator" - for LD20 SoC - "socionext,uniphier-pxs3-usb3-regulator" - for PXs3 SoC -- reg: Specifies offset and length of the register set for the device. -- clocks: A list of phandles to the clock gate for USB3 glue layer. - According to the clock-names, appropriate clocks are required. -- clock-names: Should contain - "gio", "link" - for Pro4 and Pro5 SoCs - "link" - for others -- resets: A list of phandles to the reset control for USB3 glue layer. - According to the reset-names, appropriate resets are required. -- reset-names: Should contain - "gio", "link" - for Pro4 and Pro5 SoCs - "link" - for others - -See Documentation/devicetree/bindings/regulator/regulator.txt -for more details about the regulator properties. - -Example: - - usb-glue@65b00000 { - compatible = "socionext,uniphier-ld20-dwc3-glue", - "simple-mfd"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 0x65b00000 0x400>; - - usb_vbus0: regulators@100 { - compatible = "socionext,uniphier-ld20-usb3-regulator"; - reg = <0x100 0x10>; - clock-names = "link"; - clocks = <&sys_clk 14>; - reset-names = "link"; - resets = <&sys_rst 14>; - }; - - phy { - ... - phy-supply = <&usb_vbus0>; - }; - ... - }; -- 2.7.4