Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1887325ybf; Sun, 1 Mar 2020 20:50:30 -0800 (PST) X-Google-Smtp-Source: APXvYqx0p3JqmwWTUv9zsEAABsFxNiKvz2Y3nAxobyta7sQS7sAI6SxJvt56eu9bhslBVWk/ybio X-Received: by 2002:aca:ba55:: with SMTP id k82mr10192654oif.94.1583124629847; Sun, 01 Mar 2020 20:50:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583124629; cv=none; d=google.com; s=arc-20160816; b=c1VL932w55f2MJUE7BM0MsGCQ53i0gqyFAin56gU/I7Wb8LcAd832tDR9d9ZC9Xc9D YLik/eZ6NxD5OfchyT67OcmEFkw+zvg9Vy8sstHvUjbfbuwnGCNcIKfYo4uEwGfyemoe 05QTghDcacvdQuxtl3tOE78/FQoE7GFH86awT3PGCf0Foj2b12sOZjIj0O4YZXFdPyTv B0ck/62bNxNRz7JcQoGnd1VmvgQtlPDJTDgXBL/2vd9bJ1R8Q/C5gjRVi+Xsn0FR659V Vxtw2hXvn8nmj8UAxaX5KZh5qL9p6FC8YkjdDHKOWzdFux/V3Tr56V5RqD8IMg1SQf6V pxgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=CKE9CX0nAMHtWXN4MvmwnGFCjxTM7sTCTbGxn9qfqJ0=; b=ATl+9WTMJVrbUgtqMo4+mHMDYNqA3+QJuw4bf0fpoMCqQDsxAoh6ETfihEefgbpL6x 6AbXvBSZFI6FV9IP8LGXnUK3xS2Kq9qSACLinBhijF+oOu7Ohi1F0UmLJGxBykNjEyqD oPE4RvKGNCeB4VfuozLwR/yyoYGaKLtwZ5fX4s0sxt0TqTQZOF3GKq6zsLtFQZQU7yGK KRRQS+zAMrEvrwJkp9c6gANNZSBz12z33IqKwqkOTCl4bfmGpRkfatu/FLucn9o8C6w7 P9/Ws9qgx34KQ9NfED9n/wAG1sz8/o6Xbhh8LaSiV1zwdp9Kmrqtwqi9+SSjM0r5G0Is RWEA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s70si4575021oie.178.2020.03.01.20.50.18; Sun, 01 Mar 2020 20:50:29 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727080AbgCBEuD (ORCPT + 99 others); Sun, 1 Mar 2020 23:50:03 -0500 Received: from kernel.crashing.org ([76.164.61.194]:40486 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726805AbgCBEuD (ORCPT ); Sun, 1 Mar 2020 23:50:03 -0500 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 0224n7ms031936 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 1 Mar 2020 22:49:11 -0600 Message-ID: <42daa66bedc1b06936bc9cbc6e9b31f6dd8ed3a1.camel@kernel.crashing.org> Subject: Re: [PATCH v5 7/7] dt-bindings: usb: add documentation for aspeed usb-vhub From: Benjamin Herrenschmidt To: Tao Ren Cc: Mark Rutland , Felipe Balbi , linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, Andrew Jeffery , Greg Kroah-Hartman , openbmc@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd , Rob Herring , Joel Stanley , taoren@fb.com, Chunfeng Yun , Colin Ian King , linux-arm-kernel@lists.infradead.org Date: Mon, 02 Mar 2020 15:49:07 +1100 In-Reply-To: <20200228081309.GA4531@taoren-ubuntuvm> References: <20200227230507.8682-1-rentao.bupt@gmail.com> <20200227230507.8682-8-rentao.bupt@gmail.com> <3150424b9e9f5856c747a0fbf44647919f49209d.camel@kernel.crashing.org> <20200228010444.GA19910@taoren-ubuntu-R90MNF91> <2676013663fc8c53e02a5fdaafb1b27e18249b80.camel@kernel.crashing.org> <20200228081309.GA4531@taoren-ubuntuvm> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-02-28 at 00:13 -0800, Tao Ren wrote: > On Fri, Feb 28, 2020 at 02:02:28PM +1100, Benjamin Herrenschmidt wrote: > > On Thu, 2020-02-27 at 17:05 -0800, Tao Ren wrote: > > > > Also long run I think best is going to have a child node per downstream > > > > port, so we create a matching linux struct device. This will make it > > > > easier to deal with the other device-controller in the ast2600 which is > > > > basically one of these without a vhub above it. > > > > > > Maybe a dumb question: what would be the proper place to parse the child > > > node/properties when they are added? For example, in some usb_gadget_ops > > > callback? > > > > No. What the vhub would do is when it probes, it creates a platform > > device for each "port" child node that's linked to the DT node. > > > > The driver for the device then attaches to it via standard DT matching > > and checks if it has a vhub parent or not, and based on that, operates > > as a vhub child device or a standalone one. > > > > (For example, it might have different functions for EP selection since > > standalone devices have private EPs rather than a shared pool) > > > > They can both be in the same module or they can be separate modules > > with cross dependencies. > > > > Cheers, > > Ben. > > I see. It's to describe these downstream devices (such as configurations > and according functions) in device tree, which is similar to defining a > composite device and linking functions/interfaces via configfs. Thanks for > the clarify. It's also to make it easier long run to support both the standalone variant and the vhub variant from the same code base. Cheers, Ben.