Defining schemas for Device Tree

Tomasz Figa tomasz.figa at
Mon Jul 29 18:45:24 EDT 2013

On Monday 29 of July 2013 18:23:30 jonsmirl at wrote:
> The schema should enforce some kind of regularity into the description
> of similar devices.  Take SPI for example. I pulled these SPI
> controller definitions from the kernel source. Obviously all of these
> controllers are different, but it seems to me that their definitions
> could be made more regular. DMA seems like it could use a lot of help.

Well, there is not much in common in bindings for all those SPI controllers, 
other than general device attributes, such as compatible and reg (not even 
interrupts - see spi-gpio).

There is a lot of generic binding templates (as I called this kind of bindings 
in my first mail) involved here, though.

Taking one of the controllers as the example:
> spi0: spi at f0000000 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "atmel,at91rm9200-spi";
> reg = <0xf0000000 0x100>;
> interrupts = <13 IRQ_TYPE_LEVEL_HIGH 3>;

/inherit/ "interrupts.dtss", 1;

> dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(1)>,
>       <&dma0 1 AT91_DMA_CFG_PER_ID(2)>;
> dma-names = "tx", "rx";

/inherit/ "dma.dtss", "tx", "rx";

> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_spi0>;

/inherit/ "pinctrl.dtss","default";

> status = "disabled";
> };

Best regards,

More information about the linux-arm-kernel mailing list