Skip to contentSkip to conversation

Add support for MacchiatoBin board

PATCH Superseded Sergey Matyukevich 6 participants 31 messages Nov 12, 2017 – Nov 15, 2017

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover Add support for MacchiatoBin board

Hi all,

This patchset adds support for SolidRun MacchiatoBin board based on Marvell Armada 8040 SoC. For convenience the following two different build configurations are added:

- mainline BSP
mainline Linux v4.13.11 and U-Boot v2017.09

- vendor BSP (enables more hardware)
BSP from Marvell based on Linux 4.4.52 and U-Boot v2017.03

Patches are rebased on top of next branch.

Regards,
Sergey

Sergey Matyukevich (5):
armada-firmware: new package
armada-ddr: new package
atf: add support for Marvell Armada SoCs solidrun/macchiatobin: add new board
DEVELOPERS: add myself to MacchiatoBin releated packages

 DEVELOPERS                                        |    6 +
 board/solidrun/macchiatobin/genimage.cfg          |   16 +++++
 board/solidrun/macchiatobin/readme.txt            |   70 ++++++++++++++++++++++
 boot/Config.in                                    |    2 
 boot/arm-trusted-firmware/arm-trusted-firmware.mk |   13 ++++
 boot/armada-ddr/Config.in                         |   16 +++++
 boot/armada-ddr/armada-ddr.hash                   |    2 
 boot/armada-ddr/armada-ddr.mk                     |   20 ++++++
 boot/armada-firmware/Config.in                    |   19 +++++
 boot/armada-firmware/armada-firmware.hash         |    2 
 boot/armada-firmware/armada-firmware.mk           |   18 +++++
 configs/solidrun_macchiatobin_mainline_defconfig  |   46 ++++++++++++++
 configs/solidrun_macchiatobin_marvell_defconfig   |   48 +++++++++++++++
 13 files changed, 278 insertions(+)
#1 lore raw

PATCH 1/5 armada-firmware: new package

This package adds SCP BL2 firmware for Marvell Armada 7040 and 8040 SoCs.

---
 boot/Config.in                            |  1 +
 boot/armada-firmware/Config.in            | 19 +++++++++++++++++++
 boot/armada-firmware/armada-firmware.hash |  2 ++
 boot/armada-firmware/armada-firmware.mk   | 18 ++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/armada-firmware/Config.in
 create mode 100644 boot/armada-firmware/armada-firmware.hash
 create mode 100644 boot/armada-firmware/armada-firmware.mk
boot/Config.in +1 -0
index 2f46c8546e..0ffbd7288b 100644
@@ -17,5 +17,6 @@ source "boot/ts4800-mbrboot/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
+source "boot/armada-firmware/Config.in"
 
 endmenu
boot/armada-firmware/Config.in new file +19 -0
new file mode 100644
index 0000000000..530b5622c8
@@ -0,0 +1,19 @@
+config BR2_TARGET_ARMADA_FIRMWARE
+	bool "armada-firmware"
+	depends on BR2_aarch64
+	help
+	  Marvell Armada SCP BL2 firmware images.
+
+if BR2_TARGET_ARMADA_FIRMWARE
+
+config BR2_TARGET_ARMADA_FIRMWARE_IMAGE
+	string "Armada SCP BL2 image name"
+	help
+	  Armada SCP BL2 firmware image name.
+
+config BR2_TARGET_ARMADA_FIRMWARE_VERSION
+	string "Armada SCP BL2 image version"
+	help
+	  Armada SCP BL2 firmware image version.
+
+endif
boot/armada-firmware/armada-firmware.hash new file +2 -0
new file mode 100644
index 0000000000..5eeca9d6ea
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 b310443c0d51d07b7c11597548685ae608b8478eee7095925427da6ab71e0168 armada-firmware-binaries-marvell-armada-17.10.tar.gz
boot/armada-firmware/armada-firmware.mk new file +18 -0
new file mode 100644
index 0000000000..d75dc7cb6c
@@ -0,0 +1,18 @@
+################################################################################
+#
+# Marvell Armada SCP BL2 firmware images
+#
+################################################################################
+
+ARMADA_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_VERSION))
+ARMADA_FIRMWARE_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(ARMADA_FIRMWARE_VERSION))
+ARMADA_FIRMWARE_LICENSE = Proprietary
+
+ARMADA_FIRMWARE_INSTALL_IMAGES  = YES
+
+define ARMADA_FIRMWARE_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_7040.img $(BINARIES_DIR)/mrvl_scp_bl2_7040.img
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_8040.img $(BINARIES_DIR)/mrvl_scp_bl2_8040.img
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/5 armada-firmware: new package

Hi Sergey,

Quoted 32 lines · Sergey Matyukevich

This package adds SCP BL2 firmware for Marvell Armada 7040 and 8040 SoCs.

---
 boot/Config.in                            |  1 +
 boot/armada-firmware/Config.in            | 19 +++++++++++++++++++
 boot/armada-firmware/armada-firmware.hash |  2 ++
 boot/armada-firmware/armada-firmware.mk   | 18 ++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/armada-firmware/Config.in
 create mode 100644 boot/armada-firmware/armada-firmware.hash
 create mode 100644 boot/armada-firmware/armada-firmware.mk
boot/Config.in +1 -0
index 2f46c8546e..0ffbd7288b 100644
@@ -17,5 +17,6 @@ source "boot/ts4800-mbrboot/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
+source "boot/armada-firmware/Config.in"
 
 endmenu
boot/armada-firmware/Config.in new file +2 -0
new file mode 100644
index 0000000000..530b5622c8
@@ -0,0 +1,19 @@
+config BR2_TARGET_ARMADA_FIRMWARE
+	bool "armada-firmware"

boot/armada-firmware/Config.in line 12

Quoted 10 lines
boot/armada-firmware/Config.in new file +10 -0
+	depends on BR2_aarch64
+	help
+	  Marvell Armada SCP BL2 firmware images.
+
+if BR2_TARGET_ARMADA_FIRMWARE
+
+config BR2_TARGET_ARMADA_FIRMWARE_IMAGE
+	string "Armada SCP BL2 image name"
+	help
+	  Armada SCP BL2 firmware image name.

This symbol is not used here, which is quite unusual. Instead, you set this symbol in the defconfig, and use it in the ATF package. But since we'll use only one of the 7k/8k images (right?), I suggest to add a 7k/8k choice, and make BR2_TARGET_ARMADA_FIRMWARE_IMAGE a blink symbol that is set (default) according to the choice.

Something like (abbreviated; untested):

choice
prompt "Armada platform"

config BR2_PACKAGE_ARMADA_8040

    bool "8040"

config BR2_PACKAGE_ARMADA_7040

    bool "7040"

endchoice

config BR2_TARGET_ARMADA_FIRMWARE_IMAGE

    string
    default "mrvl_scp_bl2_8040.img" if BR2_PACKAGE_ARMADA_8040
    default "mrvl_scp_bl2_7040.img" if BR2_PACKAGE_ARMADA_7040
Quoted 20 lines
boot/armada-firmware/Config.in new file +6 -0
+config BR2_TARGET_ARMADA_FIRMWARE_VERSION
+	string "Armada SCP BL2 image version"
+	help
+	  Armada SCP BL2 firmware image version.
+
+endif
boot/armada-firmware/armada-firmware.hash new file +2 -0
new file mode 100644
index 0000000000..5eeca9d6ea
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 b310443c0d51d07b7c11597548685ae608b8478eee7095925427da6ab71e0168 armada-firmware-binaries-marvell-armada-17.10.tar.gz
boot/armada-firmware/armada-firmware.mk new file +0 -0
new file mode 100644
index 0000000000..d75dc7cb6c

boot/armada-firmware/armada-firmware.mk line 7

Quoted 7 lines
boot/armada-firmware/armada-firmware.mk new file +7 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# Marvell Armada SCP BL2 firmware images
+#
+################################################################################
+
+ARMADA_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_VERSION))

Having a configurable version is an exception of very few packages (linux, uboot, ATF). Other packages should set to a static version string or a commit id when there is no official version release.

boot/armada-firmware/armada-firmware.mk line 9

Quoted 2 lines
boot/armada-firmware/armada-firmware.mk new file +2 -0
+ARMADA_FIRMWARE_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(ARMADA_FIRMWARE_VERSION))
+ARMADA_FIRMWARE_LICENSE = Proprietary

These binaries come with no license, so you should also add ARMADA_FIRMWARE_REDISTRIBUTE = NO.

boot/armada-firmware/armada-firmware.mk line 18

Quoted 9 lines
boot/armada-firmware/armada-firmware.mk new file +9 -0
+
+ARMADA_FIRMWARE_INSTALL_IMAGES  = YES
+
+define ARMADA_FIRMWARE_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_7040.img $(BINARIES_DIR)/mrvl_scp_bl2_7040.img
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_8040.img $(BINARIES_DIR)/mrvl_scp_bl2_8040.img
+endef
+
+$(eval $(generic-package))

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH 1/5 armada-firmware: new package

