summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvojo <joris.van.vossen@sintecs.nl>2017-12-20 14:16:47 (GMT)
committervojo <joris.van.vossen@sintecs.nl>2017-12-20 14:26:51 (GMT)
commit4ea837349487cafcbbb2f741e63e5505f66430f7 (patch)
tree210fe03d3c09f7486e2fca3a95afc0256cc98036
parent505d9ce1aae6b4226c33cd0903c0123ea3c8c128 (diff)
downloadu-boot-4ea837349487cafcbbb2f741e63e5505f66430f7.tar.xz
grapeboard Kconfig clean-up and PBL update
-rw-r--r--Makefile4
-rw-r--r--board/scalys/grapeboard/Kconfig10
-rw-r--r--board/scalys/grapeboard/PBL_0x33_0x05_750_250_1000.binbin160 -> 0 bytes
-rw-r--r--board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.binbin0 -> 160 bytes
-rw-r--r--board/scalys/grapeboard/PBL_0x33_0x08_750_250_1000.binbin160 -> 0 bytes
-rw-r--r--board/scalys/grapeboard/PBL_0x35_0x08_750_250_1000.binbin160 -> 0 bytes
-rw-r--r--board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.binbin0 -> 160 bytes
-rw-r--r--board/scalys/grapeboard/grapeboard.c1
-rw-r--r--configs/grapeboard_pcie_qspi_defconfig3
-rw-r--r--configs/grapeboard_sata_qspi_defconfig3
-rw-r--r--include/configs/grapeboard.h93
11 files changed, 50 insertions, 64 deletions
diff --git a/Makefile b/Makefile
index ddc8624..42fd875 100644
--- a/Makefile
+++ b/Makefile
@@ -1205,8 +1205,8 @@ u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(SPL_PAYLOAD) FORCE
#Concatenate PBL and U-boot binaries automatically
OBJCOPYFLAGS_u-boot-pbl.bin := -I binary -O binary --pad-to=$(CONFIG_U_BOOT_PAD_TO) \
--gap-fill=0xff
-
-u-boot-pbl.bin: $(srctree)/$(CONFIG_PBL_BINARY:"%"=%) u-boot.bin FORCE
+
+u-boot-pbl.bin: $(srctree)/$(CONFIG_PBL_BINARY_SRC:"%"=%) u-boot.bin FORCE
$(call if_changed,pad_cat)
# PPC4xx needs the SPL at the end of the image, since the reset vector
diff --git a/board/scalys/grapeboard/Kconfig b/board/scalys/grapeboard/Kconfig
index b038577..ef07ad6 100644
--- a/board/scalys/grapeboard/Kconfig
+++ b/board/scalys/grapeboard/Kconfig
@@ -43,14 +43,18 @@ config RESCUE_UBOOT_CONFIG
endchoice
-config PBL_BINARY
+config PBL_IMAGE
bool
+ default y
+ prompt "Concat PBL and U-boot"
-config PBL_IMAGE
+config U_BOOT_PAD_TO
string
-config U_BOOT_PAD_TO
+config PBL_BINARY_SRC
string
+ depends on PBL_IMAGE
+ prompt "Modify RCW binary source"
endmenu
diff --git a/board/scalys/grapeboard/PBL_0x33_0x05_750_250_1000.bin b/board/scalys/grapeboard/PBL_0x33_0x05_750_250_1000.bin
deleted file mode 100644
index 43cfa77..0000000
--- a/board/scalys/grapeboard/PBL_0x33_0x05_750_250_1000.bin
+++ /dev/null
Binary files differ
diff --git a/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin b/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin
new file mode 100644
index 0000000..994511d
--- /dev/null
+++ b/board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin
Binary files differ
diff --git a/board/scalys/grapeboard/PBL_0x33_0x08_750_250_1000.bin b/board/scalys/grapeboard/PBL_0x33_0x08_750_250_1000.bin
deleted file mode 100644
index 049d7bb..0000000
--- a/board/scalys/grapeboard/PBL_0x33_0x08_750_250_1000.bin
+++ /dev/null
Binary files differ
diff --git a/board/scalys/grapeboard/PBL_0x35_0x08_750_250_1000.bin b/board/scalys/grapeboard/PBL_0x35_0x08_750_250_1000.bin
deleted file mode 100644
index ad85162..0000000
--- a/board/scalys/grapeboard/PBL_0x35_0x08_750_250_1000.bin
+++ /dev/null
Binary files differ
diff --git a/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin b/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin
new file mode 100644
index 0000000..86d6227
--- /dev/null
+++ b/board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin
Binary files differ
diff --git a/board/scalys/grapeboard/grapeboard.c b/board/scalys/grapeboard/grapeboard.c
index 60d2a14..a08cfe3 100644
--- a/board/scalys/grapeboard/grapeboard.c
+++ b/board/scalys/grapeboard/grapeboard.c
@@ -28,6 +28,7 @@
#include <fsl_sec.h>
#include <fsl_csu.h>
#include "usb_grapeboard.h"
+#include <../../../include/generated/autoconf.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/configs/grapeboard_pcie_qspi_defconfig b/configs/grapeboard_pcie_qspi_defconfig
index 621c547..cbb149e 100644
--- a/configs/grapeboard_pcie_qspi_defconfig
+++ b/configs/grapeboard_pcie_qspi_defconfig
@@ -5,9 +5,10 @@ CONFIG_QSPI_AHB_INIT=y
CONFIG_DEFAULT_DEVICE_TREE="grapeboard"
CONFIG_SERDES_D_TO_PCIE=y
CONFIG_STANDARD_UBOOT_CONFIG=y
-CONFIG_CLUSTER_CLK_FREQ=125000000
CONFIG_SYS_LS_PPA_FW_ADDR=0x40240000
CONFIG_SYS_LS_PFE_FW_ADDR=0x40280000
+CONFIG_PBL_BINARY_SRC="board/scalys/grapeboard/PBL_0x33_0x05_800_250_1000.bin"
+
# CONFIG_SYS_MALLOC_F is not set
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/grapeboard_sata_qspi_defconfig b/configs/grapeboard_sata_qspi_defconfig
index 5483e22..90f7f36 100644
--- a/configs/grapeboard_sata_qspi_defconfig
+++ b/configs/grapeboard_sata_qspi_defconfig
@@ -5,9 +5,10 @@ CONFIG_QSPI_AHB_INIT=y
CONFIG_DEFAULT_DEVICE_TREE="grapeboard"
CONFIG_SERDES_D_TO_SATA=y
CONFIG_STANDARD_UBOOT_CONFIG=y
-CONFIG_CLUSTER_CLK_FREQ=125000000
CONFIG_SYS_LS_PPA_FW_ADDR=0x40240000
CONFIG_SYS_LS_PFE_FW_ADDR=0x40280000
+CONFIG_PBL_BINARY_SRC="board/scalys/grapeboard/PBL_0x35_0x08_800_250_1000.bin"
+
# CONFIG_SYS_MALLOC_F is not set
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
diff --git a/include/configs/grapeboard.h b/include/configs/grapeboard.h
index 89fe713..ebfa2dc 100644
--- a/include/configs/grapeboard.h
+++ b/include/configs/grapeboard.h
@@ -16,37 +16,23 @@
#include <asm/arch/config.h>
#include <asm/arch/stream_id_lsch2.h>
#include <asm/arch/soc.h>
-
-#define CONFIG_PBL_IMAGE
-#ifdef CONFIG_PBL_IMAGE
-
-/* Set the PBL(RCW+PBI) depending on the chosen SERDES option */
-#if (defined(CONFIG_SERDES_D_TO_SATA))
-#define CONFIG_PBL_BINARY board/scalys/grapeboard/PBL_0x35_0x08_750_250_1000.bin
-#elif (defined(CONFIG_SERDES_D_TO_PCIE))
-#define CONFIG_PBL_BINARY board/scalys/grapeboard/PBL_0x33_0x05_750_250_1000.bin
-#else
-#error Invalid SERDES option
-#endif
-
-#endif /* CONFIG_PBL_IMAGE */
+#include <../../../include/generated/autoconf.h>
#define CONFIG_SUPPORT_RAW_INITRD
#define CONFIG_DISPLAY_BOARDINFO_LATE
-/* Make sure text/u-boot base aligns with the pointer set in the PBL */
-#define CONFIG_U_BOOT_PAD_TO 0x1000
-#define CONFIG_SYS_TEXT_BASE 0x40001000
+/* Match the following u-boot offsets with the value in the PBI instructions */
+#define CONFIG_U_BOOT_PAD_TO 0x1000
+#define CONFIG_SYS_TEXT_BASE 0x40001000
-#define CONFIG_SYS_CLK_FREQ 125000000
+#define CONFIG_SYS_CLK_FREQ 125000000 /* 125MHz */
#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_FSL_OCRAM_BASE + 0xfff0)
#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_DDR_SDRAM_BASE + 0x10000000)
-
/* DDR */
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
#define CONFIG_SYS_FSL_DDR_SDRAM_BASE_PHY 0
@@ -68,7 +54,7 @@
#define CONFIG_LAYERSCAPE_NS_ACCESS
/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN (0x40000 + 128 * 1024)
/* QSPI */
#ifdef CONFIG_QSPI_BOOT
@@ -85,14 +71,18 @@
#define QSPI0_AMBA_BASE 0x40000000
#define CONFIG_SPI_FLASH_SPANSION
#define FSL_QSPI_FLASH_SIZE SZ_64M
-#define FSL_QSPI_FLASH_NUM 2
+#define FSL_QSPI_FLASH_NUM 1 /* Other flash is not accessible by default */
/* QSPI Environment */
+#if CONFIG_RESCUE_UBOOT_CONFIG
+#define CONFIG_ENV_IS_NOWHERE
+#else
#define CONFIG_ENV_OVERWRITE
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_SIZE 0x40000 /* 256KB */
#define CONFIG_ENV_OFFSET 0x200000 /* 2MB */
#define CONFIG_ENV_SECT_SIZE 0x40000
+#endif
#endif /* CONFIG_QSPI_BOOT */
/* I2C */
@@ -149,10 +139,10 @@
#define CONFIG_SCSI_AHCI
#define CONFIG_SCSI_AHCI_PLAT
#define CONFIG_CMD_SCSI
-#define CONFIG_SYS_SATA AHCI_BASE_ADDR
-#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
-#define CONFIG_SYS_SCSI_MAX_LUN 1
-#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * CONFIG_SYS_SCSI_MAX_LUN)
+#define CONFIG_SYS_SATA AHCI_BASE_ADDR
+#define CONFIG_SYS_SCSI_MAX_SCSI_ID 1
+#define CONFIG_SYS_SCSI_MAX_LUN 1
+#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * CONFIG_SYS_SCSI_MAX_LUN)
/* PCIE */
#define CONFIG_PCIE1
@@ -163,9 +153,11 @@
/* Mtdparts configuration */
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
+/*#define CONFIG_CMD_MTDPARTS*/
+#define CONFIG_USE_SPIFLASH
#define MTDIDS_DEFAULT \
- "qspi0=40000000.qspi"
+ "nor0=spi40000000.0"
#define MTDPART_DEFAULT_PARTITIONS \
"2M@0x0(u-boot)," \
@@ -174,13 +166,12 @@
"256k(pfe_ucode),"
#define MTDPARTS_DEFAULT \
- "mtdparts=40000000.qspi:" \
+ "mtdparts=spi40000000.0:" \
MTDPART_DEFAULT_PARTITIONS \
"-(rootfs)"
/* Default environment variables */
-#if CONFIG_STANDARD_UBOOT_CONFIG
-#define CONFIG_EXTRA_ENV_SETTINGS \
+#define COMMON_UBOOT_CONFIG \
"verify=no\0" \
"fdt_high=0xffffffffffffffff\0" \
"initrd_high=0xffffffffffffffff\0" \
@@ -201,7 +192,22 @@
"ethaddr=02:00:00:ba:be:01\0" \
"eth1addr=02:00:00:ba:be:02\0" \
"tftp_path=\0" \
- "autoload=no\0" \
+ "autoload=no\0"
+
+/* Default flash specific environment variables */
+#if CONFIG_RESCUE_UBOOT_CONFIG
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ COMMON_UBOOT_CONFIG
+ /* todo: add recovery variables */
+#undef CONFIG_BOOTCOMMAND
+#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
+/* recover from sd card */
+#define CONFIG_BOOTCOMMAND "test"
+#endif
+
+#else /* if CONFIG_STANDARD_UBOOT_CONFIG */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ COMMON_UBOOT_CONFIG \
"update_pbl_uboot_qspi_nor_nw=" \
"dhcp;" \
"tftp $load_addr $tftp_path/u-boot-pbl.bin;" \
@@ -246,35 +252,8 @@
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
#define CONFIG_BOOTCOMMAND "run mmcboot"
#endif
-#ifdef CONFIG_BOOTARGS
-#undef CONFIG_BOOTARGS
-#endif
#define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rw " \
"earlycon=uart8250,mmio,0x21c0500 quiet lpj=250000 noinitrd"
-#else /* if CONFIG_RESCUE_UBOOT_CONFIG */
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "verify=no\0" \
- "fdt_high=0xffffffffffffffff\0" \
- "initrd_high=0xffffffffffffffff\0" \
- "fdt_addr=0x00f00000\0" \
- "kernel_addr=0x01000000\0" \
- "kernelheader_addr=0x800000\0" \
- "scriptaddr=0x80000000\0" \
- "scripthdraddr=0x80080000\0" \
- "fdtheader_addr_r=0x80100000\0" \
- "kernelheader_addr_r=0x80200000\0" \
- "kernel_addr_r=0x81000000\0" \
- "fdt_addr_r=0x90000000\0" \
- "load_addr=0xa0000000\0" \
- "kernel_size=0x2800000\0" \
- "kernelheader_size=0x40000\0"
-
-#undef CONFIG_BOOTCOMMAND
-#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
-/* recover from sd card */
-#define CONFIG_BOOTCOMMAND ""
-#endif
-
#endif
#include <asm/fsl_secure_boot.h>