Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1094085ybp; Fri, 11 Oct 2019 08:52:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwi0+37nff2FYGpeKe8d3bx1NqTy3Xh/0B/TuEW6pJ2qfaZaD2GSkM5rTMRjc9dqeUg2JVb X-Received: by 2002:a17:906:688:: with SMTP id u8mr14824095ejb.208.1570809127412; Fri, 11 Oct 2019 08:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570809127; cv=none; d=google.com; s=arc-20160816; b=W5Etbv024dAAAGmOfHEs2VMYGZ6qsmYPT+wOQyZ961Yv7u/yN+4D/h8aR4ZREfYWhq vWUtyFi50C5uRpuop1u2OiAGLYnu2z2SQen7wwL7tGu19t7Igzx4/DfbUbw5sOa5Ys1v 08a/qByIYWS/OFtfBSYRtSV54V9XMhiUFokDfrCK44pQJmlIKhFBL0wWQoBeYn11WQJy jzffV0kcy6hmt8Lp7qYWHtn4TPd3zeBIpQptIwWINgGCGkHDcLdNGkBTC60Q7Gk4Z5HD k11A9K43qOeIJb+U66vJabkhjhVbPvmS+2b3+nllGyvqF2oYIUjo1Glt2aljkYUb/Oq2 HS6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Y/QLZGzKlqPXEYz4XBHb6fc2z++j0NNAuKvWxwrnWJg=; b=X2mxQoLhXbyYeolSYpwZpAn1TWYNgS6XqmTCJU4AAjmBSEFtoXsw5Jgowpnlt7+fQR ZqAb4cwvj4ZJWQKhkLUizQ3ZyoncggkMbTCc1z7N8YdXOEdYakOAwyamMO0jy4iwzYbH fsOYgnLAlD+0/RLIlpFHLPGbjC8h3ygkhX4Iv/BZgC83XmrR/fXtwj+Ici2cTr0Ztqle 4JwtMOyE3jLXwq+fp5eoLtH6okkpQ3LNCW8kVTxgNApz1IA5n9z7CtiTjwbJosHS4xnv ESNPieQQdTPaop6X6l6w7MT3ZplgJ4glWBuX3uEf9OiefD8rwxkq/T/bAYiCOVKnUit9 ehDA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h90si6263469edd.178.2019.10.11.08.51.44; Fri, 11 Oct 2019 08:52:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728157AbfJKPv1 (ORCPT + 99 others); Fri, 11 Oct 2019 11:51:27 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:34045 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728086AbfJKPv0 (ORCPT ); Fri, 11 Oct 2019 11:51:26 -0400 Received: by mail-ot1-f65.google.com with SMTP id m19so8384187otp.1; Fri, 11 Oct 2019 08:51:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Y/QLZGzKlqPXEYz4XBHb6fc2z++j0NNAuKvWxwrnWJg=; b=ec9NzZUpmc0uLkvW1tOSgjCPKMLt9xvqzSaW1wdr6BXn1pXtR5/MfGNBTCiIb/Awjq F/4vQAqh3GMKlZGW7TGvI09CAj7uGcMwHuMUKREdqY88KZa2GTBgWc2NVsYOsVhsRl/W UaD+F/y5Luf70XKJjZUz5Q5cAJyG5iK0ZOkL5U8aFbDpCLlaX0rZiLZny1h99JK2SbSu xsOrXdl82GZL8v4JQIsFY4arKf0ElW+4c42JGtnc8eyjlW3jdTJtqk2Okn+EG/xe+YR4 Iqwr6HHancxMvJGCttYL2MdyZLqmVtcqc12DBljO7k0smR3zqFMyFlRpkvYQzhF4acRW LVAw== X-Gm-Message-State: APjAAAUsW6M5ba/q6+yZ6jMQC7MZNKT1tNCtXAkOIUFIx7l3KWqL3g5e ymM5DxACq0NwOPLPnbzIeA== X-Received: by 2002:a9d:7844:: with SMTP id c4mr9137267otm.273.1570809085207; Fri, 11 Oct 2019 08:51:25 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id 17sm2625595oiz.3.2019.10.11.08.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 08:51:24 -0700 (PDT) Date: Fri, 11 Oct 2019 10:51:23 -0500 From: Rob Herring To: John Stultz 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" , Masahiro Yamada Subject: Re: [RFC][PATCH v2 4/5] dt-bindings: usb: dwc3: of-simple: add compatible for HiSi Message-ID: <20191011155123.GA14272@bogus> References: <20191007175553.66940-1-john.stultz@linaro.org> <20191007175553.66940-5-john.stultz@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 07, 2019 at 04:00:24PM -0700, John Stultz wrote: > On Mon, Oct 7, 2019 at 2:11 PM Rob Herring wrote: > > > > On Mon, Oct 7, 2019 at 2:07 PM John Stultz wrote: > > > > > > 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)? > > > > Yes. > > > > > Is there some pointer to documentation? The > > > Documentation/devicetree/bindings/writing-bindings.txt file doesn't > > > seem to say much on it. > > > > You mean Documentation/devicetree/writing-schemas.rst? There's that > > and Documentation/devicetree/bindings/example-schema.yaml which has a > > bunch of annotations on what each part means. > > Ah! Sorry for missing that. Thanks for the pointer, though I may get > away with dropping this one. > > > > > 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? > > > > Yes. > > > > > 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. > > > > Possible since commit fe8abf332b8f ("usb: dwc3: support clocks and > > resets for DWC3 core"). > > Ok. It *seems* like I can get it working with the existing binding > then. There's a little funkiness with the core expecting three clocks > while I only have two (currently I'm duplicating the "bus_early" clk > for "suspend". Is there a preferred way to do this sort of hack?), and > I'm a little worried that only the first reset is being used (instead > of the 4 specified), but it seems to work so far. I would assume that you simply don't know how the 'suspend' clock is connected rather than you don't have one. But that's maybe not a problem you can fix. I would make dwc3 use devm_clk_bulk_get_all and allow for less than 3 clocks. And do a similar change for resets. > I still suspect the dwc3-of-simple.c method might be better since it > can handle arbitrary sets of clks and resets instead of the fixed 3 & > 1 in the dwc3.txt binding. > But if I can get away without having to add an extra binding here, I'd > be happier. Me too. Rob