Hi Baruch,

Thanks a lot for your thorough review !

Quoted 33 lines
Quoted 7 lines

new file mode 100644
index 0000000000..530b5622c8

boot/armada-firmware/Config.in new file +2 -0
@@ -0,0 +1,19 @@
+config BR2_TARGET_ARMADA_FIRMWARE
+	bool "armada-firmware"

boot/armada-firmware/Config.in line 12

Quoted 10 lines
boot/armada-firmware/Config.in new file +10 -0
+	depends on BR2_aarch64
+	help
+	  Marvell Armada SCP BL2 firmware images.
+
+if BR2_TARGET_ARMADA_FIRMWARE
+
+config BR2_TARGET_ARMADA_FIRMWARE_IMAGE
+	string "Armada SCP BL2 image name"
+	help
+	  Armada SCP BL2 firmware image name.

This symbol is not used here, which is quite unusual. Instead, you set this symbol in the defconfig, and use it in the ATF package. But since we'll use only one of the 7k/8k images (right?), I suggest to add a 7k/8k choice, and make BR2_TARGET_ARMADA_FIRMWARE_IMAGE a blink symbol that is set (default) according to the choice.

Something like (abbreviated; untested):

choice
prompt "Armada platform"

config BR2_PACKAGE_ARMADA_8040

    bool "8040"

config BR2_PACKAGE_ARMADA_7040

Quoted 8 lines
    bool "7040"

endchoice

config BR2_TARGET_ARMADA_FIRMWARE_IMAGE

    string
    default "mrvl_scp_bl2_8040.img" if BR2_PACKAGE_ARMADA_8040
    default "mrvl_scp_bl2_7040.img" if BR2_PACKAGE_ARMADA_7040

Well, I used string field to specify firmware name because earlier versions of Armada firmware may have different names. For instance, branch 17.08 contains single firmware blob RTOSDemo-cm3.bin. So if we specify branch of Armada firmware repository, we have to specify firmware blob name as well.

On the other hand, as you mentioned in subsequent comment, having a configurable version for this firmware is not a good idea. So if we set it to the static version (now the latest is 17.10), then we can use suggested 'choice' menu. Moreover, as you mentioned, it is not really needed for upstream BSP. I will check if it is needed for Marvell BSP. If not, then it should be safe to drop this package altogether.

Quoted 8 lines
Quoted 8 lines

new file mode 100644
index 0000000000..d75dc7cb6c

boot/armada-firmware/armada-firmware.mk new file +3 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# Marvell Armada SCP BL2 firmware images
Quoted 8 lines

boot/armada-firmware/armada-firmware.mk line 7

Quoted 4 lines
boot/armada-firmware/armada-firmware.mk new file +4 -0
+#
+################################################################################
+
+ARMADA_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_VERSION))

Having a configurable version is an exception of very few packages (linux, uboot, ATF). Other packages should set to a static version string or a commit id when there is no official version release.

Ok, will do.

Quoted 5 lines

boot/armada-firmware/armada-firmware.mk line 9

Quoted 2 lines
boot/armada-firmware/armada-firmware.mk new file +2 -0
+ARMADA_FIRMWARE_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(ARMADA_FIRMWARE_VERSION))
+ARMADA_FIRMWARE_LICENSE = Proprietary

These binaries come with no license, so you should also add ARMADA_FIRMWARE_REDISTRIBUTE = NO.

Ok, will do.

Regards,
Sergey

#4 lore raw

PATCH 1/5 armada-firmware: new package

In reply to Sergey Matyukevich
Quoted 18 lines · Sergey Matyukevich

This package adds SCP BL2 firmware for Marvell Armada 7040 and 8040 SoCs.

---
 boot/Config.in                            |  1 +
 boot/armada-firmware/Config.in            | 19 +++++++++++++++++++
 boot/armada-firmware/armada-firmware.hash |  2 ++
 boot/armada-firmware/armada-firmware.mk   | 18 ++++++++++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 boot/armada-firmware/Config.in
 create mode 100644 boot/armada-firmware/armada-firmware.hash
 create mode 100644 boot/armada-firmware/armada-firmware.mk
boot/Config.in +0 -0
index 2f46c8546e..0ffbd7288b 100644

boot/Config.in source "boot/ts4800-mbrboot/Config.in" · line 20

Quoted 4 lines
boot/Config.in +1 -0
@@ -17,5 +17,6 @@ source "boot/ts4800-mbrboot/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
+source "boot/armada-firmware/Config.in"

Please keep things alphabetic. However, I don't think the boot loader menu is
appropriate. Yes, it's an image that is used by the bootloader, but really it is a piece of firmware, not really related to booting the SoC.

boot/armada-firmware/Config.in line 5

Quoted 13 lines
boot/Config.in +0 -0
 endmenu
boot/armada-firmware/Config.in new file +5 -0
new file mode 100644
index 0000000000..530b5622c8
@@ -0,0 +1,19 @@
+config BR2_TARGET_ARMADA_FIRMWARE
+	bool "armada-firmware"
+	depends on BR2_aarch64
+	help
+	  Marvell Armada SCP BL2 firmware images.

Could you write a little more help text? Like, that it's the firmware for the
management coprocessor and that it is needed for power management. The first paragraph of [1] can be a source of inspiration.

We normally also want an upstream URL. [1] might be usable but I'm not sure.

Quoted 28 lines
boot/armada-firmware/Config.in new file +14 -0
+
+if BR2_TARGET_ARMADA_FIRMWARE
+
+config BR2_TARGET_ARMADA_FIRMWARE_IMAGE
+	string "Armada SCP BL2 image name"
+	help
+	  Armada SCP BL2 firmware image name.
+
+config BR2_TARGET_ARMADA_FIRMWARE_VERSION
+	string "Armada SCP BL2 image version"
+	help
+	  Armada SCP BL2 firmware image version.
+
+endif
boot/armada-firmware/armada-firmware.hash new file +2 -0
new file mode 100644
index 0000000000..5eeca9d6ea
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 b310443c0d51d07b7c11597548685ae608b8478eee7095925427da6ab71e0168 armada-firmware-binaries-marvell-armada-17.10.tar.gz
boot/armada-firmware/armada-firmware.mk new file +0 -0
new file mode 100644
index 0000000000..d75dc7cb6c

boot/armada-firmware/armada-firmware.mk line 8

Quoted 8 lines
boot/armada-firmware/armada-firmware.mk new file +8 -0
@@ -0,0 +1,18 @@
+################################################################################
+#
+# Marvell Armada SCP BL2 firmware images
+#
+################################################################################
+
+ARMADA_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_VERSION))
+ARMADA_FIRMWARE_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(ARMADA_FIRMWARE_VERSION))

We try to keep the upstream name as the package name. Is there anything wrong
with binaries-marvell?

boot/armada-firmware/armada-firmware.mk line 15

Quoted 7 lines
boot/armada-firmware/armada-firmware.mk new file +7 -0
+ARMADA_FIRMWARE_LICENSE = Proprietary
+
+ARMADA_FIRMWARE_INSTALL_IMAGES  = YES
+
+define ARMADA_FIRMWARE_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_7040.img $(BINARIES_DIR)/mrvl_scp_bl2_7040.img
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_8040.img $(BINARIES_DIR)/mrvl_scp_bl2_8040.img

I don't think the name is really relevant, is it? So maybe you could always
copy it to the same file in BINARIES_DIR so on the ATF side you don't need to access variables of this package.

Regards,
Arnout

boot/armada-firmware/armada-firmware.mk line 18

Quoted 4 lines
boot/armada-firmware/armada-firmware.mk new file +3 -0
+endef
+
+$(eval $(generic-package))

[1]
http://wiki.macchiatobin.net/tiki-index.php?page=Enable+Power+Management+on+MACCHIATObin#Bootloader

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH 1/5 armada-firmware: new package

Hi Arnout,

Thanks for the review !

Quoted 1 line
Quoted 1 line

This package adds SCP BL2 firmware for Marvell Armada 7040 and 8040 SoCs.

...

Quoted 5 lines
Quoted 5 lines
boot/Config.in +0 -0
index 2f46c8546e..0ffbd7288b 100644
@@ -17,5 +17,6 @@ source "boot/ts4800-mbrboot/Config.in"
Quoted 8 lines

boot/Config.in source "boot/ts4800-mbrboot/Config.in" · line 20

Quoted 4 lines
boot/Config.in +1 -0
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
+source "boot/armada-firmware/Config.in"

Please keep things alphabetic. However, I don't think the boot loader menu is
appropriate. Yes, it's an image that is used by the bootloader, but really it is a piece of firmware, not really related to booting the SoC.

