Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1720307ybg; Sat, 19 Oct 2019 01:03:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVIrB18EWrXooNaipKxQhYSMcpMPjkWrtSl9VDwIqfPv4uhaSIg0mfWEVHKmt7yB5eW1co X-Received: by 2002:a50:d615:: with SMTP id x21mr14018642edi.297.1571472209740; Sat, 19 Oct 2019 01:03:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472209; cv=none; d=google.com; s=arc-20160816; b=vbVr81EGFpARh3E751dM2/SCbK3hfrPwlZ/0cFmd4g1vCTVm8fk7vd8n4l2+oL9D3a H6juJgexxR/G6VwpqmultX8fx/onDYtlwaEvOw0l32lb/MWuMNpeuMmVFEA3d/3JxMGi r+gWUW1KWcPmBJ9L8oZoVRJ3tr2VdF4fl2Mhj6hoeCOO1NVbKI3hBrOurCdV4ivachXa UAWBj7gMadGcsIxNRAh2M4D8pQwz5yGKvxH5yDBULY7fQRJaXL6Nb0Gn8YCDX8zfl0AL lOfX+d7SVj/aHfSdCn+AJ6EoRqIwoqynUCFtgpmsWZrlDudayGycxKXIhIWMyZZtRWwt SUzQ== 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=QTxJ1LqWyCUcyrdugQarkkyyIUVZydqYSzIwCGcSIqQ=; b=jxnliQbk9UlS4+cvUmpj36lWxbiKMy5HYJT37lM4f6pqSP+wWPZreA9fociPkTRwbZ yJe0o09yym0wZjm1DZMmpkny2ZH5lQWdx5neJsVk5sTT+LaSpP6S+SIh822dwPbb19gg l5jsIpY6hJDEBmhD2YajtmMTvzuPmTttUCliZYEw9UQA3TYAtFm4CoV0shnc1+R0yI02 qMZCUibuHHrnJJv7qYgowHUvzFyuKBzQdyxbqclRahExds0NrgSkPoA/AUEjkDPE9dSv Vp+MRGokLV6LivYIQ6XqPnaMSfK+ikOTanGC2/1mEonjdpaOk/f+ZJtJrtB+YZ3LF1JF Bnpg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si4760228ejr.244.2019.10.19.01.03.06; Sat, 19 Oct 2019 01:03:29 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632868AbfJRIjR (ORCPT + 99 others); Fri, 18 Oct 2019 04:39:17 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:44409 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727903AbfJRIjR (ORCPT ); Fri, 18 Oct 2019 04:39:17 -0400 X-IronPort-AV: E=Sophos;i="5.67,311,1566831600"; d="scan'208";a="29209172" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 18 Oct 2019 17:39:14 +0900 Received: from localhost.localdomain (unknown [10.166.17.210]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 65ACA4000C6E; Fri, 18 Oct 2019 17:39:14 +0900 (JST) From: Yoshihiro Shimoda To: kishon@ti.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH] dt-bindings: phy: renesas: usb3-phy: convert bindings to json-schema Date: Fri, 18 Oct 2019 17:39:14 +0900 Message-Id: <1571387954-23446-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert Renesas R-Car generation 3 USB 3.0 PHY bindings documentation to json-schema. Signed-off-by: Yoshihiro Shimoda --- .../devicetree/bindings/phy/rcar-gen3-phy-usb3.txt | 52 -------------- .../devicetree/bindings/phy/renesas,usb3-phy.yaml | 80 ++++++++++++++++++++++ 2 files changed, 80 insertions(+), 52 deletions(-) delete mode 100644 Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb3.txt create mode 100644 Documentation/devicetree/bindings/phy/renesas,usb3-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb3.txt b/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb3.txt deleted file mode 100644 index 0fe433b..00000000 --- a/Documentation/devicetree/bindings/phy/rcar-gen3-phy-usb3.txt +++ /dev/null @@ -1,52 +0,0 @@ -* Renesas R-Car generation 3 USB 3.0 PHY - -This file provides information on what the device node for the R-Car generation -3 and RZ/G2 USB 3.0 PHY contain. -If you want to enable spread spectrum clock (ssc), you should use USB_EXTAL -instead of USB3_CLK. However, if you don't want to these features, you don't -need this driver. - -Required properties: -- compatible: "renesas,r8a774a1-usb3-phy" if the device is a part of an R8A774A1 - SoC. - "renesas,r8a774b1-usb3-phy" if the device is a part of an R8A774B1 - SoC. - "renesas,r8a7795-usb3-phy" if the device is a part of an R8A7795 - SoC. - "renesas,r8a7796-usb3-phy" if the device is a part of an R8A7796 - SoC. - "renesas,r8a77965-usb3-phy" if the device is a part of an - R8A77965 SoC. - "renesas,rcar-gen3-usb3-phy" for a generic R-Car Gen3 or RZ/G2 - compatible device. - - When compatible with the generic version, nodes must list the - SoC-specific version corresponding to the platform first - followed by the generic version. - -- reg: offset and length of the USB 3.0 PHY register block. -- clocks: A list of phandles and clock-specifier pairs. -- clock-names: Name of the clocks. - - The funcional clock must be "usb3-if". - - The usb3's external clock must be "usb3s_clk". - - The usb2's external clock must be "usb_extal". If you want to use the ssc, - the clock-frequency must not be 0. -- #phy-cells: see phy-bindings.txt in the same directory, must be <0>. - -Optional properties: -- renesas,ssc-range: Enable/disable spread spectrum clock (ssc) by using - the following values as u32: - - 0 (or the property doesn't exist): disable the ssc - - 4980: enable the ssc as -4980 ppm - - 4492: enable the ssc as -4492 ppm - - 4003: enable the ssc as -4003 ppm - -Example (R-Car H3): - - usb-phy@e65ee000 { - compatible = "renesas,r8a7795-usb3-phy", - "renesas,rcar-gen3-usb3-phy"; - reg = <0 0xe65ee000 0 0x90>; - clocks = <&cpg CPG_MOD 328>, <&usb3s0_clk>, <&usb_extal>; - clock-names = "usb3-if", "usb3s_clk", "usb_extal"; - }; diff --git a/Documentation/devicetree/bindings/phy/renesas,usb3-phy.yaml b/Documentation/devicetree/bindings/phy/renesas,usb3-phy.yaml new file mode 100644 index 00000000..42239e3 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/renesas,usb3-phy.yaml @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/renesas,usb3-phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas R-Car generation 3 USB 3.0 PHY + +maintainers: + - Yoshihiro Shimoda + +properties: + compatible: + oneOf: + - items: + - enum: + - renesas,r8a774a1-usb3-phy # RZ/G2M + - renesas,r8a774b1-usb3-phy # RZ/G2N + - renesas,r8a7795-usb3-phy # R-Car H3 + - renesas,r8a7796-usb3-phy # R-Car M3-W + - renesas,r8a77965-usb3-phy # R-Car M3-N + - const: renesas,rcar-gen3-usb3-phy + + reg: + # base address and length of the registers block for the PHY. + maxItems: 1 + + clocks: + # A list of phandles and clock-specifier pairs. + maxItems: 3 + + clock-names: + # If you want to use the ssc, the clock-frequency of usb_extal + # must not be 0. + maxItems: 3 + items: + - const: usb3-if # The funcional clock + - const: usb3s_clk # The usb3's external clock + - const: usb_extal # The usb2's external clock + + '#phy-cells': + # see phy-bindings.txt in the same directory + const: 0 + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + renesas,ssc-range: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Enable/disable spread spectrum clock (ssc) by using the following values + - 0 (or the property doesn't exist): disable the ssc + - 4980: enable the ssc as -4980 ppm + - 4492: enable the ssc as -4492 ppm + - 4003: enable the ssc as -4003 ppm + +required: + - compatible + - reg + - clocks + - clock-names + - '#phy-cells' + +additionalProperties: false + +examples: + - | + #include + #include + + usb-phy@e65ee000 { + compatible = "renesas,r8a7795-usb3-phy", "renesas,rcar-gen3-usb3-phy"; + reg = <0 0xe65ee000 0 0x90>; + clocks = <&cpg CPG_MOD 328>, <&usb3s0_clk>, <&usb_extal>; + clock-names = "usb3-if", "usb3s_clk", "usb_extal"; + #phy-cells = <0>; + }; -- 2.7.4