From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Chen Subject: Re: [PATCH v2 0/3] USB: add generic onboard USB HUB driver Date: Fri, 8 Jan 2016 11:33:14 +0800 Message-ID: <20160108033314.GA26697@shlinux2> References: <20160106032027.GA23726@shlinux2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring Cc: Alan Stern , Mark Rutland , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Fabio Estevam , Pawel Moll , Arnd Bergmann , Greg Kroah-Hartman , Mathieu Poirier , Linux USB List , patryk-6+2coLtxvIyvnle+31E0rA@public.gmane.org, Felipe Balbi , Peter Chen , "kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org" , Philipp Zabel , Shawn Guo , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: devicetree@vger.kernel.org On Thu, Jan 07, 2016 at 08:18:02AM -0600, Rob Herring wrote: > On Tue, Jan 5, 2016 at 9:20 PM, Peter Chen wrote: > > On Tue, Jan 05, 2016 at 08:36:31AM -0600, Rob Herring wrote: > >> > 2. There are MFD USB devices, which includes several interfaces under > >> > USB device, > >> > like i2c, gpios, etc. Due to lack of device tree support, USB > >> > class/device driver doesn't know > >> > which kinds of interfaces are needed for this board. > >> > >> Are you talking about a device hard wired on the same board or > >> something like GPIOs on FTDI chip which could be hot-plugged in any > >> host (including non-DT based)? > > > > I talked about the case that the device hard wired on the board. > > Hot-plug device's bus topology is unknown, we can't describe it > > statically at dts. > > Correct, upstream (the USB side) can't be described, but it is the > downstream side we care about describing. If it is hot-plug, there will be any USB devices at port, and it even has a USB HUB between controller and the device we want to describe. > > >> For the hotplug case, we will need a way to associate a DT overlay > >> with the USB device and there may not even be a base DT to map the > >> overlay into. In this case, the USB device's driver will need to load > >> the overlay and trigger enumerating the child devices. Anyway, this is > >> a separate issue from your problem. > >> > > > > Since both you and Alan agree with my problem should be fixed at > > bootloader, I give the kernel solution up. > > Surprising, no one ever seems to agree with that solution... There > will be people with this problem and unable to update their > bootloader. > See: http://www.spinics.net/lists/linux-usb/msg134788.html I am a little puzzled what's your opinion for this problem. > > The another thing I open to discuss is how to let USB devices know its > > device node, the user reported issue that they can't handle interfaces > > below in USB device since that. > > The driver for the USB device would need to load a DT overlay and from > that it should be able to get its node and child nodes. The hard part > is figuring out where to put the sub tree defined in the overlay as > either there is no base DT (think x86) or there is but we don't want > to describe the whole USB bus topology in DT (in theory we could > populate USB nodes dynamically as USB devices are discovered). > > Rob I will send RFC patch for let the USB device know device node, but it is not for my issue. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: hzpeterchen@gmail.com (Peter Chen) Date: Fri, 8 Jan 2016 11:33:14 +0800 Subject: [PATCH v2 0/3] USB: add generic onboard USB HUB driver In-Reply-To: References: <20160106032027.GA23726@shlinux2> Message-ID: <20160108033314.GA26697@shlinux2> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Jan 07, 2016 at 08:18:02AM -0600, Rob Herring wrote: > On Tue, Jan 5, 2016 at 9:20 PM, Peter Chen wrote: > > On Tue, Jan 05, 2016 at 08:36:31AM -0600, Rob Herring wrote: > >> > 2. There are MFD USB devices, which includes several interfaces under > >> > USB device, > >> > like i2c, gpios, etc. Due to lack of device tree support, USB > >> > class/device driver doesn't know > >> > which kinds of interfaces are needed for this board. > >> > >> Are you talking about a device hard wired on the same board or > >> something like GPIOs on FTDI chip which could be hot-plugged in any > >> host (including non-DT based)? > > > > I talked about the case that the device hard wired on the board. > > Hot-plug device's bus topology is unknown, we can't describe it > > statically at dts. > > Correct, upstream (the USB side) can't be described, but it is the > downstream side we care about describing. If it is hot-plug, there will be any USB devices at port, and it even has a USB HUB between controller and the device we want to describe. > > >> For the hotplug case, we will need a way to associate a DT overlay > >> with the USB device and there may not even be a base DT to map the > >> overlay into. In this case, the USB device's driver will need to load > >> the overlay and trigger enumerating the child devices. Anyway, this is > >> a separate issue from your problem. > >> > > > > Since both you and Alan agree with my problem should be fixed at > > bootloader, I give the kernel solution up. > > Surprising, no one ever seems to agree with that solution... There > will be people with this problem and unable to update their > bootloader. > See: http://www.spinics.net/lists/linux-usb/msg134788.html I am a little puzzled what's your opinion for this problem. > > The another thing I open to discuss is how to let USB devices know its > > device node, the user reported issue that they can't handle interfaces > > below in USB device since that. > > The driver for the USB device would need to load a DT overlay and from > that it should be able to get its node and child nodes. The hard part > is figuring out where to put the sub tree defined in the overlay as > either there is no base DT (think x86) or there is but we don't want > to describe the whole USB bus topology in DT (in theory we could > populate USB nodes dynamically as USB devices are discovered). > > Rob I will send RFC patch for let the USB device know device node, but it is not for my issue. -- Best Regards, Peter Chen