diff mbox

[U-Boot,v3,2/5] board support of arm64

Message ID 1376574434-48664-3-git-send-email-fenghua@phytium.com.cn
State Superseded
Delegated to: Albert ARIBAUD
Headers show

Commit Message

fenghua@phytium.com.cn Aug. 15, 2013, 1:47 p.m. UTC
From: David Feng <fenghua@phytium.com.cn>

This patch provide u-boot with arm64 support. Currently, it works on
Foundation Model for armv8 or Fast Model for armv8.

Signed-off-by: David Feng <fenghua@phytium.com.cn>
---
Changes for v3:
    - rewrite cache.S and exception.S that partly originated from linux kernel,
      so the license should be ok.

 board/armltd/dts/vexpress64.dts      |  215 ++++++++++++++++++++++++++++++++++
 board/armltd/vexpress64/Makefile     |   43 +++++++
 board/armltd/vexpress64/vexpress64.c |   63 ++++++++++
 boards.cfg                           |    1 +
 include/configs/vexpress_aemv8a.h    |  200 +++++++++++++++++++++++++++++++
 5 files changed, 522 insertions(+)
 create mode 100644 board/armltd/dts/vexpress64.dts
 create mode 100644 board/armltd/vexpress64/Makefile
 create mode 100644 board/armltd/vexpress64/vexpress64.c
 create mode 100644 include/configs/vexpress_aemv8a.h

Comments

Stuart Yoder Aug. 16, 2013, 2:14 p.m. UTC | #1
On Thu, Aug 15, 2013 at 8:47 AM,  <fenghua@phytium.com.cn> wrote:
> From: David Feng <fenghua@phytium.com.cn>
>
> This patch provide u-boot with arm64 support. Currently, it works on
> Foundation Model for armv8 or Fast Model for armv8.
>
> Signed-off-by: David Feng <fenghua@phytium.com.cn>
> ---
> Changes for v3:
>     - rewrite cache.S and exception.S that partly originated from linux kernel,
>       so the license should be ok.
>
>  board/armltd/dts/vexpress64.dts      |  215 ++++++++++++++++++++++++++++++++++

Why is the device tree source in u-boot (instead of in the kernel)?
Is this temporary?   It
looks like this device tree is just a copy from somewhere else.

Would suggest removing this from this patch series and keep the dts maintained
in the Linux kernel.

Stuart
Scott Wood Aug. 19, 2013, 7:59 p.m. UTC | #2
On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
> On Thu, Aug 15, 2013 at 8:47 AM,  <fenghua@phytium.com.cn> wrote:
> > From: David Feng <fenghua@phytium.com.cn>
> >
> > This patch provide u-boot with arm64 support. Currently, it works on
> > Foundation Model for armv8 or Fast Model for armv8.
> >
> > Signed-off-by: David Feng <fenghua@phytium.com.cn>
> > ---
> > Changes for v3:
> >     - rewrite cache.S and exception.S that partly originated from linux kernel,
> >       so the license should be ok.
> >
> >  board/armltd/dts/vexpress64.dts      |  215 ++++++++++++++++++++++++++++++++++
> 
> Why is the device tree source in u-boot (instead of in the kernel)?
> Is this temporary?   It
> looks like this device tree is just a copy from somewhere else.
> 
> Would suggest removing this from this patch series and keep the dts maintained
> in the Linux kernel.

U-Boot itself uses the device tree (not just to patch up for Linux) on
some targets.

Even with the way PPC uses device trees, it doesn't really make sense to
keep them in the kernel given that they're meant to be OS-neutral, and
have ties to U-Boot in terms of what gets fixed up at runtime.

-Scott
Tom Rini Aug. 19, 2013, 8:43 p.m. UTC | #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/19/2013 03:59 PM, Scott Wood wrote:
> On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
>> On Thu, Aug 15, 2013 at 8:47 AM,  <fenghua@phytium.com.cn> 
>> wrote:
>>> From: David Feng <fenghua@phytium.com.cn>
>>> 
>>> This patch provide u-boot with arm64 support. Currently, it 
>>> works on Foundation Model for armv8 or Fast Model for armv8.
>>> 
>>> Signed-off-by: David Feng <fenghua@phytium.com.cn> --- Changes 
>>> for v3: - rewrite cache.S and exception.S that partly 
>>> originated from linux kernel, so the license should be ok.
>>> 
>>> board/armltd/dts/vexpress64.dts      |  215 
>>> ++++++++++++++++++++++++++++++++++
>> 
>> Why is the device tree source in u-boot (instead of in the 
>> kernel)? Is this temporary?   It looks like this device tree is 
>> just a copy from somewhere else.
>> 
>> Would suggest removing this from this patch series and keep the 
>> dts maintained in the Linux kernel.
> 
> U-Boot itself uses the device tree (not just to patch up for
> Linux) on some targets.
> 
> Even with the way PPC uses device trees, it doesn't really make 
> sense to keep them in the kernel given that they're meant to be 
> OS-neutral, and have ties to U-Boot in terms of what gets fixed up 
> at runtime.