Will fix the order. However it looks like boot menu is the right place for this package. This package is similar to versatile-firmware. It is SCP_BL2 image which is used by ATF to boot SCP coprocessor. A bit more details are available in ATF design document:
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/firmware-design.rst#scp-bl2-system-control-processor-firmware-image-load

Quoted 16 lines

boot/armada-firmware/Config.in line 5

Quoted 11 lines
boot/armada-firmware/Config.in new file +5 -0
new file mode 100644
index 0000000000..530b5622c8
@@ -0,0 +1,19 @@
+config BR2_TARGET_ARMADA_FIRMWARE
+	bool "armada-firmware"
+	depends on BR2_aarch64
+	help
+	  Marvell Armada SCP BL2 firmware images.

Could you write a little more help text? Like, that it's the firmware for the
management coprocessor and that it is needed for power management. The first paragraph of [1] can be a source of inspiration.

Quoted 1 line

We normally also want an upstream URL. [1] might be usable but I'm not sure.

Sure, I will add more details about this package.

Quoted 9 lines
Quoted 9 lines
boot/armada-firmware/armada-firmware.mk new file +3 -0
new file mode 100644
index 0000000000..d75dc7cb6c
@@ -0,0 +1,18 @@
+################################################################################
+#
+# Marvell Armada SCP BL2 firmware images
Quoted 8 lines

boot/armada-firmware/armada-firmware.mk line 8

Quoted 5 lines
boot/armada-firmware/armada-firmware.mk new file +5 -0
+#
+################################################################################
+
+ARMADA_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_VERSION))
+ARMADA_FIRMWARE_SITE = $(call github,MarvellEmbeddedProcessors,binaries-marvell,$(ARMADA_FIRMWARE_VERSION))

We try to keep the upstream name as the package name. Is there anything wrong
with binaries-marvell?

Ok, makes sense. Will do.

Quoted 11 lines

boot/armada-firmware/armada-firmware.mk line 15

Quoted 7 lines
boot/armada-firmware/armada-firmware.mk new file +7 -0
+ARMADA_FIRMWARE_LICENSE = Proprietary
+
+ARMADA_FIRMWARE_INSTALL_IMAGES  = YES
+
+define ARMADA_FIRMWARE_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_7040.img $(BINARIES_DIR)/mrvl_scp_bl2_7040.img
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_8040.img $(BINARIES_DIR)/mrvl_scp_bl2_8040.img

I don't think the name is really relevant, is it? So maybe you could always
copy it to the same file in BINARIES_DIR so on the ATF side you don't need to access variables of this package.

This file depends on platform. Now we are adding MacchiatoBin, but another interesting networking board called EspressoBin from the same vendor is on the horizon. So it makes sense to keep things a little bit more flexible.

It looks like, together with review comments from Baruch, this brings us to the following implementation:
- choice submenu for available platforms in armada-firmware config menu ..
config BR2_TARGET_ARMADA_FIRMWARE_IMAGE

    string
    default "mrvl_scp_bl2_8040.img" if BR2_PACKAGE_ARMADA_8040
    default "mrvl_scp_bl2_7040.img" if BR2_PACKAGE_ARMADA_7040

- copy only selected BR2_TARGET_ARMADA_FIRMWARE_IMAGE to BINARIES_DIR

- use the same BR2_TARGET_ARMADA_FIRMWARE_FIRMWARE variable in ATF package to specify correct firmware

Regards,
Sergey

#6 lore raw

PATCH 1/5 armada-firmware: new package

Quoted 22 lines · Sergey Matyukevich

Hi Arnout,

Thanks for the review !

Quoted 1 line
Quoted 1 line

This package adds SCP BL2 firmware for Marvell Armada 7040 and 8040 SoCs.

...

Quoted 5 lines
Quoted 5 lines
boot/Config.in +0 -0
index 2f46c8546e..0ffbd7288b 100644
@@ -17,5 +17,6 @@ source "boot/ts4800-mbrboot/Config.in"
Quoted 8 lines

boot/Config.in source "boot/ts4800-mbrboot/Config.in" · line 20

Quoted 4 lines
boot/Config.in +1 -0
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
+source "boot/armada-firmware/Config.in"

Please keep things alphabetic. However, I don't think the boot loader menu is
appropriate. Yes, it's an image that is used by the bootloader, but really it is a piece of firmware, not really related to booting the SoC.

Quoted 5 lines

Will fix the order. However it looks like boot menu is the right place for this package. This package is similar to versatile-firmware. It is SCP_BL2 image which is used by ATF to boot SCP coprocessor. A bit more details are available in ATF design document:
https://github.com/ARM-software/arm-trusted-firmware/blob/master/docs/firmware-design.rst#scp-bl2-system-control-processor-firmware-image-load

As I understand it, it should also be possible to load the SCP firmware after
boot. Maybe not on all platforms. But even if it weren't I wouldn't consider it a bootloader. And the same goes for vexpress-firmware by the way.

That said, it's not such a big deal for me.

[snip]

Quoted 17 lines
Quoted 7 lines

boot/Config.in source "boot/ts4800-mbrboot/Config.in"

Quoted 3 lines
boot/Config.in +3 -0
+define ARMADA_FIRMWARE_INSTALL_IMAGES_CMDS
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_7040.img $(BINARIES_DIR)/mrvl_scp_bl2_7040.img
+	$(INSTALL) -D -m 0644 $(@D)/mrvl_scp_bl2_8040.img $(BINARIES_DIR)/mrvl_scp_bl2_8040.img

I don't think the name is really relevant, is it? So maybe you could always
copy it to the same file in BINARIES_DIR so on the ATF side you don't need to access variables of this package.

This file depends on platform. Now we are adding MacchiatoBin, but another interesting networking board called EspressoBin from the same vendor is on the horizon. So it makes sense to keep things a little bit more flexible.

It looks like, together with review comments from Baruch, this brings us to the following implementation:
- choice submenu for available platforms in armada-firmware config menu ..
config BR2_TARGET_ARMADA_FIRMWARE_IMAGE

Quoted 8 lines
    string
    default "mrvl_scp_bl2_8040.img" if BR2_PACKAGE_ARMADA_8040
    default "mrvl_scp_bl2_7040.img" if BR2_PACKAGE_ARMADA_7040

- copy only selected BR2_TARGET_ARMADA_FIRMWARE_IMAGE to BINARIES_DIR

- use the same BR2_TARGET_ARMADA_FIRMWARE_FIRMWARE variable in ATF package to specify correct firmware

My point was: you can copy the image to $(BINARIES_DIR)/scp-fw.bin, then in the
ATF package you don't need to specify the firmware name but just always use scp-fw.bin. A further step would be to introduce an arm-scp-firmware (or atf-scp-firmware) virtual package (implemented by vexpress-firmware and armada-firmware). That way no change is needed in ATF to add an additional firmware package, and it's possible to add new firmware in BR2_EXTERNAL.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#7 lore raw

PATCH 2/5 armada-ddr: new package

In reply to Sergey Matyukevich

This package adds Marvell Armada SoC DDR training algorithms. This code is not built separately, it is needed as dependency to build ATF firmware for Marvell Armada SoCs.

---
 boot/Config.in                  |  1 +
 boot/armada-ddr/Config.in       | 16 ++++++++++++++++
 boot/armada-ddr/armada-ddr.hash |  2 ++
 boot/armada-ddr/armada-ddr.mk   | 20 ++++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 boot/armada-ddr/Config.in
 create mode 100644 boot/armada-ddr/armada-ddr.hash
 create mode 100644 boot/armada-ddr/armada-ddr.mk
boot/Config.in +1 -0
index 0ffbd7288b..1363181fc5 100644
@@ -18,5 +18,6 @@ source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
 source "boot/armada-firmware/Config.in"
+source "boot/armada-ddr/Config.in"
 
 endmenu
boot/armada-ddr/Config.in new file +16 -0
new file mode 100644
index 0000000000..23b71b8345
@@ -0,0 +1,16 @@
+config BR2_TARGET_ARMADA_DDR
+	bool "armada-ddr"
+	depends on BR2_aarch64
+	help
+	  Marvell keeps algorithms for DDR training in a separate repository.
+	  This code is not built separately, it is needed as dependency
+	  to build ATF firmware for Marvell Armada 7040 and 8040 SoCs.
+
+if BR2_TARGET_ARMADA_DDR
+
+config BR2_TARGET_ARMADA_DDR_VERSION
+	string "Armada DDR training code version"
+	help
+	  Marvell Armada DDR training code version
+
+endif
boot/armada-ddr/armada-ddr.hash new file +2 -0
new file mode 100644
index 0000000000..2dc36e0975
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 5f6f2b8c0742eb8b4ff716dc6715d20507c6ceadd5576aa446e407a428861de9 armada-ddr-mv_ddr-armada-17.10.tar.gz
boot/armada-ddr/armada-ddr.mk new file +20 -0
new file mode 100644
index 0000000000..5f76bfd7ed
@@ -0,0 +1,20 @@
+################################################################################
+#
+# Marvell Armada DDR training code
+#
+################################################################################
+
+ARMADA_DDR_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_DDR_VERSION))
+ARMADA_DDR_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(ARMADA_DDR_VERSION))
+ARMADA_DDR_LICENSE = Proprietary
+
+ARMADA_DDR_INSTALL_IMAGES  = YES
+
+define ARMADA_DDR_INSTALL_IMAGES_CMDS
+	$(INSTALL) -m 0755 -d $(DL_DIR)/mv-ddr-marvell
+	$(call suitable-extractor,$(notdir $(ARMADA_DDR_SOURCE))) \
+		$(DL_DIR)/$(notdir $(ARMADA_DDR_SOURCE)) | \
+		$(TAR) --strip-components=1 -C $(DL_DIR)/mv-ddr-marvell $(TAR_OPTIONS) -
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.11.0
#8 lore raw

