Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6981777rwb; Wed, 18 Jan 2023 11:51:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXvfn2ylWixClo+m9WC7p/oNxVT8kFQAaXUjspieIKEqOqv/J5jIxBhS0qDsisWI8B5mBu1x X-Received: by 2002:a17:90a:7f8a:b0:229:3d3a:49cb with SMTP id m10-20020a17090a7f8a00b002293d3a49cbmr8966600pjl.4.1674071460481; Wed, 18 Jan 2023 11:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674071460; cv=none; d=google.com; s=arc-20160816; b=e1wKQ2TVGdoigRnlyTtmsbQNbglQ7R7u3f8kmroX55mVtoj44sVcH43EQyTuXwQnHL WMTdrozYJdwk60sssLW1PjurHv+s5BKewE+u8RWl3Oca2TkqZuf2LNT4z3yPe3Xq3tB+ 1avdTaGCQLKbLxBMpEV6krYwO+VDJc5vQzP2YWh1rfT71de5xZldEDbdVYOHl/kMTjxp De/5lL58LykAeputv48dwDUKPlIcV/oh1vyeHR3Xhynu+dAOmj15L03amiAD3JSK6sni rgeShLH0X2TnButigJBpCfJsliwuXzUkebsc0gGXQf7lYf5Ac95mtvyrzq4qF0iTAD2Q NNcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=my6ZdLv862wYg9TxuhtKrEA+XZxlWplWgg57C2nOybM=; b=riPyk8Ug3YstDO0Exs16R7J4j6rShKTCXP9GJnJ3NcHuKykcCQCfDfOSBzaI7LZyd9 +qkhp9bJGuctoMX19qsu5vE95zRux8RyBmQICvmu349GDcr1tmKuDzoFB4MLoPcct3Mz lJckEuKvk9Wk7DyiW9ta6juPyHePBIEPsbmA3rTyCcHnIoyoPq+Sp1H+1K0nguXraS6b tZjBktwkAHNtevmxRIjEU2Rk2Y5YtkwDAolkRnyqvxbEwaNwW8oLJudam4aEK7ggHb42 vyX6qVaPG6s0byelROYvTfyITxGi0q+a8sLIgoT3t/GVTMQUozmlMnGuohrpg+24uMg3 kbpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bp9-20020a17090b0c0900b00219741bac53si2800005pjb.123.2023.01.18.11.50.55; Wed, 18 Jan 2023 11:51:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbjARTbo (ORCPT + 45 others); Wed, 18 Jan 2023 14:31:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbjARTbM (ORCPT ); Wed, 18 Jan 2023 14:31:12 -0500 Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 282CA5528C; Wed, 18 Jan 2023 11:31:04 -0800 (PST) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-1322d768ba7so70983fac.5; Wed, 18 Jan 2023 11:31:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=my6ZdLv862wYg9TxuhtKrEA+XZxlWplWgg57C2nOybM=; b=3W0gbLgGOTLrnd0diGGd4nnZbcVSDE2Vnc0SOo24K1mXzqblWJ5bK+2oe/11tqBpVB 1ymHvmcQa8CniU9veO//4JcEBragnBJSUPZxPaGXIHXgRXFnjzPeU7SC/7aQAt/DFuKU /TyBwEU1XL8MUWi3dQpsKckz5mJVqLCsCGkEnZTN7J+SSNYdQX0rjRjcfR2qDOW3My97 PHJhm/1Uq/uTrAydC3g5S1ZfN5QWpSmUDtU/vdnBOym5cCcRkjU3q5Znn0IisueSK9Yj LGpKPL9A5AUsOoZ/XUERyeCzISfbHhunsoWfyW2UM3w0LrbqYjVSxtltwGQnewzWXdvf 3KZQ== X-Gm-Message-State: AFqh2krkaVw3+jixIgDHesBHqsv8ety3nEq4M+XjMMnXpQoPhGLNCU+K 3HzyyIRvCUDoV1ujZ1B6gA== X-Received: by 2002:a05:6870:7997:b0:15b:9fb0:864c with SMTP id he23-20020a056870799700b0015b9fb0864cmr4818573oab.19.1674070263292; Wed, 18 Jan 2023 11:31:03 -0800 (PST) Received: from robh_at_kernel.org ([4.31.143.193]) by smtp.gmail.com with ESMTPSA id eq2-20020a056870a90200b0014fb4bdc746sm18709458oab.8.2023.01.18.11.31.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 11:31:02 -0800 (PST) Received: (nullmailer pid 673667 invoked by uid 1000); Wed, 18 Jan 2023 19:31:01 -0000 From: Rob Herring To: Greg Kroah-Hartman , Krzysztof Kozlowski , Felipe Balbi , Heiko Stuebner Cc: Johan Jonker , linux-rockchip@lists.infradead.org, Thinh Nguyen , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] dt-bindings: usb: rockchip,dwc3: Move RK3399 to its own schema Date: Wed, 18 Jan 2023 13:30:56 -0600 Message-Id: <20230118193056.673514-2-robh@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118193056.673514-1-robh@kernel.org> References: <20230118193056.673514-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The rockchip,dwc3.yaml schema defines a single DWC3 node, but the RK3399 uses the discouraged parent wrapper node and child 'generic' DWC3 node. The intent was to modify the RK3399 DTs to use a single node, but the DT changes were rejected for ABI reasons. However, the schema was accepted as-is. To fix this, we need to move the RK3399 binding to its own schema file. The RK3328 and RK3568 bindings are correct and use a single node. Cc: Johan Jonker Signed-off-by: Rob Herring --- .../bindings/usb/rockchip,dwc3.yaml | 10 +- .../bindings/usb/rockchip,rk3399-dwc3.yaml | 115 ++++++++++++++++++ 2 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/rockchip,rk3399-dwc3.yaml diff --git a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml index b3798d94d2fd..edb130c780e4 100644 --- a/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml +++ b/Documentation/devicetree/bindings/usb/rockchip,dwc3.yaml @@ -29,7 +29,6 @@ select: contains: enum: - rockchip,rk3328-dwc3 - - rockchip,rk3399-dwc3 - rockchip,rk3568-dwc3 required: - compatible @@ -39,7 +38,6 @@ properties: items: - enum: - rockchip,rk3328-dwc3 - - rockchip,rk3399-dwc3 - rockchip,rk3568-dwc3 - const: snps,dwc3 @@ -90,7 +88,7 @@ required: examples: - | - #include + #include #include bus { @@ -98,11 +96,11 @@ examples: #size-cells = <2>; usbdrd3_0: usb@fe800000 { - compatible = "rockchip,rk3399-dwc3", "snps,dwc3"; + compatible = "rockchip,rk3328-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>; + clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>, + <&cru ACLK_USB3OTG>; clock-names = "ref_clk", "suspend_clk", "bus_clk", "grf_clk"; dr_mode = "otg"; diff --git a/Documentation/devicetree/bindings/usb/rockchip,rk3399-dwc3.yaml b/Documentation/devicetree/bindings/usb/rockchip,rk3399-dwc3.yaml new file mode 100644 index 000000000000..e39a8a3a7ab3 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/rockchip,rk3399-dwc3.yaml @@ -0,0 +1,115 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/rockchip,rk3399-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3399 SuperSpeed DWC3 USB SoC controller + +maintainers: + - Heiko Stuebner + +properties: + compatible: + const: rockchip,rk3399-dwc3 + + '#address-cells': + const: 2 + + '#size-cells': + const: 2 + + ranges: true + + 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: + USB3 aclk peri + - description: + USB3 aclk + - 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 + + resets: + maxItems: 1 + + reset-names: + const: usb3-otg + +patternProperties: + '^usb@': + $ref: snps,dwc3.yaml# + +additionalProperties: false + +required: + - compatible + - '#address-cells' + - '#size-cells' + - ranges + - clocks + - clock-names + - resets + - reset-names + +examples: + - | + #include + #include + #include + + bus { + #address-cells = <2>; + #size-cells = <2>; + + usb { + compatible = "rockchip,rk3399-dwc3"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + 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"; + resets = <&cru SRST_A_USB3_OTG0>; + reset-names = "usb3-otg"; + + usb@fe800000 { + compatible = "snps,dwc3"; + reg = <0x0 0xfe800000 0x0 0x100000>; + interrupts = ; + clocks = <&cru SCLK_USB3OTG0_REF>, <&cru ACLK_USB3OTG0>, + <&cru SCLK_USB3OTG0_SUSPEND>; + clock-names = "ref", "bus_early", "suspend"; + dr_mode = "otg"; + phys = <&u2phy0_otg>, <&tcphy0_usb3>; + phy-names = "usb2-phy", "usb3-phy"; + phy_type = "utmi_wide"; + snps,dis_enblslpm_quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis_u2_susphy_quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis-tx-ipgap-linecheck-quirk; + power-domains = <&power RK3399_PD_USB3>; + }; + }; + }; +... -- 2.39.0