diff mbox

arm: mvebu: support for the new Armada XP evaluation board(DB-MV784MP-GP)

Message ID 1359566774-27669-2-git-send-email-gregory.clement@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gregory CLEMENT Jan. 30, 2013, 5:26 p.m. UTC
This is the new Armada XP evaluation board from Marvell. It comes with
a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
Gigabit links.

Support for USB (Host and device), SDIO, PCIe will be added as drivers
when they become available for Armada XP in mainline.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 arch/arm/boot/dts/Makefile         |    1 +
 arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
 2 files changed, 95 insertions(+)
 create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts

Comments

Florian Fainelli Jan. 30, 2013, 5:28 p.m. UTC | #1
Hello Gregory,

On 01/30/2013 06:26 PM, Gregory CLEMENT wrote:
> This is the new Armada XP evaluation board from Marvell. It comes with
> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> Gigabit links.
>
> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> when they become available for Armada XP in mainline.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>   arch/arm/boot/dts/Makefile         |    1 +
>   arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>   2 files changed, 95 insertions(+)
>   create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 5ebb44f..51aab4b 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
>   dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
>   	armada-370-mirabox.dtb \
>   	armada-xp-db.dtb \
> +	armada-xp-gp.dtb \
>   	armada-xp-openblocks-ax3-4.dtb
>   dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
>   	imx53-ard.dtb \
> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
> new file mode 100644
> index 0000000..85ba642
> --- /dev/null
> +++ b/arch/arm/boot/dts/armada-xp-gp.dts
> @@ -0,0 +1,94 @@
> +/*
> + * Device Tree file for Marvell Armada XP evaluation board
> + * (RD-MV784MP-GP)

Marvell refers to this as a Reference Design (which it is because it is 
boxed).

> + *
> + * Copyright (C) 2013 Marvell
> + *
> + * Lior Amsalem <alior@marvell.com>
> + * Gregory CLEMENT <gregory.clement@free-electrons.com>
> + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +/dts-v1/;
> +/include/ "armada-xp-mv78460.dtsi"
> +
> +/ {
> +	model = "Marvell Armada XP Evaluation Board: RD-MV784MP-GP";

Ditto, should be "Marvell Armada XP Reference Design Board".
> +	compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200 earlyprintk";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
> +	};
> +
> +	soc {
> +		serial@d0012000 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +		serial@d0012100 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +		serial@d0012200 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +		serial@d0012300 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +
> +		sata@d00a0000 {
> +			nr-ports = <2>;
> +			status = "okay";
> +		};
> +
> +		mdio {
> +			phy0: ethernet-phy@0 {
> +				reg = <16>;
> +			};
> +
> +			phy1: ethernet-phy@1 {
> +				reg = <17>;
> +			};
> +
> +			phy2: ethernet-phy@2 {
> +				reg = <18>;
> +			};
> +
> +			phy3: ethernet-phy@3 {
> +				reg = <19>;
> +			};
> +		};

It seemed to me like the PHY addresses were 0 to 3, but I will test that 
within the next few minutes.
--
Florian
Jason Cooper Jan. 30, 2013, 5:33 p.m. UTC | #2
On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
> This is the new Armada XP evaluation board from Marvell. It comes with
> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> Gigabit links.
> 
> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> when they become available for Armada XP in mainline.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  arch/arm/boot/dts/Makefile         |    1 +
>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 95 insertions(+)
>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 5ebb44f..51aab4b 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
>  dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
>  	armada-370-mirabox.dtb \
>  	armada-xp-db.dtb \
> +	armada-xp-gp.dtb \
>  	armada-xp-openblocks-ax3-4.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
>  	imx53-ard.dtb \
> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
> new file mode 100644
> index 0000000..85ba642
> --- /dev/null
> +++ b/arch/arm/boot/dts/armada-xp-gp.dts
> @@ -0,0 +1,94 @@
> +/*
> + * Device Tree file for Marvell Armada XP evaluation board
> + * (RD-MV784MP-GP)
> + *
> + * Copyright (C) 2013 Marvell
> + *
> + * Lior Amsalem <alior@marvell.com>
> + * Gregory CLEMENT <gregory.clement@free-electrons.com>
> + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +/dts-v1/;
> +/include/ "armada-xp-mv78460.dtsi"
> +
> +/ {
> +	model = "Marvell Armada XP Evaluation Board: RD-MV784MP-GP";
> +	compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200 earlyprintk";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x00000000 0xC0000000>; /* 3 GB */

