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=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 75C13C433DB for ; Thu, 4 Feb 2021 11:38:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3542B64F45 for ; Thu, 4 Feb 2021 11:38:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235898AbhBDLib (ORCPT ); Thu, 4 Feb 2021 06:38:31 -0500 Received: from foss.arm.com ([217.140.110.172]:56600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235857AbhBDLgc (ORCPT ); Thu, 4 Feb 2021 06:36:32 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6787411FB; Thu, 4 Feb 2021 03:35:46 -0800 (PST) Received: from [10.57.49.26] (unknown [10.57.49.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B4C483F73B; Thu, 4 Feb 2021 03:35:44 -0800 (PST) Subject: Re: [PATCH v2 1/7] dt-bindings: usb: convert rockchip,dwc3.txt to yaml To: Johan Jonker , heiko@sntech.de, Elaine Zhang Cc: devicetree@vger.kernel.org, balbi@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org References: <20210203165233.22177-1-jbx6244@gmail.com> From: Robin Murphy Message-ID: <41efd28c-ff64-2b9f-2cdc-ac4aaaeb4611@arm.com> Date: Thu, 4 Feb 2021 11:35:43 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210203165233.22177-1-jbx6244@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-03 16:52, Johan Jonker wrote: > In the past Rockchip dwc3 usb nodes were manually checked. > With the conversion of snps,dwc3.yaml as common document > we now can convert rockchip,dwc3.txt to yaml as well. > Remove node wrapper. > > Added properties for rk3399 are: > power-domains > resets > reset-names > > Signed-off-by: Johan Jonker > --- > .../devicetree/bindings/usb/rockchip,dwc3.txt | 56 ----------- > .../devicetree/bindings/usb/rockchip,dwc3.yaml | 103 +++++++++++++++++++++ > 2 files changed, 103 insertions(+), 56 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > create mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > > diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > deleted file mode 100644 > index 945204932..000000000 > --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > +++ /dev/null > @@ -1,56 +0,0 @@ > -Rockchip SuperSpeed DWC3 USB SoC controller > - > -Required properties: > -- compatible: should contain "rockchip,rk3399-dwc3" for rk3399 SoC > -- clocks: A list of phandle + clock-specifier pairs for the > - clocks listed in clock-names > -- clock-names: Should contain the following: > - "ref_clk" Controller reference clk, have to be 24 MHz > - "suspend_clk" Controller suspend clk, have to be 24 MHz or 32 KHz > - "bus_clk" Master/Core clock, have to be >= 62.5 MHz for SS > - operation and >= 30MHz for HS operation > - "grf_clk" Controller grf clk > - > -Required child node: > -A child node must exist to represent the core DWC3 IP block. The name of > -the node is not important. The content of the node is defined in dwc3.txt. > - > -Phy documentation is provided in the following places: > -Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml - USB2.0 PHY > -Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt - Type-C PHY > - > -Example device nodes: > - > - usbdrd3_0: usb@fe800000 { > - compatible = "rockchip,rk3399-dwc3"; > - clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, > - <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; > - clock-names = "ref_clk", "suspend_clk", > - "bus_clk", "grf_clk"; > - #address-cells = <2>; > - #size-cells = <2>; > - ranges; > - usbdrd_dwc3_0: dwc3@fe800000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0xfe800000 0x0 0x100000>; > - interrupts = ; > - dr_mode = "otg"; > - }; > - }; > - > - usbdrd3_1: usb@fe900000 { > - compatible = "rockchip,rk3399-dwc3"; > - clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>, > - <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>; > - clock-names = "ref_clk", "suspend_clk", > - "bus_clk", "grf_clk"; > - #address-cells = <2>; > - #size-cells = <2>; > - ranges; > - usbdrd_dwc3_1: dwc3@fe900000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0xfe900000 0x0 0x100000>; > - interrupts = ; > - dr_mode = "otg"; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > new file mode 100644 > index 000000000..fdf9497bc > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > @@ -0,0 +1,103 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/rockchip,dwc3.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip SuperSpeed DWC3 USB SoC controller > + > +maintainers: > + - Heiko Stuebner > + > +description: > + The common content of the node is defined in snps,dwc3.yaml. > + > + Phy documentation is provided in the following places. > + > + USB2.0 PHY > + Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml > + > + Type-C PHY > + Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt > + > +allOf: > + - $ref: snps,dwc3.yaml# > + > +properties: > + compatible: > + items: > + - enum: > + - rockchip,rk3399-dwc3 > + - const: snps,dwc3 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: > + Controller reference clock, must to be 24 MHz > + - description: > + Controller suspend clock, must to be 24 MHz or 32 KHz > + - description: > + Master/Core clock, must to be >= 62.5 MHz for SS > + operation and >= 30MHz for HS operation > + - description: > + Controller aclk_usb3_rksoc_axi_perf clock I'm pretty sure these last 3 don't belong to the controller itself, hence why they were in the glue layer node to being with. > + - description: > + Controller aclk_usb3 clock Does anything in the USB3 block actually consume this clock directly? If not, then I don't think it needs to be specified since it's already the parent of the controller's required bus_clk. I'm similarly suspicious of ACLK_USB3_NOC which is currently marked as CLK_IGNORE_UNUSED - if that's necessary for USB3 to function then it probably *should* be specified as part of the glue layer binding here. Robin. > + - description: > + Controller grf clock > + > + clock-names: > + items: > + - const: ref_clk > + - const: suspend_clk > + - const: bus_clk > + - const: aclk_usb3_rksoc_axi_perf > + - const: aclk_usb3 > + - const: grf_clk > + > + power-domains: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + reset-names: > + const: usb3-otg > + > +unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + > +examples: > + - | > + #include > + #include > + > + bus { > + #address-cells = <2>; > + #size-cells = <2>; > + > + usbdrd3_0: usb@fe800000 { > + compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; > + reg = <0x0 0xfe800000 0x0 0x100000>; > + interrupts = ; > + clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, > + <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>, > + <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>; > + clock-names = "ref_clk", "suspend_clk", > + "bus_clk", "aclk_usb3_rksoc_axi_perf", > + "aclk_usb3", "grf_clk"; > + dr_mode = "otg"; > + }; > + }; > 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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 3E96DC433DB for ; Thu, 4 Feb 2021 11:35:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 DA17164F4A for ; Thu, 4 Feb 2021 11:35:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA17164F4A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CwrmB+QcyOhM/vu7jFruLoow00z1CaThWO2qrKfH/UU=; b=Q5BDWX2AtJmyqRqG2h3f1JeQb jTVFSYAu15KHhRI/kr+F8ujzlj0mPzrqkFnjQVSlyijoBU43LA6YSKcCt2d0wEJSWOnFVw4+01y3S v/rzSl4tCVg9p5efGOrFW1oxtgjpeiXdOrLUE/SxYUSFUhheO0xAh8f3X2E+DsDiamoA/KQGpV+Ji 8C+fyxiF8PW0OAx2Zo1Wgj+M73q10oOHPl45NJ+Ut1CAsmwLWHHUMF4gife0aKmOM66TqaMKSVvQK F8kMeCmHYHfONd2rbSKf9d35Hgov/7KZH/hVbosHHMJ1aHuLIHFPlA774Vby0ZUlMVegdYWeHy+Ef P2IbqyqAw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7cvQ-00043V-MM; Thu, 04 Feb 2021 11:35:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7cvM-000423-NF; Thu, 04 Feb 2021 11:35:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6787411FB; Thu, 4 Feb 2021 03:35:46 -0800 (PST) Received: from [10.57.49.26] (unknown [10.57.49.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B4C483F73B; Thu, 4 Feb 2021 03:35:44 -0800 (PST) Subject: Re: [PATCH v2 1/7] dt-bindings: usb: convert rockchip,dwc3.txt to yaml To: Johan Jonker , heiko@sntech.de, Elaine Zhang References: <20210203165233.22177-1-jbx6244@gmail.com> From: Robin Murphy Message-ID: <41efd28c-ff64-2b9f-2cdc-ac4aaaeb4611@arm.com> Date: Thu, 4 Feb 2021 11:35:43 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210203165233.22177-1-jbx6244@gmail.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_063548_894207_1D8C23DD X-CRM114-Status: GOOD ( 24.72 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, balbi@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On 2021-02-03 16:52, Johan Jonker wrote: > In the past Rockchip dwc3 usb nodes were manually checked. > With the conversion of snps,dwc3.yaml as common document > we now can convert rockchip,dwc3.txt to yaml as well. > Remove node wrapper. > > Added properties for rk3399 are: > power-domains > resets > reset-names > > Signed-off-by: Johan Jonker > --- > .../devicetree/bindings/usb/rockchip,dwc3.txt | 56 ----------- > .../devicetree/bindings/usb/rockchip,dwc3.yaml | 103 +++++++++++++++++++++ > 2 files changed, 103 insertions(+), 56 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > create mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > > diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > deleted file mode 100644 > index 945204932..000000000 > --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > +++ /dev/null > @@ -1,56 +0,0 @@ > -Rockchip SuperSpeed DWC3 USB SoC controller > - > -Required properties: > -- compatible: should contain "rockchip,rk3399-dwc3" for rk3399 SoC > -- clocks: A list of phandle + clock-specifier pairs for the > - clocks listed in clock-names > -- clock-names: Should contain the following: > - "ref_clk" Controller reference clk, have to be 24 MHz > - "suspend_clk" Controller suspend clk, have to be 24 MHz or 32 KHz > - "bus_clk" Master/Core clock, have to be >= 62.5 MHz for SS > - operation and >= 30MHz for HS operation > - "grf_clk" Controller grf clk > - > -Required child node: > -A child node must exist to represent the core DWC3 IP block. The name of > -the node is not important. The content of the node is defined in dwc3.txt. > - > -Phy documentation is provided in the following places: > -Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml - USB2.0 PHY > -Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt - Type-C PHY > - > -Example device nodes: > - > - usbdrd3_0: usb@fe800000 { > - compatible = "rockchip,rk3399-dwc3"; > - clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, > - <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; > - clock-names = "ref_clk", "suspend_clk", > - "bus_clk", "grf_clk"; > - #address-cells = <2>; > - #size-cells = <2>; > - ranges; > - usbdrd_dwc3_0: dwc3@fe800000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0xfe800000 0x0 0x100000>; > - interrupts = ; > - dr_mode = "otg"; > - }; > - }; > - > - usbdrd3_1: usb@fe900000 { > - compatible = "rockchip,rk3399-dwc3"; > - clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>, > - <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>; > - clock-names = "ref_clk", "suspend_clk", > - "bus_clk", "grf_clk"; > - #address-cells = <2>; > - #size-cells = <2>; > - ranges; > - usbdrd_dwc3_1: dwc3@fe900000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0xfe900000 0x0 0x100000>; > - interrupts = ; > - dr_mode = "otg"; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > new file mode 100644 > index 000000000..fdf9497bc > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > @@ -0,0 +1,103 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/rockchip,dwc3.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip SuperSpeed DWC3 USB SoC controller > + > +maintainers: > + - Heiko Stuebner > + > +description: > + The common content of the node is defined in snps,dwc3.yaml. > + > + Phy documentation is provided in the following places. > + > + USB2.0 PHY > + Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml > + > + Type-C PHY > + Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt > + > +allOf: > + - $ref: snps,dwc3.yaml# > + > +properties: > + compatible: > + items: > + - enum: > + - rockchip,rk3399-dwc3 > + - const: snps,dwc3 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: > + Controller reference clock, must to be 24 MHz > + - description: > + Controller suspend clock, must to be 24 MHz or 32 KHz > + - description: > + Master/Core clock, must to be >= 62.5 MHz for SS > + operation and >= 30MHz for HS operation > + - description: > + Controller aclk_usb3_rksoc_axi_perf clock I'm pretty sure these last 3 don't belong to the controller itself, hence why they were in the glue layer node to being with. > + - description: > + Controller aclk_usb3 clock Does anything in the USB3 block actually consume this clock directly? If not, then I don't think it needs to be specified since it's already the parent of the controller's required bus_clk. I'm similarly suspicious of ACLK_USB3_NOC which is currently marked as CLK_IGNORE_UNUSED - if that's necessary for USB3 to function then it probably *should* be specified as part of the glue layer binding here. Robin. > + - description: > + Controller grf clock > + > + clock-names: > + items: > + - const: ref_clk > + - const: suspend_clk > + - const: bus_clk > + - const: aclk_usb3_rksoc_axi_perf > + - const: aclk_usb3 > + - const: grf_clk > + > + power-domains: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + reset-names: > + const: usb3-otg > + > +unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + > +examples: > + - | > + #include > + #include > + > + bus { > + #address-cells = <2>; > + #size-cells = <2>; > + > + usbdrd3_0: usb@fe800000 { > + compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; > + reg = <0x0 0xfe800000 0x0 0x100000>; > + interrupts = ; > + clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, > + <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>, > + <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>; > + clock-names = "ref_clk", "suspend_clk", > + "bus_clk", "aclk_usb3_rksoc_axi_perf", > + "aclk_usb3", "grf_clk"; > + dr_mode = "otg"; > + }; > + }; > _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip 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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 495A6C433DB for ; Thu, 4 Feb 2021 11:36:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 07C6D64E50 for ; Thu, 4 Feb 2021 11:36:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07C6D64E50 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SGqs9NjAO1V61NsahhwB3ItKnxcKsDtS3bAIMsmhOGI=; b=rr6dnNzwPCPCWvIDBa2GwERXd TEUBdNJIjIG3YB8S0qKaqx68ZAurPEVhEK2EF34Fag84nXyJATwno32OdhiBgHoIZK2zB3PZ8Ds0K OMmmf72fa8Nap6b3Cs/9msFm/Ggsy6PNHX7tUH/LATUpXPUf4e8nV9k83UJqujkmqEKdP7vABS71p dZQK8aVy9i7oa/zS9D5RaeFXV2y+DDqjId3kr61nS8dmdC/35rMe9gGn0RgyfJlbXVlDxDoJOpev9 n+3NO36pSr84HD55l89AyvIFRTtUarQIJgpudvPpZwS86JNxxjQubfXr9vw7nLCOOZTJigyRGTalS +THOQVcEQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7cvP-000438-N6; Thu, 04 Feb 2021 11:35:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7cvM-000423-NF; Thu, 04 Feb 2021 11:35:49 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6787411FB; Thu, 4 Feb 2021 03:35:46 -0800 (PST) Received: from [10.57.49.26] (unknown [10.57.49.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B4C483F73B; Thu, 4 Feb 2021 03:35:44 -0800 (PST) Subject: Re: [PATCH v2 1/7] dt-bindings: usb: convert rockchip,dwc3.txt to yaml To: Johan Jonker , heiko@sntech.de, Elaine Zhang References: <20210203165233.22177-1-jbx6244@gmail.com> From: Robin Murphy Message-ID: <41efd28c-ff64-2b9f-2cdc-ac4aaaeb4611@arm.com> Date: Thu, 4 Feb 2021 11:35:43 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210203165233.22177-1-jbx6244@gmail.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_063548_894207_1D8C23DD X-CRM114-Status: GOOD ( 24.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, balbi@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-02-03 16:52, Johan Jonker wrote: > In the past Rockchip dwc3 usb nodes were manually checked. > With the conversion of snps,dwc3.yaml as common document > we now can convert rockchip,dwc3.txt to yaml as well. > Remove node wrapper. > > Added properties for rk3399 are: > power-domains > resets > reset-names > > Signed-off-by: Johan Jonker > --- > .../devicetree/bindings/usb/rockchip,dwc3.txt | 56 ----------- > .../devicetree/bindings/usb/rockchip,dwc3.yaml | 103 +++++++++++++++++++++ > 2 files changed, 103 insertions(+), 56 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > create mode 100644 Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > > diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt b/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > deleted file mode 100644 > index 945204932..000000000 > --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.txt > +++ /dev/null > @@ -1,56 +0,0 @@ > -Rockchip SuperSpeed DWC3 USB SoC controller > - > -Required properties: > -- compatible: should contain "rockchip,rk3399-dwc3" for rk3399 SoC > -- clocks: A list of phandle + clock-specifier pairs for the > - clocks listed in clock-names > -- clock-names: Should contain the following: > - "ref_clk" Controller reference clk, have to be 24 MHz > - "suspend_clk" Controller suspend clk, have to be 24 MHz or 32 KHz > - "bus_clk" Master/Core clock, have to be >= 62.5 MHz for SS > - operation and >= 30MHz for HS operation > - "grf_clk" Controller grf clk > - > -Required child node: > -A child node must exist to represent the core DWC3 IP block. The name of > -the node is not important. The content of the node is defined in dwc3.txt. > - > -Phy documentation is provided in the following places: > -Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml - USB2.0 PHY > -Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt - Type-C PHY > - > -Example device nodes: > - > - usbdrd3_0: usb@fe800000 { > - compatible = "rockchip,rk3399-dwc3"; > - clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, > - <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_GRF>; > - clock-names = "ref_clk", "suspend_clk", > - "bus_clk", "grf_clk"; > - #address-cells = <2>; > - #size-cells = <2>; > - ranges; > - usbdrd_dwc3_0: dwc3@fe800000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0xfe800000 0x0 0x100000>; > - interrupts = ; > - dr_mode = "otg"; > - }; > - }; > - > - usbdrd3_1: usb@fe900000 { > - compatible = "rockchip,rk3399-dwc3"; > - clocks = <&cru SCLK_USB3OTG1_REF>, <&cru SCLK_USB3OTG1_SUSPEND>, > - <&cru ACLK_USB3OTG1>, <&cru ACLK_USB3_GRF>; > - clock-names = "ref_clk", "suspend_clk", > - "bus_clk", "grf_clk"; > - #address-cells = <2>; > - #size-cells = <2>; > - ranges; > - usbdrd_dwc3_1: dwc3@fe900000 { > - compatible = "snps,dwc3"; > - reg = <0x0 0xfe900000 0x0 0x100000>; > - interrupts = ; > - dr_mode = "otg"; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > new file mode 100644 > index 000000000..fdf9497bc > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml > @@ -0,0 +1,103 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/usb/rockchip,dwc3.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Rockchip SuperSpeed DWC3 USB SoC controller > + > +maintainers: > + - Heiko Stuebner > + > +description: > + The common content of the node is defined in snps,dwc3.yaml. > + > + Phy documentation is provided in the following places. > + > + USB2.0 PHY > + Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml > + > + Type-C PHY > + Documentation/devicetree/bindings/phy/phy-rockchip-typec.txt > + > +allOf: > + - $ref: snps,dwc3.yaml# > + > +properties: > + compatible: > + items: > + - enum: > + - rockchip,rk3399-dwc3 > + - const: snps,dwc3 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: > + Controller reference clock, must to be 24 MHz > + - description: > + Controller suspend clock, must to be 24 MHz or 32 KHz > + - description: > + Master/Core clock, must to be >= 62.5 MHz for SS > + operation and >= 30MHz for HS operation > + - description: > + Controller aclk_usb3_rksoc_axi_perf clock I'm pretty sure these last 3 don't belong to the controller itself, hence why they were in the glue layer node to being with. > + - description: > + Controller aclk_usb3 clock Does anything in the USB3 block actually consume this clock directly? If not, then I don't think it needs to be specified since it's already the parent of the controller's required bus_clk. I'm similarly suspicious of ACLK_USB3_NOC which is currently marked as CLK_IGNORE_UNUSED - if that's necessary for USB3 to function then it probably *should* be specified as part of the glue layer binding here. Robin. > + - description: > + Controller grf clock > + > + clock-names: > + items: > + - const: ref_clk > + - const: suspend_clk > + - const: bus_clk > + - const: aclk_usb3_rksoc_axi_perf > + - const: aclk_usb3 > + - const: grf_clk > + > + power-domains: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + reset-names: > + const: usb3-otg > + > +unevaluatedProperties: false > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + > +examples: > + - | > + #include > + #include > + > + bus { > + #address-cells = <2>; > + #size-cells = <2>; > + > + usbdrd3_0: usb@fe800000 { > + compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; > + reg = <0x0 0xfe800000 0x0 0x100000>; > + interrupts = ; > + clocks = <&cru SCLK_USB3OTG0_REF>, <&cru SCLK_USB3OTG0_SUSPEND>, > + <&cru ACLK_USB3OTG0>, <&cru ACLK_USB3_RKSOC_AXI_PERF>, > + <&cru ACLK_USB3>, <&cru ACLK_USB3_GRF>; > + clock-names = "ref_clk", "suspend_clk", > + "bus_clk", "aclk_usb3_rksoc_axi_perf", > + "aclk_usb3", "grf_clk"; > + dr_mode = "otg"; > + }; > + }; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel