[RFC] (early draft) dt: Linux dt usage model documentation
Shawn Guo
shawn.guo at freescale.com
Fri Jun 17 02:26:01 EST 2011
On Mon, Jun 13, 2011 at 07:32:15AM -0600, Grant Likely wrote:
[...]
> +About now is a good time to lay out an example. Here is part of the
> +device tree for the NVIDIA Tegra board.
> +
> +/{
> + compatible = "nvidia,harmony", "nvidia,tegra250";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + interrupt-parent = <&intc>;
> +
> + chosen { };
> + aliases { };
> +
> + memory {
> + device_type = "memory";
> + reg = <0x00000000 0x40000000>;
> + };
> +
> + soc {
> + compatible = "nvidia,tegra250-soc", "simple-bus";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + intc: interrupt-controller at 50041000 {
> + compatible = "nvidia,tegra250-gic";
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + reg = <0x50041000 0x1000>, < 0x50040100 0x0100 >;
> + };
> +
> + serial at 70006300 {
> + compatible = "nvidia,tegra250-uart";
> + reg = <0x70006300 0x100>;
> + interrupts = <122>;
> + };
> +
> + i2s-1: i2s at 70002800 {
It seem dtc does not compile the label name "i2s-1". Instead,
"i2s_1" seems good.
> + compatible = "nvidia,tegra250-i2s";
> + reg = <0x70002800 0x100>;
> + interrupts = <77>;
> + codec = <&wm8903>;
> + };
> +
> + i2c at 7000c000 {
> + compatible = "nvidia,tegra250-i2c";
> + #address-cells = <1>;
> + #size-cells = <1>;
#size-cells should be 0 ...
> + reg = <0x7000c000 0x100>;
> + interrupts = <70>;
> +
> + wm8903: codec at 1a {
> + compatible = "wlf,wm8903";
> + reg = <0x1a>;
... Otherwise, reg needs a size here.
> + interrupts = <347>;
> + };
> + };
> + };
> +
> + sound {
> + compatible = "nvidia,harmony-sound";
> + i2s-controller = <&i2s-1>;
> + i2s-codec = <&wm8903>;
> + };
> +};
> +
--
Regards,
Shawn
More information about the devicetree-discuss
mailing list