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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,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 4846AC433DB for ; Sat, 6 Feb 2021 18:51:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1211B64DF0 for ; Sat, 6 Feb 2021 18:51:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbhBFSvJ (ORCPT ); Sat, 6 Feb 2021 13:51:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbhBFSvH (ORCPT ); Sat, 6 Feb 2021 13:51:07 -0500 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6276CC06174A; Sat, 6 Feb 2021 10:50:27 -0800 (PST) Received: by mail-ed1-x52c.google.com with SMTP id s26so7619044edt.10; Sat, 06 Feb 2021 10:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=bP2TkjSLtuteWO1JClrvBULCopI78AgBBGVLp8X9jmQ=; b=IbVYJ/q8Z7A6d/Xr02l4CahlviL1LKWrvb5J55d6X8YEJcjlKMfavAmc0/gfUQLeC0 wt8pBLwvDmb7mAdrO2g+TvAZ+ZPZnsD2cef8FAxa4WR7aRHhsmVhYABN0zN0bI0w3AAz +foSuKIdfEdlWd8O5Y2TLGcEpIGAPqjzQMarpVcCNiu4t2iPFxhQuhvdZO3AuiPaqEua TLMuOldX6eRs23HWyFYO0KQnltST447KN8eU2t5GxisoA0c/N9jHdapoROCy1p1A/b/A KgZ5NkOEYgE77xxF7KRzkf97m2aySfqkdTZDQZp9KgZa0KjUZYl0KffBy7vjpvDU87eF HSdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bP2TkjSLtuteWO1JClrvBULCopI78AgBBGVLp8X9jmQ=; b=GIqN5PzkexDJW2B1VSoxfeQdrBvaj0Wu+IAmdJRjZE6RD+AM1UmGDNhDE6ayHTen1z PSDGKSuLpKF76sIEZh8XUjmsYpVqhPgJorTfAXoAp/7/P61iWaPV56EunvLWh9Lla8KA W2ajO6Mh/D8JIRb0yWjQCHSR0Z2bIhS1AmAvtAxXCkMXPb7nG2o60C1UpPXsxnVsv65J v3yHnzn7VbuO4kuuI8jecRLpjlMNkpDPAVkAvlcgsGuLmVNPeph0k+8zd/bAZg17Qrn2 +/oQLQ1bmiM0UN4ZItVuBYIKWU/kdEEcv2KTRpOeuSPqx5MBK5xgn2iwOykkAs6rXV7B 2Odw== X-Gm-Message-State: AOAM531W3+bml2RNwLwk0fkFnpckcjNkNBZv97RZgxueqrHNh6RSG2K8 dDw18zBd2X+gQdIw4yAYGEQ= X-Google-Smtp-Source: ABdhPJzUaY32Do01BL+HSNCqVecost6y7Df+ZCiCLRaYiYPG5W6KhJek61a00VsrqlxspFZjh1Jupg== X-Received: by 2002:a05:6402:6d6:: with SMTP id n22mr9478788edy.128.1612637426105; Sat, 06 Feb 2021 10:50:26 -0800 (PST) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id cb21sm5890005edb.57.2021.02.06.10.50.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Feb 2021 10:50:25 -0800 (PST) From: Johan Jonker To: heiko@sntech.de Cc: robh+dt@kernel.org, gregkh@linuxfoundation.org, balbi@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 1/8] dt-bindings: usb: convert rockchip,dwc3.txt to yaml Date: Sat, 6 Feb 2021 19:50:10 +0100 Message-Id: <20210206185017.1817-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- Changed V3: remove aclk_usb3_rksoc_axi_perf remove aclk_usb3 Changed V2: remove node wrapper --- .../devicetree/bindings/usb/rockchip,dwc3.txt | 56 ------------- .../devicetree/bindings/usb/rockchip,dwc3.yaml | 95 ++++++++++++++++++++++ 2 files changed, 95 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..d815aacfc --- /dev/null +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml @@ -0,0 +1,95 @@ +# 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 grf clock + + clock-names: + items: + - const: ref_clk + - const: suspend_clk + - const: bus_clk + - 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_GRF>; + clock-names = "ref_clk", "suspend_clk", + "bus_clk", "grf_clk"; + dr_mode = "otg"; + }; + }; -- 2.11.0