Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1654006rwo; Wed, 2 Aug 2023 19:02:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlG01FxtyaEHDINCha2ns/UfH8U3ZrtKUH1TWjzwJVCUzCz7noa+BsVOA2iBYtpykl8kIwCD X-Received: by 2002:a05:6a21:7889:b0:138:198f:6edf with SMTP id bf9-20020a056a21788900b00138198f6edfmr23327468pzc.46.1691028164909; Wed, 02 Aug 2023 19:02:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691028164; cv=none; d=google.com; s=arc-20160816; b=0SzmPcXTWaZuSNTkQ74EiY2xDPm4cjaOKV2e2V9ncezQOIUPWL5B7ocvcy5+49O7KD uEl25socn2JlqveYmGf/CDj7td8LlLd/M2gsmn3dLV2IAqMhmoGl3yLMUHVx6pYEm85g y/mxDb35gVkxmLjnqu5UrDMaxEqzrWRJxPxcDjoRcuCItLsH1b3ZU1EI+Jb21TmCz2jI vodLkP9tvhw3FXGsuNjWXC/Q1V4cgaXh4ESObgal26FYqWqVWRPbtVkgaBrAYI/R0nb4 5IvbzGOdtJqJrg5U4IecZBdXDWMSiILQ4WdHqY7bRmf6omhbi3fdND1QtDoMrVL6JsGD PVYw== 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=iiuTS+con+UzqtpWfXlOHjakagdXe+kP+SFLgPCVZdQ=; fh=cyQTolavo9J17BuDilFKhK9Hzlz35xxnWl/vSXcoHxQ=; b=UoQs7ABxfUlbgnIlBqLZXTZZnFx+5Y5eTCbyURfHYlFhHszUBd/C0vV9RkrIgs5H6d RruzhyqY4J0I6oo/o1tZTIiUOuq5xC8L70evFcF2gNYQZNXZAoQbPQe19/2rkNPJ1Ifz VrUJy5OvHTDWy2kWYrKGtLB78yO6VIpw0xjfHMBsY5us3oiDPrzitKUBc6fqYDrZJzWs NWZ06Zux8EWnFZ5F7UIC1TOjGPx3kyts2XzyQ3rhRU68Bwxg71/uDeEFKM6SyVyEuX9n AhXrDKd0IRqv78U+TIvlVmQMSMzau3wjCxJQKlUwqma/AgZEajalLx/qA9uVi9Ca6zTD 3C1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="hqN6OA/9"; 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 f17-20020a170902ce9100b001b8921fbd87si8866313plg.490.2023.08.02.19.02.32; Wed, 02 Aug 2023 19:02:44 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="hqN6OA/9"; 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 S232404AbjHCBSm (ORCPT + 99 others); Wed, 2 Aug 2023 21:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjHCBSk (ORCPT ); Wed, 2 Aug 2023 21:18:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84DD91B9; Wed, 2 Aug 2023 18:18:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1FC4661B9F; Thu, 3 Aug 2023 01:18:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A81B1C433C8; Thu, 3 Aug 2023 01:18:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691025518; bh=0P0S2/MgycChVw2ibGG2dMFXAv+3iwZOlw6Fgpq6W7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hqN6OA/93yzinfVGHXyl12eDcC7r/sS8zKgv+lh30BnIvzSpXVa9ncvbuw4yxNGRx ZgNwf0Z0ztBcLqVTXr/OHzBAU8tdKw4lhP+DFs+h2sYRto9qxuRcXxAePTET9ypbZ7 FU0XG2jUfDpBBrKAFH9j/K2ttnJsC21f1UWvy6hYcU0vj8AASxdJPFA7YhWxVWumqs vS4/m+zQqN0CzfUWACLbz10Oj2sNSDZ9hMelnuB16Pzld3Me6u+y70sngwar4tNDnC JX0QtwC1ALxc8J4rheTd94Rw3QWcF9yPQrFAlEvjhtM83tWFDqoBqhQu0aSyrE691C YUSpfqzJk6y1A== Received: (nullmailer pid 1644049 invoked by uid 1000); Thu, 03 Aug 2023 01:18:36 -0000 Date: Wed, 2 Aug 2023 19:18:36 -0600 From: Rob Herring To: Stanley Chang Cc: Thinh Nguyen , Greg Kroah-Hartman , Krzysztof Kozlowski , Conor Dooley , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] doc: dt: bindings: usb: realtek,dwc3: Add Realtek DHC RTD SoC DWC3 USB Message-ID: <20230803011836.GA1635549-robh@kernel.org> References: <20230728035318.18741-1-stanley_chang@realtek.com> <20230728035318.18741-2-stanley_chang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230728035318.18741-2-stanley_chang@realtek.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Fri, Jul 28, 2023 at 11:53:13AM +0800, Stanley Chang wrote: > Document the DWC3 USB bindings for Realtek SoCs. > > Signed-off-by: Stanley Chang > --- > .../devicetree/bindings/usb/realtek,dwc3.yaml | 107 ++++++++++++++++++ > 1 file changed, 107 insertions(+) > create mode 100644 Documentation/devicetree/bindings/usb/realtek,dwc3.yaml > > diff --git a/Documentation/devicetree/bindings/usb/realtek,dwc3.yaml b/Documentation/devicetree/bindings/usb/realtek,dwc3.yaml > new file mode 100644 > index 000000000000..74d388809924 > --- /dev/null > +++ b/Documentation/devicetree/bindings/usb/realtek,dwc3.yaml > @@ -0,0 +1,107 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2023 Realtek Semiconductor Corporation > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/usb/realtek,dwc3.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: Realtek DWC3 USB SoC Controller Glue > + > +maintainers: > + - Stanley Chang > + > +description: > + The Realtek DHC SoC embeds a DWC3 USB IP Core configured for USB 2.0 > + and USB 3.0 in host or dual-role mode. > + > +properties: > + compatible: > + items: > + - enum: > + - realtek,rtd1295-dwc3 > + - realtek,rtd1315e-dwc3 > + - realtek,rtd1319-dwc3 > + - realtek,rtd1319d-dwc3 > + - realtek,rtd1395-dwc3 > + - realtek,rtd1619-dwc3 > + - realtek,rtd1619b-dwc3 > + - const: realtek,rtd-dwc3 > + > + reg: > + maxItems: 1 Some details on what these registers are would be useful. Or describing what's in the 'glue' device? > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 1 > + > + ranges: true > + > + realtek,unlink-usb3-port: > + description: Disable link between USB 3.0 PHY and USB mac. > + Only for RTD1619 SoC, if the board design support maximum 2.0 speed. > + type: boolean We have a property for this: maximum-speed That belongs in the USB controller node though. > + > + realtek,disable-usb3-phy: > + description: Close USB 3.0 PHY if the board design not support USB 3.0. > + type: boolean Can't this be determined by not having a USB3 phy listed? > + > + realtek,enable-l4icg: > + description: Enable the power saving feature l4icg by hardware clock. > + gating. > + type: boolean > + > +patternProperties: > + "^usb@[0-9a-f]+$": > + $ref: snps,dwc3.yaml# > + description: Required child node > + > +required: > + - compatible > + - reg > + - "#address-cells" > + - "#size-cells" > + - ranges > + > +allOf: > + - if: > + not: > + properties: > + compatible: > + contains: > + enum: > + - realtek,rtd1619-dwc3 > + then: > + properties: > + realtek,unlink-usb3-port: false > + > +additionalProperties: false > + > +examples: > + - | > + usb@98013e00 { > + compatible = "realtek,rtd1319d-dwc3", "realtek,rtd-dwc3"; > + reg = <0x98013e00 0x200>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges; > + status = "okay"; Drop status from examples. > + realtek,disable-usb3-phy; > + realtek,enable-l4icg; > + > + usb@98050000 { > + compatible = "snps,dwc3"; > + reg = <0x98050000 0x9000>; > + interrupts = <0 94 4>; > + phys = <&usb2phy &usb3phy>; > + phy-names = "usb2-phy", "usb3-phy"; > + dr_mode = "otg"; > + usb-role-switch; > + role-switch-default-mode = "host"; > + snps,dis_u2_susphy_quirk; > + snps,parkmode-disable-ss-quirk; > + snps,parkmode-disable-hs-quirk; > + maximum-speed = "high-speed"; > + }; > + }; > -- > 2.34.1 >