Skip to contentSkip to conversation

arm: mvebu: support for the PlatHome OpenBlocks AX3 board

PATCH New Thomas Petazzoni 7 participants 17 messages Oct 23, 2012 – Dec 16, 2012

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

This platform, available in Japan from PlatHome, has a dual-core Armada XP, the MV78260. For now, only the two serial ports and the three front LEDs are supported. Support for network, SATA, USB and other peripherals will be added as drivers for them become available for Armada XP in mainline.

---
This is 3.8 material.

---
 arch/arm/boot/dts/Makefile           |    3 +-
 arch/arm/boot/dts/openblocks-ax3.dts |   69 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-mvebu/armada-370-xp.c  |    1 +
 3 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/openblocks-ax3.dts
arch/arm/boot/dts/Makefile +2 -1
index f37cf9f..b7814b9 100644
@@ -44,7 +44,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
 dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 	msm8960-cdp.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
-	armada-xp-db.dtb
+	armada-xp-db.dtb \
+	openblocks-ax3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
 	imx53-ard.dtb \
 	imx53-evk.dtb \
arch/arm/boot/dts/openblocks-ax3.dts new file +69 -0

69 lines not on this page · raw message

arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..cd2717b 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3",
 	NULL,
 };
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

arch/arm/mach-mvebu/armada-370-xp.c static void __init armada_370_xp_dt_init(void) · line 54

Quoted 11 lines
arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..cd2717b 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3",
 	NULL,
 };

Hi Thomas

You will get less merge conflicts with new boards if you keep this list sorted.

Andrew

#2 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Dear Andrew Lunn,

Quoted 14 lines · Andrew Lunn

arch/arm/mach-mvebu/armada-370-xp.c static void __init armada_370_xp_dt_init(void) · line 54

Quoted 11 lines
arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..cd2717b 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3",
 	NULL,
 };

Hi Thomas

Quoted 2 lines

You will get less merge conflicts with new boards if you keep this list sorted.

Hum, right, but isn't "plathome" after "marvell" when sorted alphabetically? Or maybe I don't get which kind of sorting you are referring to?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Quoted 17 lines · Thomas Petazzoni

Dear Andrew Lunn,

Quoted 14 lines · Andrew Lunn

arch/arm/mach-mvebu/armada-370-xp.c static void __init armada_370_xp_dt_init(void) · line 54

Quoted 11 lines
arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..cd2717b 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3",
 	NULL,
 };

Hi Thomas

Quoted 6 lines
Quoted 2 lines

You will get less merge conflicts with new boards if you keep this list sorted.

Hum, right, but isn't "plathome" after "marvell" when sorted alphabetically? Or maybe I don't get which kind of sorting you are referring to?

No, no, no. marvell, /then/ NULL, /then/ plathome. ;-) Right, Andrew?

thx,

Jason.

#4 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

In reply to Thomas Petazzoni
Quoted 5 lines · Thomas Petazzoni

This platform, available in Japan from PlatHome, has a dual-core Armada XP, the MV78260. For now, only the two serial ports and the three front LEDs are supported. Support for network, SATA, USB and other peripherals will be added as drivers for them become available for Armada XP in mainline.

And don't forget the SMP support too, MV78260 is supposed to have 2 cores.

Besides this, this patch looks good. I have applied it on a v3.7-rc2 without any problem, and managed to build it also.
So you can add my

Quoted 114 lines

---
This is 3.8 material.

---
 arch/arm/boot/dts/Makefile           |    3 +-
 arch/arm/boot/dts/openblocks-ax3.dts |   69 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-mvebu/armada-370-xp.c  |    1 +
 3 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/openblocks-ax3.dts
arch/arm/boot/dts/Makefile +2 -1
index f37cf9f..b7814b9 100644
@@ -44,7 +44,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
 dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 	msm8960-cdp.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
-	armada-xp-db.dtb
+	armada-xp-db.dtb \
+	openblocks-ax3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
 	imx53-ard.dtb \
 	imx53-evk.dtb \