Longer term, I want us to be able to make more use of device trees,
where possible and bindings are complete and stable.  And at that
point we'll have to deal with "how do we get a DT from $where-ever to
here to use.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSEoNhAAoJENk4IS6UOR1Wo4EQAIYz21GZOidLA3BzN1BjTmdK
irumwyi0iRZto4jEpqyr7UjOBK+cmHDq3/hhzo1Y4MlX3YezD+yPWRY+7+bk2Dl6
B8huuHaLMTuNK7AHPgMAOmbdxwaQRs8ZP8NA26YH5nvjOqGfpjhPDr+gD7qcRTCA
3RkOVuD5pB6mtdZdGCZqvRVAW9w+6pIhNJpokFmlvRIXLh48R7RAyiu3Ac1JPL8k
sIHmFDDEFhTcbsJdDB93uEIKqMM0K2enhpVB09ZxxpL+EVGwfVYoMGO3q0+2kL8y
q0uawG1vwrkniB0tV5Snp7EBSQdlRo1QIfutfNYI1QRgUEipY41Supx/OkAvaHAP
W2e8tmbq9EaU+TRV3SHn6AjBCTy4shYYv4r/mvEjdVhblxGK4MTdhUmhGKFABU/D
4odQlRXDFirImlELCKXr3qgT3oTWuPjIu9Udc6llwbkgZSteGrdTOyRtRo/xJ5H3
34EkHmFw65cW0kTAhJc91DzrIG7beRM5WVqJfviXE1X5uugJGg3LZidiFQxDPBGM
q+alr+G5Wvo+xrqnmnWeBEev24Oift0GoG4nEtKcnlsQj7i5eEbJj7u6ox7OszCb
8Jp9tVXFZ7c3ZuLh3lcKGYxSnrH81NBxC5f17q+g4pprAxgFTB4DV7WPeqUUxlQB
Hqsm3WzPEoAu5NCD3J7/
=9iEp
-----END PGP SIGNATURE-----
Stuart Yoder Aug. 22, 2013, 4:15 p.m. UTC | #4
On Mon, Aug 19, 2013 at 2:59 PM, Scott Wood <scottwood@freescale.com> wrote:
> On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
>> On Thu, Aug 15, 2013 at 8:47 AM,  <fenghua@phytium.com.cn> wrote:
>> > From: David Feng <fenghua@phytium.com.cn>
>> >
>> > This patch provide u-boot with arm64 support. Currently, it works on
>> > Foundation Model for armv8 or Fast Model for armv8.
>> >
>> > Signed-off-by: David Feng <fenghua@phytium.com.cn>
>> > ---
>> > Changes for v3:
>> >     - rewrite cache.S and exception.S that partly originated from linux kernel,
>> >       so the license should be ok.
>> >
>> >  board/armltd/dts/vexpress64.dts      |  215 ++++++++++++++++++++++++++++++++++
>>
>> Why is the device tree source in u-boot (instead of in the kernel)?
>> Is this temporary?   It
>> looks like this device tree is just a copy from somewhere else.
>>
>> Would suggest removing this from this patch series and keep the dts maintained
>> in the Linux kernel.
>
> U-Boot itself uses the device tree (not just to patch up for Linux) on
> some targets.
>
> Even with the way PPC uses device trees, it doesn't really make sense to
> keep them in the kernel given that they're meant to be OS-neutral, and
> have ties to U-Boot in terms of what gets fixed up at runtime.

It may not make sense, but that is where they are kept currently.  It
doesn't make
sense to maintain 2 copies of a vexpress64.dts device tree in 2 different
places...or to maintain 1 lone device tree in u-boot.

Maybe we need a git repo for device trees that could be included
in Linux, u-boot, and other things a submodule.