PATCH 2/5 armada-ddr: new package

Hi Sergey,

Quoted 62 lines · Sergey Matyukevich

This package adds Marvell Armada SoC DDR training algorithms. This code is not built separately, it is needed as dependency to build ATF firmware for Marvell Armada SoCs.

---
 boot/Config.in                  |  1 +
 boot/armada-ddr/Config.in       | 16 ++++++++++++++++
 boot/armada-ddr/armada-ddr.hash |  2 ++
 boot/armada-ddr/armada-ddr.mk   | 20 ++++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 boot/armada-ddr/Config.in
 create mode 100644 boot/armada-ddr/armada-ddr.hash
 create mode 100644 boot/armada-ddr/armada-ddr.mk
boot/Config.in +1 -0
index 0ffbd7288b..1363181fc5 100644
@@ -18,5 +18,6 @@ source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 source "boot/xloader/Config.in"
 source "boot/armada-firmware/Config.in"
+source "boot/armada-ddr/Config.in"
 
 endmenu
boot/armada-ddr/Config.in new file +16 -0
new file mode 100644
index 0000000000..23b71b8345
@@ -0,0 +1,16 @@
+config BR2_TARGET_ARMADA_DDR
+	bool "armada-ddr"
+	depends on BR2_aarch64
+	help
+	  Marvell keeps algorithms for DDR training in a separate repository.
+	  This code is not built separately, it is needed as dependency
+	  to build ATF firmware for Marvell Armada 7040 and 8040 SoCs.
+
+if BR2_TARGET_ARMADA_DDR
+
+config BR2_TARGET_ARMADA_DDR_VERSION
+	string "Armada DDR training code version"
+	help
+	  Marvell Armada DDR training code version
+
+endif
boot/armada-ddr/armada-ddr.hash new file +2 -0
new file mode 100644
index 0000000000..2dc36e0975
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 5f6f2b8c0742eb8b4ff716dc6715d20507c6ceadd5576aa446e407a428861de9 armada-ddr-mv_ddr-armada-17.10.tar.gz
boot/armada-ddr/armada-ddr.mk new file +0 -0
new file mode 100644
index 0000000000..5f76bfd7ed

boot/armada-ddr/armada-ddr.mk line 7

Quoted 7 lines
boot/armada-ddr/armada-ddr.mk new file +7 -0
@@ -0,0 +1,20 @@
+################################################################################
+#
+# Marvell Armada DDR training code
+#
+################################################################################
+
+ARMADA_DDR_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_DDR_VERSION))

Here again, should be a static commit id.

boot/armada-ddr/armada-ddr.mk line 9

Quoted 2 lines
boot/armada-ddr/armada-ddr.mk new file +2 -0
+ARMADA_DDR_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(ARMADA_DDR_VERSION))
+ARMADA_DDR_LICENSE = Proprietary

The few files I looked into each have a few optional license headings, including a Commercial License, GPL-2.0+, GPL with exception, and BSD.

boot/armada-ddr/armada-ddr.mk line 18

Quoted 9 lines
boot/armada-ddr/armada-ddr.mk new file +9 -0
+
+ARMADA_DDR_INSTALL_IMAGES  = YES
+
+define ARMADA_DDR_INSTALL_IMAGES_CMDS
+	$(INSTALL) -m 0755 -d $(DL_DIR)/mv-ddr-marvell
+	$(call suitable-extractor,$(notdir $(ARMADA_DDR_SOURCE))) \
+		$(DL_DIR)/$(notdir $(ARMADA_DDR_SOURCE)) | \
+		$(TAR) --strip-components=1 -C $(DL_DIR)/mv-ddr-marvell $(TAR_OPTIONS) -
+endef

Can't you use $(BUILD_DIR)/... for ATF, where mv-ddr-marvell source are extracted anyway?

boot/armada-ddr/armada-ddr.mk line 20

Quoted 2 lines
boot/armada-ddr/armada-ddr.mk new file +2 -0
+
+$(eval $(generic-package))

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#9 lore raw

PATCH 2/5 armada-ddr: new package

Quoted 16 lines

boot/armada-ddr/armada-ddr.mk line 7

Quoted 7 lines
boot/armada-ddr/armada-ddr.mk new file +7 -0
+################################################################################
+#
+# Marvell Armada DDR training code
+#
+################################################################################
+
+ARMADA_DDR_VERSION = $(call qstrip,$(BR2_TARGET_ARMADA_DDR_VERSION))

Here again, should be a static commit id.

boot/armada-ddr/armada-ddr.mk line 9

Quoted 2 lines
boot/armada-ddr/armada-ddr.mk new file +2 -0
+ARMADA_DDR_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(ARMADA_DDR_VERSION))
+ARMADA_DDR_LICENSE = Proprietary

The few files I looked into each have a few optional license headings, including a Commercial License, GPL-2.0+, GPL with exception, and BSD.

Quoted 12 lines

boot/armada-ddr/armada-ddr.mk line 18

Quoted 9 lines
boot/armada-ddr/armada-ddr.mk new file +9 -0
+
+ARMADA_DDR_INSTALL_IMAGES  = YES
+
+define ARMADA_DDR_INSTALL_IMAGES_CMDS
+	$(INSTALL) -m 0755 -d $(DL_DIR)/mv-ddr-marvell
+	$(call suitable-extractor,$(notdir $(ARMADA_DDR_SOURCE))) \
+		$(DL_DIR)/$(notdir $(ARMADA_DDR_SOURCE)) | \
+		$(TAR) --strip-components=1 -C $(DL_DIR)/mv-ddr-marvell $(TAR_OPTIONS) -
+endef

Can't you use $(BUILD_DIR)/... for ATF, where mv-ddr-marvell source are extracted anyway?

All noted and will be implemented in v2.

Thanks again for your thorough review !

Regards,
Sergey

#10 lore raw

PATCH 3/5 atf: add support for Marvell Armada SoCs

In reply to Sergey Matyukevich

Add support for Marvell Armada SoCs to arm-trusted-firmware package.

---
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
boot/arm-trusted-firmware/arm-trusted-firmware.mk +13 -0
index 7b1cc6ebb6..d6bde29894 100644
@@ -39,6 +39,19 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
 endif
 
+ifeq ($(BR2_TARGET_ARMADA_FIRMWARE),y)
+ARMADA_FIRMWARE_IMAGE = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_IMAGE))
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	SCP_BL2=$(BINARIES_DIR)/$(ARMADA_FIRMWARE_IMAGE)
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += armada-firmware
+endif
+
+ifeq ($(BR2_TARGET_ARMADA_DDR),y)
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	MV_DDR_PATH=$(DL_DIR)/mv-ddr-marvell
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += armada-ddr
+endif
+
 define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) \
 		$(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
Signature · 1 line
2.11.0
#11 lore raw

PATCH 3/5 atf: add support for Marvell Armada SoCs

Hi Sergey,

Quoted 17 lines · Sergey Matyukevich

Add support for Marvell Armada SoCs to arm-trusted-firmware package.

---
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
boot/arm-trusted-firmware/arm-trusted-firmware.mk +2 -0
index 7b1cc6ebb6..d6bde29894 100644
@@ -39,6 +39,19 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
 endif
 
+ifeq ($(BR2_TARGET_ARMADA_FIRMWARE),y)
+ARMADA_FIRMWARE_IMAGE = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_IMAGE))

boot/arm-trusted-firmware/arm-trusted-firmware.mk ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin · line 53

Quoted 10 lines
boot/arm-trusted-firmware/arm-trusted-firmware.mk +10 -0
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	SCP_BL2=$(BINARIES_DIR)/$(ARMADA_FIRMWARE_IMAGE)
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += armada-firmware
+endif
+
+ifeq ($(BR2_TARGET_ARMADA_DDR),y)
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	MV_DDR_PATH=$(DL_DIR)/mv-ddr-marvell
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += armada-ddr
+endif

