From: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>, Marek Szyprowski <m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org, bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org, olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org, jdl-CYoMK+44s/E@public.gmane.org, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>, jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org, Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Subject: [PATCH RFC 5/5] Add sample DTS and DTSS schema Date: Thu, 20 Feb 2014 19:06:51 +0100 [thread overview] Message-ID: <1392919611-10746-6-git-send-email-t.figa@samsung.com> (raw) In-Reply-To: <1392919611-10746-1-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Signed-off-by: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> --- sample.dts | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ schema.dtss | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 sample.dts create mode 100644 schema.dtss 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..7a819fe --- /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>; + }; +}; -- 1.8.5.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: t.figa@samsung.com (Tomasz Figa) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH RFC 5/5] Add sample DTS and DTSS schema Date: Thu, 20 Feb 2014 19:06:51 +0100 [thread overview] Message-ID: <1392919611-10746-6-git-send-email-t.figa@samsung.com> (raw) In-Reply-To: <1392919611-10746-1-git-send-email-t.figa@samsung.com> Signed-off-by: Tomasz Figa <t.figa@samsung.com> --- sample.dts | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ schema.dtss | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 sample.dts create mode 100644 schema.dtss 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 at 10490000 { + compatible = "arm,cortex-a9-gic"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0x10490000 0x1000>, <0x10480000 0x100>; + cpu-offset = <0x4000>; + }; + + i2c_0: i2c at 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 at 33 { + compatible = "wlf,wm8903"; + reg = <0x33>; + gpio-controller; + #gpio-cells = <1>; + }; + }; + + gpio: pinctrl at 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 at 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..7a819fe --- /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@samsung.com> + * + * 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>; + }; +}; -- 1.8.5.2
next prev parent reply other threads:[~2014-02-20 18:06 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-02-20 18:06 [PATCH RFC 0/5] Hybrid approach for DT schema checking Tomasz Figa 2014-02-20 18:06 ` Tomasz Figa [not found] ` <1392919611-10746-1-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2014-02-20 18:06 ` [PATCH RFC 1/5] dtc: Add helpers for various message levels Tomasz Figa 2014-02-20 18:06 ` Tomasz Figa [not found] ` <1392919611-10746-2-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2014-03-09 11:43 ` David Gibson 2014-03-09 11:43 ` David Gibson 2014-02-20 18:06 ` [PATCH RFC 2/5] dtc: livetree: Add more tree parsing helpers Tomasz Figa 2014-02-20 18:06 ` Tomasz Figa [not found] ` <1392919611-10746-3-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2014-03-09 12:03 ` David Gibson 2014-03-09 12:03 ` David Gibson 2014-02-20 18:06 ` [PATCH RFC 3/5] Implement DT schema checker using hybrid approach Tomasz Figa 2014-02-20 18:06 ` Tomasz Figa [not found] ` <1392919611-10746-4-git-send-email-t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2014-03-09 12:17 ` David Gibson 2014-03-09 12:17 ` David Gibson 2014-02-20 18:06 ` [PATCH RFC 4/5] Add sample C-based generic bindings Tomasz Figa 2014-02-20 18:06 ` Tomasz Figa 2014-02-20 18:06 ` Tomasz Figa [this message] 2014-02-20 18:06 ` [PATCH RFC 5/5] Add sample DTS and DTSS schema Tomasz Figa 2014-03-09 12:22 ` [PATCH RFC 0/5] Hybrid approach for DT schema checking David Gibson 2014-03-09 12:22 ` David Gibson 2014-05-13 13:21 ` Tomasz Figa 2014-05-13 13:21 ` Tomasz Figa
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1392919611-10746-6-git-send-email-t.figa@samsung.com \ --to=t.figa-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \ --cc=a.hajda-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \ --cc=arnd-r2nGTMty4D4@public.gmane.org \ --cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \ --cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \ --cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \ --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \ --cc=jdl-CYoMK+44s/E@public.gmane.org \ --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \ --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \ --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \ --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \ --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.