Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2399096pxb; Thu, 11 Feb 2021 11:17:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1nRGK4UL+AWMXktXpzQ/hWlYrFgd1nBnTeTQwAQcJmxqODuzyK/4f10S/2MtzuB5Om3Ee X-Received: by 2002:aa7:c843:: with SMTP id g3mr9885441edt.228.1613071036739; Thu, 11 Feb 2021 11:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613071036; cv=none; d=google.com; s=arc-20160816; b=vaShBS9WZBMuMTLbZwDNZFwb9GDDKJcxPoJF999LXky5CUaOcsggBs3kS9HdYWK+rq LQ1M1jn/Js7jY44p9PPT//QeLxw5J+84vS1Qbv/Dug5MK9lD2pWW4v+z9zTJ03g9SkwG cIktl53B0Fj4O2Hz26H/MZjYBl24UkTf9Qb7l5ONUt0Cbe9aDg16I6mK7uC7Vvrxc6/8 5bZCOUCVgCaI4y4O+9+tOYoV5ViQtdeKH9Nr5natFmlXaOZgviAUJ8kuQ8eU/uy/tnPu xt00kk9VyZsityb5Bu36NDIgArWFykkTA5Mrf6IFCzCnhBQVrA2uWFs+g4VehE1/WXvR Vlgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=qqEry60T4DmTyCAXWg4gMVAOjQbNyth0ovp4BVqxCc8=; b=FzKTwqohAzL2tiMiDWbkfLyhcjRmSK0f/TiFSuVxwYoWewfn4fpc0ZLfIj7IEJ43Jf A8+qeo4A8pPwwpqktD9FuQvR7+7kXruY/z6SJnSqS380QSzvzt/yNYpUuFDeUFeiTP5a 5yUxY29CBIdwmLHH/zgkxmoA+2b5UcKsDYsoPlukIzc4oHos5WOOpXkzPrIt1o8XRprv F0x5J+OJ8XPo3l6zxfU+4TIE/Mxn8mxOIP2UI8AxidnhQqrYfPU57XRNdn694Y+d+sUj BrBJxy6XdQ7p6BO6Yf4PEUuAHKx8dKl+I7M6l95cRB+/OAiouT3EHuedzQ9qjq4BHLYs HODA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UnD7UfzY; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si3951980ejf.655.2021.02.11.11.16.52; Thu, 11 Feb 2021 11:17:16 -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=@chromium.org header.s=google header.b=UnD7UfzY; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbhBKTP3 (ORCPT + 99 others); Thu, 11 Feb 2021 14:15:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbhBKTPX (ORCPT ); Thu, 11 Feb 2021 14:15:23 -0500 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B8D5C061786 for ; Thu, 11 Feb 2021 11:14:43 -0800 (PST) Received: by mail-pf1-x436.google.com with SMTP id j12so4277720pfj.12 for ; Thu, 11 Feb 2021 11:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=qqEry60T4DmTyCAXWg4gMVAOjQbNyth0ovp4BVqxCc8=; b=UnD7UfzYJXS9wCo8RcNk2NVDC0RL2SLfwid1NILUmfiMlyGyHHPF2HoFUXvjv1h3y8 nyYd3031FB5XuwbTMIWp+2C7dPZ+sPJN7vq3FHxvZ3595t0tSOR0uvkvB/SRTNZhTsfa uTwOFWatxO8GhXs47gLTt8iYdWhCLLKQb40/M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=qqEry60T4DmTyCAXWg4gMVAOjQbNyth0ovp4BVqxCc8=; b=HO0RE2pMDm3uiGKZE2K+VeeAjHYsedRO392vQreogJeQPTvFu1cpDUAGvdsBDV7riB lcEG17kGcMshHMS3HyZ9yIf1R3Y5WuYZfyaXtdf/8srKN/CWXNFc4Ee80mdNnzVzYHyA ru+WaPLxMq24d04JHCKTmjh4uzrx6YufGHcN6AfOye8DHA2yFAd1GhxKyFIDB0VrIwgP Y247QZmyhlTYbLmbSRanc5y5dtDurzqS0JtuOjW9M6nYmnq7cMOqY781u1OTpa8M+QpV /LlqxyuUlZg1iQO1+IQWRGm18JXTR0HxM8pK0EWaZCf6IQF/pHXmAClJgaGA2kAmX+aS vp6A== X-Gm-Message-State: AOAM530LSji5hBvcaSR/1vBEqiolDj1qsPFTj4um2AQ0hNuh/U+M4Pzs 559HL00iHTbhIr3kyFxNpWHDIw== X-Received: by 2002:a62:1708:0:b029:1da:2f7a:3639 with SMTP id 8-20020a6217080000b02901da2f7a3639mr8920114pfx.78.1613070881351; Thu, 11 Feb 2021 11:14:41 -0800 (PST) Received: from chromium.org ([2620:15c:202:201:f038:5688:cf3c:eca2]) by smtp.gmail.com with ESMTPSA id y24sm6307848pfr.152.2021.02.11.11.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 11:14:40 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20210210171040.684659-1-mka@chromium.org> <20210210091015.v5.3.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid> <20210210210645.xapaua7djdsvr3ca@kozik-lap> Subject: Re: [PATCH v5 3/4] usb: host: xhci-plat: Create platform device for onboard hubs in probe() From: Stephen Boyd Cc: Greg Kroah-Hartman , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Peter Chen , Alan Stern , Ravi Chandra Sadineni , Bastien Nocera , linux-kernel@vger.kernel.org, Douglas Anderson , linux-usb@vger.kernel.org, Mathias Nyman To: Krzysztof Kozlowski , Matthias Kaehlcke Date: Thu, 11 Feb 2021 11:14:39 -0800 Message-ID: <161307087919.1254594.11784819060723374369@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Matthias Kaehlcke (2021-02-10 14:20:18) >=20 > On Wed, Feb 10, 2021 at 10:06:45PM +0100, Krzysztof Kozlowski wrote: > >=20 > > This looks hackish... what if later we have something else than hub? > > Another if()? > >=20 > > What if hub could be connected to something else than XHCI controller? >=20 > In earlier versions this was standalone driver, which was more flexible a= nd > didn't require cooperation from the XHCI driver: >=20 > https://lore.kernel.org/patchwork/patch/1313001/ >=20 > Rob Herring raised objections about the DT bindings, since the USB hub wo= uld be > represented twice in the DT, once in the USB hierachry (with an explicit = node or > implicitly) plus a node for the platform device for the new driver: >=20 > https://lore.kernel.org/patchwork/patch/1305395/ > https://lore.kernel.org/patchwork/patch/1313000/ >=20 > Alan Stern suggested to create the platform device in the XHCI platform d= river: >=20 > https://lore.kernel.org/patchwork/patch/1313000/#1510227 >=20 > I wasn't super happy about involving xhci-plat, but at least the code is = minimal > and all the device specific stuff is handled by the onboard_usb_hub drive= r. >=20 > If you have better suggestions that might satisfy all parties please let = us > know :) >=20 Is it possible to use the graph binding to connect the USB controller on the SoC to the port on the hub? Then the hub would be a standalone node at the root of DT connected to the USB controller (or phy) and xhci code could probe the firmware to see if there's a graph connection downstream that is a powered hub like this. I didn't see this idea mentioned in the previous discussions, but maybe I missed it.