Interfacing devices with multiple parents within newbus

From: Arnaud Lacombe <lacombar_at_gmail.com>
Date: Thu, 5 Jul 2012 19:14:28 -0400
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_at_50004000 { /* ESDHC1 */
        cd-gpios = <&gpio2 13 0>; /* GPIO3_13 */
        wp-gpios = <&gpio3 11 0>; /* GPIO4_11 */
        status = "okay";
};

or:

ecspi_at_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_at_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
Received on Thu Jul 05 2012 - 21:14:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:28 UTC