Stuart
Scott Wood Aug. 22, 2013, 4:23 p.m. UTC | #5
On Thu, 2013-08-22 at 11:15 -0500, Stuart Yoder wrote:
> On Mon, Aug 19, 2013 at 2:59 PM, Scott Wood <scottwood@freescale.com> wrote:
> > On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
> >> On Thu, Aug 15, 2013 at 8:47 AM,  <fenghua@phytium.com.cn> wrote:
> >> > From: David Feng <fenghua@phytium.com.cn>
> >> >
> >> > This patch provide u-boot with arm64 support. Currently, it works on
> >> > Foundation Model for armv8 or Fast Model for armv8.
> >> >
> >> > Signed-off-by: David Feng <fenghua@phytium.com.cn>
> >> > ---
> >> > Changes for v3:
> >> >     - rewrite cache.S and exception.S that partly originated from linux kernel,
> >> >       so the license should be ok.
> >> >
> >> >  board/armltd/dts/vexpress64.dts      |  215 ++++++++++++++++++++++++++++++++++
> >>
> >> Why is the device tree source in u-boot (instead of in the kernel)?
> >> Is this temporary?   It
> >> looks like this device tree is just a copy from somewhere else.
> >>
> >> Would suggest removing this from this patch series and keep the dts maintained
> >> in the Linux kernel.
> >
> > U-Boot itself uses the device tree (not just to patch up for Linux) on
> > some targets.
> >
> > Even with the way PPC uses device trees, it doesn't really make sense to
> > keep them in the kernel given that they're meant to be OS-neutral, and
> > have ties to U-Boot in terms of what gets fixed up at runtime.
> 
> It may not make sense, but that is where they are kept currently. 

For PPC.

> It doesn't make sense to maintain 2 copies of a vexpress64.dts device tree in 2 different
> places...or to maintain 1 lone device tree in u-boot.

Why does it not make sense for there to be one lone device tree in
U-Boot?

A device tree that is not used with U-Boot may not look the same, since
U-Boot is (at least on some platforms) responsible for filling in parts
of the tree, and (again on some platforms) for setting up the address
map.

> Maybe we need a git repo for device trees that could be included
> in Linux, u-boot, and other things a submodule.

Submodules can be a pain.  If we don't use them for DTC, why would we
use them for this?  Since they require extra commands, you'd be
modifying the workflow of everyone that builds U-Boot and/or Linux for
affected platforms.

-Scott
Stuart Yoder Aug. 22, 2013, 5:44 p.m. UTC | #6
On Thu, Aug 22, 2013 at 11:23 AM, Scott Wood <scottwood@freescale.com> wrote:
> On Thu, 2013-08-22 at 11:15 -0500, Stuart Yoder wrote:
>> On Mon, Aug 19, 2013 at 2:59 PM, Scott Wood <scottwood@freescale.com> wrote:
>> > On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
>> >> On Thu, Aug 15, 2013 at 8:47 AM,  <fenghua@phytium.com.cn> wrote:
>> >> > From: David Feng <fenghua@phytium.com.cn>
>> >> >
>> >> > This patch provide u-boot with arm64 support. Currently, it works on
>> >> > Foundation Model for armv8 or Fast Model for armv8.
>> >> >
>> >> > Signed-off-by: David Feng <fenghua@phytium.com.cn>
>> >> > ---
>> >> > Changes for v3:
>> >> >     - rewrite cache.S and exception.S that partly originated from linux kernel,
>> >> >       so the license should be ok.
>> >> >
>> >> >  board/armltd/dts/vexpress64.dts      |  215 ++++++++++++++++++++++++++++++++++
>> >>
>> >> Why is the device tree source in u-boot (instead of in the kernel)?
>> >> Is this temporary?   It
>> >> looks like this device tree is just a copy from somewhere else.
>> >>
>> >> Would suggest removing this from this patch series and keep the dts maintained
>> >> in the Linux kernel.
>> >
>> > U-Boot itself uses the device tree (not just to patch up for Linux) on
>> > some targets.
>> >
>> > Even with the way PPC uses device trees, it doesn't really make sense to
>> > keep them in the kernel given that they're meant to be OS-neutral, and
>> > have ties to U-Boot in terms of what gets fixed up at runtime.
>>
>> It may not make sense, but that is where they are kept currently.
>
> For PPC.

$ find arch/arm/boot/dts | wc -l
425
$ find arch/powerpc/boot/dts | wc -l
315

There are also a handful of device trees under arch/arm64/boot/dts,
including what looks like a vexpress board.

>> It doesn't make sense to maintain 2 copies of a vexpress64.dts device tree in 2 different
>> places...or to maintain 1 lone device tree in u-boot.
>
> Why does it not make sense for there to be one lone device tree in
> U-Boot?

It doesn't make sense to me to keep one device tree in u-boot
and the rest in the kernel.

I don't know where that vexpress64.dts came from, but I'm guessing
it's a copy from the Linux kernel.

> A device tree that is not used with U-Boot may not look the same, since
> U-Boot is (at least on some platforms) responsible for filling in parts
> of the tree, and (again on some platforms) for setting up the address
> map.
>
>> Maybe we need a git repo for device trees that could be included
>> in Linux, u-boot, and other things a submodule.
>
> Submodules can be a pain.  If we don't use them for DTC, why would we
> use them for this?  Since they require extra commands, you'd be
> modifying the workflow of everyone that builds U-Boot and/or Linux for
> affected platforms.