These are not really optional dependencies of ATF in general. It's only the Marvell specific ATF version that needs them, and they are not optional.

I don't have any better suggestion at the moment.

baruch

Quoted 4 lines
boot/arm-trusted-firmware/arm-trusted-firmware.mk +1 -0
+
 define ARM_TRUSTED_FIRMWARE_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) \
 		$(MAKE) -C $(@D) $(ARM_TRUSTED_FIRMWARE_MAKE_OPTS) \
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#12 lore raw

PATCH 3/5 atf: add support for Marvell Armada SoCs

Quoted 31 lines
Quoted 17 lines

Add support for Marvell Armada SoCs to arm-trusted-firmware package.

---
 boot/arm-trusted-firmware/arm-trusted-firmware.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)
boot/arm-trusted-firmware/arm-trusted-firmware.mk +2 -0
index 7b1cc6ebb6..d6bde29894 100644
@@ -39,6 +39,19 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin
 ARM_TRUSTED_FIRMWARE_DEPENDENCIES += vexpress-firmware
 endif
 
+ifeq ($(BR2_TARGET_ARMADA_FIRMWARE),y)
+ARMADA_FIRMWARE_IMAGE = $(call qstrip,$(BR2_TARGET_ARMADA_FIRMWARE_IMAGE))

boot/arm-trusted-firmware/arm-trusted-firmware.mk ARM_TRUSTED_FIRMWARE_MAKE_OPTS += SCP_BL2=$(BINARIES_DIR)/scp-fw.bin · line 53

Quoted 10 lines
boot/arm-trusted-firmware/arm-trusted-firmware.mk +10 -0
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	SCP_BL2=$(BINARIES_DIR)/$(ARMADA_FIRMWARE_IMAGE)
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += armada-firmware
+endif
+
+ifeq ($(BR2_TARGET_ARMADA_DDR),y)
+ARM_TRUSTED_FIRMWARE_MAKE_OPTS += \
+	MV_DDR_PATH=$(DL_DIR)/mv-ddr-marvell
+ARM_TRUSTED_FIRMWARE_DEPENDENCIES += armada-ddr
+endif

These are not really optional dependencies of ATF in general. It's only the Marvell specific ATF version that needs them, and they are not optional.

Quoted 1 line

I don't have any better suggestion at the moment.

Neither do I. Another obvious option is to create a separate ATF package for Marvell. But it doesn't look like a good idea. I opted the same approach as for Versatile firmware, at least for the time being.

Regards,
Sergey

#13 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

In reply to Sergey Matyukevich

Add MacchiatoBin board by SolidRun. This board is based on Marvell Armada 8040 SoC. Board support package includes the following two options: mainline and vendor BSPs.

Mainline BSP:
- Marvell ATF v1.3-armada-17.10 and its dependencies
- mainline U-Boot v2017.09
- mainline Linux kernel v4.13.11

Marvell BSP with more hardware support enabled:
- Marvell ATF v1.3-armada-17.10 and its dependencies
- vendor U-Boot based on v2017.03
- Marvell Linux kernel based v4.4.52

More details about this board are available on wiki:
- http://wiki.macchiatobin.net

---
 board/solidrun/macchiatobin/genimage.cfg         | 16 ++++++
 board/solidrun/macchiatobin/readme.txt           | 70 ++++++++++++++++++++++++
 configs/solidrun_macchiatobin_mainline_defconfig | 46 ++++++++++++++++
 configs/solidrun_macchiatobin_marvell_defconfig  | 48 ++++++++++++++++
 4 files changed, 180 insertions(+)
 create mode 100644 board/solidrun/macchiatobin/genimage.cfg
 create mode 100644 board/solidrun/macchiatobin/readme.txt
 create mode 100644 configs/solidrun_macchiatobin_mainline_defconfig
 create mode 100644 configs/solidrun_macchiatobin_marvell_defconfig
board/solidrun/macchiatobin/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..fdcda368a2
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition uboot {
+		in-partition-table = "no"
+		image = "flash-image.bin"
+		offset = 0x200000
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		offset = 0x2200000
+		image = "rootfs.ext4"
+	}
+}
board/solidrun/macchiatobin/readme.txt new file +70 -0

70 lines not on this page · raw message

configs/solidrun_macchiatobin_mainline_defconfig new file +46 -0

46 lines not on this page · raw message

configs/solidrun_macchiatobin_marvell_defconfig new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.11.0
#14 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Sergey,

Quoted 8 lines · Sergey Matyukevich

Add MacchiatoBin board by SolidRun. This board is based on Marvell Armada 8040 SoC. Board support package includes the following two options: mainline and vendor BSPs.

Mainline BSP:
- Marvell ATF v1.3-armada-17.10 and its dependencies
- mainline U-Boot v2017.09
- mainline Linux kernel v4.13.11

Thanks. For the mainline kernel BSP:

I'll note though that 'df' crashes here consistently:

[  962.179129] df[1346]: unhandled level 2 translation fault (11) at 0x00000a74, esr 0x92000046, in busybox[400000+a4000]
[  962.190801] CPU: 0 PID: 1346 Comm: df Not tainted 4.13.11 #1
[  962.197869] Hardware name: Marvell 8040 MACHIATOBin (DT)

...

I have not investigated it any further.

A few more comments below.

Quoted 48 lines

Marvell BSP with more hardware support enabled:
- Marvell ATF v1.3-armada-17.10 and its dependencies
- vendor U-Boot based on v2017.03
- Marvell Linux kernel based v4.4.52

More details about this board are available on wiki:
- http://wiki.macchiatobin.net

---
 board/solidrun/macchiatobin/genimage.cfg         | 16 ++++++
 board/solidrun/macchiatobin/readme.txt           | 70 ++++++++++++++++++++++++
 configs/solidrun_macchiatobin_mainline_defconfig | 46 ++++++++++++++++
 configs/solidrun_macchiatobin_marvell_defconfig  | 48 ++++++++++++++++
 4 files changed, 180 insertions(+)
 create mode 100644 board/solidrun/macchiatobin/genimage.cfg
 create mode 100644 board/solidrun/macchiatobin/readme.txt
 create mode 100644 configs/solidrun_macchiatobin_mainline_defconfig
 create mode 100644 configs/solidrun_macchiatobin_marvell_defconfig
board/solidrun/macchiatobin/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..fdcda368a2
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition uboot {
+		in-partition-table = "no"
+		image = "flash-image.bin"
+		offset = 0x200000
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		offset = 0x2200000
+		image = "rootfs.ext4"
+	}
+}
board/solidrun/macchiatobin/readme.txt new file +0 -0
new file mode 100644
index 0000000000..7bab5aca3c

board/solidrun/macchiatobin/readme.txt line 10

Quoted 10 lines
board/solidrun/macchiatobin/readme.txt new file +10 -0
@@ -0,0 +1,70 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the MacchiatoBin board based on Marvell Armada
+8040 SoC. Documentation for the board hardware and software
+is available on wiki: http://wiki.macchiatobin.net
+
+This default configuration will bring-up the board and allow
+access through the serial console.

Would be nice to note that the serial console is accessible at the micro-USB connector marked CON9.

Quoted 26 lines
board/solidrun/macchiatobin/readme.txt new file +26 -0
+
+How to build
+============
+
+There are two build options. The first option is mainline BSP:
+ - Linux v4.13.11
+ - U-Boot v2017.09
+
+The second option is vendor BSP which enables more hardware.
+Marvell BSP is based on the following Linux and U-Boot versions:
+ - Linux v4.4.52
+ - U-Boot v2017.03
+Sources are available on Marvell GitHub page:
+   https://github.com/MarvellEmbeddedProcessors
+
+To use mainline BSP run the following commands:
+    $ make solidrun_macchiatobin_mainline_defconfig
+    $ make
+
+To use vendor BSP run the following commands:
+    $ make solidrun_macchiatobin_marvell_defconfig
+    $ make
+
+Note: you will need access to the internet to download
+all the required sources.
+

board/solidrun/macchiatobin/readme.txt line 46

Quoted 10 lines
board/solidrun/macchiatobin/readme.txt new file +10 -0
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image
+called "sdcard.img" in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+  $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+  $ sudo sync

A somewhat faster one liner:

sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M conv=fsync

board/solidrun/macchiatobin/readme.txt line 54

Quoted 7 lines
board/solidrun/macchiatobin/readme.txt new file +7 -0
+Insert the micro SDcard in MacchiatoBin board and power it up.
+The console is on the serial line, 115200 8N1.
+
+Note that MacchiatoBin board can be setup to load bootloader
+from different sources including eMMC, SPI flash, and SD card.
+Make sure to properly configure DIP switches SW1 and SW2
+according to information available on wiki.

Would be nice to write here the DIP switches configuration for SD card boot:

SW2: 01110
SW1: 1xxxx

board/solidrun/macchiatobin/readme.txt line 63

