aboutsummaryrefslogtreecommitdiff
path: root/board/solidrun
diff options
context:
space:
mode:
authorGravatar Sergey Matyukevich <geomatsi@gmail.com>2017-12-09 15:17:20 +0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-12-15 09:28:47 +0100
commit9ea3da06b21ce4750dce2b0fefb130256bd56551 (patch)
tree429a1595e99249b87d31f5ec4f1d5e81d3c75af8 /board/solidrun
parent569ef2e889c9d85d95c6bf3d4ea90a36a7b2f2d9 (diff)
downloadbuildroot-9ea3da06b21ce4750dce2b0fefb130256bd56551.tar.gz
buildroot-9ea3da06b21ce4750dce2b0fefb130256bd56551.tar.bz2
configs/solidrun_macchiatobin: add new defconfigs
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 - mainline U-Boot v2017.11 - mainline Linux kernel v4.14.4 Marvell BSP with more hardware support enabled: - Marvell ATF v1.3-armada-17.10 - Marvell 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 Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> [Thomas: misc tweaks in readme.txt.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'board/solidrun')
-rw-r--r--board/solidrun/macchiatobin/genimage.cfg16
-rw-r--r--board/solidrun/macchiatobin/linux-extras.config3
-rw-r--r--board/solidrun/macchiatobin/patches/linux/0001-arm64-dts-marvell-extend-the-cp110-syscon-register-a.patch45
-rw-r--r--board/solidrun/macchiatobin/patches/linux/0002-arm64-dts-marvell-add-comphy-nodes-on-cp110-master-a.patch118
-rw-r--r--board/solidrun/macchiatobin/patches/linux/0003-arm64-dts-marvell-mcbin-add-comphy-references-to-Eth.patch58
-rwxr-xr-xboard/solidrun/macchiatobin/post-build.sh5
-rw-r--r--board/solidrun/macchiatobin/readme.txt83
-rw-r--r--board/solidrun/macchiatobin/uEnv-example.txt7
8 files changed, 335 insertions, 0 deletions
diff --git a/board/solidrun/macchiatobin/genimage.cfg b/board/solidrun/macchiatobin/genimage.cfg
new file mode 100644
index 0000000000..fdcda368a2
--- /dev/null
+++ b/board/solidrun/macchiatobin/genimage.cfg
@@ -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"
+ }
+}
diff --git a/board/solidrun/macchiatobin/linux-extras.config b/board/solidrun/macchiatobin/linux-extras.config
new file mode 100644
index 0000000000..11267d2f80
--- /dev/null
+++ b/board/solidrun/macchiatobin/linux-extras.config
@@ -0,0 +1,3 @@
+CONFIG_MARVELL_PHY=y
+CONFIG_MARVELL_10G_PHY=y
+CONFIG_PHY_MVEBU_CP110_COMPHY=y
diff --git a/board/solidrun/macchiatobin/patches/linux/0001-arm64-dts-marvell-extend-the-cp110-syscon-register-a.patch b/board/solidrun/macchiatobin/patches/linux/0001-arm64-dts-marvell-extend-the-cp110-syscon-register-a.patch
new file mode 100644
index 0000000000..bcfeb1ecf9
--- /dev/null
+++ b/board/solidrun/macchiatobin/patches/linux/0001-arm64-dts-marvell-extend-the-cp110-syscon-register-a.patch
@@ -0,0 +1,45 @@
+From c25a2b8559989011d43fb901824dd8b981fc6b7b Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Fri, 8 Dec 2017 23:08:34 +0300
+Subject: [PATCH] arm64: dts: marvell: extend the cp110 syscon register area length
+
+This patch extends on both cp110 the system register area length to
+include some of the comphy registers as well.
+
+Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
+Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 2 +-
+ arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+index f2aa2a81de4d..4dd8c7d53764 100644
+--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+@@ -143,7 +143,7 @@
+
+ cpm_syscon0: system-controller@440000 {
+ compatible = "syscon", "simple-mfd";
+- reg = <0x440000 0x1000>;
++ reg = <0x440000 0x2000>;
+
+ cpm_clk: clock {
+ compatible = "marvell,cp110-clock";
+diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+index 4fe70323abb3..43fa491da6ce 100644
+--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+@@ -143,7 +143,7 @@
+
+ cps_syscon0: system-controller@440000 {
+ compatible = "syscon", "simple-mfd";
+- reg = <0x440000 0x1000>;
++ reg = <0x440000 0x2000>;
+
+ cps_clk: clock {
+ compatible = "marvell,cp110-clock";
+--
+2.11.0
+
diff --git a/board/solidrun/macchiatobin/patches/linux/0002-arm64-dts-marvell-add-comphy-nodes-on-cp110-master-a.patch b/board/solidrun/macchiatobin/patches/linux/0002-arm64-dts-marvell-add-comphy-nodes-on-cp110-master-a.patch
new file mode 100644
index 0000000000..b2989667eb
--- /dev/null
+++ b/board/solidrun/macchiatobin/patches/linux/0002-arm64-dts-marvell-add-comphy-nodes-on-cp110-master-a.patch
@@ -0,0 +1,118 @@
+From f05fc07443118bb3017c2b6938c63f48845329ca Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Fri, 8 Dec 2017 23:10:36 +0300
+Subject: [PATCH] arm64: dts: marvell: add comphy nodes on cp110 master and slave
+
+This patch describes the comphy available in the cp110 master and slave.
+This comphy provides serdes lanes used by various controllers such as
+the network one.
+
+Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
+Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ .../boot/dts/marvell/armada-cp110-master.dtsi | 38 ++++++++++++++++++++++
+ .../arm64/boot/dts/marvell/armada-cp110-slave.dtsi | 38 ++++++++++++++++++++++
+ 2 files changed, 76 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+index 4dd8c7d53764..b91c27ccee33 100644
+--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+@@ -109,6 +109,44 @@
+ };
+ };
+
++ cpm_comphy: phy@120000 {
++ compatible = "marvell,comphy-cp110";
++ reg = <0x120000 0x6000>;
++ marvell,system-controller = <&cpm_syscon0>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ cpm_comphy0: phy@0 {
++ reg = <0>;
++ #phy-cells = <1>;
++ };
++
++ cpm_comphy1: phy@1 {
++ reg = <1>;
++ #phy-cells = <1>;
++ };
++
++ cpm_comphy2: phy@2 {
++ reg = <2>;
++ #phy-cells = <1>;
++ };
++
++ cpm_comphy3: phy@3 {
++ reg = <3>;
++ #phy-cells = <1>;
++ };
++
++ cpm_comphy4: phy@4 {
++ reg = <4>;
++ #phy-cells = <1>;
++ };
++
++ cpm_comphy5: phy@5 {
++ reg = <5>;
++ #phy-cells = <1>;
++ };
++ };
++
+ cpm_mdio: mdio@12a200 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+index 43fa491da6ce..6849348ae214 100644
+--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
++++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+@@ -109,6 +109,44 @@
+ };
+ };
+
++ cps_comphy: phy@120000 {
++ compatible = "marvell,comphy-cp110";
++ reg = <0x120000 0x6000>;
++ marvell,system-controller = <&cps_syscon0>;
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ cps_comphy0: phy@0 {
++ reg = <0>;
++ #phy-cells = <1>;
++ };
++
++ cps_comphy1: phy@1 {
++ reg = <1>;
++ #phy-cells = <1>;
++ };
++
++ cps_comphy2: phy@2 {
++ reg = <2>;
++ #phy-cells = <1>;
++ };
++
++ cps_comphy3: phy@3 {
++ reg = <3>;
++ #phy-cells = <1>;
++ };
++
++ cps_comphy4: phy@4 {
++ reg = <4>;
++ #phy-cells = <1>;
++ };
++
++ cps_comphy5: phy@5 {
++ reg = <5>;
++ #phy-cells = <1>;
++ };
++ };
++
+ cps_mdio: mdio@12a200 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+--
+2.11.0
+
diff --git a/board/solidrun/macchiatobin/patches/linux/0003-arm64-dts-marvell-mcbin-add-comphy-references-to-Eth.patch b/board/solidrun/macchiatobin/patches/linux/0003-arm64-dts-marvell-mcbin-add-comphy-references-to-Eth.patch
new file mode 100644
index 0000000000..dcbd8779a3
--- /dev/null
+++ b/board/solidrun/macchiatobin/patches/linux/0003-arm64-dts-marvell-mcbin-add-comphy-references-to-Eth.patch
@@ -0,0 +1,58 @@
+From 7a67e72567a9b6104c7ebe134e710610cfb88a6e Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Fri, 8 Dec 2017 23:11:29 +0300
+Subject: [PATCH] arm64: dts: marvell: mcbin: add comphy references to Ethernet ports
+
+This patch adds comphy phandles to the Ethernet ports in the mcbin
+device tree. The comphy is used to configure the serdes PHYs used by
+these ports.
+
+Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+index acf5c7d16d79..49d6590507b5 100644
+--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
++++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts
+@@ -222,8 +222,11 @@
+
+ &cpm_eth0 {
+ status = "okay";
++ /* Network PHY */
+ phy = <&phy0>;
+ phy-mode = "10gbase-kr";
++ /* Generic PHY, providing serdes lanes */
++ phys = <&cpm_comphy4 0>;
+ };
+
+ &cpm_sata0 {
+@@ -257,15 +260,21 @@
+
+ &cps_eth0 {
+ status = "okay";
++ /* Network PHY */
+ phy = <&phy8>;
+ phy-mode = "10gbase-kr";
++ /* Generic PHY, providing serdes lanes */
++ phys = <&cps_comphy4 0>;
+ };
+
+ &cps_eth1 {
+ /* CPS Lane 0 - J5 (Gigabit RJ45) */
+ status = "okay";
++ /* Network PHY */
+ phy = <&ge_phy>;
+ phy-mode = "sgmii";
++ /* Generic PHY, providing serdes lanes */
++ phys = <&cps_comphy0 1>;
+ };
+
+ &cps_pinctrl {
+--
+2.11.0
+
diff --git a/board/solidrun/macchiatobin/post-build.sh b/board/solidrun/macchiatobin/post-build.sh
new file mode 100755
index 0000000000..9c1b5b883c
--- /dev/null
+++ b/board/solidrun/macchiatobin/post-build.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+
+install -m 0644 -D ${BOARD_DIR}/uEnv-example.txt ${TARGET_DIR}/boot/uEnv-example.txt
diff --git a/board/solidrun/macchiatobin/readme.txt b/board/solidrun/macchiatobin/readme.txt
new file mode 100644
index 0000000000..cdfe740c4e
--- /dev/null
+++ b/board/solidrun/macchiatobin/readme.txt
@@ -0,0 +1,83 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with
+the buildroot environment for the MacchiatoBin board based on the
+Marvell Armada 8040 SoC. Documentation for the board hardware and
+software is available on the wiki at: http://wiki.macchiatobin.net
+
+This default configuration will bring up the board and allow access
+through the serial console.
+
+How to build
+============
+
+There are two build options: mainline support and vendor support.
+
+For the mainline BSP, we use:
+ - Linux v4.14.4
+ - U-Boot v2017.11
+
+For the vendor BSP, we use the sources available from Marvell Github
+page at https://github.com/MarvellEmbeddedProcessors, which uses:
+ - Linux v4.4.52
+ - U-Boot v2017.03
+
+At the moment mainline support for the board is a work in progress.
+Mainline kernel 4.14 with provided patches enables eth2 in 1Gb (RJ45
+connector J5) and eth0 in 10Gb (SFP connector J15). The vendor BSP
+enables more hardware features out of the box, e.g. all the network
+interfaces.
+
+To use the mainline BSP run the following commands:
+
+ $ make solidrun_macchiatobin_mainline_defconfig
+ $ make
+
+To use the vendor BSP run the following commands:
+
+ $ make solidrun_macchiatobin_marvell_defconfig
+ $ make
+
+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 bs=1M conv=fsync
+ $ sudo sync
+
+How to boot the board
+=====================
+
+The MacchiatoBin board can be setup to load the bootloader from
+different sources including eMMC, SPI flash, and SD-card. In order to
+select boot from SD-card DIP switches SW1 and SW2 should be configured
+as follows:
+
+SW2: 01110
+SW1: 1xxxx
+
+Insert the micro SDcard in the MacchiatoBin board and power it up.
+The serial console is accessible at the micro-USB Type-B connector
+marked CON9. The serial line settings are 115200 8N1.
+
+By default U-Boot will load its environment from the SPI flash. On the
+first boot SPI flash may be empty or it may contain a legacy
+environment incompatible with up-to-date mainline U-Boot and
+kernel. Then the following commands can be used to boot the board:
+
+=> ext4load mmc 1:1 0x01700000 /boot/uEnv-example.txt
+=> env import -t 0x01700000 $filesize
+=> boot
+
+The example environment from uEnv-example.txt can be written to
+SPI flash using the following commands:
+
+=> env default -f -a
+=> ext4load mmc 1:1 0x01700000 /boot/uEnv-example.txt
+=> env import -t 0x01700000 $filesize
+=> saveenv
diff --git a/board/solidrun/macchiatobin/uEnv-example.txt b/board/solidrun/macchiatobin/uEnv-example.txt
new file mode 100644
index 0000000000..1967e2badd
--- /dev/null
+++ b/board/solidrun/macchiatobin/uEnv-example.txt
@@ -0,0 +1,7 @@
+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