arch/arm/boot/dts/openblocks-ax3.dts new file +69 -0
new file mode 100644
index 0000000..f757116
@@ -0,0 +1,69 @@
+/*
+ * Device Tree file for OpenBlocks AX3 board
+ *
+ * Copyright (C) 2012 Marvell
+ *
+ * Thomas Petazzoni <[email protected]>
+ *
+ * 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-mv78260.dtsi"
+
+/ {
+	model = "PlatHome OpenBlocks AX3 board";
+	compatible = "plathome,openblocks-ax3", "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp";
+
+	chosen {
+		bootargs = "console=ttyS0,115200 earlyprintk";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x40000000>; /* 1 GB */
+	};
+
+	soc {
+		serial at d0012000 {
+			clock-frequency = <250000000>;
+			status = "okay";
+		};
+		serial at d0012100 {
+			clock-frequency = <250000000>;
+			status = "okay";
+		};
+		pinctrl {
+			led_pins: led-pins-0 {
+				  marvell,pins = "mpp49", "mpp51", "mpp53";
+				  marvell,function = "gpio";
+			};
+		};
+		leds {
+		        compatible = "gpio-leds";
+			pinctrl-names = "default";
+			pinctrl-0 = <&led_pins>;
+
+			red_led {
+				   label = "red_led";
+				   gpios = <&gpio1 17 1>;
+				   default-state = "off";
+			};
+
+			yellow_led {
+				   label = "yellow_led";
+				   gpios = <&gpio1 19 1>;
+				   default-state = "off";
+			};
+
+			green_led {
+				   label = "green_led";
+				   gpios = <&gpio1 21 1>;
+				   default-state = "off";
+				   linux,default-trigger = "heartbeat";
+			};
+		};
+	};
+};
arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..cd2717b 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3",
 	NULL,
 };
 
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Dear Gregory CLEMENT,

Quoted 7 lines · Gregory CLEMENT
Quoted 5 lines · Thomas Petazzoni

This platform, available in Japan from PlatHome, has a dual-core Armada XP, the MV78260. For now, only the two serial ports and the three front LEDs are supported. Support for network, SATA, USB and other peripherals will be added as drivers for them become available for Armada XP in mainline.

And don't forget the SMP support too, MV78260 is supposed to have 2 cores.

Sure. My plan is to progressively add support for other devices and features (SMP included) as we get them merged in mainline.

Quoted 4 lines

Besides this, this patch looks good. I have applied it on a v3.7-rc2 without any problem, and managed to build it also.
So you can add my

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
maintainer
#6 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

In reply to Thomas Petazzoni
Quoted 54 lines · Thomas Petazzoni

This platform, available in Japan from PlatHome, has a dual-core Armada XP, the MV78260. For now, only the two serial ports and the three front LEDs are supported. Support for network, SATA, USB and other peripherals will be added as drivers for them become available for Armada XP in mainline.

---
This is 3.8 material.

---
 arch/arm/boot/dts/Makefile           |    3 +-
 arch/arm/boot/dts/openblocks-ax3.dts |   69 ++++++++++++++++++++++++++++++++++
 arch/arm/mach-mvebu/armada-370-xp.c  |    1 +
 3 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/openblocks-ax3.dts
arch/arm/boot/dts/Makefile +2 -1
index f37cf9f..b7814b9 100644
@@ -44,7 +44,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
 dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 	msm8960-cdp.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
-	armada-xp-db.dtb
+	armada-xp-db.dtb \
+	openblocks-ax3.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
 	imx53-ard.dtb \
 	imx53-evk.dtb \