Is this the soldered on the board amount, or the amount with an
expandable slot filled?

thx,

Jason.
Gregory CLEMENT Jan. 30, 2013, 5:33 p.m. UTC | #3
On 01/30/2013 06:28 PM, Florian Fainelli wrote:
> Hello Gregory,

Hi Floran,

thanks for your quick feedback

> 
> On 01/30/2013 06:26 PM, Gregory CLEMENT wrote:
>> This is the new Armada XP evaluation board from Marvell. It comes with
>> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
>> Gigabit links.
>>
>> Support for USB (Host and device), SDIO, PCIe will be added as drivers
>> when they become available for Armada XP in mainline.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>>   arch/arm/boot/dts/Makefile         |    1 +
>>   arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>>   2 files changed, 95 insertions(+)
>>   create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 5ebb44f..51aab4b 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
>>   dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
>>   	armada-370-mirabox.dtb \
>>   	armada-xp-db.dtb \
>> +	armada-xp-gp.dtb \
>>   	armada-xp-openblocks-ax3-4.dtb
>>   dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
>>   	imx53-ard.dtb \
>> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
>> new file mode 100644
>> index 0000000..85ba642
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/armada-xp-gp.dts
>> @@ -0,0 +1,94 @@
>> +/*
>> + * Device Tree file for Marvell Armada XP evaluation board
>> + * (RD-MV784MP-GP)
> 
> Marvell refers to this as a Reference Design (which it is because it is 
> boxed).

OK I will change this

> 
>> + *
>> + * Copyright (C) 2013 Marvell
>> + *
>> + * Lior Amsalem <alior@marvell.com>
>> + * Gregory CLEMENT <gregory.clement@free-electrons.com>
>> + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2.  This program is licensed "as is" without any
>> + * warranty of any kind, whether express or implied.
>> + */
>> +
>> +/dts-v1/;
>> +/include/ "armada-xp-mv78460.dtsi"
>> +
>> +/ {
>> +	model = "Marvell Armada XP Evaluation Board: RD-MV784MP-GP";
> 
> Ditto, should be "Marvell Armada XP Reference Design Board".

I will change this too

>> +	compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
>> +
>> +	chosen {
>> +		bootargs = "console=ttyS0,115200 earlyprintk";
>> +	};
>> +
>> +	memory {
>> +		device_type = "memory";
>> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
>> +	};
>> +
>> +	soc {
>> +		serial@d0012000 {
>> +			clock-frequency = <250000000>;
>> +			status = "okay";
>> +		};
>> +		serial@d0012100 {
>> +			clock-frequency = <250000000>;
>> +			status = "okay";
>> +		};
>> +		serial@d0012200 {
>> +			clock-frequency = <250000000>;
>> +			status = "okay";
>> +		};
>> +		serial@d0012300 {
>> +			clock-frequency = <250000000>;
>> +			status = "okay";
>> +		};
>> +
>> +		sata@d00a0000 {
>> +			nr-ports = <2>;
>> +			status = "okay";
>> +		};
>> +
>> +		mdio {
>> +			phy0: ethernet-phy@0 {
>> +				reg = <16>;
>> +			};
>> +
>> +			phy1: ethernet-phy@1 {
>> +				reg = <17>;
>> +			};
>> +
>> +			phy2: ethernet-phy@2 {
>> +				reg = <18>;
>> +			};
>> +
>> +			phy3: ethernet-phy@3 {
>> +				reg = <19>;
>> +			};
>> +		};
> 
> It seemed to me like the PHY addresses were 0 to 3, but I will test that 
> within the next few minutes.

I wait for your results

> --
> Florian
>
Gregory CLEMENT Jan. 30, 2013, 5:35 p.m. UTC | #4
On 01/30/2013 06:33 PM, Jason Cooper wrote:
> On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
>> This is the new Armada XP evaluation board from Marvell. It comes with
>> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
>> Gigabit links.
>>
>> Support for USB (Host and device), SDIO, PCIe will be added as drivers
>> when they become available for Armada XP in mainline.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/Makefile         |    1 +
>>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>>  2 files changed, 95 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
>>
>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
>> index 5ebb44f..51aab4b 100644
>> --- a/arch/arm/boot/dts/Makefile
>> +++ b/arch/arm/boot/dts/Makefile
>> @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
>>  dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
>>  	armada-370-mirabox.dtb \
>>  	armada-xp-db.dtb \
>> +	armada-xp-gp.dtb \
>>  	armada-xp-openblocks-ax3-4.dtb
>>  dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
>>  	imx53-ard.dtb \
>> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
>> new file mode 100644
>> index 0000000..85ba642
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/armada-xp-gp.dts
>> @@ -0,0 +1,94 @@
>> +/*
>> + * Device Tree file for Marvell Armada XP evaluation board
>> + * (RD-MV784MP-GP)
>> + *
>> + * Copyright (C) 2013 Marvell
>> + *
>> + * Lior Amsalem <alior@marvell.com>
>> + * Gregory CLEMENT <gregory.clement@free-electrons.com>
>> + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> + *
>> + * This file is licensed under the terms of the GNU General Public
>> + * License version 2.  This program is licensed "as is" without any
>> + * warranty of any kind, whether express or implied.
>> + */
>> +
>> +/dts-v1/;
>> +/include/ "armada-xp-mv78460.dtsi"
>> +
>> +/ {
>> +	model = "Marvell Armada XP Evaluation Board: RD-MV784MP-GP";
>> +	compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
>> +
>> +	chosen {
>> +		bootargs = "console=ttyS0,115200 earlyprintk";
>> +	};
>> +
>> +	memory {
>> +		device_type = "memory";
>> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
> 
> Is this the soldered on the board amount, or the amount with an
> expandable slot filled?

It is not soldered, so you can change the amount of memory

> 
> thx,
> 
> Jason.
>
Jason Cooper Jan. 30, 2013, 6:10 p.m. UTC | #5
Gregory,

Adding devicetree-discuss.

Guys, how do you prefer to handle plug-in RAM modules?  describe the
soldered-in amount, or?

On Wed, Jan 30, 2013 at 06:35:17PM +0100, Gregory CLEMENT wrote:
> On 01/30/2013 06:33 PM, Jason Cooper wrote:
> > On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
> >> This is the new Armada XP evaluation board from Marvell. It comes with
> >> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> >> Gigabit links.
> >>
> >> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> >> when they become available for Armada XP in mainline.
> >>
> >> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >> ---
> >>  arch/arm/boot/dts/Makefile         |    1 +
> >>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
> >>  2 files changed, 95 insertions(+)
> >>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
> >>
...
> >> +	memory {
> >> +		device_type = "memory";
> >> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
> > 
> > Is this the soldered on the board amount, or the amount with an
> > expandable slot filled?
> 
> It is not soldered, so you can change the amount of memory

Well, there's something we don't encounter too much in the embedded
world.  ;-)  I'm inclined to think the entry here should be the soldered
on amount, and the bootloader would (hypothetically) change the DT to
the probed amount.  But I haven't seen a precedent set yet...

thx,

Jason.
Florian Fainelli Jan. 30, 2013, 7:30 p.m. UTC | #6
On Wednesday 30 January 2013 18:26:14 Gregory CLEMENT wrote:
> This is the new Armada XP evaluation board from Marvell. It comes with
> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> Gigabit links.
> 
> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> when they become available for Armada XP in mainline.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Tested-by: Florian Fainelli <florian@openwrt.org>

The PHY mapping you have is the right one, besides the minor naming in model 
and header comment, this is good, thanks a lot!
Gregory CLEMENT Jan. 31, 2013, 8:50 a.m. UTC | #7
On 01/30/2013 08:30 PM, Florian Fainelli wrote:
> On Wednesday 30 January 2013 18:26:14 Gregory CLEMENT wrote:
>> This is the new Armada XP evaluation board from Marvell. It comes with
>> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
>> Gigabit links.
>>
>> Support for USB (Host and device), SDIO, PCIe will be added as drivers
>> when they become available for Armada XP in mainline.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> 
> Tested-by: Florian Fainelli <florian@openwrt.org>
> 
> The PHY mapping you have is the right one, besides the minor naming in model 
> and header comment, this is good, thanks a lot!
> 
Thanks!
So I am waiting for the official Tested-by from Simon, and I will send a V2
patch with the name fixed and with your tested-by.
Simon Guinot Jan. 31, 2013, 9:20 a.m. UTC | #8
On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
> This is the new Armada XP evaluation board from Marvell. It comes with
> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> Gigabit links.
> 
> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> when they become available for Armada XP in mainline.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  arch/arm/boot/dts/Makefile         |    1 +
>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 95 insertions(+)
>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts

It works fine for me. Thank you for the patch.

Tested-by: Simon Guinot <simon.guinot@sequanux.org>

> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 5ebb44f..51aab4b 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -78,6 +78,7 @@ dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
>  dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
>  	armada-370-mirabox.dtb \
>  	armada-xp-db.dtb \
> +	armada-xp-gp.dtb \
>  	armada-xp-openblocks-ax3-4.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
>  	imx53-ard.dtb \
> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
> new file mode 100644
> index 0000000..85ba642
> --- /dev/null
> +++ b/arch/arm/boot/dts/armada-xp-gp.dts
> @@ -0,0 +1,94 @@
> +/*
> + * Device Tree file for Marvell Armada XP evaluation board
> + * (RD-MV784MP-GP)
> + *
> + * Copyright (C) 2013 Marvell
> + *
> + * Lior Amsalem <alior@marvell.com>
> + * Gregory CLEMENT <gregory.clement@free-electrons.com>
> + * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2.  This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +/dts-v1/;
> +/include/ "armada-xp-mv78460.dtsi"
> +
> +/ {
> +	model = "Marvell Armada XP Evaluation Board: RD-MV784MP-GP";
> +	compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
> +
> +	chosen {
> +		bootargs = "console=ttyS0,115200 earlyprintk";
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
> +	};
> +
> +	soc {
> +		serial@d0012000 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +		serial@d0012100 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +		serial@d0012200 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +		serial@d0012300 {
> +			clock-frequency = <250000000>;
> +			status = "okay";
> +		};
> +
> +		sata@d00a0000 {
> +			nr-ports = <2>;
> +			status = "okay";
> +		};
> +
> +		mdio {
> +			phy0: ethernet-phy@0 {
> +				reg = <16>;
> +			};
> +
> +			phy1: ethernet-phy@1 {
> +				reg = <17>;
> +			};
> +
> +			phy2: ethernet-phy@2 {
> +				reg = <18>;
> +			};
> +
> +			phy3: ethernet-phy@3 {
> +				reg = <19>;
> +			};
> +		};
> +
> +		ethernet@d0070000 {
> +			status = "okay";
> +			phy = <&phy0>;
> +			phy-mode = "rgmii-id";
> +		};
> +		ethernet@d0074000 {
> +			status = "okay";
> +			phy = <&phy1>;
> +			phy-mode = "rgmii-id";
> +		};
> +		ethernet@d0030000 {
> +			status = "okay";
> +			phy = <&phy2>;
> +			phy-mode = "rgmii-id";
> +		};
> +		ethernet@d0034000 {
> +			status = "okay";
> +			phy = <&phy3>;
> +			phy-mode = "rgmii-id";
> +		};
> +	};
> +};
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Andrew Lunn Jan. 31, 2013, 9:50 a.m. UTC | #9
On Wed, Jan 30, 2013 at 01:10:35PM -0500, Jason Cooper wrote:
> 
> Gregory,
> 
> Adding devicetree-discuss.
> 
> Guys, how do you prefer to handle plug-in RAM modules?  describe the
> soldered-in amount, or?
> 
> On Wed, Jan 30, 2013 at 06:35:17PM +0100, Gregory CLEMENT wrote:
> > On 01/30/2013 06:33 PM, Jason Cooper wrote:
> > > On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
> > >> This is the new Armada XP evaluation board from Marvell. It comes with
> > >> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> > >> Gigabit links.
> > >>
> > >> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> > >> when they become available for Armada XP in mainline.
> > >>
> > >> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> > >> ---
> > >>  arch/arm/boot/dts/Makefile         |    1 +
> > >>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
> > >>  2 files changed, 95 insertions(+)
> > >>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
> > >>
> ...
> > >> +	memory {
> > >> +		device_type = "memory";
> > >> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
> > > 
> > > Is this the soldered on the board amount, or the amount with an
> > > expandable slot filled?
> > 
> > It is not soldered, so you can change the amount of memory
> 
> Well, there's something we don't encounter too much in the embedded
> world.  ;-)  I'm inclined to think the entry here should be the soldered
> on amount, and the bootloader would (hypothetically) change the DT to
> the probed amount.  But I haven't seen a precedent set yet...

Hi Jason

We have the same issue with OpenBox AX3. All the devices we have in
our hands have 1GB soldered down, plus 2GB on expansion. The DT
currently has the full 3GB.

However, there has been discussion of reducing this down to 1GB since
both Thomas and Gregory have unstable systems with the full 3GB, but
mine box is stable with the full 3GB. So i don't know how strong a
precedent that sets....

	  Andrew
Thomas Petazzoni Jan. 31, 2013, 10:07 a.m. UTC | #10
Dear Andrew Lunn,

On Thu, 31 Jan 2013 10:50:25 +0100, Andrew Lunn wrote:

> We have the same issue with OpenBox AX3. All the devices we have in
> our hands have 1GB soldered down, plus 2GB on expansion. The DT
> currently has the full 3GB.
> 
> However, there has been discussion of reducing this down to 1GB since
> both Thomas and Gregory have unstable systems with the full 3GB, but
> mine box is stable with the full 3GB. So i don't know how strong a
> precedent that sets....

It seems that if we have CONFIG_ARM_ATAG_DTB_COMPAT, then the code in
arch/arm/boot/compressed/atags_to_fdt.c will update the DT memory node
according to the ATAG_MEM passed by the bootloader.

Best regards,

Thomas
Gregory CLEMENT Jan. 31, 2013, 12:02 p.m. UTC | #11
On 01/31/2013 11:07 AM, Thomas Petazzoni wrote:
> Dear Andrew Lunn,
> 
> On Thu, 31 Jan 2013 10:50:25 +0100, Andrew Lunn wrote:
> 
>> We have the same issue with OpenBox AX3. All the devices we have in
>> our hands have 1GB soldered down, plus 2GB on expansion. The DT
>> currently has the full 3GB.
>>
>> However, there has been discussion of reducing this down to 1GB since
>> both Thomas and Gregory have unstable systems with the full 3GB, but
>> mine box is stable with the full 3GB. So i don't know how strong a
>> precedent that sets....
> 
> It seems that if we have CONFIG_ARM_ATAG_DTB_COMPAT, then the code in
> arch/arm/boot/compressed/atags_to_fdt.c will update the DT memory node
> according to the ATAG_MEM passed by the bootloader.
> 

From my point of view these dts file are just given as reference, and the
bootloader should be able to modify them on the fly according the hardware
configuration of the board.

And for old bootloader then we can use the CONFIG_ARM_ATAG_DTB_COMPAT as
pointed by Thomas.

So I am not sure that the amount of memory is very important.

However I think that having a value by default is useful, so unless
there is a strong argument against it, I would like to keep it, maybe with
a comment in the dts to emphasize that it is just a default value and the
amount of memory can be changed.


> Best regards,
> 
> Thomas
>
Gregory CLEMENT Jan. 31, 2013, 12:07 p.m. UTC | #12
On 01/30/2013 07:10 PM, Jason Cooper wrote:
> 
> Gregory,
> 
> Adding devicetree-discuss.

I should have added it in in CC in my first version

> 
> Guys, how do you prefer to handle plug-in RAM modules?  describe the
> soldered-in amount, or?
> 
> On Wed, Jan 30, 2013 at 06:35:17PM +0100, Gregory CLEMENT wrote:
>> On 01/30/2013 06:33 PM, Jason Cooper wrote:
>>> On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
>>>> This is the new Armada XP evaluation board from Marvell. It comes with
>>>> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
>>>> Gigabit links.
>>>>
>>>> Support for USB (Host and device), SDIO, PCIe will be added as drivers
>>>> when they become available for Armada XP in mainline.
>>>>
>>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>>> ---
>>>>  arch/arm/boot/dts/Makefile         |    1 +
>>>>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>>>>  2 files changed, 95 insertions(+)
>>>>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
>>>>
> ...
>>>> +	memory {
>>>> +		device_type = "memory";
>>>> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
>>>
>>> Is this the soldered on the board amount, or the amount with an
>>> expandable slot filled?
>>
>> It is not soldered, so you can change the amount of memory
> 
> Well, there's something we don't encounter too much in the embedded
> world.  ;-)  I'm inclined to think the entry here should be the soldered
> on amount, and the bootloader would (hypothetically) change the DT to
> the probed amount.  But I haven't seen a precedent set yet...

Well on this board there is no soldered memory at all.

> 
> thx,
> 
> Jason.
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Jason Cooper Jan. 31, 2013, 12:44 p.m. UTC | #13
On Thu, Jan 31, 2013 at 01:02:00PM +0100, Gregory CLEMENT wrote:
> On 01/31/2013 11:07 AM, Thomas Petazzoni wrote:
> > Dear Andrew Lunn,
> > 
> > On Thu, 31 Jan 2013 10:50:25 +0100, Andrew Lunn wrote:
> > 
> >> We have the same issue with OpenBox AX3. All the devices we have in
> >> our hands have 1GB soldered down, plus 2GB on expansion. The DT
> >> currently has the full 3GB.
> >>
> >> However, there has been discussion of reducing this down to 1GB since
> >> both Thomas and Gregory have unstable systems with the full 3GB, but
> >> mine box is stable with the full 3GB. So i don't know how strong a
> >> precedent that sets....
> > 
> > It seems that if we have CONFIG_ARM_ATAG_DTB_COMPAT, then the code in
> > arch/arm/boot/compressed/atags_to_fdt.c will update the DT memory node
> > according to the ATAG_MEM passed by the bootloader.
> > 
> 
> From my point of view these dts file are just given as reference, and the
> bootloader should be able to modify them on the fly according the hardware
> configuration of the board.
> 
> And for old bootloader then we can use the CONFIG_ARM_ATAG_DTB_COMPAT as
> pointed by Thomas.
> 
> So I am not sure that the amount of memory is very important.
> 
> However I think that having a value by default is useful, so unless
> there is a strong argument against it, I would like to keep it, maybe with
> a comment in the dts to emphasize that it is just a default value and the
> amount of memory can be changed.

Let's go with the comment.  Upgradeable memory is still fairly uncommon
in embedded, it won't hurt to let folks know the bootloader will set it
(hopefully) correctly.

thx,

Jason.
Jason Cooper Jan. 31, 2013, 12:45 p.m. UTC | #14
On Thu, Jan 31, 2013 at 01:07:35PM +0100, Gregory CLEMENT wrote:
> On 01/30/2013 07:10 PM, Jason Cooper wrote:
> > 
> > Gregory,
> > 
> > Adding devicetree-discuss.
> 
> I should have added it in in CC in my first version
> 
> > 
> > Guys, how do you prefer to handle plug-in RAM modules?  describe the
> > soldered-in amount, or?
> > 
> > On Wed, Jan 30, 2013 at 06:35:17PM +0100, Gregory CLEMENT wrote:
> >> On 01/30/2013 06:33 PM, Jason Cooper wrote:
> >>> On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
> >>>> This is the new Armada XP evaluation board from Marvell. It comes with
> >>>> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
> >>>> Gigabit links.
> >>>>
> >>>> Support for USB (Host and device), SDIO, PCIe will be added as drivers
> >>>> when they become available for Armada XP in mainline.
> >>>>
> >>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >>>> ---
> >>>>  arch/arm/boot/dts/Makefile         |    1 +
> >>>>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
> >>>>  2 files changed, 95 insertions(+)
> >>>>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
> >>>>
> > ...
> >>>> +	memory {
> >>>> +		device_type = "memory";
> >>>> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
> >>>
> >>> Is this the soldered on the board amount, or the amount with an
> >>> expandable slot filled?
> >>
> >> It is not soldered, so you can change the amount of memory
> > 
> > Well, there's something we don't encounter too much in the embedded
> > world.  ;-)  I'm inclined to think the entry here should be the soldered
> > on amount, and the bootloader would (hypothetically) change the DT to
> > the probed amount.  But I haven't seen a precedent set yet...
> 
> Well on this board there is no soldered memory at all.

So it has two slots? 1GB and 2GB?

thx,

Jason.
Gregory CLEMENT Jan. 31, 2013, 12:50 p.m. UTC | #15
On 01/31/2013 01:45 PM, Jason Cooper wrote:
> On Thu, Jan 31, 2013 at 01:07:35PM +0100, Gregory CLEMENT wrote:
>> On 01/30/2013 07:10 PM, Jason Cooper wrote:
>>>
>>> Gregory,
>>>
>>> Adding devicetree-discuss.
>>
>> I should have added it in in CC in my first version
>>
>>>
>>> Guys, how do you prefer to handle plug-in RAM modules?  describe the
>>> soldered-in amount, or?
>>>
>>> On Wed, Jan 30, 2013 at 06:35:17PM +0100, Gregory CLEMENT wrote:
>>>> On 01/30/2013 06:33 PM, Jason Cooper wrote:
>>>>> On Wed, Jan 30, 2013 at 06:26:14PM +0100, Gregory CLEMENT wrote:
>>>>>> This is the new Armada XP evaluation board from Marvell. It comes with
>>>>>> a RS232 port over USB, a SATA link, an internal SSD, 4 Ethernet
>>>>>> Gigabit links.
>>>>>>
>>>>>> Support for USB (Host and device), SDIO, PCIe will be added as drivers
>>>>>> when they become available for Armada XP in mainline.
>>>>>>
>>>>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>>>>> ---
>>>>>>  arch/arm/boot/dts/Makefile         |    1 +
>>>>>>  arch/arm/boot/dts/armada-xp-gp.dts |   94 ++++++++++++++++++++++++++++++++++++
>>>>>>  2 files changed, 95 insertions(+)
>>>>>>  create mode 100644 arch/arm/boot/dts/armada-xp-gp.dts
>>>>>>
>>> ...
>>>>>> +	memory {
>>>>>> +		device_type = "memory";
>>>>>> +		reg = <0x00000000 0xC0000000>; /* 3 GB */
>>>>>
>>>>> Is this the soldered on the board amount, or the amount with an
>>>>> expandable slot filled?
>>>>
>>>> It is not soldered, so you can change the amount of memory
>>>
>>> Well, there's something we don't encounter too much in the embedded
>>> world.  ;-)  I'm inclined to think the entry here should be the soldered
>>> on amount, and the bootloader would (hypothetically) change the DT to
>>> the probed amount.  But I haven't seen a precedent set yet...
>>
>> Well on this board there is no soldered memory at all.
> 
> So it has two slots? 1GB and 2GB?

Well in fact it is 4GB RAM but we can only use 3GB (we need the last GB
of address space for peripheral, CPU registers and IOmem).

There is only one slot.

> 
> thx,
> 
> Jason.
>
Jason Cooper Jan. 31, 2013, 12:52 p.m. UTC | #16
On Thu, Jan 31, 2013 at 01:50:35PM +0100, Gregory CLEMENT wrote:
> On 01/31/2013 01:45 PM, Jason Cooper wrote:
> > On Thu, Jan 31, 2013 at 01:07:35PM +0100, Gregory CLEMENT wrote:
> >> Well on this board there is no soldered memory at all.
> > 
> > So it has two slots? 1GB and 2GB?
> 
> Well in fact it is 4GB RAM but we can only use 3GB (we need the last GB
> of address space for peripheral, CPU registers and IOmem).
> 
> There is only one slot.

Ok, thanks.

Jason.
Andrew Lunn Jan. 31, 2013, 4:22 p.m. UTC | #17
> Well in fact it is 4GB RAM but we can only use 3GB (we need the last GB
> of address space for peripheral, CPU registers and IOmem).

Hi Gregory

Does the CPU support Large Physical Addressing, LPA? Is that on the
roadmap for Armada?

	Andrew
Andrew Lunn Jan. 31, 2013, 4:38 p.m. UTC | #18
On Thu, Jan 31, 2013 at 05:22:54PM +0100, Andrew Lunn wrote:
> > Well in fact it is 4GB RAM but we can only use 3GB (we need the last GB
> > of address space for peripheral, CPU registers and IOmem).
> 
> Hi Gregory
> 
> Does the CPU support Large Physical Addressing, LPA? Is that on the
> roadmap for Armada?

I did a bit of googling:

http://www.linleygroup.com/newsletters/newsletter_detail.php?num=3982

	To address the cloud-computing market, the company added
	40-bit physical addressing to Armada XP, using a method
	similar to what ARM implemented in Cortex-A15. This feature
	allows the memory controller to support up to one terabyte
	(1TB) of DRAM.

Also:

http://www.theregister.co.uk/2012/10/24/dell_zinc_arm_server_apache_software/

talks about 40-bit.

So it should be possible to use the full 4GBytes of RAM, in theory.

   Andrew
Arnd Bergmann Jan. 31, 2013, 9:08 p.m. UTC | #19
On Thursday 31 January 2013, Andrew Lunn wrote:
> I did a bit of googling:
> 
> http://www.linleygroup.com/newsletters/newsletter_detail.php?num=3982
> 
>         To address the cloud-computing market, the company added
>         40-bit physical addressing to Armada XP, using a method
>         similar to what ARM implemented in Cortex-A15. This feature
>         allows the memory controller to support up to one terabyte
>         (1TB) of DRAM.
> 
> Also:
> 
> http://www.theregister.co.uk/2012/10/24/dell_zinc_arm_server_apache_software/
> 
> talks about 40-bit.
> 
> So it should be possible to use the full 4GBytes of RAM, in theory.

But is it actually using the same page table layout as LPAE or just
something "similar"?

Note that there is also 36-bit addressing in certain CPUs, which is
far less useful in general, but which could actually help here if you
can remap the MMIO registers above 4GB to free up the 32-bit space
for RAM.

	Arnd
diff mbox

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 5ebb44f..51aab4b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -78,6 +78,7 @@  dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
 	armada-370-mirabox.dtb \
 	armada-xp-db.dtb \
+	armada-xp-gp.dtb \
 	armada-xp-openblocks-ax3-4.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
 	imx53-ard.dtb \
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
new file mode 100644
index 0000000..85ba642
--- /dev/null
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -0,0 +1,94 @@ 
+/*
+ * Device Tree file for Marvell Armada XP evaluation board
+ * (RD-MV784MP-GP)
+ *
+ * Copyright (C) 2013 Marvell
+ *
+ * Lior Amsalem <alior@marvell.com>
+ * Gregory CLEMENT <gregory.clement@free-electrons.com>
+ * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+/dts-v1/;
+/include/ "armada-xp-mv78460.dtsi"
+
+/ {
+	model = "Marvell Armada XP Evaluation Board: RD-MV784MP-GP";
+	compatible = "marvell,axp-db", "marvell,armadaxp-mv78460", "marvell,armadaxp", "marvell,armada-370-xp";
+
+	chosen {
+		bootargs = "console=ttyS0,115200 earlyprintk";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0xC0000000>; /* 3 GB */
+	};
+
+	soc {
+		serial@d0012000 {
+			clock-frequency = <250000000>;
+			status = "okay";
+		};
+		serial@d0012100 {
+			clock-frequency = <250000000>;
+			status = "okay";
+		};
+		serial@d0012200 {
+			clock-frequency = <250000000>;
+			status = "okay";
+		};
+		serial@d0012300 {
+			clock-frequency = <250000000>;
+			status = "okay";
+		};
+
+		sata@d00a0000 {
+			nr-ports = <2>;
+			status = "okay";
+		};
+
+		mdio {
+			phy0: ethernet-phy@0 {
+				reg = <16>;
+			};
+
+			phy1: ethernet-phy@1 {
+				reg = <17>;
+			};
+
+			phy2: ethernet-phy@2 {
+				reg = <18>;
+			};
+
+			phy3: ethernet-phy@3 {
+				reg = <19>;
+			};
+		};
+
+		ethernet@d0070000 {
+			status = "okay";
+			phy = <&phy0>;
+			phy-mode = "rgmii-id";
+		};
+		ethernet@d0074000 {
+			status = "okay";
+			phy = <&phy1>;
+			phy-mode = "rgmii-id";
+		};
+		ethernet@d0030000 {
+			status = "okay";
+			phy = <&phy2>;
+			phy-mode = "rgmii-id";
+		};
+		ethernet@d0034000 {
+			status = "okay";
+			phy = <&phy3>;
+			phy-mode = "rgmii-id";
+		};
+	};
+};