You shouldn't need device trees for building u-boot or the kernel.
I don't think a couple of extra commands is that burdensome.

I agree the DTS files really don't belong in the kernel, but there is
currently no better repository that has been proposed.   I'm not
sure u-boot is a better place.    Device trees should be independent
of any particular bootloader or OS.

Stuart
Scott Wood Aug. 22, 2013, 5:50 p.m. UTC | #7
On Thu, 2013-08-22 at 12:44 -0500, Stuart Yoder wrote:
> On Thu, Aug 22, 2013 at 11:23 AM, Scott Wood <scottwood@freescale.com> wrote:
> > On Thu, 2013-08-22 at 11:15 -0500, Stuart Yoder wrote:
> >> On Mon, Aug 19, 2013 at 2:59 PM, Scott Wood <scottwood@freescale.com> wrote:
> >> > On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
> >> >> Why is the device tree source in u-boot (instead of in the kernel)?
> >> >> Is this temporary?   It
> >> >> looks like this device tree is just a copy from somewhere else.
> >> >>
> >> >> Would suggest removing this from this patch series and keep the dts maintained
> >> >> in the Linux kernel.
> >> >
> >> > U-Boot itself uses the device tree (not just to patch up for Linux) on
> >> > some targets.
> >> >
> >> > Even with the way PPC uses device trees, it doesn't really make sense to
> >> > keep them in the kernel given that they're meant to be OS-neutral, and
> >> > have ties to U-Boot in terms of what gets fixed up at runtime.
> >>
> >> It may not make sense, but that is where they are kept currently.
> >
> > For PPC.
> 
> $ find arch/arm/boot/dts | wc -l
> 425
> $ find arch/powerpc/boot/dts | wc -l
> 315

My point is this isn't the first device tree to go into U-Boot for ARM.

> >> It doesn't make sense to maintain 2 copies of a vexpress64.dts device tree in 2 different
> >> places...or to maintain 1 lone device tree in u-boot.
> >
> > Why does it not make sense for there to be one lone device tree in
> > U-Boot?
> 
> It doesn't make sense to me to keep one device tree in u-boot
> and the rest in the kernel.

That's not what's being proposed.

> > Submodules can be a pain.  If we don't use them for DTC, why would we
> > use them for this?  Since they require extra commands, you'd be
> > modifying the workflow of everyone that builds U-Boot and/or Linux for
> > affected platforms.
> 
> You shouldn't need device trees for building u-boot or the kernel.

Then why mess around with submodules instead of just a separate
repository?

> I don't think a couple of extra commands is that burdensome.

I disagree, and at the least don't want to be the one to advocate such a
change. :-)

> I agree the DTS files really don't belong in the kernel, but there is
> currently no better repository that has been proposed.   I'm not
> sure u-boot is a better place.    Device trees should be independent
> of any particular bootloader or OS.

The final device tree that the OS sees should be independent of the OS.
The dts is not the final device tree, and is tied to U-Boot.  The device
tree in general is also tied to the bootloader in other ways -- U-Boot
expects certain aliases, configurable addresses must match, etc.

-Scott
Tom Rini Aug. 23, 2013, 7:48 p.m. UTC | #8
On Thu, Aug 22, 2013 at 12:50:44PM -0500, Scott Wood wrote:
> On Thu, 2013-08-22 at 12:44 -0500, Stuart Yoder wrote:
> > On Thu, Aug 22, 2013 at 11:23 AM, Scott Wood <scottwood@freescale.com> wrote:
> > > On Thu, 2013-08-22 at 11:15 -0500, Stuart Yoder wrote:
> > >> On Mon, Aug 19, 2013 at 2:59 PM, Scott Wood <scottwood@freescale.com> wrote:
> > >> > On Fri, 2013-08-16 at 09:14 -0500, Stuart Yoder wrote:
> > >> >> Why is the device tree source in u-boot (instead of in the kernel)?
> > >> >> Is this temporary?   It
> > >> >> looks like this device tree is just a copy from somewhere else.
> > >> >>
> > >> >> Would suggest removing this from this patch series and keep the dts maintained
> > >> >> in the Linux kernel.
> > >> >
> > >> > U-Boot itself uses the device tree (not just to patch up for Linux) on
> > >> > some targets.
> > >> >
> > >> > Even with the way PPC uses device trees, it doesn't really make sense to
> > >> > keep them in the kernel given that they're meant to be OS-neutral, and
> > >> > have ties to U-Boot in terms of what gets fixed up at runtime.
> > >>
> > >> It may not make sense, but that is where they are kept currently.
> > >
> > > For PPC.
> > 
> > $ find arch/arm/boot/dts | wc -l
> > 425
> > $ find arch/powerpc/boot/dts | wc -l
> > 315
> 
> My point is this isn't the first device tree to go into U-Boot for ARM.

