From owner-freebsd-current@FreeBSD.ORG Thu Jul 5 23:14:29 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C035B106566C; Thu, 5 Jul 2012 23:14:29 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 29F5B8FC15; Thu, 5 Jul 2012 23:14:29 +0000 (UTC) Received: by wgbds11 with SMTP id ds11so8618397wgb.31 for ; Thu, 05 Jul 2012 16:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=Tg3u0LwO0lSgOxLar0RrzCMgWg4SWbYlWdj/SpUcQHA=; b=xF8y1awOvBlH2MZmN0zLp69Hz0Avn+HexbogxCIhpmOF1HuJz0w6qoHjEFVJLpiiet kTsA6EappWvfQD9NWPLJUfqfHgNtC3W8ASHo/KYAQD8/Zle5MfGi4PPQLpv+ZMxa4asz 0fQ9+q8OvygRzke5/6InkA80AjLMhkZaa6pyjHZ2LNSiKZsFccOtrxZdaizTU2UFIc0+ Ut40kMoniYZBeLqDxa53h5sMherDOUdfNVwS3/7dnRZKScP49MKFxR8y23ooDaBNigPS A7GqtLFLilQhx9YGd1C2+ni9fsSUG3aHK4zjJo+I21XHcNMpLRM5zoaQhOHxyK+BNTXZ 9fIw== MIME-Version: 1.0 Received: by 10.217.3.209 with SMTP id r59mr8701254wes.108.1341530068015; Thu, 05 Jul 2012 16:14:28 -0700 (PDT) Received: by 10.216.47.3 with HTTP; Thu, 5 Jul 2012 16:14:28 -0700 (PDT) Date: Thu, 5 Jul 2012 19:14:28 -0400 Message-ID: From: Arnaud Lacombe To: FreeBSD Current Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Hackers Subject: Interfacing devices with multiple parents within newbus X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 23:14:29 -0000 Hi folks, The problem has been raised in the last BSDCan during a talk, but no clear answer has been given. Some (pseudo-)devices might require resources from multiple other (pseudo-)devices. For example, a device is sitting on an SMBus, but need to access a software controlled LED, sitting on a GPIO bus, itself sitting on an LPC bus... Or a variant where everything is controlled on the same chip, but different GPIO banks. For that specific example, all the GPIO pin could be implement on the same GPIObus, however, gpiobus(4) is limited to 32 pins and the chip provides 5 banks of 8 pins, ie. a total of 40 pins[0]. In the same idea, a device sitting on GPIOs controlled by two independant chips, say one being an ICH10R chipset on a PCI device function, and the other being a SuperIO on an LPC bus. This situation make me really dubious that FreeBSD will be able to support configuration such as: esdhc@50004000 { /* ESDHC1 */ cd-gpios = <&gpio2 13 0>; /* GPIO3_13 */ wp-gpios = <&gpio3 11 0>; /* GPIO4_11 */ status = "okay"; }; or: ecspi@50010000 { /* ECSPI1 */ fsl,spi-num-chipselects = <2>; cs-gpios = <&gpio1 30 0>, /* GPIO2_30 */ <&gpio2 19 0>; /* GPIO3_19 */ status = "okay"; [...] This example is taken from Linux' `arch/arm/boot/dts/imx53-smd.dts'. Here, SDHC or SPI controller are using different GPIO devices. Note that these GPIO pins does not seem to be multi-function pins as another .dts defines ESDHC1 as: esdhc@50004000 { /* ESDHC1 */ cd-gpios = <&gpio2 13 0>; /* GPIO3_13 */ wp-gpios = <&gpio2 14 0>; /* GPIO3_14 */ status = "okay"; }; AFAIK, newbus is unable to model any of the above situation without being bypassed one way or another. any hints ? Thanks, - Arnaud [0]: as a matter of comparison, old PXA27x have up to 121 GPIOs