MIPS: add BMIPS Comtrend CT-5361 board
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 16 May 2017 16:39:04 +0000 (18:39 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 31 May 2017 12:49:55 +0000 (14:49 +0200)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/mips/dts/Makefile
arch/mips/dts/comtrend,ct-5361.dts [new file with mode: 0644]
arch/mips/mach-bmips/Kconfig
board/comtrend/ct5361/Kconfig [new file with mode: 0644]
board/comtrend/ct5361/MAINTAINERS [new file with mode: 0644]
board/comtrend/ct5361/Makefile [new file with mode: 0644]
board/comtrend/ct5361/ct-5361.c [new file with mode: 0644]
configs/comtrend_ct5361_ram_defconfig [new file with mode: 0644]
include/configs/comtrend_ct5361.h [new file with mode: 0644]

index 4c02c48c11168ca5288433d9f0abd51ea6d21ac7..9bab7446307c5acd15bea2173de54c8927ae06d0 100644 (file)
@@ -9,6 +9,7 @@ dtb-$(CONFIG_TARGET_MALTA) += mti,malta.dtb
 dtb-$(CONFIG_TARGET_PIC32MZDASK) += pic32mzda_sk.dtb
 dtb-$(CONFIG_TARGET_XILFPGA) += nexys4ddr.dtb
 dtb-$(CONFIG_BOARD_COMTREND_AR5387UN) += comtrend,ar-5387un.dtb
+dtb-$(CONFIG_BOARD_COMTREND_CT5361) += comtrend,ct-5361.dtb
 dtb-$(CONFIG_BOARD_COMTREND_VR3032U) += comtrend,vr-3032u.dtb
 dtb-$(CONFIG_BOARD_HUAWEI_HG556A) += huawei,hg556a.dtb
 dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb
diff --git a/arch/mips/dts/comtrend,ct-5361.dts b/arch/mips/dts/comtrend,ct-5361.dts
new file mode 100644 (file)
index 0000000..c909a52
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "brcm,bcm6348.dtsi"
+
+/ {
+       model = "Comtrend CT-5361";
+       compatible = "comtrend,ct-5361", "brcm,bcm6348";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+
+       gpio-leds {
+               compatible = "gpio-leds";
+
+               power_green {
+                       label = "CT-5361:green:power";
+                       gpios = <&gpio0 0 1>;
+               };
+
+               alarm_red {
+                       label = "CT-5361:red:alarm";
+                       gpios = <&gpio0 2 1>;
+               };
+       };
+};
+
+&gpio0 {
+       status = "okay";
+};
+
+&pflash {
+       status = "okay";
+};
+
+&uart0 {
+       u-boot,dm-pre-reloc;
+       status = "okay";
+};
index b7f7b1e2a5d0c1881a6801bb504c1cf2f8137c1f..b9805874eac802221c90f453526da13fe3075667 100644 (file)
@@ -65,6 +65,17 @@ config BOARD_COMTREND_AR5387UN
        depends on SOC_BMIPS_BCM6328
        select BMIPS_SUPPORTS_BOOT_RAM
 
+config BOARD_COMTREND_CT5361
+       bool "Comtrend CT-5361"
+       depends on SOC_BMIPS_BCM6348
+       select BMIPS_SUPPORTS_BOOT_RAM
+       help
+         Comtrend CT-5361 boards have a BCM6348 SoC with 16 MB of RAM and 4 MB
+         of flash (CFI).
+         Between its different peripherals there's a BCM5325 switch with 4
+         ethernet ports, 1 USB port, 1 UART, GPIO buttons and LEDs, and a
+         BCM4312 (miniPCI).
+
 config BOARD_COMTREND_VR3032U
        bool "Comtrend VR-3032u board"
        depends on SOC_BMIPS_BCM63268
@@ -99,6 +110,7 @@ config BMIPS_SUPPORTS_BOOT_RAM
        bool
 
 source "board/comtrend/ar5387un/Kconfig"
+source "board/comtrend/ct5361/Kconfig"
 source "board/comtrend/vr3032u/Kconfig"
 source "board/huawei/hg556a/Kconfig"
 source "board/sfr/nb4_ser/Kconfig"
diff --git a/board/comtrend/ct5361/Kconfig b/board/comtrend/ct5361/Kconfig
new file mode 100644 (file)
index 0000000..d77d814
--- /dev/null
@@ -0,0 +1,12 @@
+if BOARD_COMTREND_CT5361
+
+config SYS_BOARD
+       default "ct5361"
+
+config SYS_VENDOR
+       default "comtrend"
+
+config SYS_CONFIG_NAME
+       default "comtrend_ct5361"
+
+endif
diff --git a/board/comtrend/ct5361/MAINTAINERS b/board/comtrend/ct5361/MAINTAINERS
new file mode 100644 (file)
index 0000000..aea737a
--- /dev/null
@@ -0,0 +1,6 @@
+COMTREND CT-5361 BOARD
+M:     Álvaro Fernández Rojas <noltari@gmail.com>
+S:     Maintained
+F:     board/comtrend/ct-5361/
+F:     include/configs/comtrend_ct5361.h
+F:     configs/comtrend_ct5361_ram_defconfig
diff --git a/board/comtrend/ct5361/Makefile b/board/comtrend/ct5361/Makefile
new file mode 100644 (file)
index 0000000..872e80a
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y += ct-5361.o
diff --git a/board/comtrend/ct5361/ct-5361.c b/board/comtrend/ct5361/ct-5361.c
new file mode 100644 (file)
index 0000000..d181ca6
--- /dev/null
@@ -0,0 +1,7 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
diff --git a/configs/comtrend_ct5361_ram_defconfig b/configs/comtrend_ct5361_ram_defconfig
new file mode 100644 (file)
index 0000000..9ec0c41
--- /dev/null
@@ -0,0 +1,57 @@
+CONFIG_ARCH_BMIPS=y
+CONFIG_BAUDRATE=115200
+CONFIG_BCM6345_CLK=y
+CONFIG_BCM6345_GPIO=y
+CONFIG_BCM6345_SERIAL=y
+CONFIG_BMIPS_BOOT_RAM=y
+CONFIG_BOARD_COMTREND_CT5361=y
+CONFIG_CFI_FLASH=y
+# CONFIG_CMD_BOOTD is not set
+CONFIG_CMD_BOOTM=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_CRC32 is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_EXPORTENV is not set
+CONFIG_CMD_FLASH=y
+# CONFIG_CMD_FPGA is not set
+# CONFIG_CMD_GPIO is not set
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LOADB=y
+# CONFIG_CMD_LOADS is not set
+CONFIG_CMD_MEMINFO=y
+# CONFIG_CMD_MISC is not set
+# CONFIG_CMD_NET is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_XIMG is not set
+CONFIG_DEFAULT_DEVICE_TREE="comtrend,ct-5361"
+CONFIG_DISPLAY_CPUINFO=y
+# CONFIG_DM_DEVICE_REMOVE is not set
+CONFIG_DM_GPIO=y
+CONFIG_DM_RESET=y
+CONFIG_DM_SERIAL=y
+CONFIG_HUSH_PARSER=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_MIPS=y
+# CONFIG_MIPS_BOOT_CMDLINE_LEGACY is not set
+# CONFIG_MIPS_BOOT_ENV_LEGACY is not set
+CONFIG_MIPS_BOOT_FDT=y
+CONFIG_MTD=y
+CONFIG_MTD_DEVICE=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_RESET=y
+CONFIG_RESET_BCM6345=y
+CONFIG_SOC_BMIPS_BCM6348=y
+# CONFIG_SPL_SERIAL_PRESENT is not set
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SYS_PROMPT="CT-5361 # "
+CONFIG_SYS_TEXT_BASE=0x80010000
+CONFIG_WDT=y
+CONFIG_WDT_BCM6345=y
diff --git a/include/configs/comtrend_ct5361.h b/include/configs/comtrend_ct5361.h
new file mode 100644 (file)
index 0000000..099684d
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2017 Álvaro Fernández Rojas <noltari@gmail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <configs/bmips_common.h>
+#include <configs/bmips_bcm6348.h>
+
+#define CONFIG_REMAKE_ELF
+
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_ENV_SIZE                        (8 * 1024)
+
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
+
+#define CONFIG_SYS_FLASH_CFI           1
+#define CONFIG_FLASH_CFI_DRIVER                1