Right, but a problem we have today is that the existing ones are
incompatible with the real device trees for the devices in question.

> > >> It doesn't make sense to maintain 2 copies of a vexpress64.dts device tree in 2 different
> > >> places...or to maintain 1 lone device tree in u-boot.
> > >
> > > Why does it not make sense for there to be one lone device tree in
> > > U-Boot?
> > 
> > It doesn't make sense to me to keep one device tree in u-boot
> > and the rest in the kernel.
> 
> That's not what's being proposed.
> 
> > > Submodules can be a pain.  If we don't use them for DTC, why would we
> > > use them for this?  Since they require extra commands, you'd be
> > > modifying the workflow of everyone that builds U-Boot and/or Linux for
> > > affected platforms.
> > 
> > You shouldn't need device trees for building u-boot or the kernel.
> 
> Then why mess around with submodules instead of just a separate
> repository?
> 
> > I don't think a couple of extra commands is that burdensome.
> 
> I disagree, and at the least don't want to be the one to advocate such a
> change. :-)
> 
> > I agree the DTS files really don't belong in the kernel, but there is
> > currently no better repository that has been proposed.   I'm not
> > sure u-boot is a better place.    Device trees should be independent
> > of any particular bootloader or OS.
> 
> The final device tree that the OS sees should be independent of the OS.
> The dts is not the final device tree, and is tied to U-Boot.  The device
> tree in general is also tied to the bootloader in other ways -- U-Boot
> expects certain aliases, configurable addresses must match, etc.

I really hope that when the data gets pulled out of the kernel we'll
have a useable central repository somewhere that can be used and various
problems like this are taken into consideration.
diff mbox

Patch

