openwrtv4/target/linux/mvebu/base-files/lib/mvebu.sh
Damir Samardzic 5b7b0c68c7 mvebu: initial support for Marvell Armada 7k and 8k DB boards
Add initial support for cortex-a72 based Armada DB-88F8040-Modular and
DB-88F7040-Modular development boards.

DB-88F8040-Modular specifications:
- Quad-core ARMv8 Cortex A72 CPU (up to 2 GHz)
- DDR4 DIMM - 64 bits + ECC
- 2 x 128 Mb SPI NOR flash memory
- 2 x 1G Ethernet port via RGMII (RJ45)
- 2 x SD card ports (4 bit port on CP, 8 bit port on AP)
- 2 SERDES modules with the following interfaces each:
  - 2 x SATA Rev 3.0 port (Port1 via SERDES module CON4 (active port), Port0
    via SERDES Module CON2 or CON1 (optional port))
  - 3 x PCI Express (PCIe) Gen 3.0 (Port2 via SERDES module CON5 (active port),
    Port1 via SERDES module CON7 (optional port), Port0 via SERDES module CON6
    (optional port))
  - 2 x USB3 (USB 2.0 backward compatible) host (via SERDES module CON9 and
    CON10)
  - 1 x 10G port over SFP+ connector (via SERDES module CON8)
- 1 x MCI interface by two over USB Type C connector
- 4 x serial COM port driven by the 88F8040 UART interface and converted to
  USB via FTDI IC
- I2C Master Interface
  - CP I2C 2x EEPROM @ Address 0x50 and 0x57
  - 1 x I/O Expander @ Address 0x21
  - Sample at Reset (SatR) memory device @ Address 0x4C and 0x4E
- I2C Slave Interface (via SERDES module) - Connection to each device on the
  board via an I2C multiplexer
- JTAG interface for CPU emulator
- Board dimensions: 270 mm x 240 mm (main + SERDES module)
- SERDES Module Dimensions: 70 mm x 105 mm

DB-88F7040-Modular specifications:
- Quad-core ARMv8 Cortex A72 CPU
  - CPU core operating speed of up to 1.6 GHz for Dual Core, 1.4 GHz for Quad
    Core
- DDR4 - 32 bit + ECC on Module - SLM1366-V1 (DB-DDR4-40B-MODULE) 4 GByte
  32-bit
- 1 x 128Mb SPI NOR flash memory
- 2 x 1G Ethernet port: 1 over RGMII (RJ45) and 1 over SGMII
- SD card 4 bits port on AP
- eMMc Module on CP
- 1 SERDES Modules with the following interfaces each:
  - 1 x SATA Rev 3.0 port (via SERDES module CON4)
  - 1 x PCI Express (PCIe) Gen 3.0 (via SERDES module CON5)
  - 2 x USB 3.0 (USB 2.0 backward compatible) host (via SERDES module CON9 and
    CON10)
  - 1 x 10G port over SFP+ connector (via SERDES module CON8)
- 2 x MCi interface by one over USB Type C connector
- 4 x Serial COM port driven by the 88F7040 UA
- RT interface and converted to USB via FTDI IC
- I2C Master Interface
  - 2 x EEPROM at address 0x57 and 0x50 in AP and 2 x EEPROM at address 0x57
    and 0x50 in CP
  - 1 x I/O Expander at address 0x21
  - Sample at Reset (SatR) memory device at address 0x4C and 0x4E
- I2C Slave Interface (via SERDES module) - Connection to each device on the
  board via an I2C multiplexer
- JTAG interface for CPU emulator
- Board dimensions - 270 mm x 240 mm (main + SERDES module)
- SERDES Module Dimensions - 70 mm x 105 mm

Booting from USB flash drive (dd sdcard image to the flash drive):
 1. reset U-Boot environment:
      env default -a
      saveenv

 2. prepare U-Boot manually (make sure to set correct dtb file name):
      setenv bootargs_root 'root=/dev/sda2 rw rootdelay=2 ip=dhcp'
      setenv fdtfile armada-7040-db.dtb
      setenv image_name Image
      setenv bootcmd 'usb start; ext4load usb 0:1 $kernel_addr $image_name; ext4load usb 0:1 $fdt_addr $fdtfile; setenv bootargs $console $mtdparts $bootargs_root; booti $kernel_addr - $fdt_addr'
      saveenv
      boot

Signed-off-by: Damir Samardzic <damir.samardzic@sartura.hr>
2018-05-21 18:07:47 +02:00

94 lines
2 KiB
Bash
Executable file

#!/bin/sh
#
# Copyright (C) 2013-2015 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#
MVEBU_BOARD_NAME=
MVEBU_MODEL=
mvebu_board_detect() {
local machine
local name
machine=$(cat /proc/device-tree/model)
case "$machine" in
*"Marvell Armada 370 Evaluation Board")
name="armada-370-db"
;;
*"Globalscale Marvell ESPRESSOBin Board")
name="globalscale,espressobin"
;;
*"Marvell Armada 3720 Development Board DB-88F3720-DDR3")
name="marvell,armada-3720-db"
;;
*"Marvell 8040 MACHIATOBin")
name="marvell,armada8040-mcbin"
;;
*"Marvell Armada 8040 DB board")
name="marvell,armada8040-db"
;;
*"Marvell Armada 7040 DB board")
name="marvell,armada7040-db"
;;
*"Globalscale Mirabox")
name="mirabox"
;;
*"Marvell Armada 370 Reference Design")
name="armada-370-rd"
;;
*"Marvell Armada XP Evaluation Board")
name="armada-xp-db"
;;
*"PlatHome OpenBlocks AX3-4 board")
name="openblocks-ax3-4"
;;
*"Marvell Armada XP GP Board")
name="armada-xp-gp"
;;
*"Linksys WRT1200AC")
name="armada-385-linksys-caiman"
;;
*"Linksys WRT1900AC")
name="armada-xp-linksys-mamba"
;;
*"Linksys WRT1900ACv2")
name="armada-385-linksys-cobra"
;;
*"Linksys WRT1900ACS")
name="armada-385-linksys-shelby"
;;
*"Linksys WRT3200ACM")
name="armada-385-linksys-rango"
;;
*"Linksys WRT32X")
name="armada-385-linksys-venom"
;;
*"Marvell Armada 385 Access Point Development Board")
name="armada-385-db-ap"
;;
*"Marvell Armada XP Development Board DB-MV784MP-GP")
name="armada-xp-gp"
;;
*"SolidRun Clearfog Pro A1")
name="armada-388-clearfog-pro"
;;
*"SolidRun Clearfog Base A1")
name="armada-388-clearfog-base"
;;
*"Turris Omnia")
name="armada-385-turris-omnia"
;;
esac
[ -z "$name" ] && name="unknown"
[ -z "$MVEBU_BOARD_NAME" ] && MVEBU_BOARD_NAME="$name"
[ -z "$MVEBU_MODEL" ] && MVEBU_MODEL="$machine"
[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
echo "$MVEBU_BOARD_NAME" > /tmp/sysinfo/board_name
echo "$MVEBU_MODEL" > /tmp/sysinfo/model
}