Quoted 8 lines
board/solidrun/macchiatobin/readme.txt new file +8 -0
+By default U-Boot will use environment from SPI flash. If SPI flash
+is empty or it keeps legacy environment which is incompatible with
+up-to-date mainline U-Boot and kernel, then the following
+commands can be used to boot the board:
+
+=> env default -f -a
+=> setenv bootargs console=ttyS0,115200 root=/dev/mmcblk1p1 rw rootwait
+=> setenv bootdelay 2

This doesn't make much sense, since the user is now at the serial console already.

board/solidrun/macchiatobin/readme.txt line 70

Quoted 7 lines
board/solidrun/macchiatobin/readme.txt new file +7 -0
+=> setenv fdt_addr 0x1000000
+=> setenv fdt_high 0xffffffffffffffff
+=> setenv fdt_name boot/armada-8040-mcbin.dtb
+=> setenv kernel_addr 0x2000000
+=> setenv image_name boot/Image
+=> setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr $image_name; ext4load mmc 1:1 $fdt_addr $fdt_name; booti $kernel_addr - $fdt_addr'
+=> boot

Having to type all that on the console is not nice. Unfortunately, current mainline U-Boot does not make it easy to override the SPI flash stored environment. But we can ease the pain somewhat. Create a uEnv.txt file, and store it in /boot. The sequence above can now be shortened to:

=> ext4load mmc 1:1 0x01700000 /boot/uEnv.txt
=> env import -t 0x01700000 $filesize
=> boot

The uEnv.txt file that I tested is attached.

baruch

Signature · 11 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
-------------- next part --------------
bootargs=console=ttyS0,115200 root=/dev/mmcblk1p1 rw rootwait
fdt_addr=0x1000000
fdt_high=0xffffffffffffffff
fdt_name=boot/armada-8040-mcbin.dtb
kernel_addr=0x2000000
image_name=boot/Image
bootcmd=mmc dev 1; ext4load mmc 1:1 $kernel_addr $image_name; ext4load mmc 1:1 $fdt_addr $fdt_name; booti $kernel_addr - $fdt_addr
#15 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Quoted 1 line · Baruch Siach

Create a uEnv.txt file, and store it in /boot.

Hi Baruch, does U-Boot auto-load this file on each and every boot? If not, than I suggest to name it differently -- perhaps uEnv-recovery.txt. I would expect that any change in a /boot/uEnv.txt somehow propagates to U-Boot environment during the next boot.

Cheers,
Jan

#16 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Jan,

Quoted 4 lines · Jan Kundr?t
Quoted 1 line · Baruch Siach

Create a uEnv.txt file, and store it in /boot.

Hi Baruch, does U-Boot auto-load this file on each and every boot?

That depends on the default U-Boot environment. In the case of the Macchiatobin the built-in default is empty, and the SPI flash stored environment is not in a known state. So you must load uEnv.txt manually on every boot to make sure your environment is in a known state.

Quoted 3 lines

If not, than I suggest to name it differently -- perhaps uEnv-recovery.txt. I would expect that any change in a /boot/uEnv.txt somehow propagates to U-Boot environment during the next boot.

That's a good idea.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#17 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

In reply to Baruch Siach
Quoted 13 lines
Quoted 8 lines

Add MacchiatoBin board by SolidRun. This board is based on Marvell Armada 8040 SoC. Board support package includes the following two options: mainline and vendor BSPs.

Mainline BSP:
- Marvell ATF v1.3-armada-17.10 and its dependencies
- mainline U-Boot v2017.09
- mainline Linux kernel v4.13.11

Thanks. For the mainline kernel BSP:

Quoted 8 lines

I'll note though that 'df' crashes here consistently:

[  962.179129] df[1346]: unhandled level 2 translation fault (11) at 0x00000a74, esr 0x92000046, in busybox[400000+a4000]
[  962.190801] CPU: 0 PID: 1346 Comm: df Not tainted 4.13.11 #1
[  962.197869] Hardware name: Marvell 8040 MACHIATOBin (DT)

...

I have not investigated it any further.

This issue is not specific to MacchiatoBin board. I observed it last week testing images for another arm64 board - Orange Pi Zero Plus2 board. I haven't investigated it yet.

Meanwhile this is not the only problem with mainline BSP. It turned out that network interfaces do not work properly neither on v4.13.11 nor in fresh v4.14. Kernel v4.13.11 doesn't enable them in DTS. Kernel v4.14 does enable them, but I couldn't make them work: Tx looks ok, but no Rx. Meanwhile on kernel from devel-4.14/all branch from https://github.com/MISL-EBU-System-SW/mainline-public
management 1Gb interface appears to be working fine.

I plan to bump kernel version to 4.14 and find minimal set of patches needed to enable networking.

Quoted 10 lines

board/solidrun/macchiatobin/readme.txt line 10

Quoted 7 lines
board/solidrun/macchiatobin/readme.txt new file +7 -0
+This default configuration will allow you to start experimenting with the
+buildroot environment for the MacchiatoBin board based on Marvell Armada
+8040 SoC. Documentation for the board hardware and software
+is available on wiki: http://wiki.macchiatobin.net
+
+This default configuration will bring-up the board and allow
+access through the serial console.

Would be nice to note that the serial console is accessible at the micro-USB connector marked CON9.

Ok, will do.

Quoted 13 lines

board/solidrun/macchiatobin/readme.txt line 46

Quoted 10 lines
board/solidrun/macchiatobin/readme.txt new file +10 -0
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image
+called "sdcard.img" in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+  $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+  $ sudo sync

A somewhat faster one liner:

Quoted 1 line

sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M conv=fsync

Ok, thanks! Will do.

Quoted 10 lines

board/solidrun/macchiatobin/readme.txt line 54

Quoted 7 lines
board/solidrun/macchiatobin/readme.txt new file +7 -0
+Insert the micro SDcard in MacchiatoBin board and power it up.
+The console is on the serial line, 115200 8N1.
+
+Note that MacchiatoBin board can be setup to load bootloader
+from different sources including eMMC, SPI flash, and SD card.
+Make sure to properly configure DIP switches SW1 and SW2
+according to information available on wiki.

Would be nice to write here the DIP switches configuration for SD card boot:

Quoted 2 lines

SW2: 01110
SW1: 1xxxx

Good point. Will do.

Quoted 8 lines
Quoted 7 lines
+=> setenv fdt_addr 0x1000000
+=> setenv fdt_high 0xffffffffffffffff
+=> setenv fdt_name boot/armada-8040-mcbin.dtb
+=> setenv kernel_addr 0x2000000
+=> setenv image_name boot/Image
+=> setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 $kernel_addr $image_name; ext4load mmc 1:1 $fdt_addr $fdt_name; booti $kernel_addr - $fdt_addr'
+=> boot
Quoted 8 lines

Having to type all that on the console is not nice. Unfortunately, current mainline U-Boot does not make it easy to override the SPI flash stored environment. But we can ease the pain somewhat. Create a uEnv.txt file, and store it in /boot. The sequence above can now be shortened to:

=> ext4load mmc 1:1 0x01700000 /boot/uEnv.txt
=> env import -t 0x01700000 $filesize
=> boot

Indeed, that will be easier for quick start.

Regards,
Sergey

#18 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hello,

Quoted 10 lines · Sergey Matyukevich

This issue is not specific to MacchiatoBin board. I observed it last week testing images for another arm64 board - Orange Pi Zero Plus2 board. I haven't investigated it yet.

Meanwhile this is not the only problem with mainline BSP. It turned out that network interfaces do not work properly neither on v4.13.11 nor in fresh v4.14. Kernel v4.13.11 doesn't enable them in DTS. Kernel v4.14 does enable them, but I couldn't make them work: Tx looks ok, but no Rx. Meanwhile on kernel from devel-4.14/all branch from https://github.com/MISL-EBU-System-SW/mainline-public
management 1Gb interface appears to be working fine.

The fact that network interfaces don't work on mcbin with the stock 4.14 is not expected. I've added in Cc: my colleague Antoine T?nart who worked on this topic.

Antoine, do you know which patches are missing in 4.14 ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#19 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hello Thomas, Sergey,

Quoted 9 lines · Thomas Petazzoni
Quoted 6 lines · Sergey Matyukevich

Meanwhile this is not the only problem with mainline BSP. It turned out that network interfaces do not work properly neither on v4.13.11 nor in fresh v4.14. Kernel v4.13.11 doesn't enable them in DTS. Kernel v4.14 does enable them, but I couldn't make them work: Tx looks ok, but no Rx. Meanwhile on kernel from devel-4.14/all branch from https://github.com/MISL-EBU-System-SW/mainline-public
management 1Gb interface appears to be working fine.

Quoted 5 lines

The fact that network interfaces don't work on mcbin with the stock 4.14 is not expected. I've added in Cc: my colleague Antoine T?nart who worked on this topic.

