Received: by 10.192.165.148 with SMTP id m20csp1401731imm; Fri, 27 Apr 2018 19:43:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrV8oSKHR6Yv++IiKmpkRxt3v+gd/BRmbwhRXVlWO/f4BUuiVtOsFSiPJADTGUbyicqpKuG X-Received: by 2002:a63:bf44:: with SMTP id i4-v6mr3998329pgo.66.1524883400120; Fri, 27 Apr 2018 19:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524883400; cv=none; d=google.com; s=arc-20160816; b=wEs/ltvSdY6fGyW2NrTC1+KfKWutzlMOjJUzh0HRZT4gUagB/23BM6Mss9p9W7O6rw Qz86/bYn67WK5tbjaNZlkAKKjDrdzD8wMyfNCIc7K81A3wIQ/VlvbY5PbZFHBBehPrt4 dT1l9jkDt2jMulzbXurZBp8G0KLtNCAzqEHTSj94mNP2wDqOBrwhphIgEOmiy+xI7/8W 3rFtt4fftnzt9tY9oBIzaH07PehQpHzXPhMzweGtZPELWPlhFbP3ZgNTEGFs707jxKmX r6N8f0rYx4tFCM5D7kS+r+hKvmM9+N2VOV6kjC5qPtWLcGZnh6n8/Eo7PasmzCo1Icwd S2QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=7O4h7WDC4KvXUx9y+h24OYYkT0mk82o7noDt6Y3De5Q=; b=E5ivXVYBjnPriFIj/AMsUJ8JgDVdmJvl6fAPn9kte3afKMqOzOQPAW06qlgDnoKqeL 5gMOWj0yDCQGKb8T2cay7Yz03/Paa0P0/J5w/QYMH+SA8k7uXgQYwxGnc8tDIxJ/9jjT 25uDhWXuG50ECXk05Ot1MtWWcEB2gubR5bAJTFizUN8wqQX5toQYABeqmjUxcql7nVV4 Iir6xBXsUwkc/2EVm1fRnrA03EnX9UzfNFdIMjfUuDqMHsP/IFnKBPYu3STby+CSWgXr 9lRC3TPS8BvmzpCi1Zm2cDpvoc2kVArOJnW5qeDTLtGfHYelwSN2B2POX5oZ99PcgtHK eQQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cCzYzVtB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si2448931pla.509.2018.04.27.19.43.06; Fri, 27 Apr 2018 19:43:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cCzYzVtB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759533AbeD1Clz (ORCPT + 99 others); Fri, 27 Apr 2018 22:41:55 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:40263 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759215AbeD1Clw (ORCPT ); Fri, 27 Apr 2018 22:41:52 -0400 Received: from mail-ua0-f181.google.com (mail-ua0-f181.google.com [209.85.217.181]) (authenticated) by conssluserg-02.nifty.com with ESMTP id w3S2fiWP012317; Sat, 28 Apr 2018 11:41:45 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com w3S2fiWP012317 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1524883305; bh=7O4h7WDC4KvXUx9y+h24OYYkT0mk82o7noDt6Y3De5Q=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=cCzYzVtBvirpDcFQDabq+lAekwuZVcEy0ZdhWPR/cGTCW96GtRoWX0x3f7mn58ODk sgh31f3jWNFw11gS4k0WJqcLzRgxNnSXrlWDjqPRvwXYkHJa3vhOjIx8LFTW1q7Dmq dtCpbcMoXH248b0lBtchvbyBFZuROikADsec33tnnjAq2ezjuJbpdfaTTizl6P4h0i A3X4SxdTfPqe5kosWOjzOUL80atUs1yesxBFKZCaJkgjkR7xO33vqmGomOOdynGIIq oqk/9kHetcGRXo+50HXtO/w7WiSHbN+xRmE0LX9LCQLBK75gu7LcGBaZdDu/yvS5TY 92H5xIxyVP4XQ== X-Nifty-SrcIP: [209.85.217.181] Received: by mail-ua0-f181.google.com with SMTP id e8so126527uam.13; Fri, 27 Apr 2018 19:41:45 -0700 (PDT) X-Gm-Message-State: ALQs6tDAPTudAb8lR2tiwUnlRZnBGTCymADqQHuuwSo1eKduwnklGo20 B3lyZUo86tP1xI4UfTJ6EZzfRQraF/97uBdhLyY= X-Received: by 10.176.16.20 with SMTP id f20mr3166928uab.141.1524883303939; Fri, 27 Apr 2018 19:41:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.85.216 with HTTP; Fri, 27 Apr 2018 19:41:03 -0700 (PDT) In-Reply-To: References: <1524135818-14825-1-git-send-email-yamada.masahiro@socionext.com> <1524135818-14825-3-git-send-email-yamada.masahiro@socionext.com> From: Masahiro Yamada Date: Sat, 28 Apr 2018 11:41:03 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/2] usb: dwc3: support clocks and resets for DWC3 core To: Martin Blumenstingl Cc: linux-usb@vger.kernel.org, Felipe Balbi , Rob Herring , Roger Quadros , Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi , DTML , Felipe Balbi , Linux Kernel Mailing List , Rob Herring , Greg Kroah-Hartman , Mark Rutland Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, 2018-04-24 2:44 GMT+09:00 Martin Blumenstingl : > Hello, > > On Thu, Apr 19, 2018 at 1:03 PM, Masahiro Yamada > wrote: >> Historically, the clocks and resets are handled on the glue layer >> side instead of the DWC3 core. For simple cases, dwc3-of-simple.c >> takes care of arbitrary number of clocks and resets. The DT node >> structure typically looks like as follows: >> >> dwc3-glue { >> compatible = "foo,dwc3"; >> clocks = ...; >> resets = ...; >> ... >> >> dwc3 { >> compatible = "snps,dwc3"; >> ... >> }; >> } >> >> By supporting the clocks and the reset in the dwc3/core.c, it will >> be turned into a single node: >> >> dwc3 { >> compatible = "foo,dwc3", "snps,dwc3"; >> clocks = ...; >> resets = ...; >> ... >> } >> >> This commit adds the binding of clocks and resets specific to this IP. >> The number of clocks should generally be the same across SoCs, it is >> just some SoCs either tie clocks together or do not provide software >> control of some of the clocks. >> >> I took the clock names from the Synopsys datasheet: "ref" (ref_clk), >> "bus_early" (bus_clk_early), and "suspend" (suspend_clk). > looking at the code: this could mean that dwc3-exynos.c can be removed > mid-term (assuming the PHY and regulator handling can be > moved/removed/changed) > > does the datasheet state anything about the clock speeds? from > Documentation/devicetree/bindings/usb/dwc3-xilinx.txt: > "bus_clk" Master/Core clock, have to be >= 125 MHz for SS operation > and >= 60MHz for HS operation > >> I found only one reset line in the datasheet, hence the reset-names >> property is omitted. > does the datasheet state whether this is a level or a pulsed reset line? > on Amlogic Meson GXL, GXM and AXG SoCs we use a pulsed (and shared) > reset line (see ff0a632f08759e "usb: dwc3: of-simple: add support for > shared and pulsed reset lines") because the reset line is shared > between various components (USB2 PHY, USB3 PHY, dwc3 controller, ...) > your current approach (having a vendor-specific "foo,dwc3" binding > along with the generic "snps,dwc3") would allow having > per-"of_device_id" settings which could indicate whether the reset > lines are level or pulsed reset if these are "implementation specific" Let me ask a question about your reset controller. (drivers/reset/reset-meson.c) All reset ID supports .reset, .assert, .deassert Is this correct? I believe you and I use the same DWC3 core IP. I suspect the difference is in the reset controller side. In my case, the reset line is asserted by default. (that is, all FFs in the RTL are put into the initial state on power-on) That's why only reset_deassert() will work for me, I think. What about your case? Is the reset line in deassert state on power-on? Then, the reset must be explicitly pulsed to put FFs into the initial state. Is this correct? -- Best Regards Masahiro Yamada