arch/arm/boot/dts/openblocks-ax3.dts new file +17 -0
new file mode 100644
index 0000000..f757116
@@ -0,0 +1,69 @@
+/*
+ * Device Tree file for OpenBlocks AX3 board
+ *
+ * Copyright (C) 2012 Marvell
+ *
+ * Thomas Petazzoni <[email protected]>
+ *
+ * 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-mv78260.dtsi"
+
+/ {
+	model = "PlatHome OpenBlocks AX3 board";

arch/arm/boot/dts/openblocks-ax3.dts line 27

Quoted 10 lines
arch/arm/boot/dts/openblocks-ax3.dts new file +10 -0
+	compatible = "plathome,openblocks-ax3", "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp";
+
+	chosen {
+		bootargs = "console=ttyS0,115200 earlyprintk";
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x40000000>; /* 1 GB */
+	};

Hi Thomas

There are two variants of this box, ax3/2 and ax3/4. The ax3/4 can have more RAM and has a mini pci express slot. Do you expect both boards to be supported with one dts file?

Thanks
Andrew

#7 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Andrew,

Quoted 3 lines · Andrew Lunn

There are two variants of this box, ax3/2 and ax3/4. The ax3/4 can have more RAM and has a mini pci express slot. Do you expect both boards to be supported with one dts file?

I have the ax3/4 version apparently.

So, we can have the following possible schemes:

+ openblocks-ax3.dtsi
+ openblocks-ax3-2.dts
+ openblocks-ax3-4.dts

But I am not sure if using a .dtsi to factorize things common between multiple boards is OK. Or we can do:

+ openblocks-ax3-2.dts
+ openblocks-ax3-4.dts

With openblocks-ax3-4.dts being the simple addition of PCIe slot + more RAM. That said, I don't have the ax3/2 board anyway, so should we plan for something that nobody can test at the moment, or wait for someone to get a ax3/2 board, and therefore be able to do the testing? I think I prefer to submit dts files that are know to work and have been tested on hardware that we have.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
maintainer
#8 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Quoted 22 lines · Thomas Petazzoni

Andrew,

Quoted 3 lines · Andrew Lunn

There are two variants of this box, ax3/2 and ax3/4. The ax3/4 can have more RAM and has a mini pci express slot. Do you expect both boards to be supported with one dts file?

I have the ax3/4 version apparently.

So, we can have the following possible schemes:

+ openblocks-ax3.dtsi
+ openblocks-ax3-2.dts
+ openblocks-ax3-4.dts

But I am not sure if using a .dtsi to factorize things common between multiple boards is OK. Or we can do:

+ openblocks-ax3-2.dts
+ openblocks-ax3-4.dts

Quoted 6 lines

With openblocks-ax3-4.dts being the simple addition of PCIe slot + more RAM. That said, I don't have the ax3/2 board anyway, so should we plan for something that nobody can test at the moment, or wait for someone to get a ax3/2 board, and therefore be able to do the testing? I think I prefer to submit dts files that are know to work and have been tested on hardware that we have.

Hi Thomas

I agree with the last point. So maybe have a openblocks-ax3-4.dts and set the compatibility string to plathome,openblocks-ax3-4.

When somebody gets a ax3/2, they can refactor the common DT into a dtsi file without causing any compatibility issues.

Andrew

#9 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Andrew,

Quoted 5 lines · Andrew Lunn

I agree with the last point. So maybe have a openblocks-ax3-4.dts and set the compatibility string to plathome,openblocks-ax3-4.

When somebody gets a ax3/2, they can refactor the common DT into a dtsi file without causing any compatibility issues.

Ok, I'll repost with this update. Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#10 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

In reply to Thomas Petazzoni

Hi,

2012/10/24 Thomas Petazzoni <[email protected]>:

Quoted 6 lines

With openblocks-ax3-4.dts being the simple addition of PCIe slot + more RAM. That said, I don't have the ax3/2 board anyway, so should we plan for something that nobody can test at the moment, or wait for someone to get a ax3/2 board, and therefore be able to do the testing? I think I prefer to submit dts files that are know to work and have been tested on hardware that we have.

I got an ax3/2 device, I would not mind to test any changes? Are you aware of which changes should I apply to dtsi file to work on ax3-2 device?