Antoine, do you know which patches are missing in 4.14 ?

The 4.14 network support for the mcbin is partial but you should be able to use 2 out of the 4 interfaces in the mode U-Boot configured them. tl;dr; eth0 in 10G (sfp) and eth2 in 1G.

See https://elinux.org/Marvell_EBU:MacchiatoBin for the network interfaces description.

- eth0 should work on 10G (the sfp cage).
- eth1 is not working because of a bug which is not cleanly fixed yet. The devel-4.14/all branch contains a workaround (which is not suitable for the upstream kernel), see 0968cd30a0d4 ("DO NOT UPSTREAM: phy: marvell10g:
Do not reset PHY autoneg for 10G KR mode"). With this patch it should work on 10G (sfp) with the 4.14 kernel.
- eth2 should be working just fine on 1G.
- eth3 is not supported yet, in both the upstream kernel and the devel-4.14/all branch.

One feature not supported in the upstream 4.14 kernel is the dynamic reconfiguration of the interfaces, i.e. the ability to switch from/to 10G to/from 1G on eth0 and eth1 given what's connected. To do this you would need a few device tree patches from devel-4.14/all (which will be in 4.15):
- 0f0dfbec373e ("arm64: dts: marvell: extend the cp110 syscon register area length")
- c90dab5d2bf4 ("arm64: dts: marvell: add comphy nodes on cp110 master and slave")
- 26c08c06b827 ("arm64: dts: marvell: mcbin: add comphy references to Ethernet ports")

Also, please note the network PHY drivers are not selected to be built-in in the arm64 upstream defconfig, so you should probably select both CONFIG_MARVELL_PHY and CONFIG_MARVELL_10G_PHY. This is done in the devel-4.14/all arm64 defconfig.

Antoine

Signature · 3 lines
Antoine T?nart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#20 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hello Antoine,

Quoted 39 lines
Quoted 7 lines
Quoted 6 lines

Meanwhile this is not the only problem with mainline BSP. It turned out that network interfaces do not work properly neither on v4.13.11 nor in fresh v4.14. Kernel v4.13.11 doesn't enable them in DTS. Kernel v4.14 does enable them, but I couldn't make them work: Tx looks ok, but no Rx. Meanwhile on kernel from devel-4.14/all branch from https://github.com/MISL-EBU-System-SW/mainline-public
management 1Gb interface appears to be working fine.

Quoted 5 lines

The fact that network interfaces don't work on mcbin with the stock 4.14 is not expected. I've added in Cc: my colleague Antoine T?nart who worked on this topic.

Antoine, do you know which patches are missing in 4.14 ?

The 4.14 network support for the mcbin is partial but you should be able to use 2 out of the 4 interfaces in the mode U-Boot configured them. tl;dr; eth0 in 10G (sfp) and eth2 in 1G.

See https://elinux.org/Marvell_EBU:MacchiatoBin for the network interfaces description.

- eth0 should work on 10G (the sfp cage).
- eth1 is not working because of a bug which is not cleanly fixed yet. The devel-4.14/all branch contains a workaround (which is not suitable for the upstream kernel), see 0968cd30a0d4 ("DO NOT UPSTREAM: phy: marvell10g:
Do not reset PHY autoneg for 10G KR mode"). With this patch it should work on 10G (sfp) with the 4.14 kernel.
- eth2 should be working just fine on 1G.
- eth3 is not supported yet, in both the upstream kernel and the devel-4.14/all branch.

One feature not supported in the upstream 4.14 kernel is the dynamic reconfiguration of the interfaces, i.e. the ability to switch from/to 10G to/from 1G on eth0 and eth1 given what's connected. To do this you would need a few device tree patches from devel-4.14/all (which will be in 4.15):
- 0f0dfbec373e ("arm64: dts: marvell: extend the cp110 syscon register area length")
- c90dab5d2bf4 ("arm64: dts: marvell: add comphy nodes on cp110 master and slave")
- 26c08c06b827 ("arm64: dts: marvell: mcbin: add comphy references to Ethernet ports")

Quoted 4 lines

Also, please note the network PHY drivers are not selected to be built-in in the arm64 upstream defconfig, so you should probably select both CONFIG_MARVELL_PHY and CONFIG_MARVELL_10G_PHY. This is done in the devel-4.14/all arm64 defconfig.

Thanks for detailed summary of mcbin networking support. However it sill looks like there is a missing piece here. I have checked behavior of both mainline 4.14 (516fb7f2e73dcc) and marvell-mainline devel-4.14/all (a3d9036af3c6033). I did no changes to kernel/dts/defconfig at all other than enabling Marvell PHYs for mainline kernel. But the result is still the same: 1Gb eth2 interface works with devel-4.14/all, but doesn't work with mainline. Though PHY is recognized and attached, mii-diag also provides sane report. Tx packet counter in ifconfig is increased, but no packets on wire.

Probably I am missing something obvious. I will do more checks and comparisons later this week. Setup is just the same: mainline U-Boot 2017.09 and images built using this patchset.

Regards,
Sergey

#21 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Sergey,

Quoted 10 lines · Sergey Matyukevich

Thanks for detailed summary of mcbin networking support. However it sill looks like there is a missing piece here. I have checked behavior of both mainline 4.14 (516fb7f2e73dcc) and marvell-mainline devel-4.14/all (a3d9036af3c6033). I did no changes to kernel/dts/defconfig at all other than enabling Marvell PHYs for mainline kernel. But the result is still the same: 1Gb eth2 interface works with devel-4.14/all, but doesn't work with mainline. Though PHY is recognized and attached, mii-diag also provides sane report. Tx packet counter in ifconfig is increased, but no packets on wire.

Quoted 3 lines

Probably I am missing something obvious. I will do more checks and comparisons later this week. Setup is just the same: mainline U-Boot 2017.09 and images built using this patchset.

Note that I never tested with the upstream U-Boot. Do the interfaces work in U-Boot?

Antoine

Signature · 3 lines
Antoine T?nart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#22 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Antoine,

Quoted 9 lines
Quoted 9 lines

Thanks for detailed summary of mcbin networking support. However it sill looks like there is a missing piece here. I have checked behavior of both mainline 4.14 (516fb7f2e73dcc) and marvell-mainline devel-4.14/all (a3d9036af3c6033). I did no changes to kernel/dts/defconfig at all other than enabling Marvell PHYs for mainline kernel. But the result is still the same: 1Gb eth2 interface works with devel-4.14/all, but doesn't work with mainline. Though PHY is recognized and attached, mii-diag also provides sane report. Tx packet counter in ifconfig is increased, but no packets on wire.

Quoted 6 lines
Quoted 3 lines

Probably I am missing something obvious. I will do more checks and comparisons later this week. Setup is just the same: mainline U-Boot 2017.09 and images built using this patchset.

Note that I never tested with the upstream U-Boot. Do the interfaces work in U-Boot?

No, interfaces do not work in U-Boot. Probably U-Boot matters, but even with the same mainline U-Boot interface eth2 works just fine on devel-4.14/all kernel.

By the way, could you please advise how to switch eth0 from SFP to RJ45 when using mainline kernel 4.14 ?

Regards,
Sergey

#23 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Sergey,

Quoted 4 lines · Sergey Matyukevich

No, interfaces do not work in U-Boot. Probably U-Boot matters, but even with the same mainline U-Boot interface eth2 works just fine on devel-4.14/all kernel.

This is expected. The mainline 4.14 kernel relies on the U-Boot configuration for some parts while the devel-4.14/all contains all the patches to configure the network interfaces (+ comphy) from scratch.

So, it seems to me the upstream U-Boot 2017.09 has an issue while configuring the network interface. There are chances the issue is within the comphy configuration / driver in this U-Boot version.

Quoted 2 lines

By the way, could you please advise how to switch eth0 from SFP to RJ45 when using mainline kernel 4.14 ?

You need to apply the dt patches I provided. You should then be able to use eth0 and eth1 with either an SFP or an RJ45 cable, depending on what's (dynamically) connected. To sum up, you just need to plugin either the SFP or the RJ45 cable to start using the interface in the right mode. You can switch from one to the other without rebooting the board.

To get this board supported in Buildroot with an upstream kernel, I would suggest to put the device tree patches I gave you, so that the kernel can not rely on the bootloader configuration. And as soon as 4.15 is out the patches can be removed from Buildroot.

Antoine

Signature · 3 lines
Antoine T?nart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#24 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Antoine,

Thanks for the update on upstream status of this board.

Quoted 10 lines
Quoted 2 lines

By the way, could you please advise how to switch eth0 from SFP to RJ45 when using mainline kernel 4.14 ?

You need to apply the dt patches I provided. You should then be able to use eth0 and eth1 with either an SFP or an RJ45 cable, depending on what's (dynamically) connected. To sum up, you just need to plugin either the SFP or the RJ45 cable to start using the interface in the right mode. You can switch from one to the other without rebooting the board.

Quoted 4 lines

To get this board supported in Buildroot with an upstream kernel, I would suggest to put the device tree patches I gave you, so that the kernel can not rely on the bootloader configuration. And as soon as 4.15 is out the patches can be removed from Buildroot.

With those 3 dts patches J5 management interface is working fine even with upstream U-Boot. So I will add those patches to board files for the time being, just to enable network access to the board right out of the box.

Regards,
Sergey

#25 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

In reply to Sergey Matyukevich

Hi Sergey,

Quoted 14 lines · Sergey Matyukevich
configs/solidrun_macchiatobin_mainline_defconfig new file +8 -0
new file mode 100644
index 0000000000..ab82865a0d
@@ -0,0 +1,46 @@
+BR2_aarch64=y
+
+#
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_13=y
+BR2_TARGET_GENERIC_HOSTNAME="mcbin"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for Marvell MacchiatoBin"
+
+# Firmware

configs/solidrun_macchiatobin_mainline_defconfig line 18

Quoted 10 lines
configs/solidrun_macchiatobin_mainline_defconfig new file +10 -0
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_URL="https://github.com/MarvellEmbeddedProcessors/atf-marvell.git"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION="atf-v1.3-armada-17.10"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="USE_COHERENT_MEM=0"
+
+BR2_TARGET_ARMADA_FIRMWARE=y
+BR2_TARGET_ARMADA_FIRMWARE_IMAGE="mrvl_scp_bl2_8040.img"
+BR2_TARGET_ARMADA_FIRMWARE_VERSION="binaries-marvell-armada-17.10"

It turns out that this firmware is not required, at least for the mainline kernel. The system boots just fine without it. It might be needed for the Marvell provided kernel. I didn't check that.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#26 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Quoted 7 lines

configs/solidrun_macchiatobin_mainline_defconfig line 18

Quoted 3 lines
configs/solidrun_macchiatobin_mainline_defconfig new file +3 -0
+BR2_TARGET_ARMADA_FIRMWARE=y
+BR2_TARGET_ARMADA_FIRMWARE_IMAGE="mrvl_scp_bl2_8040.img"
+BR2_TARGET_ARMADA_FIRMWARE_VERSION="binaries-marvell-armada-17.10"

It turns out that this firmware is not required, at least for the mainline kernel. The system boots just fine without it. It might be needed for the Marvell provided kernel. I didn't check that.

Thanks for checking! I followed BSP HOWTO at http://wiki.macchiatobin.net.
But it looks slightly outdated since it refers to 17.06 versions for all the repositories. I will check both mainline and vendor BSPs to clarify whether it is needed at all.

Regards,
Sergey

#27 lore raw

PATCH 4/5 solidrun/macchiatobin: add new board

Hi Baruch,

Quoted 8 lines
Quoted 7 lines

configs/solidrun_macchiatobin_mainline_defconfig line 18

Quoted 3 lines
configs/solidrun_macchiatobin_mainline_defconfig new file +3 -0
+BR2_TARGET_ARMADA_FIRMWARE=y
+BR2_TARGET_ARMADA_FIRMWARE_IMAGE="mrvl_scp_bl2_8040.img"
+BR2_TARGET_ARMADA_FIRMWARE_VERSION="binaries-marvell-armada-17.10"

It turns out that this firmware is not required, at least for the mainline kernel. The system boots just fine without it. It might be needed for the Marvell provided kernel. I didn't check that.

Quoted 4 lines

Thanks for checking! I followed BSP HOWTO at http://wiki.macchiatobin.net.
But it looks slightly outdated since it refers to 17.06 versions for all the repositories. I will check both mainline and vendor BSPs to clarify whether it is needed at all.

I tried to build both vendor and mainline BSP w/o this firmware. Both appear to be working fine without this firmware. According to ATF firmware design doc
https://github.com/ARM-software/arm-trusted-firmware, this SCP_BL2 image is for platform-specific power/clock/reset/sysctl coprocessor available on some systems.

As I mentioned, I didn't notice any issues during quick smoke test of images built w/o SCP_BL2 firmware. However, according to MacchiatoBin wiki page quite a few Linux power management features depend on this firmware:
http://wiki.macchiatobin.net/tiki-index.php?page=Enable+Power+Management+on+MACCHIATObin

So it makes a lot of sense to keep using it. To summarize, I would prefer to keep this package, fixing all the issues.

Regards,
Sergey

#28 lore raw

PATCH 5/5 Add myself to MacchiatoBin releated packages

In reply to Sergey Matyukevich
---
 DEVELOPERS | 6 ++++++
 1 file changed, 6 insertions(+)
DEVELOPERS +6 -0
index 7a4218d9c5..39773bd65e 100644
@@ -1474,12 +1474,18 @@ F:	package/mpir/
 N:	Sergey Matyukevich <[email protected]>
 F:	package/xr819-xradio/
 F:	package/armbian-firmware/
+F:	boot/arm-trusted-firmware/
+F:	boot/armada-firmware/
+F:	boot/armada-ddr/
 F:	board/orangepi/orangepi-zero
 F:	board/orangepi/orangepi-one
 F:	board/linksprite/pcduino
+F:	board/solidrun/macchiatobin
 F:	configs/orangepi_one_defconfig
 F:	configs/orangepi_zero_defconfig
 F:	configs/linksprite_pcduino_defconfig
+F:	configs/solidrun_macchiatobin_marvell_defconfig
+F:	configs/solidrun_macchiatobin_mainline_defconfig
 
 N:	Sergio Prado <[email protected]>
 F:	package/libgdiplus/
Signature · 1 line
2.11.0
#29 lore raw

cover Add support for MacchiatoBin board

In reply to Sergey Matyukevich
Quoted 11 lines · Sergey Matyukevich

Hi all,

This patchset adds support for SolidRun MacchiatoBin board based on Marvell Armada 8040 SoC. For convenience the following two different build configurations are added:

- mainline BSP
mainline Linux v4.13.11 and U-Boot v2017.09

- vendor BSP (enables more hardware)
BSP from Marvell based on Linux 4.4.52 and U-Boot v2017.03

Do we really want to have defconfigs for both upstream and vendor BSP?
Especially because we will also probably have a graphical defconfig later... This way, we end up with 3-4 defconfigs per board, for dozens of boards...

That said, I do think it is useful to have both of these for this specific
board. It's just that I'm afraid we're going to be overwhelmed by the number of defconfigs...

What do the others think?

Regards,
Arnout

Quoted 32 lines

Patches are rebased on top of next branch.

Regards,
Sergey

Sergey Matyukevich (5):
armada-firmware: new package
armada-ddr: new package
atf: add support for Marvell Armada SoCs solidrun/macchiatobin: add new board
DEVELOPERS: add myself to MacchiatoBin releated packages

 DEVELOPERS                                        |    6 +
 board/solidrun/macchiatobin/genimage.cfg          |   16 +++++
 board/solidrun/macchiatobin/readme.txt            |   70 ++++++++++++++++++++++
 boot/Config.in                                    |    2 
 boot/arm-trusted-firmware/arm-trusted-firmware.mk |   13 ++++
 boot/armada-ddr/Config.in                         |   16 +++++
 boot/armada-ddr/armada-ddr.hash                   |    2 
 boot/armada-ddr/armada-ddr.mk                     |   20 ++++++
 boot/armada-firmware/Config.in                    |   19 +++++
 boot/armada-firmware/armada-firmware.hash         |    2 
 boot/armada-firmware/armada-firmware.mk           |   18 +++++
 configs/solidrun_macchiatobin_mainline_defconfig  |   46 ++++++++++++++
 configs/solidrun_macchiatobin_marvell_defconfig   |   48 +++++++++++++++
 13 files changed, 278 insertions(+)

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#30 lore raw

cover Add support for MacchiatoBin board

Hi Arnout,

Quoted 15 lines · Arnout Vandecappelle
Quoted 9 lines · Sergey Matyukevich

This patchset adds support for SolidRun MacchiatoBin board based on Marvell Armada 8040 SoC. For convenience the following two different build configurations are added:

- mainline BSP
mainline Linux v4.13.11 and U-Boot v2017.09

- vendor BSP (enables more hardware)
BSP from Marvell based on Linux 4.4.52 and U-Boot v2017.03

Do we really want to have defconfigs for both upstream and vendor BSP?
Especially because we will also probably have a graphical defconfig later... This way, we end up with 3-4 defconfigs per board, for dozens of boards...

Quoted 5 lines

That said, I do think it is useful to have both of these for this specific
board. It's just that I'm afraid we're going to be overwhelmed by the number of defconfigs...

What do the others think?

This board has no native graphic interface. So you can think of it as a basic (mainline) defconfig, and a fully featured (vendor) defconfig. This is similar to the basic and "demo" defconfigs that we have for other boards.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -