diff options
author | Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> | 2014-02-20 19:06:51 +0100 |
---|---|---|
committer | Tomasz Figa <tomasz.figa@gmail.com> | 2014-05-12 02:09:39 +0200 |
commit | 9ab6f7e5ea4a9183bf4fcf48bea4498b331d4075 (patch) | |
tree | 1dea87b3a059917b1846b05af0e2a2e023b6c609 | |
parent | 52733f0fae5f520cb486054b63248c89fd10b2bb (diff) | |
download | dtc-validation.tar.gz |
Add sample DTS and DTSS schemavalidation
Signed-off-by: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
-rw-r--r-- | sample.dts | 70 | ||||
-rw-r--r-- | schema.dtss | 86 |
2 files changed, 156 insertions, 0 deletions
diff --git a/sample.dts b/sample.dts new file mode 100644 index 0000000..f962051 --- /dev/null +++ b/sample.dts @@ -0,0 +1,70 @@ +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&gic>; + compatible = "foo,bar"; + model = "Foo Bar board"; + + chosen { + bootargs = "console=ttySAC2,115200N8"; + }; + + aliases { + i2c0 = &i2c_0; + }; + + memory { + device_type = "memory"; + reg = <0x40000000 0x40000000>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gic: interrupt-controller@10490000 { + compatible = "arm,cortex-a9-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0x10490000 0x1000>, <0x10480000 0x100>; + cpu-offset = <0x4000>; + }; + + i2c_0: i2c@13860000 { + compatible = "nvidia,tegra20-i2c"; + reg = <0x13860000 0x100>; + interrupts = <0 57 0>; + clocks = <&clocks 43>, <&clocks 28>; + clock-names = "div-clk", "fast-clk"; + #address-cells = <1>; + #size-cells = <0>; + + audio-codec@33 { + compatible = "wlf,wm8903"; + reg = <0x33>; + gpio-controller; + #gpio-cells = <1>; + }; + }; + + gpio: pinctrl@11400000 { + compatible = "foo,bar-gpio"; + reg = <0x11400000 0x1000>; + interrupts = <0 47 0>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + clocks: clock-controller@15440000 { + compatible = "foo,bar-clocks"; + reg = <0x15440000 0x1000>; + #clock-cells = <1>; + }; + }; +}; diff --git a/schema.dtss b/schema.dtss new file mode 100644 index 0000000..2dd6f37 --- /dev/null +++ b/schema.dtss @@ -0,0 +1,86 @@ +/* + * schema.dtss - Sample Device Tree schema file. + * + * Copyright (C) 2013 Samsung Electronics Co., Ltd. + * Author: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/dtss-v1/; + +root-node { + /match/ path = "/"; + /require/ mmio-bus; + + compatible; + /optional/ model; +}; + +wlf,wm8903 { + /match/ compatible = "wlf,wm8903"; + + /optional/ micdet-cfg; + /optional/ micdet-delay; + /optional/ gpio-cfg; + + /require/ i2c-device; + + /require/ gpio-provider { + cells = <1>; + }; + + /use/ interrupts { + count = <1>; + }; +}; + +nvidia,tegra20-i2c { + /match/ compatible = "nvidia,tegra20-i2c", "nvidia,tegra30-i2c"; + + resets; + reset-names; + dmas; + dma-names; + + /require/ i2c-bus; + + /require/ mmio-device { + reg-count = <1>; + }; + + /require/ interrupts { + count = <1>; + }; + + /require/ clocks { + names = "div-clk", "fast-clk"; + }; +}; + +foo,bar-gpio { + /match/ compatible = "foo,bar-gpio"; + + /require/ interrupts { + count = <1>; + }; + + /require/ mmio-device { + reg-count = <1>; + }; + + /require/ gpio-provider { + cells = <2>; + }; + + /require/ interrupt-controller { + cells = <2>; + }; +}; |