regards,

Signature · 1 line
 H?ctor Or?n  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . .-.
#11 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Dear Hector Oron,

Quoted 3 lines · Hector Oron

I got an ax3/2 device, I would not mind to test any changes? Are you aware of which changes should I apply to dtsi file to work on ax3-2 device?

If I'm correct, the differences between AX-2 and AX3-4 is:

* AX3-2 has two Ethernet interfaces, while AX3-4 has four Ethernet interfaces

* AX3-4 is in standard mounted with a 2 GB additional DRAM in a SO-DIMM slot, while the AX3-2 is not. However, it is not clear if the SO-DIMM slot is present or not on the AX3-2 (could you confirm this?).

* AX3-2 does not have a mini PCIe slot, while AX3-4 has one.

So I guess you could create a separate armada-xp-openblocks-ax3-2.dts file to support this new board. Maybe at some point it will make sense to have a common armada-xp-openblocks-ax3.dtsi that both board .dts includes.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#12 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Quoted 16 lines · Thomas Petazzoni
Quoted 3 lines · Hector Oron

I got an ax3/2 device, I would not mind to test any changes? Are you aware of which changes should I apply to dtsi file to work on ax3-2 device?

If I'm correct, the differences between AX-2 and AX3-4 is:

* AX3-2 has two Ethernet interfaces, while AX3-4 has four Ethernet interfaces

* AX3-4 is in standard mounted with a 2 GB additional DRAM in a SO-DIMM slot, while the AX3-2 is not. However, it is not clear if the SO-DIMM slot is present or not on the AX3-2 (could you confirm this?).

Quoted 6 lines

* AX3-2 does not have a mini PCIe slot, while AX3-4 has one.

So I guess you could create a separate armada-xp-openblocks-ax3-2.dts file to support this new board. Maybe at some point it will make sense to have a common armada-xp-openblocks-ax3.dtsi that both board .dts includes.

Adding plathome to the email list to see if they can offer any concrete answers.

thx,

Jason.

#13 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Dear Jason and all,

Thank you for adding us to the email list.

Thomas is correct. The differences between AX3-2 and AX3-4 are only 3 as following.

AX3-2 AX3-4
No. of ethernet interface 2 4
SO-DIMM slot none 1
mini PCIe slot none 1

I delite Mr. Matumoto from the list since he quit Plat'Home already and I am his successor. Please just remain "eg@". It is a mailing list including our development section. Thank you.

Kind regards,
Mio Watanabe

????????????????????????
Plat'Home Co., Ltd.
Product Marketing Dept.
Nihon Building Kudanbekkan 3F
4-1-3 Kudankita, Chiyoda-ku, Tokyo
102-0073 Japan
TEL: ++81 (0) 3 5213 4373
FAX: ++81 (0) 3 3221-0882
E-mail : m-watanabe at plathome.co.jp

Quoted 30 lines · On Tue, 27 Nov 2012 08:00:35 -0500 Jason Cooper <[email protected]> wrote:
Quoted 16 lines · Thomas Petazzoni
Quoted 3 lines · Hector Oron

I got an ax3/2 device, I would not mind to test any changes? Are you aware of which changes should I apply to dtsi file to work on ax3-2 device?

If I'm correct, the differences between AX-2 and AX3-4 is:

* AX3-2 has two Ethernet interfaces, while AX3-4 has four Ethernet interfaces

* AX3-4 is in standard mounted with a 2 GB additional DRAM in a SO-DIMM slot, while the AX3-2 is not. However, it is not clear if the SO-DIMM slot is present or not on the AX3-2 (could you confirm this?).

Quoted 6 lines

* AX3-2 does not have a mini PCIe slot, while AX3-4 has one.

So I guess you could create a separate armada-xp-openblocks-ax3-2.dts file to support this new board. Maybe at some point it will make sense to have a common armada-xp-openblocks-ax3.dtsi that both board .dts includes.

