Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2732669rdb; Wed, 4 Oct 2023 09:45:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEoaMFJbU7IcxcJctx6MQKVlNVVVbaL8McvUfYybR13wspn1tAAGpHCSIfxz81h+Cb01MX5 X-Received: by 2002:a9d:798f:0:b0:6bd:cf64:d105 with SMTP id h15-20020a9d798f000000b006bdcf64d105mr2432895otm.12.1696437957739; Wed, 04 Oct 2023 09:45:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696437957; cv=none; d=google.com; s=arc-20160816; b=ZoEHzQS3/ohWGDQKn8xoDD7znAyZfchPJUmqPgCuX3fY4IfqdXbx6xL6PRj7eMPRGr RcXKSP31GQ9Q3JpXWPhScUw+E+ewig2Ws5FUCc86JQf1yYLSC26A4hSuataf9dhCTN7R 88/neWEOoZlkUjdjlYhKcJpCW8fuOeFB4gyNkeHhMa3dy4CjlLwOykidNlpQ1dZORYOF BtTmky6hwariU65PxXcQNXF4P+koegIRy8RKozhoD3oW7CHf4zRQT0Vgdq8/lHS91LNu WZEKWV421E/UytMD0wr5LrfcJzp6l1oqLrY5V8vfovIKboR6eIfrHYDAEpQeOl0qBqvM x7CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=p/vEtIb5/27rg2ItvgN0j/co68cAaZOpIupvmxJgEzE=; fh=MVyO89UhMu7FoYZMB9dgvzmECHcBSZXhdeqreF9r0AY=; b=sTY3vOE+qoYvmiYZvKfq7rLAimtjVhBemuBVuBwfXG5NvbyMLsnEFhPyTb5LvJsxxW KY2lHwgaW5LvT0JVB8r3Nq5/8p29H//f1z1nLsige6JAg+ZF6MOBQPT4Hq2WUI0BcKMK Qc4a6a9WtnhZAoFyjUHmURW2UFLDlucRvz23JuJHGOD/CmCIKsutXeX+tZaaPYl0JFk4 z3004iwlS9HYaXTHwu6eQ0RYHjXPKYWnnoP/Iau3hrPa6cuNBA8jPgSDID2ZzuraD/Aq XcU6xnEjqD6FnbnrUbRbw8oMdcQ5TS+F7m15ZacUbYaMKMn6bUtYynmdFUDjfh7PywEp G3dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J0goTKf7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p2-20020a634202000000b00565342470c4si3843698pga.801.2023.10.04.09.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:45:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J0goTKf7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 24AB38027EB6; Wed, 4 Oct 2023 09:45:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243442AbjJDQoe (ORCPT + 99 others); Wed, 4 Oct 2023 12:44:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233112AbjJDQod (ORCPT ); Wed, 4 Oct 2023 12:44:33 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6662A9B for ; Wed, 4 Oct 2023 09:44:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC080C433C8; Wed, 4 Oct 2023 16:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696437870; bh=bJUdCu4n8Q616ruuLdWGE4yAQa292y0ym8neR1k201A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=J0goTKf7yenCuo1njZMrdo0wDTZQ5t1AC2tPHka97g2Tw8m49Gbju3yP3QFrztt7U PN/0QG/WY1onVRnFunFTmiV9QhcIcASYT19N+va3cryvt4q6+Z/cxMIAidJ0kNOF6w Wb6oOuXTJuD/I8RpVkWvMcI6ZlSMYBsAhNIz3SnnCzNfffbYTB2YrbsY0PUk90MCpe 2XKJDz2xfxe/JJuLwx14ZYyXc7RqfTlkL3KlVH/Bsg2k18iK1dSy93uImyHWmQyRvG g5ANS9iQg3CvKRycbtbSuhZny1k3bnQKtZBxX2WwR2Ycjzan5KB/Tk8fCQBuv1mTh4 cNatltJeDS8HA== Date: Thu, 5 Oct 2023 00:32:23 +0800 From: Jisheng Zhang To: Samuel Holland Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Guo Ren , Fu Wei , linux-riscv@lists.infradead.org, Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thinh Nguyen Subject: Re: [PATCH 1/2] dt-bindings: usb: Add T-HEAD TH1520 USB controller Message-ID: References: <20230927164222.3505-1-jszhang@kernel.org> <20230927164222.3505-2-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:45:55 -0700 (PDT) On Wed, Sep 27, 2023 at 03:00:59PM -0500, Samuel Holland wrote: > On 2023-09-27 11:42 AM, Jisheng Zhang wrote: > > T-HEAD TH1520 platform's USB has a wrapper module around > > the DesignWare USB3 DRD controller. Add binding information doc for > > it. > > > > Signed-off-by: Jisheng Zhang > > --- > > .../bindings/usb/thead,th1520-usb.yaml | 73 +++++++++++++++++++ > > 1 file changed, 73 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/thead,th1520-usb.yaml > > > > diff --git a/Documentation/devicetree/bindings/usb/thead,th1520-usb.yaml b/Documentation/devicetree/bindings/usb/thead,th1520-usb.yaml > > new file mode 100644 > > index 000000000000..afb618eb5013 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/thead,th1520-usb.yaml > > @@ -0,0 +1,73 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/usb/thead,th1520-usb.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: T-HEAD TH1520 DWC3 USB Controller Glue > > + > > +maintainers: > > + - Jisheng Zhang > > + > > +properties: > > + compatible: > > + const: thead,th1520-usb > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 4 > > + > > + clock-names: > > + items: > > + - const: ref > > + - const: bus_early > > + - const: phy > > + - const: suspend > > Except for "phy", these clocks are already documented in snps,dwc3.yaml. Are > they necessary for the glue/PHY, or do they belong only in the controller node? Hi Samuel, Enabling ref, bus_early clks are necessary for the glue layer, because we program the glue registers before calling of_platform_populate() > They are not used by the driver in patch 2. Also, the PHY clock probably belongs > with the PHY node. Except enabling the phy clk, we don't need to touch the phy, so I'm not sure how to handle this if we have a dedicated phy driver thus a phy node. or use the usb-nop-xceiv? Thanks > > > + > > + ranges: true > > + > > + '#address-cells': > > + enum: [ 1, 2 ] > > + > > + '#size-cells': > > + enum: [ 1, 2 ] > > + > > +# Required child node: > > + > > +patternProperties: > > + "^usb@[0-9a-f]+$": > > + $ref: snps,dwc3.yaml# > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - clock-names > > + - ranges > > + > > +additionalProperties: false > > The driver in patch 2 uses the thead,misc-sysreg and vbus-supply properties, > neither of which is documented here. Also, depending on the other bindings, the > VBUS supply should be referenced from the USB PHY or connector node, not here. > > Regards, > Samuel > > > +examples: > > + - | > > + > > + usb { > > + compatible = "thead,th1520-usb"; > > + reg = <0xec03f000 0x1000>; > > + clocks = <&clk 1>, > > + <&clk 2>, > > + <&clk 3>, > > + <&clk 4>; > > + clock-names = "ref", "bus_early", "phy", "suspend"; > > + ranges; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + usb@e7040000 { > > + compatible = "snps,dwc3"; > > + reg = <0xe7040000 0x10000>; > > + interrupts = <68>; > > + dr_mode = "host"; > > + }; > > + }; >