Patchwork [U-Boot,RFC,4/4,v1] dreamplug: enable fdt

login
register
mail settings
Submitter u-boot@lakedaemon.net
Date Sept. 15, 2011, 1:54 p.m.
Message ID <f7459c46dc3c21318236e9f4d31e4f5c424ee24d.1316092940.git.u-boot@lakedaemon.net>
Download mbox | patch
Permalink /patch/114792/
State RFC
Headers show

Comments

u-boot@lakedaemon.net - Sept. 15, 2011, 1:54 p.m.
Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
---
 board/Marvell/dreamplug/kirkwood-dreamplug.dts |   12 +++++++++++
 board/Marvell/dreamplug/kirkwood.dtsi          |   25 ++++++++++++++++++++++++
 include/configs/dreamplug.h                    |    5 ++++
 3 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 board/Marvell/dreamplug/kirkwood-dreamplug.dts
 create mode 100644 board/Marvell/dreamplug/kirkwood.dtsi
Simon Glass - Sept. 15, 2011, 7:25 p.m.
Hi Jason,

On Thu, Sep 15, 2011 at 6:54 AM, Jason Cooper <u-boot@lakedaemon.net> wrote:
>
> Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
> ---
>  board/Marvell/dreamplug/kirkwood-dreamplug.dts |   12 +++++++++++
>  board/Marvell/dreamplug/kirkwood.dtsi          |   25 ++++++++++++++++++++++++
>  include/configs/dreamplug.h                    |    5 ++++
>  3 files changed, 42 insertions(+), 0 deletions(-)
>  create mode 100644 board/Marvell/dreamplug/kirkwood-dreamplug.dts
>  create mode 100644 board/Marvell/dreamplug/kirkwood.dtsi
>
> diff --git a/board/Marvell/dreamplug/kirkwood-dreamplug.dts b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
> new file mode 100644
> index 0000000..eb900c3
> --- /dev/null
> +++ b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
> @@ -0,0 +1,12 @@
> +/dts-v1/;
> +
> +/include/ "kirkwood.dtsi"
> +
> +/ {
> +       model = "Marvell Dreamplug";
> +       compatible = "marvell,dreamplug", "marvell,kirkwood";
> +
> +       rtc@0xf1010300 {
> +               status = "ok";
> +       };
> +};
> diff --git a/board/Marvell/dreamplug/kirkwood.dtsi b/board/Marvell/dreamplug/kirkwood.dtsi
> new file mode 100644
> index 0000000..15e52bd
> --- /dev/null
> +++ b/board/Marvell/dreamplug/kirkwood.dtsi
> @@ -0,0 +1,25 @@
> +/ {
> +       model = "Marvell Kirkwood";
> +       compatible = "marvell,kirkwood";
> +       #address-cells = <1>;
> +       #size-cells = <1>;
> +
> +       cpus {
> +               #address-cells = <1>;
> +               #size-cells = <0>;
> +               cpu@0 {
> +                       compatible = "arm,arm926ejs";
> +                       reg = <0>;
> +               };
> +       };
> +
> +       rtc@0xf1010300 {
> +               compatible = "marvell,kirkwood-rtc";
> +               reg = <0xf1010300 0x02>;
> +               status = "disabled";
> +       };
> +
> +       aliases {
> +               rtc0 = "/rtc@0xf1010300";
> +       };
> +};
> diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
> index 8d1b935..9960d35 100644
> --- a/include/configs/dreamplug.h
> +++ b/include/configs/dreamplug.h
> @@ -50,6 +50,11 @@
>  #define CONFIG_MACH_TYPE       MACH_TYPE_DREAMPLUG
>  #define CONFIG_SKIP_LOWLEVEL_INIT      /* disable board lowlevel_init */
>
> +#define CONFIG_OF_EMBED
> +#define CONFIG_DEFAULT_DEVICE_TREE "kirkwood-dreamplug"

One of my experiments was to create this automatically from
<vendor>-<board>.dts, so that this isn't needed explicitly. Is it
better to require a CONFIG for this, or just use the expected name?

Regards,
Simon

