From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758879AbZE1OOE (ORCPT ); Thu, 28 May 2009 10:14:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752293AbZE1ONy (ORCPT ); Thu, 28 May 2009 10:13:54 -0400 Received: from yx-out-2324.google.com ([74.125.44.28]:35255 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754624AbZE1ONx convert rfc822-to-8bit (ORCPT ); Thu, 28 May 2009 10:13:53 -0400 MIME-Version: 1.0 In-Reply-To: References: <20090527175609.GB31861@flint.arm.linux.org.uk> <1243496236.3171.140.camel@pasglop> <20090528091513.GA14789@n2100.arm.linux.org.uk> <20090528.025739.16559619.davem@davemloft.net> From: Grant Likely Date: Thu, 28 May 2009 08:13:34 -0600 Message-ID: Subject: Re: [RFC] [PATCH] Device Tree on ARM platform To: Dmitry Eremin-Solenikov Cc: linux-kernel@vger.kernel.org, devicetree-discuss@ozlabs.org, linux-arm-kernel@lists.arm.linux.org.uk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 28, 2009 at 6:17 AM, Dmitry Eremin-Solenikov wrote: > David Miller wrote: > >> From: Russell King - ARM Linux >> 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@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@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. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [RFC] [PATCH] Device Tree on ARM platform Date: Thu, 28 May 2009 08:13:34 -0600 Message-ID: References: <20090527175609.GB31861@flint.arm.linux.org.uk> <1243496236.3171.140.camel@pasglop> <20090528091513.GA14789@n2100.arm.linux.org.uk> <20090528.025739.16559619.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: Dmitry Eremin-Solenikov Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org List-Id: devicetree@vger.kernel.org On Thu, May 28, 2009 at 6:17 AM, Dmitry Eremin-Solenikov wrote: > David Miller wrote: > >> From: Russell King - ARM Linux >> 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. =A0It 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 =3D <0>; #address-cells =3D <1>; compatible =3D "name-of-spi-bus-device"; reg =3D <[someaddress] [size]>; backlight-spi: backlight@5 { compatible =3D "sharp,backlight-spi"; reg =3D <5>; /* CS line # 5 */ } } i2c@[anotheraddress] { #size-cells =3D <0>; #address-cells =3D <1>; compatible =3D "name-of-i2c-bus-device"; reg =3D <[anotheraddress] [size]>; backlight@30 { compatible =3D "sharp,backlight-i2c"; reg =3D <30>; spi-interface-phandle =3D < &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.