[RFC] [PATCH] Device Tree on ARM platform

Grant Likely grant.likely at secretlab.ca
Fri May 29 00:13:34 EST 2009


On Thu, May 28, 2009 at 6:17 AM, Dmitry Eremin-Solenikov
<dbaryshkov at gmail.com> wrote:
> David Miller wrote:
>
>> From: Russell King - ARM Linux
>> <linux at arm.linux.org.uk> Date: Thu, 28 May 2009
>> 10:15:13 +0100
>>
>>> For example, how would an IrDA transceiver be expressed in OF?
>>
>> As a child device node of the IRDA device, with associated properties.
>>
>> You can express _ANYTHING_ using the OF device tree.  It is not even
>> something to discuss, it's flexible enough.
>
> Hmmm. How to express the following situation:
> On one of my platforms (sharp tosa) the backlight controller
> is separated into two parts: one sitting on SPI, one on the I2C.
> The tricky part is that the I2C part is only available when some
> of registers of SPI part are programmed in a specific way.

Perhaps something like this (in dts format):

spi@[someaddress] {
        #size-cells = <0>;
        #address-cells = <1>;
        compatible = "name-of-spi-bus-device";
        reg = <[someaddress] [size]>;
        backlight-spi: backlight at 5 {
                compatible = "sharp,backlight-spi";
                reg = <5>;  /* CS line # 5 */
        }
}

i2c@[anotheraddress] {
        #size-cells = <0>;
        #address-cells = <1>;
        compatible = "name-of-i2c-bus-device";
        reg = <[anotheraddress] [size]>;
        backlight at 30 {
                compatible = "sharp,backlight-i2c";
                reg = <30>;
                spi-interface-phandle = < &backlight-spi >;
        }
}

Two nodes are used to describe the device and a "phandle" is used to
link them.  A device driver probe could be triggered (bind) against
the i2c half of the device and follow the phandle to get the rest of
the description.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the devicetree-discuss mailing list