Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4898162ybp; Mon, 7 Oct 2019 16:01:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAhb1cIueP9WXSzihjuSODyZmUk6ywhnVhTeAk/3oAHZB37N2uYubw+B2ka0R3ACBD71xn X-Received: by 2002:a50:aa96:: with SMTP id q22mr31123829edc.179.1570489270569; Mon, 07 Oct 2019 16:01:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570489270; cv=none; d=google.com; s=arc-20160816; b=RjkUoBT2v7LzNKWe61UXa4bqohTSvtZ6Ijn9BAqVOJydrjtj3MyKQmNHuj5wXNtjea KZRU8c82cXnvg13VeK/ArkK78nHmJv2EM4v+AIb+ZTEcYuBdSC7aYk4PlgQzEA+f4GsZ 3SqNGkdkHswI7FTBqR6D7Muqbq/7cd8Oc700GRSaKdyRuYW+nNGd4bzs7YsgH4oFiUwh Z78h76p6jqZ8QRKMy/lkHEhjbeDGXT9HQ5Cq8nyMwdUTJsgxTGZdeJJOMlbbkQzK3inr BAQ0XL2bWoBBR5gtB4x9lwXjdmTI18Ww4DaT0W4ijbGa1IKXEjGtHsyey1XcVRnl8UND sKbw== 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=5sEe5owGp1W2adbjPNudunYGCk7mIJAE9kb0DI5bzNA=; b=GXzFfp9+XLmkTGLGux+N6UKMyMlhUpZHA+b7UJoJlIZpxB7kCKWE24uVjbVlxZpE3O Pqm8QXiFH2oOrc5CwRYY98SYJ5dDMnTfJangss60bw71o2rSm2iTLMsqC87ceHHoLY/6 8qbiSwPStnL8Wdze1n5jV9M5mEtdLgIRpXtuA7pxU0FTnQpivGHXTG6YJG6ercAPbL0j CHQldDr0Zh+X4EV3ZqLdk4FkTaaf7Id1niVRb8HJKq2/xgS73FP3Q+uO6T/YNKNtYBcm 9dUzZDzBhHqamlAkJ9932twhUcdC1X4KRCGaD01kwpvmJ4NVZm4lPUdeNKK3qNfBNGeM wG6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="O+c9lew/"; 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 w12si8681147edx.223.2019.10.07.16.00.44; Mon, 07 Oct 2019 16:01:10 -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="O+c9lew/"; 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 S1729595AbfJGXAi (ORCPT + 99 others); Mon, 7 Oct 2019 19:00:38 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53079 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728980AbfJGXAh (ORCPT ); Mon, 7 Oct 2019 19:00:37 -0400 Received: by mail-wm1-f67.google.com with SMTP id r19so1110693wmh.2 for ; Mon, 07 Oct 2019 16:00:36 -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=5sEe5owGp1W2adbjPNudunYGCk7mIJAE9kb0DI5bzNA=; b=O+c9lew/nusfCZUjADv9wuSQXLp8VOFYy/0WSdV/7Hy21ZsROhuKwQjW8kQQXN6EYP Sv/S5RTGBNu3HghEfpz93Z3IxaEP71CfoMQ8yRIWjAZkBM3qr7pYKJC0heA6i7K0XIcn N82zQD4R4/WQjJ39LS7CrMf6UVIhZA6+XJdQ69bPqsEPYAHzJwxIypY5k7JnlsK9Q0ib SCbrqNY+lO0JrDWTCMF9RuUKj9xcNXanM3jhrWRwY9wzLcSmBQM7RSCODbP57hAeuC4s U4DBtjCPh8J2TBNea8QagYHaRzlmRSFj/o64vE15uZcJ4KB5T1knTnwffLW2yJeTPY9V JEWg== 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=5sEe5owGp1W2adbjPNudunYGCk7mIJAE9kb0DI5bzNA=; b=UnY64BHZx1GCHCWbhc8hE1bDzUj60yxI6fdeHA6rJUrdZtSLzT/1Psw6b9BlQFFGQk ivKqM7IzBVYPceGS7whUOVYEkG7yhqypHfXR8+T3ItHsJrKg0vic2jxjQNCcDGVix9ix 8HYGyhTtr6p14qZQQV+UzWQ4MC27eMIq5xGekcX01xfqnirtoeN2+r3KEOX2DOhCjRxH 09EfFPrXBjD4Ya000WiGuGFcSrktaUS0aWK4pXNKs0Gc437bgMF+EawX3xrrbpq4zPd3 A4J059lc2JJ8iSkvPC9R7b1NwzRGPUbv8eg5AzqRhAKFrw7uSrZ6M8wFyyhmgbmLlt/1 6+ZA== X-Gm-Message-State: APjAAAWO4p8F2CqJSntEhrPM/oPVbDjpHhwsWefcteiSEE2DJmPr+pxn rkUDn1Glnksw/AZlB0K32Md0DbFmTbVJAYLHpPuRhQ== X-Received: by 2002:a7b:c8d9:: with SMTP id f25mr1209258wml.153.1570489235833; Mon, 07 Oct 2019 16:00:35 -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 16:00:24 -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" , Masahiro Yamada 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 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 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. thanks -john