Adding plathome to the email list to see if they can offer any concrete answers.

thx,

Jason.

#14 lore raw

PATCH 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3 board

Hello,

Quoted 8 lines
Quoted 8 lines · Thomas Petazzoni
Quoted 7 lines · Hector Oron
Quoted 4 lines

I got an ax3/2 device, I would not mind to test any changes? Are you aware of which changes should I apply to dtsi file to work on ax3-2 device?

If I'm correct, the differences between AX-2 and AX3-4 is:

Apologies for confusion, while the box I had referenced AX3/2, the machine inside is a AX3/4. So, currently I am trying to test Linus' tree which has merged your patchsets.

Best regards,

Signature · 1 line
 H?ctor Or?n  -.. . -... .. .- -.   -.. . ...- . .-.. --- .--. . .-.
#15 lore raw

PATCH v2 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3-4 board

In reply to Thomas Petazzoni

This platform, available in Japan from PlatHome, has a dual-core Armada XP, the MV78260. For now, only the two serial ports and the three front LEDs are supported. Support for SMP, network, SATA, USB and other peripherals will be added as drivers for them become available for Armada XP in mainline.

---
This is 3.8 material.

Changes since v1:

* Renamed the board to OpenBlocks AX3-4, since there is a variant called AX3-2 which has less RAM, and no mini PCIe port. Requested by Andrew Lunn.

* Fix the amount of memory to 3 GB. In fact, the board has 1 GB soldered, and 2 GB in a SODIMM slot (which is therefore removable). But as the board is delivered as is, we'll assume it has 3 GB of memory by default.

---
 arch/arm/boot/dts/Makefile             |    3 +-
 arch/arm/boot/dts/openblocks-ax3-4.dts |   69 ++++++++++++++++++++++++++++++++
 arch/arm/mach-mvebu/armada-370-xp.c    |    1 +
 3 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/openblocks-ax3-4.dts
arch/arm/boot/dts/Makefile +2 -1
index f37cf9f..6f2a25d 100644
@@ -44,7 +44,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
 dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
 	msm8960-cdp.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
-	armada-xp-db.dtb
+	armada-xp-db.dtb \
+	openblocks-ax3-4.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx51-babbage.dtb \
 	imx53-ard.dtb \
 	imx53-evk.dtb \
arch/arm/boot/dts/openblocks-ax3-4.dts new file +69 -0

69 lines not on this page · raw message

arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..68f1483 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3-4",
 	NULL,
 };
 
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH v2 1/1 arm: mvebu: support for the PlatHome OpenBlocks AX3-4 board

Quoted 1 line · Thomas Petazzoni
arch/arm/boot/dts/openblocks-ax3-4.dts new file +1 -0
+	compatible = "plathome,openblocks-ax3-4", "marvell,armadaxp-mv78260", "marvell,armadaxp", "marvell,armada-370-xp";

[...]

arch/arm/mach-mvebu/armada-370-xp.c static void __init armada_370_xp_dt_init(void) · line 54

Quoted 11 lines
arch/arm/mach-mvebu/armada-370-xp.c +1 -0
index 49d7915..68f1483 100644
@@ -49,6 +49,7 @@ static void __init armada_370_xp_dt_init(void)
 static const char * const armada_370_xp_dt_board_dt_compat[] = {
 	"marvell,a370-db",
 	"marvell,axp-db",
+	"plathome,openblocks-ax3-4",
 	NULL,
 };

Hi,

One of the big benefits of device trees is to, in a perfect world, having to avoid adding new C code for a new board. It seems like this compatible array should contain one of the more generic compatible fields instead, and you should then have each board dts specify that as a fallback. It looks like you already list those in the board dts file, so you're good at that end.

Would that work?

Also, I can't tell for sure but it seems like the list of compatibles in the board dts go from specific to generic, i.e. if "marvell,armadaxp" is less generic than "marvell,armada-370-xp".

-Olof