Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp8087334pxb; Fri, 19 Feb 2021 07:08:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJySRzBH0OYKx1G0w7pjZE+CU4Bu0ossiuhe03pOx9iJIeGHs6DErc4UBkMWMdWSr6ZKww35 X-Received: by 2002:a17:907:1692:: with SMTP id hc18mr9137511ejc.244.1613747324713; Fri, 19 Feb 2021 07:08:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613747324; cv=none; d=google.com; s=arc-20160816; b=C2EBkE2RSOeFT6m0FPs6d2rTXYfcvVC9B2QXeeB4yLu280XrHTkYwSvN0PoBbyTtSX rUgNgj02riUG4OD/hJG1v/pXtzWBORhanjl6b1wztglXHzc81L0a+mtks+b/NIA/IEdw W98TpBjy3PWxe+3brs8mNZT/J3VHfdv6seaXBwSW/h/up+VEw1w3QoELXGWzxNbX1LgX wBh3P2DlS1mxYtf/5L/JxLdK2Yam+KHgF65DgqGpIVOB0zb/mW2xoKkeqhyQSYOHBY2v QgHmiUtl5oYYnk+NM8fWm5Sk0nWTvUgHVwpd22GTeHQtkfg8MWohZQ8cF0zwxLweDrk9 7i5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5Wv0VZ+8TjoLgqaKySLlHr9dE8I68hrxk2lhogdSnEw=; b=BPpjmz0exPbsqv0TYFwHNFMDuKzp0iJ/i7DX3EjTeBqVow7HSn4umJhKhGxyXYvAEX wb+HAcmEBj7nHVkIgSydgfUgCuEINNMfTOmLvLBP4yOSendp1hjusJeRbv7/HgTIAE1S +jgDz6BdyPtR0PJotiAmC5eJTCkJk6ut/Qc6M8xjCcxZBB5u+R5xuc2AATF8t5PKyE02 BcGG7IPVGGX53HNMlxShZp7iY+p8HKUh4NT/7+3ncZWFIW0hoJRqg8an326KJi/lEJmN cXYoCF5p9l9b1E0OX4gAwKanHVewTDMWEpliul/LF7warS9U28lAuFAeN8NadJudoNPx A5ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ty/5YzIJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si5885863ejt.198.2021.02.19.07.08.20; Fri, 19 Feb 2021 07:08:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ty/5YzIJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229734AbhBSPGq (ORCPT + 99 others); Fri, 19 Feb 2021 10:06:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:38760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhBSPGd (ORCPT ); Fri, 19 Feb 2021 10:06:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id AC63C64EB2; Fri, 19 Feb 2021 15:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613747149; bh=TFnkMI7UMPE4haMLe6s3+bb5ZQ9eOM3Ey+RTradDiDw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ty/5YzIJLHmMx8pxXU6Xc7TCwPBY6RbIS1pQ4CF6uDiuX+7FxIhwy+nCphfhw8t1D DF5259hbST/ddPx6JoNwaTwrgoLgE9mWvRGY73dXjcc9Ckv75Pwut5lqeMWH4FB1Vg 6IEmPCVOZkyHBc0FipmPYOE9+eIgmc1syhp+DjL9fzogqV4fEHL1b4e2Zis2U6Es6R mBjEoFwJUsApP4sKTP0OsobfOXTLP2RWLdtkelJmn8dkQr3sFcQKIiFDvdOBMjffSM vYEvq9Q5b9USTWMAojfaOklBNLa1/O3wi8GM77UwP2uvPGQ0Z3mUZ0zWOKD8JoGUct ucaYhVS1Qbvuw== Received: by mail-ej1-f42.google.com with SMTP id jt13so14050110ejb.0; Fri, 19 Feb 2021 07:05:48 -0800 (PST) X-Gm-Message-State: AOAM532k1MrC2Nm/leb3RSWT894h2DQ8m8OJLHM9mscfwkLhV6Caeo+j 2LBfbvvRjaQfu55d6FoR8LCmpG2vAnqKhohvRQ== X-Received: by 2002:a17:906:d1d0:: with SMTP id bs16mr9376281ejb.468.1613747147168; Fri, 19 Feb 2021 07:05:47 -0800 (PST) MIME-Version: 1.0 References: <20210210171040.684659-1-mka@chromium.org> <20210210091015.v5.1.I248292623d3d0f6a4f0c5bc58478ca3c0062b49a@changeid> <20210217210441.GA2709172@robh.at.kernel.org> In-Reply-To: From: Rob Herring Date: Fri, 19 Feb 2021 09:05:32 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/4] dt-bindings: usb: Add binding for discrete onboard USB hubs To: Matthias Kaehlcke Cc: Greg Kroah-Hartman , Frank Rowand , devicetree@vger.kernel.org, Peter Chen , Stephen Boyd , Alan Stern , Ravi Chandra Sadineni , Bastien Nocera , "linux-kernel@vger.kernel.org" , Douglas Anderson , Linux USB List , Krzysztof Kozlowski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 17, 2021 at 7:33 PM Matthias Kaehlcke wrote: > > Hi Rob, > > thanks for your review! > > On Wed, Feb 17, 2021 at 03:04:41PM -0600, Rob Herring wrote: > > On Wed, Feb 10, 2021 at 09:10:36AM -0800, Matthias Kaehlcke wrote: > > > Discrete onboard USB hubs (an example for such a hub is the Realtek > > > RTS5411) need to be powered and may require initialization of other > > > resources (like GPIOs or clocks) to work properly. This adds a device > > > tree binding for these hubs. > > > > > > Signed-off-by: Matthias Kaehlcke > > > --- > > > > > > Changes in v5: > > > - updated 'title' > > > - only use standard USB compatible strings > > > - deleted 'usb_hub' node > > > - renamed 'usb_controller' node to 'usb-controller' > > > - removed labels from USB nodes > > > - added 'vdd-supply' to USB nodes > > > > > > Changes in v4: > > > - none > > > > > > Changes in v3: > > > - updated commit message > > > - removed recursive reference to $self > > > - adjusted 'compatible' definition to support multiple entries > > > - changed USB controller phandle to be a node > > > > > > Changes in v2: > > > - removed 'wakeup-source' and 'power-off-in-suspend' properties > > > - consistently use spaces for indentation in example > > > > > > .../bindings/usb/onboard_usb_hub.yaml | 49 +++++++++++++++++++ > > > 1 file changed, 49 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml b/Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml > > > new file mode 100644 > > > index 000000000000..bf4ec52e6c7b > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/usb/onboard_usb_hub.yaml > > > @@ -0,0 +1,49 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/usb/onboard_usb_hub.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Binding for discrete onboard USB hubs > > > > This isn't really generic. Maybe there's a set of hubs with only a > > single supply much like 'simple-panel', but I kind of doubt that here. > > There aren't hundreds of hub chips like panels. Though, we should put > > this into bindings/usb/hub/ so we start collecting hub bindings in one > > place. > > Ok, I agree that the name of the binding is too generic, I anticipated that > the power supply section would need to be extended to support other hub > chips. > > > A generic driver doesn't have to have a generic binding. > > That's a good point, it seems to make sense to have separate bindings in > this case. > > > You can have a specific device binding which is handled by a generic > > driver. Or not. Who knows. Maybe a simple user like u-boot has a generic > > driver while something more feature rich has a device specific binding. > > > > > + > > > +maintainers: > > > + - Matthias Kaehlcke > > > > Now we have usb-device.yaml, you need: > > > > allOf: > > - $ref: usb-device.yaml# > > ok > > So with your comments addressed it seems we have a binding that could be > acceptable. I'll still hold back a bit to see if we can make progress with > the discussion about using the 'graph' binding (https://lore.kernel.org/patchwork/patch/1379002/#1578294). > The one thing I don't like about the current binding is that it wouldn't > work out of the box with a hierarchy of hubs. To make that work on the > driver side an additional property would be needed to indicate that two > (or more) USB hub devices are related (i.e. are provided by the same > chip). This is needed to be able to decide whether the hub should be > powered down during system suspend. How about a 'hub-companion' property or similar? Rob