Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp324472pxu; Tue, 6 Oct 2020 07:20:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBMi4vlk2olKnIYLljLgsot1L+76OgPGnDtFul/RantgVZyq1/Qn39yIzYsjuPNRnWO3jH X-Received: by 2002:a05:6402:2d9:: with SMTP id b25mr5741998edx.131.1601994006645; Tue, 06 Oct 2020 07:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601994006; cv=none; d=google.com; s=arc-20160816; b=rA/Dlf3Q2YXq+EOuSMF6PNWhtiODykQ2ZZsnz0Ab3hEwxa3KCFjnUHrQutPYJT+705 DEkRh/KeG54hqL+R1qoJ3OpTUtP7TgdM/UrIxvXdwr0URcPuahbafGgwBqgSUVgB6SBJ w+3JEw/zKV1L3kjIbEZ5FQwwCTPnKtWlwKC2st4i3WxtXaHpTGF6EEKlw8OxyDh9eDRD NkchLi3/laTQZUulUOBMxMm5UV2jwtZjCyVzuU+zrKLzXUxQHzGsnIPCw7Q5QjJ7LAOV QkEjiZ2TN7tiO8Bf5/UlDPg530EfbilwF9YJTkZ3EktyJY5cC5/9xD4ZcPb6f7iR0xCF e+GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=itWJi0o96IHbW/B8auOby15x/6b0N8a/51To0M3n0vE=; b=gzFsvpE+QXc5PZ+qM3ZQPjDdvJBsNrgN54FA37yxy/l8f4ue7tOZ1RmhhRJGaBBPwR P+vlTB4465wq6NLCq+yg0XhMiyfC86j/iZVSs0WR4SIitfm+Rioi1XmRDWM0M5CTBJ50 zSZYZk+2MTRs5vFZ4SuhaMhEQ4n3/7dTPFX92vipY3iOIaL7ROQCHylpNit74igSz24n Umdfb+pQKoO28BZq/y0k8VuWRkpG0w0mTYVjCQIq0QLYJYp9aoSi70mh1v/ltzLeB6yD fzj0/lskeugdiTCrlyf5djM+jrr7jgzWwqyvgha8BuDiV5dL1JJasvKaXdhKNgL54aF5 HAMA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m21si1988815ejq.199.2020.10.06.07.19.41; Tue, 06 Oct 2020 07:20:06 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbgJFOSV (ORCPT + 99 others); Tue, 6 Oct 2020 10:18:21 -0400 Received: from netrider.rowland.org ([192.131.102.5]:33521 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725947AbgJFOSV (ORCPT ); Tue, 6 Oct 2020 10:18:21 -0400 Received: (qmail 417731 invoked by uid 1000); 6 Oct 2020 10:18:20 -0400 Date: Tue, 6 Oct 2020 10:18:20 -0400 From: Alan Stern To: Matthias Kaehlcke Cc: Doug Anderson , Rob Herring , Greg Kroah-Hartman , Frank Rowand , "linux-kernel@vger.kernel.org" , Linux USB List , Bastien Nocera , Stephen Boyd , Ravi Chandra Sadineni , Krzysztof Kozlowski , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Peter Chen Subject: Re: [PATCH v4 1/2] dt-bindings: usb: Add binding for discrete onboard USB hubs Message-ID: <20201006141820.GA416765@rowland.harvard.edu> References: <20200929220912.GF1621304@google.com> <20200930013229.GB194665@rowland.harvard.edu> <20200930124915.GA1826870@google.com> <20201006004510.GD4135817@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201006004510.GD4135817@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05, 2020 at 05:45:10PM -0700, Matthias Kaehlcke wrote: > I did some prototyping, it seems a binding like this would work for > case a) or b): > > &usb_1_dwc3 { > hub_2_0: hub@1 { > compatible = "usbbda,5411"; > reg = <1>; > }; > > hub_3_0: hub@2 { > compatible = "usbbda,411"; > reg = <2>; > vdd-supply = <&pp3300_hub>; > companion-hubs = <&hub_2_0>; > }; > }; > > It still requires specifying both hubs (which reflects the actual wiring). > Supporting something like "reg = <1 2>" seems more complex due to the need to > obtain the hub USB device at runtime (a DT node makes that trivial), possibly > this could be solved by adding new APIs. > > In terms of implementation would I envision to keep a platform driver. This > would keep the hubby parts out of xhci-plat (except for populating the platform > devices), support systems with cascaded hubs and provide a device for the sysfs > attribute. What will you do if a system has more than one of these power-regulated hubs? That is, how will the user know which platform device handles the power control for a particular hub (and vice versa)? You'd probably have to create a pair of symlinks going back and forth in the sysfs directories. Wouldn't it be easier to put the power-control attribute directly in the hub's sysfs directory (or .../power subdirectory)? Alan Stern