]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: Add CRS305-1G-4S Bit board
authorLuka Kovacic <luka.kovacic@sartura.hr>
Thu, 23 Jul 2020 08:56:36 +0000 (10:56 +0200)
committerStefan Roese <sr@denx.de>
Thu, 6 Aug 2020 12:12:14 +0000 (14:12 +0200)
MikroTik CRS305-1G-4S Bit board has a switch chip with an integrated
Marvell Prestera 98DX3236 CPU.

The Bit board variant is added, which has a bigger Macronix flash.

Add basic U-Boot, UART and Winbond SPI flash support.

Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Jakov Petrina <jakov.petrina@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
arch/arm/dts/Makefile
arch/arm/dts/armada-xp-crs305-1g-4s-bit.dts [new file with mode: 0644]
board/mikrotik/crs3xx-98dx3236/MAINTAINERS
configs/crs305-1g-4s-bit_defconfig [new file with mode: 0644]

index 43a2ee12134302219881a48a96cb547217cfdd2d..519548073ae0e55989c3bfaf9251ca4ffd224c59 100644 (file)
@@ -219,6 +219,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=                 \
        armada-8040-db.dtb                      \
        armada-8040-mcbin.dtb                   \
        armada-xp-crs305-1g-4s.dtb              \
+       armada-xp-crs305-1g-4s-bit.dtb          \
        armada-xp-db-xc3-24g4xg.dtb             \
        armada-xp-gp.dtb                        \
        armada-xp-maxbcm.dtb                    \
diff --git a/arch/arm/dts/armada-xp-crs305-1g-4s-bit.dts b/arch/arm/dts/armada-xp-crs305-1g-4s-bit.dts
new file mode 100644 (file)
index 0000000..059bf48
--- /dev/null
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree file for MikroTik CRS305-1G-4S+ Bit board
+ *
+ * Copyright (C) 2020 Sartura Ltd.
+ * Author: Luka Kovacic <luka.kovacic@sartura.hr>
+ */
+
+#include "armada-xp-crs305-1g-4s.dtsi"
+
+/ {
+       model = "MikroTik CRS305-1G-4S+ Bit";
+};
+
+&spi0 {
+       status = "okay";
+
+       spi-flash@0 {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               compatible = "spi-flash", "jedec,spi-nor";
+               reg = <0>; /* Chip select 0 */
+               spi-max-frequency = <108000000>;
+               m25p,fast-read;
+
+               partition@u-boot {
+                       reg = <0x00000000 0x001f0000>;
+                       label = "u-boot";
+               };
+               partition@u-boot-env {
+                       reg = <0x001f0000 0x00010000>;
+                       label = "u-boot-env";
+               };
+               partition@ubi1 {
+                       reg = <0x00200000 0x03f00000>;
+                       label = "ubi1";
+               };
+               partition@ubi2 {
+                       reg = <0x04100000 0x03f00000>;
+                       label = "ubi2";
+               };
+       };
+};
index 127e0eac60499b5c056dea0923cd4057e704dc37..d02584bb1dcad577ab8d53ee09826bd5305dd0e4 100644 (file)
@@ -6,6 +6,9 @@ F:      include/configs/crs3xx-98dx3236.h
 
 CRS305-1G-4S BOARD
 M:     Luka Kovacic <luka.kovacic@sartura.hr>
+M:     Luka Perkov <luka.perkov@sartura.hr>
 S:     Maintained
 F:     configs/crs305-1g-4s_defconfig
+F:     configs/crs305-1g-4s-bit_defconfig
 F:     arch/arm/dts/armada-xp-crs305-1g-4s.dts
+F:     arch/arm/dts/armada-xp-crs305-1g-4s-bit.dts
diff --git a/configs/crs305-1g-4s-bit_defconfig b/configs/crs305-1g-4s-bit_defconfig
new file mode 100644 (file)
index 0000000..0ecf11a
--- /dev/null
@@ -0,0 +1,54 @@
+CONFIG_ARM=y
+CONFIG_ARCH_CPU_INIT=y
+CONFIG_ARCH_MVEBU=y
+CONFIG_SYS_TEXT_BASE=0x00800000
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_TARGET_CRS3XX_98DX3236=y
+CONFIG_ENV_SIZE=0x10000
+CONFIG_ENV_SECT_SIZE=0x10000
+CONFIG_ENV_OFFSET=0x1F0000
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
+# CONFIG_EFI_LOADER is not set
+CONFIG_BUILD_TARGET="u-boot.kwb"
+CONFIG_USE_PREBOOT=y
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_HUSH_PARSER=y
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Autoboot in %d seconds, to stop use 's' key\n"
+CONFIG_AUTOBOOT_STOP_STR="s"
+CONFIG_AUTOBOOT_KEYED_CTRLC=y
+CONFIG_CMD_BOOTZ=y
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_I2C is not set
+CONFIG_CMD_SPI=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_DEFAULT_DEVICE_TREE="armada-xp-crs305-1g-4s-bit"
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_BLK=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_ENV=y
+# CONFIG_DM_I2C is not set
+# CONFIG_SYS_I2C_MVTWSI is not set
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_PARTITIONS=y
+CONFIG_DM_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_MACRONIX=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_FIT_BEST_MATCH=y
+CONFIG_PCI=y
+CONFIG_PCI_MVEBU=y
+CONFIG_SYS_NS16550=y
+CONFIG_KIRKWOOD_SPI=y