Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2518319pxb; Thu, 11 Feb 2021 14:44:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxsbEmh9pvvoo9qfpB9TSX1qhfXCvxBEQkYEWTBiNG5DB1QVtZ2hV+fDprHGKVB0AgUc+8 X-Received: by 2002:a17:907:96aa:: with SMTP id hd42mr10424396ejc.526.1613083468426; Thu, 11 Feb 2021 14:44:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613083468; cv=none; d=google.com; s=arc-20160816; b=QtUtQ+idzzrpIoJ3ZcTCE3w74/LjYH7nNQ1z8M2ov0iN5bgnBQ4bUQb+/mF1Grvv2B HBBn49fBFKsZB44/ZCupulHl4iBoTYpfRBrWA/xb0LMGSLl7UKVGWlN6RRRDqKIC1iBv ni940QPmVtKMIolI3yG1aJPnc7O2njjMfXQxgnlte9ifuhZJhcrRh59QZIavc5XFLkIC JW2PF21dl4e7c7WtmFqB8iTqpSarqS19g4igwJu+YrPrDMp6xfwc1nfvE3PvCjJY/qiv +2KnUHKzaLcRKMjSsrRFh8ajrPntbG+W6dMgKrGVk+Qp20s6Sfz7EgkMmAQMhn9vyKNP 2fMQ== 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=8IaBx6200CR5VJbEUK0yZ2/gA5Be2yye2+JFWZpaRN4=; b=p+2ge292urCu4gbhCQ7oGGWW9+JVTdVx9eVWUDPVSSL6f2FLrf110/8yn8eQWOjSKl lLsB0FxMPqvcYBaTRQENqRsNa3k+YkmhyTmifjT2frLS2hyzlNU97qKVVdEeUh2c0zCY juhzv65DS8icdEdF7tm85SeIv2GpDxX5gaIPok8RChZIqgyeMX9xB+8DL/lsi7k6D1Kx 9sa2d6pSgaFFnh+1OLRm/wGRJv26OWul5EGfnG/2wWDV73mI2fV4kuns+n8234vN+QxA KlcrpOODyjcg3eA7Q1vCfUUVr1RsX51ZSGZ+Aye+jxD9WHNo2rN1dxnqbno/G0XJ9FiY +poQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YjH153+T; 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 v12si4827190ejq.716.2021.02.11.14.43.58; Thu, 11 Feb 2021 14:44:28 -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=YjH153+T; 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 S230029AbhBKWlT (ORCPT + 99 others); Thu, 11 Feb 2021 17:41:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:43760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229907AbhBKWlN (ORCPT ); Thu, 11 Feb 2021 17:41:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5035764E57; Thu, 11 Feb 2021 22:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613083232; bh=8IaBx6200CR5VJbEUK0yZ2/gA5Be2yye2+JFWZpaRN4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YjH153+T24737wK5scfdcPYfh5XydxNmbAzAYG8DhvjXaxuvt6c1S6l9emEu0iLzn i4SiuNarDaGCwSLYWgb8Xtj6hf8kJjZ1eK+CeSaVvNA9epzvN2U5aOIiUOiZ4rK13C Xt4RU/okHVOYY/k7zZtLafvuv7Pyt8WQMtal8REthmytdRXfKr4Aj+L9u52H1IUcuW nuu1Pxqs3wgg+2GP+pXN/J4V5+8YNGippxXNSelWvdIERUwR921udXA0/zovhfZ/BH sGoFfZZO7d8kJ2HVV7krDqwrtMrDWYbIUHmZZQ5MolsAmxDAXktYroplx1mBvG0fw3 WxGV5MRClhwMA== Received: by mail-ej1-f42.google.com with SMTP id p20so12559041ejb.6; Thu, 11 Feb 2021 14:40:32 -0800 (PST) X-Gm-Message-State: AOAM533BXZdCFp7asMtMyVYc8YvADhpxOUepoI8E+SWShZ4toGUQcb0i nxoBIqnu9CdTsyyPIfgPs/C1sZlestT3r3Qu+g== X-Received: by 2002:a17:906:f85:: with SMTP id q5mr10524066ejj.108.1613083230827; Thu, 11 Feb 2021 14:40:30 -0800 (PST) MIME-Version: 1.0 References: <20210210171040.684659-1-mka@chromium.org> <20210210091015.v5.3.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid> <20210210210645.xapaua7djdsvr3ca@kozik-lap> <161307087919.1254594.11784819060723374369@swboyd.mtv.corp.google.com> In-Reply-To: <161307087919.1254594.11784819060723374369@swboyd.mtv.corp.google.com> From: Rob Herring Date: Thu, 11 Feb 2021 16:40:19 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 3/4] usb: host: xhci-plat: Create platform device for onboard hubs in probe() To: Stephen Boyd Cc: Krzysztof Kozlowski , Matthias Kaehlcke , Greg Kroah-Hartman , Frank Rowand , devicetree@vger.kernel.org, Peter Chen , Alan Stern , Ravi Chandra Sadineni , Bastien Nocera , "linux-kernel@vger.kernel.org" , Douglas Anderson , Linux USB List , Mathias Nyman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 11, 2021 at 1:14 PM Stephen Boyd wrote: > > Quoting Matthias Kaehlcke (2021-02-10 14:20:18) > > > > On Wed, Feb 10, 2021 at 10:06:45PM +0100, Krzysztof Kozlowski wrote: > > > > > > This looks hackish... what if later we have something else than hub? > > > Another if()? > > > > > > What if hub could be connected to something else than XHCI controller? > > > > In earlier versions this was standalone driver, which was more flexible and > > didn't require cooperation from the XHCI driver: > > > > https://lore.kernel.org/patchwork/patch/1313001/ > > > > Rob Herring raised objections about the DT bindings, since the USB hub would 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: > > > > https://lore.kernel.org/patchwork/patch/1305395/ > > https://lore.kernel.org/patchwork/patch/1313000/ > > > > Alan Stern suggested to create the platform device in the XHCI platform driver: > > > > https://lore.kernel.org/patchwork/patch/1313000/#1510227 > > > > 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 driver. > > > > If you have better suggestions that might satisfy all parties please let us > > know :) > > > > 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. An orphan at the root node is exactly what I don't want to see here. I'm happy with the binding now from a skim of it. The kernel support does seem kind of hacky though. Rob