Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4682534ybp; Mon, 7 Oct 2019 12:10:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6LENM6MIbTFy5gM/T3W4I8gk2WTZOtfE8jgHCCX88tzAFHch8RKgM2E+F/GJIUg/I+qFh X-Received: by 2002:aa7:dad3:: with SMTP id x19mr30617921eds.59.1570475406237; Mon, 07 Oct 2019 12:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570475406; cv=none; d=google.com; s=arc-20160816; b=Z9jBH/I/lLlUDnsF7U1FlwxLqXhd/9m+irzYPPd+xdqSDuhMyKRjW83vXJpKMiVRg8 zHTHVFpnMFbG39PQAffoI/NTnmNmm7Eu2FeKgLJ1zuySEPtr7KgdtxDPmlWwuFKX3pSD 1a4Yz03kp/4E/j/E0Kcr5YAPFcIWr7wd6sUuJesrw4VcXhA7N4PjtbqX4p3Pn/M5Jy9+ VQzFGCYUyQIkHwYAYuq4BCgroWsYjQY7uAYLH+5NxDApUIv9mMMtx2CEQocdMeZeUnT1 UeLiT5S5TqA9Pvgh0974HH6Cu3gpPjipS+Ow61iwaf18iua8vVGl8GlTViqozfMtgmME XC2A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=95juAPRibRsg5re+laxQpzz0D8Am/jXsPVvZ79cjhUQ=; b=oX+rgXJGlWkOJO6HH7g6dVWoT2/Aa9401sQzVR3sHEobsdVR7HLI0GkWSq/dk32REp A1jjMejeOuyiXSA2mSevniOaEgGfIs08JfBvF55sLO2ezw4qIPyhX24XC27Oe5oXRaNN K3pKww4uQNfmF5+c5gYDjjUuk08Mfiu8Owj9dXJwfiVG5DcHlh1/XHDoUvyTJSFmRbnC B1pfa3H1XW9ONFw8kvnL7oU5ti4IZ3MPyKYoNJqecxkqtzJDDFAT4Hw5KF2emHKFGzs7 UhnQtAF6KsuqkFVYQ9OO7qehWZs813g67u6zRe1KsfceKvJcJXFAPezBvQn++SJJ70xS VqFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wW6rr+1h; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e22si8698913eda.300.2019.10.07.12.09.41; Mon, 07 Oct 2019 12:10:06 -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=@linaro.org header.s=google header.b=wW6rr+1h; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728371AbfJGTHH (ORCPT + 99 others); Mon, 7 Oct 2019 15:07:07 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33467 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbfJGTHH (ORCPT ); Mon, 7 Oct 2019 15:07:07 -0400 Received: by mail-wr1-f66.google.com with SMTP id b9so16637683wrs.0 for ; Mon, 07 Oct 2019 12:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=95juAPRibRsg5re+laxQpzz0D8Am/jXsPVvZ79cjhUQ=; b=wW6rr+1hS+VmsRnIZrSE0LcWIGuTNm/CGXrzeSUP+yMjFX8ONLJUEFVbaavrpyiD0O xmV6DbtmOrjCDLaongOaRi86y1lq1sgKTl8lmSNE9AvH3YoJEFegf2KVyjj54PuSMRyO cK1uRRL4Ku7+uZkBiAGrilSsrGpN3EyXGxKm9Kt3GlXxPHT6bWYXAFyH8E4iEW03+SNm iLesfPQ2lVCQOvVvx/r5qDetWCgZPzD7BWVwzztUl3WWaDk2YSY1K4TP56uzyURnKzZC UW0QIjYwNVHs6lZW7XmyzGj7YN/Rj8sDaOR6LKGRE6cl85HsjchFtIfrRdMddy8Ucy+a JE6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=95juAPRibRsg5re+laxQpzz0D8Am/jXsPVvZ79cjhUQ=; b=CEdIiQhEy8BIQJuQFnUAcNl+7zykmHCEvA14iRtpMLbrcS35+3jMEQV49CRmaN7ExM UJOO/hqBuKgbZsok/6gOaImsOayTuvpgAnZHCDtiYzT27PJfNdqGedrsVUkcb2F8g3F3 ypXk0zhyd5rVPqB2eduhnz8B+dy/osATvV/0L8XLTeJ0TnkA5iAvMogTKm9RYmQ/QhaW sLWJ/Z8YfwBgimVHiyWjenXfidT0+0gWOc5jBRidfnXcRbFf/2zD1RfREBxYD6Aj/vFn 0E9xYLUfDTHKhyU2ZOeyOV6UV5eYC+UzlismUTNhqDLjTXjljn2MwtVNj1sn+woWTReR 6uoA== X-Gm-Message-State: APjAAAUlJl85Y7YpKIoD8aWQEzx+FOc+IIXAG2sWy1Wyi4c/ThZvol8j n5w6GG3ADDSLOmkCyXFnPNNWeXXOOTCNQD6K289bXA== X-Received: by 2002:adf:fc07:: with SMTP id i7mr8880378wrr.50.1570475224332; Mon, 07 Oct 2019 12:07:04 -0700 (PDT) MIME-Version: 1.0 References: <20191007175553.66940-1-john.stultz@linaro.org> <20191007175553.66940-5-john.stultz@linaro.org> In-Reply-To: From: John Stultz Date: Mon, 7 Oct 2019 12:06:53 -0700 Message-ID: Subject: Re: [RFC][PATCH v2 4/5] dt-bindings: usb: dwc3: of-simple: add compatible for HiSi To: Rob Herring Cc: lkml , Greg Kroah-Hartman , Felipe Balbi , Andy Shevchenko , Mark Rutland , Yu Chen , Matthias Brugger , Chunfeng Yun , Linux USB List , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 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 On Mon, Oct 7, 2019 at 11:38 AM Rob Herring wrote: > > On Mon, Oct 7, 2019 at 12:56 PM John Stultz wrote: > > > > Add necessary compatible flag for HiSi's DWC3 so > > dwc3-of-simple will probe. > > > > Cc: Greg Kroah-Hartman > > Cc: Felipe Balbi > > Cc: Andy Shevchenko > > Cc: Rob Herring > > Cc: Mark Rutland > > Cc: Yu Chen > > Cc: Matthias Brugger > > Cc: Chunfeng Yun > > Cc: linux-usb@vger.kernel.org > > Cc: devicetree@vger.kernel.org > > Signed-off-by: John Stultz > > --- > > v2: Tweaked clock names as clk_usb3phy_ref didn't seem right. > > --- > > .../devicetree/bindings/usb/hisi,dwc3.txt | 52 +++++++++++++++++++ > > 1 file changed, 52 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/hisi,dwc3.txt > > Can you make this a schema. Sorry, I'm not sure exactly what you're asking. I'm guessing from grepping around you want the bindings in yaml instead (I see a few examples)? Is there some pointer to documentation? The Documentation/devicetree/bindings/writing-bindings.txt file doesn't seem to say much on it. > > diff --git a/Documentation/devicetree/bindings/usb/hisi,dwc3.txt b/Documentation/devicetree/bindings/usb/hisi,dwc3.txt > > new file mode 100644 > > index 000000000000..3a3e5c320f2a > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/hisi,dwc3.txt > > @@ -0,0 +1,52 @@ > > +HiSi SuperSpeed DWC3 USB SoC controller > > + > > +Required properties: > > +- compatible: should contain "hisilicon,hi3660-dwc3" for HiSi SoC > > +- clocks: A list of phandle + clock-specifier pairs for the > > + clocks listed in clock-names > > +- clock-names: Should contain the following: > > + "clk_abb_usb" USB reference clk > > + "aclk_usb3otg" USB3 OTG aclk > > + > > +- assigned-clocks: Should be: > > + HI3660_ACLK_GATE_USB3OTG > > +- assigned-clock-rates: Should be: > > + 229Mhz (229000000) for HI3660_ACLK_GATE_USB3OTG > > + > > +Optional properties: > > +- resets: Phandle to reset control that resets core and wrapper. > > Looks like 4 resets though. Good point. I'll fix that up. > > + > > +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. > > + > > +Example device nodes: > > + > > + usb3: hisi_dwc3 { > > + compatible = "hisilicon,hi3660-dwc3"; > > + #address-cells = <2>; > > + #size-cells = <2>; > > + ranges; > > + > > + clocks = <&crg_ctrl HI3660_CLK_ABB_USB>, > > + <&crg_ctrl HI3660_ACLK_GATE_USB3OTG>; > > + clock-names = "clk_abb_usb", "aclk_usb3otg"; > > + > > + assigned-clocks = <&crg_ctrl HI3660_ACLK_GATE_USB3OTG>; > > + assigned-clock-rates = <229 000 000>; > > + resets = <&crg_rst 0x90 8>, > > + <&crg_rst 0x90 7>, > > + <&crg_rst 0x90 6>, > > + <&crg_rst 0x90 5>; > > + > > + dwc3: dwc3@ff100000 { > > If it's only clocks and resets for the wrapper node, just make this > all one node. Just to make sure I'm following, you're suggesting I put all the clocks/resets in the dwc3 node (renamed to usb for the node name) and not add the wrapper? I'll have to see if that's possible. The generic dwc3 binding wants 3 clocks, but I only have two in the code I've worked with (similarly it seems to only want two resets, not 4) so I'll have to see if I can figure out how to adapt that. If that approach is preferred, do I also no longer need a separate binding document/schema? thanks -john