diff --git a/board/armltd/dts/vexpress64.dts b/board/armltd/dts/vexpress64.dts
new file mode 100644
index 0000000..3814e01
--- /dev/null
+++ b/board/armltd/dts/vexpress64.dts
@@ -0,0 +1,215 @@ 
+/*
+ * ARM Ltd. Fast Models
+ *
+ * Architecture Envelope Model (AEM) ARMv8-A
+ * ARMAEMv8AMPCT
+ *
+ * RTSM_VE_AEMv8A.lisa
+ */
+
+/dts-v1/;
+
+/memreserve/ 0x80000000 0x00010000;
+
+/ {
+	/* boot configurations for u-boot */
+	config {
+		/*bootdelay = <1>;*/
+		kernel-offset = <0x100000>;
+		rootdisk-offset = <0x800000>;
+		bootcmd = "bootm 0x100000 0x800000:0x2000000";
+	};
+};
+
+/ {
+	model = "RTSM_VE_AEMv8A";
+	compatible = "arm,rtsm_ve,aemv8a", "arm,vexpress";
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	/* chosen */
+	/* generated by u-boot */
+
+
+	aliases {
+		serial0 = &v2m_serial0;
+		serial1 = &v2m_serial1;
+		serial2 = &v2m_serial2;
+		serial3 = &v2m_serial3;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <0>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu@1 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <1>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu@2 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <2>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+		cpu@3 {
+			device_type = "cpu";
+			compatible = "arm,armv8";
+			reg = <3>;
+			enable-method = "spin-table";
+			cpu-release-addr = <0x0 0x8000fff8>;
+		};
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x00000000 0x80000000 0 0x80000000>,
+		      <0x00000008 0x80000000 0 0x80000000>;
+	};
+
+	gic: interrupt-controller@2c001000 {
+		compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
+		#interrupt-cells = <3>;
+		#address-cells = <0>;
+		interrupt-controller;
+		reg = <0x0 0x2c001000 0 0x1000>,
+		      <0x0 0x2c002000 0 0x1000>,
+		      <0x0 0x2c004000 0 0x2000>,
+		      <0x0 0x2c006000 0 0x2000>;
+		interrupts = <1 9 0xf04>;
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <1 13 0xff01>,
+			     <1 14 0xff01>,
+			     <1 11 0xff01>,
+			     <1 10 0xff01>;
+		clock-frequency = <100000000>;
+	};
+
+	pmu {
+		compatible = "arm,armv8-pmuv3";
+		interrupts = <0 60 4>,
+			     <0 61 4>,
+			     <0 62 4>,
+			     <0 63 4>;
+	};
+
+	smb {
+		compatible = "simple-bus";
+
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges = <0 0 0 0x08000000 0x04000000>,
+			 <1 0 0 0x14000000 0x04000000>,
+			 <2 0 0 0x18000000 0x04000000>,
+			 <3 0 0 0x1c000000 0x04000000>,
+			 <4 0 0 0x0c000000 0x04000000>,
+			 <5 0 0 0x10000000 0x04000000>;
+
+		#interrupt-cells = <1>;
+		interrupt-map-mask = <0 0 63>;
+		interrupt-map = <0 0  0 &gic 0  0 4>,
+				<0 0  1 &gic 0  1 4>,
+				<0 0  2 &gic 0  2 4>,
+				<0 0  3 &gic 0  3 4>,
+				<0 0  4 &gic 0  4 4>,
+				<0 0  5 &gic 0  5 4>,
+				<0 0  6 &gic 0  6 4>,
+				<0 0  7 &gic 0  7 4>,
+				<0 0  8 &gic 0  8 4>,
+				<0 0  9 &gic 0  9 4>,
+				<0 0 10 &gic 0 10 4>,
+				<0 0 11 &gic 0 11 4>,
+				<0 0 12 &gic 0 12 4>,
+				<0 0 13 &gic 0 13 4>,
+				<0 0 14 &gic 0 14 4>,
+				<0 0 15 &gic 0 15 4>,
+				<0 0 16 &gic 0 16 4>,
+				<0 0 17 &gic 0 17 4>,
+				<0 0 18 &gic 0 18 4>,
+				<0 0 19 &gic 0 19 4>,
+				<0 0 20 &gic 0 20 4>,
+				<0 0 21 &gic 0 21 4>,
+				<0 0 22 &gic 0 22 4>,
+				<0 0 23 &gic 0 23 4>,
+				<0 0 24 &gic 0 24 4>,
+				<0 0 25 &gic 0 25 4>,
+				<0 0 26 &gic 0 26 4>,
+				<0 0 27 &gic 0 27 4>,
+				<0 0 28 &gic 0 28 4>,
+				<0 0 29 &gic 0 29 4>,
+				<0 0 30 &gic 0 30 4>,
+				<0 0 31 &gic 0 31 4>,
+				<0 0 32 &gic 0 32 4>,
+				<0 0 33 &gic 0 33 4>,
+				<0 0 34 &gic 0 34 4>,
+				<0 0 35 &gic 0 35 4>,
+				<0 0 36 &gic 0 36 4>,
+				<0 0 37 &gic 0 37 4>,
+				<0 0 38 &gic 0 38 4>,
+				<0 0 39 &gic 0 39 4>,
+				<0 0 40 &gic 0 40 4>,
+				<0 0 41 &gic 0 41 4>,
+				<0 0 42 &gic 0 42 4>;
+
+		/include/ "aemv8a.dtsi"
+	};
+
+	panels {
+		panel@0 {
+			compatible	= "panel";
+			mode		= "VGA";
+			refresh		= <60>;
+			xres		= <640>;
+			yres		= <480>;
+			pixclock	= <39721>;
+			left_margin	= <40>;
+			right_margin	= <24>;
+			upper_margin	= <32>;
+			lower_margin	= <11>;
+			hsync_len	= <96>;
+			vsync_len	= <2>;
+			sync		= <0>;
+			vmode		= "FB_VMODE_NONINTERLACED";
+			tim2		= "TIM2_BCD", "TIM2_IPC";
+			cntl		= "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
+			caps		= "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
+			bpp		= <16>;
+		};
+
+		panel@1 {
+			compatible	= "panel";
+			mode		= "XVGA";
+			refresh		= <60>;
+			xres		= <1024>;
+			yres		= <768>;
+			pixclock	= <15748>;
+			left_margin	= <152>;
+			right_margin	= <48>;
+			upper_margin	= <23>;
+			lower_margin	= <3>;
+			hsync_len	= <104>;
+			vsync_len	= <4>;
+			sync		= <0>;
+			vmode		= "FB_VMODE_NONINTERLACED";
+			tim2		= "TIM2_BCD", "TIM2_IPC";
+			cntl		= "CNTL_LCDTFT", "CNTL_BGR", "CNTL_LCDVCOMP(1)";
+			caps		= "CLCD_CAP_5551", "CLCD_CAP_565", "CLCD_CAP_888";
+			bpp		= <16>;
+		};
+	};
+};
diff --git a/board/armltd/vexpress64/Makefile b/board/armltd/vexpress64/Makefile
new file mode 100644
index 0000000..77f0c3f
--- /dev/null
+++ b/board/armltd/vexpress64/Makefile
@@ -0,0 +1,43 @@ 
+#
+# (C) Copyright 2000-2004
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(BOARD).o
+
+COBJS	:= vexpress64.o
+
+SRCS	:= $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+
+$(LIB):	$(obj).depend $(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
new file mode 100644
index 0000000..b86736d
--- /dev/null
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -0,0 +1,63 @@ 
+/*
+ * (C) Copyright 2013
+ * Phytium Technology, <www.phytium.com.cn>
+ * David Feng, fenghua@phytium.com.cn
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#include <common.h>
+#include <malloc.h>
+#include <errno.h>
+#include <netdev.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Board specific reset that is system reset.
+ */
+void reset_cpu(ulong addr)
+{
+}
+
+/*
+ * Default implementation of gpio related functiuons
+ * Real implementation should be in gpio driver.
+ * fdtdec.c need this function, but currenty no gpio driver defined
+ */
+int __gpio_get_value(unsigned gpio)
+{
+	return 0;
+}
+int gpio_get_value(unsigned gpio)
+	__attribute__((weak, alias("__gpio_get_value")));
+
+void __gpio_set_value(unsigned gpio, int vlaue)
+{
+	return;
+}
+void gpio_set_value(unsigned gpio, int vlaue)
+	__attribute__((weak, alias("__gpio_set_value")));
+
+void __gpio_request(unsigned gpio, const char *label)
+{
+	return;
+}
+void gpio_request(unsigned gpio, const char *label)
+	__attribute__((weak, alias("__gpio_request")));
diff --git a/boards.cfg b/boards.cfg
index 944ed4c..561b0d6 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -1182,5 +1182,6 @@  gr_ep2s60                    sparc       leon3       -                   gaisler
 grsim                        sparc       leon3       -                   gaisler
 gr_xc3s_1500                 sparc       leon3       -                   gaisler
 coreboot-x86                 x86         x86        coreboot            chromebook-x86 coreboot    coreboot:SYS_TEXT_BASE=0x01110000
+vexpress_aemv8a              arm64       armv8       vexpress64          armltd
 # Target                     ARCH        CPU         Board name          Vendor	        SoC         Options
 ########################################################################################################################
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
new file mode 100644
index 0000000..d920333
--- /dev/null
+++ b/include/configs/vexpress_aemv8a.h
@@ -0,0 +1,200 @@ 
+/*
+ * Configuration for Versatile Express. Parts were derived from other ARM
+ *   configurations.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __VEXPRESS_AEMV8A_H
+#define __VEXPRESS_AEMV8A_H
+
+#define DEBUG
+
+#define CONFIG_SYS_NO_FLASH
+
+#define CONFIG_SUPPORT_RAW_INITRD
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+/* Cache Definitions */
+//#define CONFIG_SYS_DCACHE_OFF
+//#define CONFIG_SYS_ICACHE_OFF
+
+#define CONFIG_IDENT_STRING		" vexpress_aemv8a"
+#define CONFIG_BOOTP_VCI_STRING    	"U-boot.armv8.vexpress_aemv8a"
+
+/* Link Definitions */
+#define CONFIG_SYS_TEXT_BASE		0x80000000
+#define CONFIG_SYS_INIT_SP_ADDR         (CONFIG_SYS_SDRAM_BASE + 0x400000)
+
+/* Flat Device Tree Definitions */
+#define CONFIG_OF_EMBED
+#define CONFIG_OF_CONTROL
+#define CONFIG_OF_LIBFDT
+
+#define CONFIG_DEFAULT_DEVICE_TREE	vexpress64
+
+/* SMP Definitions */
+#define SECONDARY_CPU_MAILBOX		0x8000fff8
+
+/* CS register bases for the original memory map. */
+#define V2M_PA_CS0			0x00000000
+#define V2M_PA_CS1			0x14000000
+#define V2M_PA_CS2			0x18000000
+#define V2M_PA_CS3			0x1c000000
+#define V2M_PA_CS4			0x0c000000
+#define V2M_PA_CS5			0x10000000
+
+#define V2M_PERIPH_OFFSET(x)		(x << 16)
+#define V2M_SYSREGS			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(1))
+#define V2M_SYSCTL			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(2))
+#define V2M_SERIAL_BUS_PCI		(V2M_PA_CS3 + V2M_PERIPH_OFFSET(3))
+
+#define V2M_BASE			0x80000000
+
+/*
+ * Physical addresses, offset from V2M_PA_CS0-3
+ */
+#define V2M_NOR0			(V2M_PA_CS0)
+#define V2M_NOR1			(V2M_PA_CS4)
+#define V2M_SRAM			(V2M_PA_CS1)
+
+/* Common peripherals relative to CS7. */
+#define V2M_AACI			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(4))
+#define V2M_MMCI			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(5))
+#define V2M_KMI0			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(6))
+#define V2M_KMI1			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(7))
+
+#define V2M_UART0			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(9))
+#define V2M_UART1			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(10))
+#define V2M_UART2			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(11))
+#define V2M_UART3			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(12))
+
+#define V2M_WDT				(V2M_PA_CS3 + V2M_PERIPH_OFFSET(15))
+
+#define V2M_TIMER01			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(17))
+#define V2M_TIMER23			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(18))
+
+#define V2M_SERIAL_BUS_DVI		(V2M_PA_CS3 + V2M_PERIPH_OFFSET(22))
+#define V2M_RTC				(V2M_PA_CS3 + V2M_PERIPH_OFFSET(23))
+
+#define V2M_CF				(V2M_PA_CS3 + V2M_PERIPH_OFFSET(26))
+
+#define V2M_CLCD			(V2M_PA_CS3 + V2M_PERIPH_OFFSET(31))
+
+/* System register offsets. */
+#define V2M_SYS_CFGDATA			(V2M_SYSREGS + 0x0a0)
+#define V2M_SYS_CFGCTRL			(V2M_SYSREGS + 0x0a4)
+#define V2M_SYS_CFGSTAT			(V2M_SYSREGS + 0x0a8)
+
+/* Generic Timer Definitions */
+#define CONFIG_SYS_CNTFRQ		(0x1800000)	/* 24MHz */
+
+/* Generic Interrupt Controller Definitions */
+#define GIC_DIST_BASE			(0x2C001000)
+#define GIC_CPU_BASE			(0x2C002000)
+
+#define CONFIG_SYS_MEMTEST_START	V2M_BASE
+#define CONFIG_SYS_MEMTEST_END		(V2M_BASE + 0x80000000)
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+
+/* PL011 Serial Configuration */
+#define CONFIG_PL011_SERIAL
+#define CONFIG_PL011_CLOCK		24000000
+#define CONFIG_PL01x_PORTS		{(void *)CONFIG_SYS_SERIAL0, \
+					 (void *)CONFIG_SYS_SERIAL1}
+#define CONFIG_CONS_INDEX		0
+
+#define CONFIG_BAUDRATE			115200
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
+#define CONFIG_SYS_SERIAL0		V2M_UART0
+#define CONFIG_SYS_SERIAL1		V2M_UART1
+
+/* Command line configuration */
+#define CONFIG_MENU
+//#define CONFIG_MENU_SHOW
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_BDI
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_PXE
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_FLASH
+#define CONFIG_CMD_IMI
+#define CONFIG_CMD_MEMORY
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_NET
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVEENV
+#define CONFIG_CMD_RUN
+#define CONFIG_CMD_BOOTD
+#define CONFIG_CMD_ECHO
+#define CONFIG_CMD_SOURCE
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+
+/* BOOTP options */
+#define CONFIG_BOOTP_BOOTFILESIZE
+#define CONFIG_BOOTP_BOOTPATH
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+#define CONFIG_BOOTP_PXE
+#define CONFIG_BOOTP_PXE_CLIENTARCH	0x100
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_LOAD_ADDR		(V2M_BASE + 0x10000000)	/* load address */
+
+/* Physical Memory Map */
+#define CONFIG_NR_DRAM_BANKS		1
+#define PHYS_SDRAM_1			(V2M_BASE)	/* SDRAM Bank #1 */
+#define PHYS_SDRAM_1_SIZE		0x80000000	/* 2048 MB */
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+
+
+/* Initial environment variables */
+#define CONFIG_EXTRA_ENV_SETTINGS	\
+					"loadaddr=0x80100000\0"		\
+					"kernel_addr=0x100000\0"	\
+					"ramdisk_addr=0x800000\0"	\
+					"ramdisk_size=0x2000000\0"	\
+					"fdt_high=0xa0000000\0"		\
+					"console=ttyAMA0,38400n8\0"
+
+#define CONFIG_BOOTARGS			"console=ttyAMA0 root=/dev/ram0"
+#define CONFIG_BOOTCOMMAND		"bootm $kernel_addr $ramdisk_addr:$ramdisk_size"
+#define CONFIG_BOOTDELAY		-1
+
+/* Store environment at top of flash */
+#define CONFIG_ENV_IS_NOWHERE		1
+#define CONFIG_ENV_SIZE			0x1000
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
+#define CONFIG_SYS_PROMPT		"VExpress# "
+#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
+					sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
+#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot args buffer */
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_CMDLINE_EDITING		1
+#define CONFIG_SYS_MAXARGS		64	/* max command args */
+
+#endif /* __VEXPRESS_AEMV8A_H */