> +#define CONFIG_OF_CONTROL
> +#define CONFIG_OF_LIBFDT
> +
>  /*
>  * Commands configuration
>  */
> --
> 1.7.0.4
>
>
u-boot@lakedaemon.net - Sept. 15, 2011, 7:50 p.m.
On Thu, Sep 15, 2011 at 12:25:36PM -0700, Simon Glass wrote:
> On Thu, Sep 15, 2011 at 6:54 AM, Jason Cooper <u-boot@lakedaemon.net> wrote:
> >
> > Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
> > ---
> >  board/Marvell/dreamplug/kirkwood-dreamplug.dts |   12 +++++++++++
> >  board/Marvell/dreamplug/kirkwood.dtsi          |   25 ++++++++++++++++++++++++
> >  include/configs/dreamplug.h                    |    5 ++++
> >  3 files changed, 42 insertions(+), 0 deletions(-)
> >  create mode 100644 board/Marvell/dreamplug/kirkwood-dreamplug.dts
> >  create mode 100644 board/Marvell/dreamplug/kirkwood.dtsi
> >
> > diff --git a/board/Marvell/dreamplug/kirkwood-dreamplug.dts b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
> > new file mode 100644
> > index 0000000..eb900c3
> > --- /dev/null
> > +++ b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
> > @@ -0,0 +1,12 @@
> > +/dts-v1/;
> > +
> > +/include/ "kirkwood.dtsi"
> > +
> > +/ {
> > +       model = "Marvell Dreamplug";
> > +       compatible = "marvell,dreamplug", "marvell,kirkwood";
> > +
> > +       rtc@0xf1010300 {
> > +               status = "ok";
> > +       };
> > +};
> > diff --git a/board/Marvell/dreamplug/kirkwood.dtsi b/board/Marvell/dreamplug/kirkwood.dtsi
> > new file mode 100644
> > index 0000000..15e52bd
> > --- /dev/null
> > +++ b/board/Marvell/dreamplug/kirkwood.dtsi
> > @@ -0,0 +1,25 @@
> > +/ {
> > +       model = "Marvell Kirkwood";
> > +       compatible = "marvell,kirkwood";
> > +       #address-cells = <1>;
> > +       #size-cells = <1>;
> > +
> > +       cpus {
> > +               #address-cells = <1>;
> > +               #size-cells = <0>;
> > +               cpu@0 {
> > +                       compatible = "arm,arm926ejs";
> > +                       reg = <0>;
> > +               };
> > +       };
> > +
> > +       rtc@0xf1010300 {
> > +               compatible = "marvell,kirkwood-rtc";
> > +               reg = <0xf1010300 0x02>;
> > +               status = "disabled";
> > +       };
> > +
> > +       aliases {
> > +               rtc0 = "/rtc@0xf1010300";
> > +       };
> > +};
> > diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
> > index 8d1b935..9960d35 100644
> > --- a/include/configs/dreamplug.h
> > +++ b/include/configs/dreamplug.h
> > @@ -50,6 +50,11 @@
> >  #define CONFIG_MACH_TYPE       MACH_TYPE_DREAMPLUG
> >  #define CONFIG_SKIP_LOWLEVEL_INIT      /* disable board lowlevel_init */
> >
> > +#define CONFIG_OF_EMBED
> > +#define CONFIG_DEFAULT_DEVICE_TREE "kirkwood-dreamplug"
> 
> One of my experiments was to create this automatically from
> <vendor>-<board>.dts, so that this isn't needed explicitly. Is it
> better to require a CONFIG for this, or just use the expected name?

There is a large probability that users may roll their own dts files.
Until device-tree.git is a reality, I'd say keep it so users can specify
which dts file they want to build.

thx,

Jason.

Patch

diff --git a/board/Marvell/dreamplug/kirkwood-dreamplug.dts b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
new file mode 100644
index 0000000..eb900c3
--- /dev/null
+++ b/board/Marvell/dreamplug/kirkwood-dreamplug.dts
@@ -0,0 +1,12 @@ 
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+	model = "Marvell Dreamplug";
+	compatible = "marvell,dreamplug", "marvell,kirkwood";
+
+	rtc@0xf1010300 {
+		status = "ok";
+	};
+};
diff --git a/board/Marvell/dreamplug/kirkwood.dtsi b/board/Marvell/dreamplug/kirkwood.dtsi
new file mode 100644
index 0000000..15e52bd
--- /dev/null
+++ b/board/Marvell/dreamplug/kirkwood.dtsi
@@ -0,0 +1,25 @@ 
+/ {
+	model = "Marvell Kirkwood";
+	compatible = "marvell,kirkwood";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		cpu@0 {
+			compatible = "arm,arm926ejs";
+			reg = <0>;
+		};
+	};
+
+	rtc@0xf1010300 {
+		compatible = "marvell,kirkwood-rtc";
+		reg = <0xf1010300 0x02>;
+		status = "disabled";
+	};
+
+	aliases {
+		rtc0 = "/rtc@0xf1010300";
+	};
+};
diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index 8d1b935..9960d35 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -50,6 +50,11 @@ 
 #define CONFIG_MACH_TYPE	MACH_TYPE_DREAMPLUG
 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
 
+#define CONFIG_OF_EMBED
+#define CONFIG_DEFAULT_DEVICE_TREE "kirkwood-dreamplug"
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_LIBFDT
+
 /*
  * Commands configuration
  */