From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: [PATCH 2/6] dt-bindings: usb: Convert the generic OHCI binding to YAML Date: Tue, 16 Apr 2019 10:27:58 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Greg Kroah-Hartman Cc: Mark Rutland , devicetree@vger.kernel.org, Maxime Ripard , linux-usb@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org The generic OHCI binding is used by many controllers that are using the OHCI spec. Convert that binding to a YAML description to enable the validation on all the nodes using that binding. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/usb/generic-ohci.yaml | 89 ++++++++++- Documentation/devicetree/bindings/usb/usb-ohci.txt | 35 +---- 2 files changed, 89 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/generic-ohci.yaml delete mode 100644 Documentation/devicetree/bindings/usb/usb-ohci.txt diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml new file mode 100644 index 000000000000..da5a14becbe5 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/generic-ohci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB OHCI Controller Device Tree Bindings + +allOf: + - $ref: "usb-hcd.yaml" + +maintainers: + - Greg Kroah-Hartman + +properties: + compatible: + contains: + const: generic-ohci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + minItems: 1 + maxItems: 2 + + clocks: + minItems: 1 + maxItems: 3 + description: | + In case the Renesas R-Car Gen3 SoCs: + - if a host only channel: first clock should be host. + - if a USB DRD channel: first clock should be host and second + one should be peripheral + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian descriptors and big + endian registers. + + big-endian-desc: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian descriptors. + + big-endian-regs: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian registers. + + remote-wakeup-connected: + $ref: /schemas/types.yaml#/definitions/flag + description: + Remote wakeup is wired on the platform. + + no-big-frame-no: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set if frame_no lives in bits [15:0] of HCCA + + num-ports: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Overrides the detected port count + + phys: true + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + ohci0: usb@1c14400 { + compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; + reg = <0x01c14400 0x100>; + interrupts = <64>; + clocks = <&usb_clk 6>, <&ahb_gates 2>; + phys = <&usbphy 1>; + }; + +... diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt deleted file mode 100644 index aaaa5255c972..000000000000 --- a/Documentation/devicetree/bindings/usb/usb-ohci.txt +++ /dev/null @@ -1,35 +0,0 @@ -USB OHCI controllers - -Required properties: -- compatible : "generic-ohci" -- reg : ohci controller register range (address and length) -- interrupts : ohci controller interrupt - -Optional properties: -- big-endian-regs : boolean, set this for hcds with big-endian registers -- big-endian-desc : boolean, set this for hcds with big-endian descriptors -- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc -- no-big-frame-no : boolean, set if frame_no lives in bits [15:0] of HCCA -- remote-wakeup-connected: remote wakeup is wired on the platform -- num-ports : u32, to override the detected port count -- clocks : a list of phandle + clock specifier pairs. In case of Renesas - R-Car Gen3 SoCs: - - if a host only channel: first clock should be host. - - if a USB DRD channel: first clock should be host and second one - should be peripheral. -- phys : see usb-hcd.txt in the current directory -- resets : a list of phandle + reset specifier pairs - -additionally the properties from usb-hcd.txt (in the current directory) are -supported. - -Example: - - ohci0: usb@1c14400 { - compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; - reg = <0x01c14400 0x100>; - interrupts = <64>; - clocks = <&usb_clk 6>, <&ahb_gates 2>; - phys = <&usbphy 1>; - phy-names = "usb"; - }; -- git-series 0.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [2/6] dt-bindings: usb: Convert the generic OHCI binding to YAML From: Maxime Ripard Message-Id: Date: Tue, 16 Apr 2019 10:27:58 +0200 To: Greg Kroah-Hartman Cc: Mark Rutland , Rob Herring , Frank Rowand , linux-usb@vger.kernel.org, Chen-Yu Tsai , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org List-ID: VGhlIGdlbmVyaWMgT0hDSSBiaW5kaW5nIGlzIHVzZWQgYnkgbWFueSBjb250cm9sbGVycyB0aGF0 IGFyZSB1c2luZyB0aGUKT0hDSSBzcGVjLgoKQ29udmVydCB0aGF0IGJpbmRpbmcgdG8gYSBZQU1M IGRlc2NyaXB0aW9uIHRvIGVuYWJsZSB0aGUgdmFsaWRhdGlvbiBvbiBhbGwKdGhlIG5vZGVzIHVz aW5nIHRoYXQgYmluZGluZy4KClNpZ25lZC1vZmYtYnk6IE1heGltZSBSaXBhcmQgPG1heGltZS5y aXBhcmRAYm9vdGxpbi5jb20+Ci0tLQogRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdz L3VzYi9nZW5lcmljLW9oY2kueWFtbCB8IDg5ICsrKysrKysrKystCiBEb2N1bWVudGF0aW9uL2Rl dmljZXRyZWUvYmluZGluZ3MvdXNiL3VzYi1vaGNpLnR4dCAgICAgIHwgMzUgKy0tLS0KIDIgZmls ZXMgY2hhbmdlZCw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b21wYXRpYmxlOgorICAgIGNvbnRhaW5zOgorICAgICAgY29uc3Q6IGdlbmVy aWMtb2hjaQorCisgIHJlZzoKKyAgICBtYXhJdGVtczogMQorCisgIGludGVycnVwdHM6CisgICAg bWF4SXRlbXM6IDEKKworICByZXNldHM6CisgICAgbWluSXRlbXM6IDEKKyAgICBtYXhJdGVtczog MgorCisgIGNsb2NrczoKKyAgICBtaW5JdGVtczogMQorICAgIG1heEl0ZW1zOiAzCisgICAgZGVz Y3JpcHRpb246IHwKKyAgICAgIEluIGNhc2UgdGhlIFJlbmVzYXMgUi1DYXIgR2VuMyBTb0NzOgor ICAgICAgICAtIGlmIGEgaG9zdCBvbmx5IGNoYW5uZWw6IGZpcnN0IGNsb2NrIHNob3VsZCBiZSBo b3N0LgorICAgICAgICAtIGlmIGEgVVNCIERSRCBjaGFubmVsOiBmaXJzdCBjbG9jayBzaG91bGQg YmUgaG9zdCBhbmQgc2Vjb25kCisgICAgICAgICAgb25lIHNob3VsZCBiZSBwZXJpcGhlcmFsCisK KyAgYmlnLWVuZGlhbjoKKyAgICAkcmVmOiAvc2NoZW1hcy90eXBlcy55YW1sIy9kZWZpbml0aW9u cy9mbGFnCisgICAgZGVzY3JpcHRpb246CisgICAgICBTZXQgdGhpcyBmbGFnIGZvciBIQ0RzIHdp dGggYmlnIGVuZGlhbiBkZXNjcmlwdG9ycyBhbmQgYmlnCisgICAgICBlbmRpYW4gcmVnaXN0ZXJz LgorCisgIGJpZy1lbmRpYW4tZGVzYzoKKyAgICAkcmVmOiAvc2NoZW1hcy90eXBlcy55YW1sIy9k ZWZpbml0aW9ucy9mbGFnCisgICAgZGVzY3JpcHRpb246CisgICAgICBTZXQgdGhpcyBmbGFnIGZv ciBIQ0RzIHdpdGggYmlnIGVuZGlhbiBkZXNjcmlwdG9ycy4KKworICBiaWctZW5kaWFuLXJlZ3M6 CisgICAgJHJlZjogL3NjaGVtYXMvdHlwZXMueWFtbCMvZGVmaW5pdGlvbnMvZmxhZworICAg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IDE+OwotCQlwaHktbmFtZXMgPSAidXNiIjsKLQl9Owo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B29FFC10F13 for ; Tue, 16 Apr 2019 08:28:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8AFC22086A for ; Tue, 16 Apr 2019 08:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728393AbfDPI2N (ORCPT ); Tue, 16 Apr 2019 04:28:13 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:42153 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbfDPI2N (ORCPT ); Tue, 16 Apr 2019 04:28:13 -0400 X-Originating-IP: 90.88.18.121 Received: from localhost (aaubervilliers-681-1-63-121.w90-88.abo.wanadoo.fr [90.88.18.121]) (Authenticated sender: maxime.ripard@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 5805F240008; Tue, 16 Apr 2019 08:28:08 +0000 (UTC) From: Maxime Ripard To: Greg Kroah-Hartman Cc: Mark Rutland , Rob Herring , Frank Rowand , linux-usb@vger.kernel.org, Chen-Yu Tsai , Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] dt-bindings: usb: Convert the generic OHCI binding to YAML Date: Tue, 16 Apr 2019 10:27:58 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Message-ID: <20190416082758.MItqM8li-3W4b6nd4vbKdMQp3CiLJJMdLlT4VDF0zfk@z> The generic OHCI binding is used by many controllers that are using the OHCI spec. Convert that binding to a YAML description to enable the validation on all the nodes using that binding. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/usb/generic-ohci.yaml | 89 ++++++++++- Documentation/devicetree/bindings/usb/usb-ohci.txt | 35 +---- 2 files changed, 89 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/generic-ohci.yaml delete mode 100644 Documentation/devicetree/bindings/usb/usb-ohci.txt diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml new file mode 100644 index 000000000000..da5a14becbe5 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/generic-ohci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB OHCI Controller Device Tree Bindings + +allOf: + - $ref: "usb-hcd.yaml" + +maintainers: + - Greg Kroah-Hartman + +properties: + compatible: + contains: + const: generic-ohci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + minItems: 1 + maxItems: 2 + + clocks: + minItems: 1 + maxItems: 3 + description: | + In case the Renesas R-Car Gen3 SoCs: + - if a host only channel: first clock should be host. + - if a USB DRD channel: first clock should be host and second + one should be peripheral + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian descriptors and big + endian registers. + + big-endian-desc: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian descriptors. + + big-endian-regs: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian registers. + + remote-wakeup-connected: + $ref: /schemas/types.yaml#/definitions/flag + description: + Remote wakeup is wired on the platform. + + no-big-frame-no: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set if frame_no lives in bits [15:0] of HCCA + + num-ports: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Overrides the detected port count + + phys: true + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + ohci0: usb@1c14400 { + compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; + reg = <0x01c14400 0x100>; + interrupts = <64>; + clocks = <&usb_clk 6>, <&ahb_gates 2>; + phys = <&usbphy 1>; + }; + +... diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt deleted file mode 100644 index aaaa5255c972..000000000000 --- a/Documentation/devicetree/bindings/usb/usb-ohci.txt +++ /dev/null @@ -1,35 +0,0 @@ -USB OHCI controllers - -Required properties: -- compatible : "generic-ohci" -- reg : ohci controller register range (address and length) -- interrupts : ohci controller interrupt - -Optional properties: -- big-endian-regs : boolean, set this for hcds with big-endian registers -- big-endian-desc : boolean, set this for hcds with big-endian descriptors -- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc -- no-big-frame-no : boolean, set if frame_no lives in bits [15:0] of HCCA -- remote-wakeup-connected: remote wakeup is wired on the platform -- num-ports : u32, to override the detected port count -- clocks : a list of phandle + clock specifier pairs. In case of Renesas - R-Car Gen3 SoCs: - - if a host only channel: first clock should be host. - - if a USB DRD channel: first clock should be host and second one - should be peripheral. -- phys : see usb-hcd.txt in the current directory -- resets : a list of phandle + reset specifier pairs - -additionally the properties from usb-hcd.txt (in the current directory) are -supported. - -Example: - - ohci0: usb@1c14400 { - compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; - reg = <0x01c14400 0x100>; - interrupts = <64>; - clocks = <&usb_clk 6>, <&ahb_gates 2>; - phys = <&usbphy 1>; - phy-names = "usb"; - }; -- git-series 0.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C992AC10F13 for ; Tue, 16 Apr 2019 08:29:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 959AD2073F for ; Tue, 16 Apr 2019 08:29:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iWKLFM9Y"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="UiFYKUph" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 959AD2073F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sD1SW6CFjfKtv+cViTCo0BUvW73Cbu619rMF8g8dHVQ=; b=iWKLFM9Y+c7kxg rpJNInGSUrWbMRxk0KdnOi9e/BDMVwrm++yXTj5MC3jQqNauczKvZiBXgt/5seM/G+zYDGw1iVe/c fScGkBST1mYmJCyirpAnypHw//noTtGSslK5n0zYMiHCCU5wosnPhbXfH+lflO4oKz/lw8WLPwf9t d+nLvpeL/a6usy3byzkMTND/oxWoLJ1PJ6onfMQAxXOnDgALa2Fich+pyLKYIokDEE4TVjJ49qCF3 W0jOej6t2MH5fKz30e/oHiOwNv3t3bQ7z0IYSeJx0IgP+vgAPdTGE4IM3ZHmqEY61hzb9scDp8uXN vnxLQWlr4j0sTDDBW2QA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGJT9-0003q7-Dp; Tue, 16 Apr 2019 08:29:31 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGJSP-00037u-4L for linux-arm-kernel@bombadil.infradead.org; Tue, 16 Apr 2019 08:28:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0k/NKYymy0mhdcMHKkMj9KLyWAR49nWfB34xCwebBZc=; b=UiFYKUph/LYM/AQ1YwqWeYF5ZR KtKC2ag8PdzD6XKecvWPHhmn56UdtIRNfRQflkw8GRA1gbhOaEmPwVZhGlh43YrlMqYMZEYYuq2Rf D7Vlo11zd00xslhO598KG0xesehnqzTd26lzAz1vDiXKbbdOTC0TMt7v0OwB2BuAgqyAua8Saf4X9 mh+XJsYDjgIIfIuP/KEmPD0XPX3b/D7e1h4yYe7OMz4ucmOpI87hVXKAApsqZfgkarCfXSYpN184l /GC36kEBe9SV482PaaTo6zorVufNGGhjqUj+zHtJnhnwq/eew1UX7vUqIZc6J7kzEgqpfvg3XEcDD Yl4DVZ9w==; Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGJSL-0000sS-FJ for linux-arm-kernel@lists.infradead.org; Tue, 16 Apr 2019 08:28:43 +0000 X-Originating-IP: 90.88.18.121 Received: from localhost (aaubervilliers-681-1-63-121.w90-88.abo.wanadoo.fr [90.88.18.121]) (Authenticated sender: maxime.ripard@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 5805F240008; Tue, 16 Apr 2019 08:28:08 +0000 (UTC) From: Maxime Ripard To: Greg Kroah-Hartman Subject: [PATCH 2/6] dt-bindings: usb: Convert the generic OHCI binding to YAML Date: Tue, 16 Apr 2019 10:27:58 +0200 Message-Id: X-Mailer: git-send-email 2.21.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_042842_111779_D2A96F85 X-CRM114-Status: GOOD ( 17.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Maxime Ripard , linux-usb@vger.kernel.org, Chen-Yu Tsai , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The generic OHCI binding is used by many controllers that are using the OHCI spec. Convert that binding to a YAML description to enable the validation on all the nodes using that binding. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/usb/generic-ohci.yaml | 89 ++++++++++- Documentation/devicetree/bindings/usb/usb-ohci.txt | 35 +---- 2 files changed, 89 insertions(+), 35 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/generic-ohci.yaml delete mode 100644 Documentation/devicetree/bindings/usb/usb-ohci.txt diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml new file mode 100644 index 000000000000..da5a14becbe5 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml @@ -0,0 +1,89 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/generic-ohci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: USB OHCI Controller Device Tree Bindings + +allOf: + - $ref: "usb-hcd.yaml" + +maintainers: + - Greg Kroah-Hartman + +properties: + compatible: + contains: + const: generic-ohci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + resets: + minItems: 1 + maxItems: 2 + + clocks: + minItems: 1 + maxItems: 3 + description: | + In case the Renesas R-Car Gen3 SoCs: + - if a host only channel: first clock should be host. + - if a USB DRD channel: first clock should be host and second + one should be peripheral + + big-endian: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian descriptors and big + endian registers. + + big-endian-desc: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian descriptors. + + big-endian-regs: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set this flag for HCDs with big endian registers. + + remote-wakeup-connected: + $ref: /schemas/types.yaml#/definitions/flag + description: + Remote wakeup is wired on the platform. + + no-big-frame-no: + $ref: /schemas/types.yaml#/definitions/flag + description: + Set if frame_no lives in bits [15:0] of HCCA + + num-ports: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Overrides the detected port count + + phys: true + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + ohci0: usb@1c14400 { + compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; + reg = <0x01c14400 0x100>; + interrupts = <64>; + clocks = <&usb_clk 6>, <&ahb_gates 2>; + phys = <&usbphy 1>; + }; + +... diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt deleted file mode 100644 index aaaa5255c972..000000000000 --- a/Documentation/devicetree/bindings/usb/usb-ohci.txt +++ /dev/null @@ -1,35 +0,0 @@ -USB OHCI controllers - -Required properties: -- compatible : "generic-ohci" -- reg : ohci controller register range (address and length) -- interrupts : ohci controller interrupt - -Optional properties: -- big-endian-regs : boolean, set this for hcds with big-endian registers -- big-endian-desc : boolean, set this for hcds with big-endian descriptors -- big-endian : boolean, for hcds with big-endian-regs + big-endian-desc -- no-big-frame-no : boolean, set if frame_no lives in bits [15:0] of HCCA -- remote-wakeup-connected: remote wakeup is wired on the platform -- num-ports : u32, to override the detected port count -- clocks : a list of phandle + clock specifier pairs. In case of Renesas - R-Car Gen3 SoCs: - - if a host only channel: first clock should be host. - - if a USB DRD channel: first clock should be host and second one - should be peripheral. -- phys : see usb-hcd.txt in the current directory -- resets : a list of phandle + reset specifier pairs - -additionally the properties from usb-hcd.txt (in the current directory) are -supported. - -Example: - - ohci0: usb@1c14400 { - compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; - reg = <0x01c14400 0x100>; - interrupts = <64>; - clocks = <&usb_clk 6>, <&ahb_gates 2>; - phys = <&usbphy 1>; - phy-names = "usb"; - }; -- git-series 0.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel