]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-mmc
authorTom Rini <trini@konsulko.com>
Tue, 21 Mar 2017 18:10:15 +0000 (14:10 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 21 Mar 2017 18:10:15 +0000 (14:10 -0400)
46 files changed:
.travis.yml
arch/arm/Kconfig
arch/arm/dts/am437x-gp-evm-u-boot.dtsi [new file with mode: 0644]
arch/arm/dts/omap5-u-boot.dtsi [new file with mode: 0644]
arch/arm/include/asm/arch-omap5/gpio.h
arch/arm/include/asm/omap_common.h
arch/arm/mach-keystone/Kconfig
arch/arm/mach-omap2/am33xx/Kconfig
arch/arm/mach-omap2/am33xx/sys_info.c
arch/arm/mach-omap2/u-boot-spl.lds
board/broadcom/bcm958712k/MAINTAINERS [new file with mode: 0644]
board/broadcom/bcmns2/Kconfig [new file with mode: 0644]
board/broadcom/bcmns2/Makefile [new file with mode: 0644]
board/broadcom/bcmns2/northstar2.c [new file with mode: 0644]
board/davinci/da8xxevm/README.da850
board/ti/am57xx/board.c
board/ti/am57xx/mux_data.h
board/ti/common/Kconfig
board/ti/common/board_detect.c
board/ti/common/board_detect.h
board/ti/ks2_evm/Kconfig
board/ti/ks2_evm/board_k2g.c
common/spl/spl.c
configs/am43xx_evm_defconfig
configs/am43xx_evm_ethboot_defconfig
configs/am43xx_evm_usbhost_boot_defconfig
configs/am43xx_hs_evm_defconfig
configs/am57xx_evm_defconfig
configs/am57xx_hs_evm_defconfig
configs/bcm958712k_defconfig [new file with mode: 0644]
configs/dra7xx_evm_defconfig
configs/dra7xx_hs_evm_defconfig
disk/Kconfig
disk/part_efi.c
doc/README.fdt-control
doc/device-tree-bindings/config.txt [new file with mode: 0644]
include/configs/am43xx_evm.h
include/configs/am57xx_evm.h
include/configs/bcm_northstar2.h [new file with mode: 0644]
include/configs/dra7xx_evm.h
include/configs/ti_armv7_keystone2.h
include/configs/ti_omap5_common.h
lib/rsa/Kconfig
net/eth_common.c
test/image/test-fit.py
tools/Makefile

index 8333fae9b333f96b95ca08bba3a3c144118729e1..aaa7433840c3182a40f76ed1a1f5a008c26f3280 100644 (file)
@@ -135,10 +135,13 @@ matrix:
           BUILDMAN="freescale -x powerpc,m68k,aarch64"
     - env:
         - JOB="Freescale AArch64"
-          BUILDMAN="freescale -x powerpc,m68k,armv7,arm9,arm11"
+          BUILDMAN="freescale&aarch64"
     - env:
-        - JOB="i.MX (non-Freescale)"
-          BUILDMAN="mx -x freescale"
+        - JOB="i.MX6 (non-Freescale)"
+          BUILDMAN="mx6 -x freescale"
+    - env:
+        - JOB="i.MX (non-Freescale, non-i.MX6)"
+          BUILDMAN="mx -x freescale,mx6"
     - env:
         - BUILDMAN="samsung"
     - env:
index b758745f4a6962f7f3c12c9c32b5857ad30a4e02..1eb373f3df0ee187d1f3ff98a6b25dc57293d72b 100644 (file)
@@ -559,6 +559,14 @@ config TARGET_BCMNSP
        bool "Support bcmnsp"
        select CPU_V7
 
+config TARGET_BCMNS2
+       bool "Support Broadcom Northstar2"
+       select ARM64
+       help
+         Support for Broadcom Northstar 2 SoCs.  NS2 is a quad-core 64-bit
+         ARMv8 Cortex-A57 processors targeting a broad range of networking
+         applications
+
 config ARCH_EXYNOS
        bool "Samsung EXYNOS"
        select DM
@@ -722,6 +730,12 @@ config OMAP54XX
 config AM43XX
        bool "AM43XX SoC"
        select ARCH_OMAP2
+       imply SPL_DM
+       imply SPL_DM_SEQ_ALIAS
+       imply SPL_OF_CONTROL
+       imply SPL_OF_TRANSLATE
+       imply SPL_SEPARATE_BSS
+       imply SPL_SYS_MALLOC_SIMPLE
        imply SYS_THUMB_BUILD
        help
          Support for AM43xx SOC from Texas Instruments.
@@ -1237,6 +1251,7 @@ source "board/broadcom/bcm23550_w1d/Kconfig"
 source "board/broadcom/bcm28155_ap/Kconfig"
 source "board/broadcom/bcmcygnus/Kconfig"
 source "board/broadcom/bcmnsp/Kconfig"
+source "board/broadcom/bcmns2/Kconfig"
 source "board/cavium/thunderx/Kconfig"
 source "board/cirrus/edb93xx/Kconfig"
 source "board/compulab/cm_t335/Kconfig"
diff --git a/arch/arm/dts/am437x-gp-evm-u-boot.dtsi b/arch/arm/dts/am437x-gp-evm-u-boot.dtsi
new file mode 100644 (file)
index 0000000..885a9a9
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ * Based on "dra7.dtsi"
+ */
+
+/{
+       ocp {
+               u-boot,dm-pre-reloc;
+       };
+};
+
+&uart0 {
+       u-boot,dm-pre-reloc;
+};
+
+&mmc1 {
+       u-boot,dm-pre-reloc;
+};
+
+&mac {
+       u-boot,dm-pre-reloc;
+};
+
+&davinci_mdio {
+       u-boot,dm-pre-reloc;
+};
+
+&cpsw_emac0 {
+       u-boot,dm-pre-reloc;
+};
+
+&phy_sel {
+       u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/omap5-u-boot.dtsi b/arch/arm/dts/omap5-u-boot.dtsi
new file mode 100644 (file)
index 0000000..6305f57
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ * Based on "dra7.dtsi"
+ */
+
+/{
+       ocp {
+               u-boot,dm-pre-reloc;
+       };
+};
+
+&uart1 {
+       u-boot,dm-pre-reloc;
+};
+
+&uart3 {
+       u-boot,dm-pre-reloc;
+};
+
+&mmc1 {
+       u-boot,dm-pre-reloc;
+};
+
+&mmc2 {
+       u-boot,dm-pre-reloc;
+};
+
+&l4_cfg {
+       u-boot,dm-pre-reloc;
+};
+
+&scm {
+       u-boot,dm-pre-reloc;
+};
+
+&scm_conf {
+       u-boot,dm-pre-reloc;
+};
+
+&qspi {
+       u-boot,dm-pre-reloc;
+
+       m25p80@0 {
+               u-boot,dm-pre-reloc;
+       };
+};
index 9dd03c9fa6512b100938d8aec4bd446a936fa590..48e8ca502132f7cf48f7720119137505ca1ebbc5 100644 (file)
@@ -34,4 +34,8 @@
 #define OMAP54XX_GPIO7_BASE            0x48051000
 #define OMAP54XX_GPIO8_BASE            0x48053000
 
+
+/* Get the GPIO index from the given bank number and bank gpio */
+#define GPIO_TO_PIN(bank, bank_gpio)   (32 * (bank - 1) + (bank_gpio))
+
 #endif /* _GPIO_OMAP5_H */
index 2034a5e9b85ec183f8ba75d84b90fdba5d36c134..c1a70b15d02ecad1846688ce4af0da3cd1fc558e 100644 (file)
@@ -767,9 +767,11 @@ static inline u8 is_dra72x(void)
 #define OMAP_SRAM_SCRATCH_VCORES_PTR    (SRAM_SCRATCH_SPACE_ADDR + 0x1C)
 #define OMAP_SRAM_SCRATCH_SYS_CTRL     (SRAM_SCRATCH_SPACE_ADDR + 0x20)
 #define OMAP_SRAM_SCRATCH_BOOT_PARAMS  (SRAM_SCRATCH_SPACE_ADDR + 0x24)
-#define OMAP_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR + 0x28)
-#define OMAP_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200)
-#define OMAP_SRAM_SCRATCH_SPACE_END    (OMAP_SRAM_SCRATCH_BOARD_EEPROM_END)
+#ifndef TI_SRAM_SCRATCH_BOARD_EEPROM_START
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_START (SRAM_SCRATCH_SPACE_ADDR + 0x28)
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_END (SRAM_SCRATCH_SPACE_ADDR + 0x200)
+#endif
+#define OMAP_SRAM_SCRATCH_SPACE_END    (TI_SRAM_SCRATCH_BOARD_EEPROM_END)
 
 /* Boot parameters */
 #define DEVICE_DATA_OFFSET     0x18
index e1962c779a6ad24d32c020ab08b491e3553ddd22..67f5fa0265fc1a3925af3074c8e4c1ecc638d5b2 100644 (file)
@@ -15,6 +15,8 @@ config TARGET_K2L_EVM
 
 config TARGET_K2G_EVM
        bool "TI Keystone 2 Galileo EVM"
+        select BOARD_LATE_INIT
+        select TI_I2C_BOARD_DETECT
 
 endchoice
 
index 865a8d2d04ac4c4f4288e11f42bf35ca4bb2a3b3..cf5d95a26d028e524208b994e97153a9d4f00187 100644 (file)
@@ -119,6 +119,11 @@ config TARGET_AM43XX_EVM
        bool "Support am43xx_evm"
        select BOARD_LATE_INIT
        select TI_I2C_BOARD_DETECT
+       imply DM_ETH
+       imply DM_I2C
+       imply DM_SPI
+       imply DM_SPI_FLASH
+       imply SPI_FLASH_BAR
        imply SPL_ENV_SUPPORT
        imply SPL_EXT_SUPPORT
        imply SPL_FAT_SUPPORT
index f0f72fa6d4dfacb5f04e5c35e9424496b76f8872..e4fc461bd81835a0b6518c3c82648533cf3722dc 100644 (file)
@@ -74,6 +74,10 @@ static char *cpu_revs[] = {
                "2.0",
                "2.1"};
 
+static char *cpu_revs_am43xx[] = {
+               "1.0",
+               "1.1",
+               "1.2"};
 
 static char *dev_types[] = {
                "TST",
@@ -87,6 +91,7 @@ static char *dev_types[] = {
 int print_cpuinfo(void)
 {
        char *cpu_s, *sec_s, *rev_s;
+       char **cpu_rev_arr = cpu_revs;
 
        switch (get_cpu_type()) {
        case AM335X:
@@ -97,6 +102,7 @@ int print_cpuinfo(void)
                break;
        case AM437X:
                cpu_s = "AM437X";
+               cpu_rev_arr = cpu_revs_am43xx;
                break;
        default:
                cpu_s = "Unknown CPU type";
@@ -104,7 +110,7 @@ int print_cpuinfo(void)
        }
 
        if (get_cpu_rev() < ARRAY_SIZE(cpu_revs))
-               rev_s = cpu_revs[get_cpu_rev()];
+               rev_s = cpu_rev_arr[get_cpu_rev()];
        else
                rev_s = "?";
 
index 8fec715ca56c85de2b6be7069ac748b1f7e065b4..e9da2a9dd18627b625b2fd576080161cb03af213 100644 (file)
@@ -46,6 +46,8 @@ SECTIONS
                *(.__end)
        }
 
+       _image_binary_end = .;
+
        .bss :
        {
                . = ALIGN(4);
diff --git a/board/broadcom/bcm958712k/MAINTAINERS b/board/broadcom/bcm958712k/MAINTAINERS
new file mode 100644 (file)
index 0000000..024fb14
--- /dev/null
@@ -0,0 +1,6 @@
+BCM958712K BOARD
+M:     Jon Mason <jon.mason@broadcom.com>
+S:     Maintained
+F:     board/broadcom/bcmns2/
+F:     include/configs/bcm_northstar2.h
+F:     configs/bcm958712k_defconfig
diff --git a/board/broadcom/bcmns2/Kconfig b/board/broadcom/bcmns2/Kconfig
new file mode 100644 (file)
index 0000000..3ac6724
--- /dev/null
@@ -0,0 +1,15 @@
+if TARGET_BCMNS2
+
+config SYS_BOARD
+       default "bcmns2"
+
+config SYS_VENDOR
+       default "broadcom"
+
+config SYS_SOC
+       default "ns2"
+
+config SYS_CONFIG_NAME
+       default "bcm_northstar2"
+
+endif
diff --git a/board/broadcom/bcmns2/Makefile b/board/broadcom/bcmns2/Makefile
new file mode 100644 (file)
index 0000000..f6ddd80
--- /dev/null
@@ -0,0 +1,7 @@
+#
+# Copyright 2016 Broadcom Ltd.
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+obj-y  := northstar2.o
diff --git a/board/broadcom/bcmns2/northstar2.c b/board/broadcom/bcmns2/northstar2.c
new file mode 100644 (file)
index 0000000..a64431d
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * (C) Copyright 2016 Broadcom Ltd.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+#include <common.h>
+#include <asm/system.h>
+#include <asm/armv8/mmu.h>
+
+static struct mm_region ns2_mem_map[] = {
+       {
+               .virt = 0x0UL,
+               .phys = 0x0UL,
+               .size = 0x80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+                        PTE_BLOCK_NON_SHARE |
+                        PTE_BLOCK_PXN | PTE_BLOCK_UXN
+       }, {
+               .virt = 0x80000000UL,
+               .phys = 0x80000000UL,
+               .size = 0xff80000000UL,
+               .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+                        PTE_BLOCK_INNER_SHARE
+       }, {
+               /* List terminator */
+               0,
+       }
+};
+
+struct mm_region *mem_map = ns2_mem_map;
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+       return 0;
+}
+
+int dram_init(void)
+{
+       gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+                                   PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE);
+       return 0;
+}
+
+void dram_init_banksize(void)
+{
+       gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+       gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+       gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE + PHYS_SDRAM_1_SIZE;
+       gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+}
+
+void reset_cpu(ulong addr)
+{
+       psci_system_reset();
+}
index 29cb4ec40827f53bf91cba731e39f3acbbc2d303..519267e2f06a45efc783692fe5344cc3e0689b08 100644 (file)
@@ -47,6 +47,47 @@ U-Boot > sf erase 0 +320000
 U-Boot > tftp u-boot.ais
 U-Boot > sf write c0700000 0 $filesize
 
+Flashing the images to NAND
+===========================
+The AIS image can be written to NAND using the u-boot "nand" commands.
+
+Example:
+
+OMAPL138_LCDK requires the AIS image to be written to the second block of
+the NAND flash.
+
+From the "nand info" command we see that the second block would start at
+offset 0x20000:
+
+  U-Boot > nand info
+      sector size      128 KiB (0x20000)
+      Page size       2048 b
+
+From the tftp command we see that we need to copy 0x74908 bytes from
+memory address 0xc0700000 (0x75000 if we align a page of 2048):
+
+  U-Boot > tftp u-boot.ais
+      Load address: 0xc0700000
+      Bytes transferred = 477448 (74908 hex)
+
+The commands to write the image from memory to NAND would be:
+
+  U-Boot > nand erase 0x20000 0x75000
+  U-Boot > nand write 0xc0700000 0x20000 0x75000
+
+Alternatively, MTD partitions may be defined. Using "mtdparts" to
+conveniently have a bootloader partition starting at the second block
+(offset 0x20000):
+
+  setenv mtdids nand0=davinci_nand.0
+  setenv mtdparts mtdparts=davinci_nand.0:128k(bootenv),2m(bootloader)
+
+In this case the commands would be simplified to:
+
+  U-Boot > tftp u-boot.ais
+  U-Boot > nand erase.part bootloader
+  U-Boot > nand write 0xc0700000 bootloader
+
 Flashing the images to MMC
 ==========================
 If the boot pins are set to boot from mmc, the RBL will try to load the
index df9039c7692a299e48c57ccb00239f5025baa5f9..1cfc08bc9ce5b4c3d266bb7c056f9fa1249f20d1 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#define GPIO_ETH_LCD           GPIO_TO_PIN(2, 22)
 /* GPIO 7_11 */
 #define GPIO_DDR_VTT_EN 203
 
+/* Touch screen controller to identify the LCD */
+#define OSD_TS_FT_BUS_ADDRESS  0
+#define OSD_TS_FT_CHIP_ADDRESS 0x38
+#define OSD_TS_FT_REG_ID       0xA3
+/*
+ * Touchscreen IDs for various OSD panels
+ * Ref: http://www.osddisplays.com/TI/OSD101T2587-53TS_A.1.pdf
+ */
+/* Used on newer osd101t2587 Panels */
+#define OSD_TS_FT_ID_5x46      0x54
+/* Used on older osd101t2045 Panels */
+#define OSD_TS_FT_ID_5606      0x08
+
 #define SYSINFO_BOARD_NAME_MAX_LEN     45
 
 #define TPS65903X_PRIMARY_SECONDARY_PAD2       0xFB
@@ -449,6 +463,21 @@ void hw_data_init(void)
        *ctrl = &dra7xx_ctrl;
 }
 
+bool am571x_idk_needs_lcd(void)
+{
+       bool needs_lcd;
+
+       gpio_request(GPIO_ETH_LCD, "nLCD_Detect");
+       if (gpio_get_value(GPIO_ETH_LCD))
+               needs_lcd = false;
+       else
+               needs_lcd = true;
+
+       gpio_free(GPIO_ETH_LCD);
+
+       return needs_lcd;
+}
+
 int board_init(void)
 {
        gpmc_init();
@@ -457,6 +486,62 @@ int board_init(void)
        return 0;
 }
 
+void am57x_idk_lcd_detect(void)
+{
+       int r = -ENODEV;
+       char *idk_lcd = "no";
+       uint8_t buf = 0;
+
+       /* Only valid for IDKs */
+       if (board_is_x15() || board_is_am572x_evm())
+               return;
+
+       /* Only AM571x IDK has gpio control detect.. so check that */
+       if (board_is_am571x_idk() && !am571x_idk_needs_lcd())
+               goto out;
+
+       r = i2c_set_bus_num(OSD_TS_FT_BUS_ADDRESS);
+       if (r) {
+               printf("%s: Failed to set bus address to %d: %d\n",
+                      __func__, OSD_TS_FT_BUS_ADDRESS, r);
+               goto out;
+       }
+       r = i2c_probe(OSD_TS_FT_CHIP_ADDRESS);
+       if (r) {
+               /* AM572x IDK has no explicit settings for optional LCD kit */
+               if (board_is_am571x_idk()) {
+                       printf("%s: Touch screen detect failed: %d!\n",
+                              __func__, r);
+               }
+               goto out;
+       }
+
+       /* Read FT ID */
+       r = i2c_read(OSD_TS_FT_CHIP_ADDRESS, OSD_TS_FT_REG_ID, 1, &buf, 1);
+       if (r) {
+               printf("%s: Touch screen ID read %d:0x%02x[0x%02x] failed:%d\n",
+                      __func__, OSD_TS_FT_BUS_ADDRESS, OSD_TS_FT_CHIP_ADDRESS,
+                      OSD_TS_FT_REG_ID, r);
+               goto out;
+       }
+
+       switch (buf) {
+       case OSD_TS_FT_ID_5606:
+               idk_lcd = "osd101t2045";
+               break;
+       case OSD_TS_FT_ID_5x46:
+               idk_lcd = "osd101t2587";
+               break;
+       default:
+               printf("%s: Unidentifed Touch screen ID 0x%02x\n",
+                      __func__, buf);
+               /* we will let default be "no lcd" */
+       }
+out:
+       setenv("idk_lcd", idk_lcd);
+       return;
+}
+
 int board_late_init(void)
 {
        setup_board_eeprom_env();
@@ -489,6 +574,12 @@ int board_late_init(void)
 
        omap_die_id_serial();
 
+       am57x_idk_lcd_detect();
+
+#if !defined(CONFIG_SPL_BUILD)
+       board_ti_set_ethaddr(2);
+#endif
+
        return 0;
 }
 
@@ -551,6 +642,17 @@ void recalibrate_iodelay(void)
                do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
        }
 
+       if (board_is_am571x_idk()) {
+               if (am571x_idk_needs_lcd()) {
+                       pconf = core_padconf_array_vout_am571x_idk;
+                       pconf_sz = ARRAY_SIZE(core_padconf_array_vout_am571x_idk);
+               } else {
+                       pconf = core_padconf_array_icss1eth_am571x_idk;
+                       pconf_sz = ARRAY_SIZE(core_padconf_array_icss1eth_am571x_idk);
+               }
+               do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);
+       }
+
        /* Setup IOdelay configuration */
        ret = do_set_iodelay((*ctrl)->iodelay_config_base, iod, iod_sz);
 err:
index 2f5243ee7ad9dfc77a864ba7950e8644ee4904ec..5485212e540025dd2ecd6b38a492f58160afb6d8 100644 (file)
@@ -549,13 +549,6 @@ const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
        {VIN2A_D0, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d0.pr1_uart0_rxd */
        {VIN2A_D1, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d1.pr1_uart0_txd */
        {VIN2A_D2, (M10 | PIN_INPUT_PULLDOWN)}, /* vin2a_d2.eCAP1_in_PWM1_out */
-       {VIN2A_D3, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d3.pr1_mi1_col */
-       {VIN2A_D4, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d4.pr1_mii1_txd1 */
-       {VIN2A_D5, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d5.pr1_mii1_txd0 */
-       {VIN2A_D6, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d6.pr1_mii_mt1_clk */
-       {VIN2A_D7, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d7.pr1_mii1_txen */
-       {VIN2A_D8, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d8.pr1_mii1_txd3 */
-       {VIN2A_D9, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d9.pr1_mii1_txd2 */
        {VIN2A_D10, (M11 | PIN_INPUT_PULLDOWN)},        /* vin2a_d10.pr1_mdio_mdclk */
        {VIN2A_D11, (M11 | PIN_INPUT_PULLUP)},  /* vin2a_d11.pr1_mdio_data */
        {VIN2A_D12, (M3 | PIN_INPUT_PULLDOWN | MANUAL_MODE)},   /* vin2a_d12.rgmii1_txc */
@@ -570,35 +563,7 @@ const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
        {VIN2A_D21, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)},     /* vin2a_d21.rgmii1_rxd2 */
        {VIN2A_D22, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)},     /* vin2a_d22.rgmii1_rxd1 */
        {VIN2A_D23, (M3 | PIN_INPUT_PULLUP | MANUAL_MODE)},     /* vin2a_d23.rgmii1_rxd0 */
-       {VOUT1_CLK, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_clk.vout1_clk */
-       {VOUT1_DE, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_de.vout1_de */
        {VOUT1_FLD, (M14 | PIN_INPUT_PULLUP)},  /* vout1_fld.gpio4_21 */
-       {VOUT1_HSYNC, (M0 | PIN_INPUT_PULLDOWN)},       /* vout1_hsync.vout1_hsync */
-       {VOUT1_VSYNC, (M0 | PIN_INPUT_PULLDOWN)},       /* vout1_vsync.vout1_vsync */
-       {VOUT1_D0, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d0.vout1_d0 */
-       {VOUT1_D1, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d1.vout1_d1 */
-       {VOUT1_D2, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d2.vout1_d2 */
-       {VOUT1_D3, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d3.vout1_d3 */
-       {VOUT1_D4, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d4.vout1_d4 */
-       {VOUT1_D5, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d5.vout1_d5 */
-       {VOUT1_D6, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d6.vout1_d6 */
-       {VOUT1_D7, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d7.vout1_d7 */
-       {VOUT1_D8, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d8.vout1_d8 */
-       {VOUT1_D9, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d9.vout1_d9 */
-       {VOUT1_D10, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d10.vout1_d10 */
-       {VOUT1_D11, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d11.vout1_d11 */
-       {VOUT1_D12, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d12.vout1_d12 */
-       {VOUT1_D13, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d13.vout1_d13 */
-       {VOUT1_D14, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d14.vout1_d14 */
-       {VOUT1_D15, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d15.vout1_d15 */
-       {VOUT1_D16, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d16.vout1_d16 */
-       {VOUT1_D17, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d17.vout1_d17 */
-       {VOUT1_D18, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d18.vout1_d18 */
-       {VOUT1_D19, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d19.vout1_d19 */
-       {VOUT1_D20, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d20.vout1_d20 */
-       {VOUT1_D21, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d21.vout1_d21 */
-       {VOUT1_D22, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d22.vout1_d22 */
-       {VOUT1_D23, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d23.vout1_d23 */
        {MDIO_MCLK, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},     /* mdio_mclk.mdio_mclk */
        {MDIO_D, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},        /* mdio_d.mdio_d */
        {RMII_MHZ_50_CLK, (M13 | PIN_INPUT_PULLDOWN)},  /* RMII_MHZ_50_CLK.pr2_pru1_gpo2 */
@@ -621,46 +586,46 @@ const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
        {GPIO6_14, (M14 | PIN_INPUT_PULLUP)},   /* gpio6_14.gpio6_14 */
        {GPIO6_15, (M14 | PIN_INPUT_PULLUP)},   /* gpio6_15.gpio6_15 */
        {GPIO6_16, (M14 | PIN_INPUT_PULLDOWN)}, /* gpio6_16.gpio6_16 */
-       {XREF_CLK0, (M11 | PIN_INPUT_PULLDOWN)},        /* xref_clk0.pr2_mii1_col */
-       {XREF_CLK1, (M11 | PIN_INPUT_PULLDOWN)},        /* xref_clk1.pr2_mii1_crs */
+       {XREF_CLK0, (M11 | PIN_INPUT)}, /* xref_clk0.pr2_mii1_col */
+       {XREF_CLK1, (M11 | PIN_INPUT_PULLUP)},  /* xref_clk1.pr2_mii1_crs */
        {XREF_CLK2, (M14 | PIN_INPUT_PULLDOWN)},        /* xref_clk2.gpio6_19 */
        {XREF_CLK3, (M15 | PIN_INPUT_PULLDOWN)},        /* xref_clk3.Driveroff */
        {MCASP1_ACLKX, (M11 | PIN_INPUT_PULLDOWN)},     /* mcasp1_aclkx.pr2_mdio_mdclk */
        {MCASP1_FSX, (M11 | PIN_INPUT_SLEW)},   /* mcasp1_fsx.pr2_mdio_data */
        {MCASP1_ACLKR, (M14 | PIN_INPUT_PULLUP)},       /* mcasp1_aclkr.gpio5_0 */
        {MCASP1_FSR, (M14 | PIN_INPUT_PULLUP)}, /* mcasp1_fsr.gpio5_1 */
-       {MCASP1_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)},  /* mcasp1_axr0.pr2_mii0_rxer */
-       {MCASP1_AXR1, (M11 | PIN_INPUT_SLEW)},  /* mcasp1_axr1.pr2_mii_mt0_clk */
+       {MCASP1_AXR0, (M11 | PIN_INPUT_PULLUP)},        /* mcasp1_axr0.pr2_mii0_rxer */
+       {MCASP1_AXR1, (M11 | PIN_INPUT_PULLDOWN)},      /* mcasp1_axr1.pr2_mii_mt0_clk */
        {MCASP1_AXR2, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp1_axr2.gpio5_4 */
        {MCASP1_AXR3, (M14 | PIN_INPUT_PULLUP)},        /* mcasp1_axr3.gpio5_5 */
        {MCASP1_AXR4, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp1_axr4.gpio5_6 */
        {MCASP1_AXR5, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp1_axr5.gpio5_7 */
        {MCASP1_AXR6, (M14 | PIN_INPUT_PULLUP)},        /* mcasp1_axr6.gpio5_8 */
        {MCASP1_AXR7, (M14 | PIN_INPUT_PULLUP)},        /* mcasp1_axr7.gpio5_9 */
-       {MCASP1_AXR8, (M11 | PIN_INPUT_SLEW)},  /* mcasp1_axr8.pr2_mii0_txen */
-       {MCASP1_AXR9, (M11 | PIN_INPUT_SLEW)},  /* mcasp1_axr9.pr2_mii0_txd3 */
-       {MCASP1_AXR10, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr10.pr2_mii0_txd2 */
-       {MCASP1_AXR11, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr11.pr2_mii0_txd1 */
-       {MCASP1_AXR12, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr12.pr2_mii0_txd0 */
-       {MCASP1_AXR13, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr13.pr2_mii_mr0_clk */
-       {MCASP1_AXR14, (M11 | PIN_INPUT_PULLDOWN | SLEWCONTROL)},       /* mcasp1_axr14.pr2_mii0_rxdv */
-       {MCASP1_AXR15, (M11 | PIN_INPUT_SLEW)}, /* mcasp1_axr15.pr2_mii0_rxd3 */
-       {MCASP2_ACLKX, (M11 | PIN_INPUT_SLEW)}, /* mcasp2_aclkx.pr2_mii0_rxd2 */
-       {MCASP2_FSX, (M11 | PIN_INPUT_SLEW)},   /* mcasp2_fsx.pr2_mii0_rxd1 */
+       {MCASP1_AXR8, (M11 | PIN_OUTPUT)},      /* mcasp1_axr8.pr2_mii0_txen */
+       {MCASP1_AXR9, (M11 | PIN_OUTPUT)},      /* mcasp1_axr9.pr2_mii0_txd3 */
+       {MCASP1_AXR10, (M11 | PIN_OUTPUT)},     /* mcasp1_axr10.pr2_mii0_txd2 */
+       {MCASP1_AXR11, (M11 | PIN_OUTPUT)},     /* mcasp1_axr11.pr2_mii0_txd1 */
+       {MCASP1_AXR12, (M11 | PIN_OUTPUT)},     /* mcasp1_axr12.pr2_mii0_txd0 */
+       {MCASP1_AXR13, (M11 | PIN_INPUT_PULLDOWN)},     /* mcasp1_axr13.pr2_mii_mr0_clk */
+       {MCASP1_AXR14, (M11 | PIN_INPUT_PULLDOWN)},     /* mcasp1_axr14.pr2_mii0_rxdv */
+       {MCASP1_AXR15, (M11 | PIN_INPUT)},      /* mcasp1_axr15.pr2_mii0_rxd3 */
+       {MCASP2_ACLKX, (M11 | PIN_INPUT)},      /* mcasp2_aclkx.pr2_mii0_rxd2 */
+       {MCASP2_FSX, (M11 | PIN_INPUT)},        /* mcasp2_fsx.pr2_mii0_rxd1 */
        {MCASP2_ACLKR, (M15 | PIN_INPUT_PULLDOWN)},     /* mcasp2_aclkr.Driveroff */
        {MCASP2_FSR, (M15 | PIN_INPUT_PULLDOWN)},       /* mcasp2_fsr.Driveroff */
        {MCASP2_AXR0, (M15 | PIN_INPUT_PULLDOWN)},      /* mcasp2_axr0.Driveroff */
        {MCASP2_AXR1, (M15 | PIN_INPUT_PULLDOWN)},      /* mcasp2_axr1.Driveroff */
-       {MCASP2_AXR2, (M11 | PIN_INPUT_SLEW)},  /* mcasp2_axr2.pr2_mii0_rxd0 */
-       {MCASP2_AXR3, (M11 | PIN_INPUT_PULLDOWN | SLEWCONTROL)},        /* mcasp2_axr3.pr2_mii0_rxlink */
+       {MCASP2_AXR2, (M11 | PIN_INPUT)},       /* mcasp2_axr2.pr2_mii0_rxd0 */
+       {MCASP2_AXR3, (M11 | PIN_INPUT)},       /* mcasp2_axr3.pr2_mii0_rxlink */
        {MCASP2_AXR4, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp2_axr4.gpio1_4 */
        {MCASP2_AXR5, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp2_axr5.gpio6_7 */
        {MCASP2_AXR6, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp2_axr6.gpio2_29 */
        {MCASP2_AXR7, (M14 | PIN_INPUT_PULLDOWN)},      /* mcasp2_axr7.gpio1_5 */
-       {MCASP3_ACLKX, (M11 | PIN_INPUT_PULLDOWN)},     /* mcasp3_aclkx.pr2_mii0_crs */
-       {MCASP3_FSX, (M11 | PIN_INPUT_SLEW)},   /* mcasp3_fsx.pr2_mii0_col */
-       {MCASP3_AXR0, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)},  /* mcasp3_axr0.pr2_mii1_rxer */
-       {MCASP3_AXR1, (M11 | PIN_INPUT_PULLUP | SLEWCONTROL)},  /* mcasp3_axr1.pr2_mii1_rxlink */
+       {MCASP3_ACLKX, (M11 | PIN_INPUT_PULLUP)},       /* mcasp3_aclkx.pr2_mii0_crs */
+       {MCASP3_FSX, (M11 | PIN_INPUT)},        /* mcasp3_fsx.pr2_mii0_col */
+       {MCASP3_AXR0, (M11 | PIN_INPUT_PULLUP)},        /* mcasp3_axr0.pr2_mii1_rxer */
+       {MCASP3_AXR1, (M11 | PIN_INPUT)},       /* mcasp3_axr1.pr2_mii1_rxlink */
        {MCASP4_ACLKX, (M2 | PIN_INPUT_PULLDOWN)},      /* mcasp4_aclkx.spi3_sclk */
        {MCASP4_FSX, (M2 | PIN_INPUT_PULLDOWN)},        /* mcasp4_fsx.spi3_d1 */
        {MCASP4_AXR0, (M15 | PIN_INPUT_PULLDOWN)},      /* mcasp4_axr0.Driveroff */
@@ -677,18 +642,18 @@ const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
        {MMC1_DAT3, (M0 | PIN_INPUT_PULLUP)},   /* mmc1_dat3.mmc1_dat3 */
        {MMC1_SDCD, (M14 | PIN_INPUT_PULLUP)},  /* mmc1_sdcd.gpio6_27 */
        {MMC1_SDWP, (M0 | PIN_OUTPUT)}, /* mmc1_sdwp.mmc1_sdwp */
-       {GPIO6_10, (M11 | PIN_INPUT_PULLUP)},   /* gpio6_10.pr2_mii_mt1_clk */
-       {GPIO6_11, (M11 | PIN_INPUT_PULLUP)},   /* gpio6_11.pr2_mii1_txen */
-       {MMC3_CLK, (M11 | PIN_INPUT_PULLUP)},   /* mmc3_clk.pr2_mii1_txd3 */
-       {MMC3_CMD, (M11 | PIN_INPUT_PULLUP)},   /* mmc3_cmd.pr2_mii1_txd2 */
-       {MMC3_DAT0, (M11 | PIN_INPUT_PULLUP)},  /* mmc3_dat0.pr2_mii1_txd1 */
-       {MMC3_DAT1, (M11 | PIN_INPUT_PULLUP)},  /* mmc3_dat1.pr2_mii1_txd0 */
-       {MMC3_DAT2, (M11 | PIN_INPUT_PULLUP)},  /* mmc3_dat2.pr2_mii_mr1_clk */
+       {GPIO6_10, (M11 | PIN_INPUT_PULLDOWN)}, /* gpio6_10.pr2_mii_mt1_clk */
+       {GPIO6_11, (M11 | PIN_OUTPUT)}, /* gpio6_11.pr2_mii1_txen */
+       {MMC3_CLK, (M11 | PIN_OUTPUT)}, /* mmc3_clk.pr2_mii1_txd3 */
+       {MMC3_CMD, (M11 | PIN_OUTPUT)}, /* mmc3_cmd.pr2_mii1_txd2 */
+       {MMC3_DAT0, (M11 | PIN_OUTPUT)},        /* mmc3_dat0.pr2_mii1_txd1 */
+       {MMC3_DAT1, (M11 | PIN_OUTPUT)},        /* mmc3_dat1.pr2_mii1_txd0 */
+       {MMC3_DAT2, (M11 | PIN_INPUT_PULLDOWN)},        /* mmc3_dat2.pr2_mii_mr1_clk */
        {MMC3_DAT3, (M11 | PIN_INPUT_PULLDOWN)},        /* mmc3_dat3.pr2_mii1_rxdv */
-       {MMC3_DAT4, (M11 | PIN_INPUT_PULLDOWN)},        /* mmc3_dat4.pr2_mii1_rxd3 */
-       {MMC3_DAT5, (M11 | PIN_INPUT_PULLDOWN)},        /* mmc3_dat5.pr2_mii1_rxd2 */
-       {MMC3_DAT6, (M11 | PIN_INPUT_PULLDOWN)},        /* mmc3_dat6.pr2_mii1_rxd1 */
-       {MMC3_DAT7, (M11 | PIN_INPUT_PULLDOWN)},        /* mmc3_dat7.pr2_mii1_rxd0 */
+       {MMC3_DAT4, (M11 | PIN_INPUT)}, /* mmc3_dat4.pr2_mii1_rxd3 */
+       {MMC3_DAT5, (M11 | PIN_INPUT)}, /* mmc3_dat5.pr2_mii1_rxd2 */
+       {MMC3_DAT6, (M11 | PIN_INPUT)}, /* mmc3_dat6.pr2_mii1_rxd1 */
+       {MMC3_DAT7, (M11 | PIN_INPUT)}, /* mmc3_dat7.pr2_mii1_rxd0 */
        {SPI1_SCLK, (M14 | PIN_INPUT_PULLDOWN)},        /* spi1_sclk.gpio7_7 */
        {SPI1_D1, (M14 | PIN_INPUT_PULLDOWN)},  /* spi1_d1.gpio7_8 */
        {SPI1_D0, (M14 | PIN_INPUT_PULLDOWN)},  /* spi1_d0.gpio7_9 */
@@ -727,6 +692,75 @@ const struct pad_conf_entry core_padconf_array_essential_am571x_idk[] = {
        {RSTOUTN, (M0 | PIN_OUTPUT_PULLDOWN)},  /* rstoutn.rstoutn */
 };
 
+const struct pad_conf_entry core_padconf_array_icss1eth_am571x_idk[] = {
+       /* PR1 MII0 */
+       {VOUT1_D8, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d8.pr1_mii_mt0_clk */
+       {VOUT1_D9, (M13 | PIN_OUTPUT)},         /* vout1_d9.pr1_mii0_txd3 */
+       {VOUT1_D10, (M13 | PIN_OUTPUT)},        /* vout1_d10.pr1_mii0_txd2 */
+       {VOUT1_D11, (M13 | PIN_OUTPUT)},        /* vout1_d11.pr1_mii0_txen */
+       {VOUT1_D12, (M13 | PIN_OUTPUT)},        /* vout1_d12.pr1_mii0_txd1 */
+       {VOUT1_D13, (M13 | PIN_OUTPUT)},        /* vout1_d13.pr1_mii0_txd0 */
+       {VOUT1_D14, (M12 | PIN_INPUT_PULLDOWN)},        /* vout1_d14.pr1_mii_mr0_clk */
+       {VOUT1_D15, (M12 | PIN_INPUT_PULLDOWN)},        /* vout1_d15.pr1_mii0_rxdv */
+       {VOUT1_D16, (M12 | PIN_INPUT)}, /* vout1_d16.pr1_mii0_rxd3 */
+       {VOUT1_D17, (M12 | PIN_INPUT)}, /* vout1_d17.pr1_mii0_rxd2 */
+       {VOUT1_D18, (M12 | PIN_INPUT)}, /* vout1_d18.pr1_mii0_rxd1 */
+       {VOUT1_D19, (M12 | PIN_INPUT)}, /* vout1_d19.pr1_mii0_rxd0 */
+       {VOUT1_D20, (M12 | PIN_INPUT_PULLUP)},  /* vout1_d20.pr1_mii0_rxer */
+       {VOUT1_D21, (M12 | PIN_INPUT)}, /* vout1_d21.pr1_mii0_rxlink */
+       {VOUT1_D22, (M12 | PIN_INPUT)}, /* vout1_d22.pr1_mii0_col */
+       {VOUT1_D23, (M12 | PIN_INPUT_PULLUP)},  /* vout1_d23.pr1_mii0_crs */
+
+       /* PR1 MII1 */
+       {VIN2A_D3, (M12 | PIN_INPUT)},  /* vin2a_d3.pr1_mi1_col */
+       {VIN2A_D4, (M13 | PIN_OUTPUT)}, /* vin2a_d4.pr1_mii1_txd1 */
+       {VIN2A_D5, (M13 | PIN_OUTPUT)}, /* vin2a_d5.pr1_mii1_txd0 */
+       {VIN2A_D6, (M11 | PIN_INPUT_PULLDOWN)}, /* vin2a_d6.pr1_mii_mt1_clk */
+       {VIN2A_D7, (M11 | PIN_OUTPUT)}, /* vin2a_d7.pr1_mii1_txen */
+       {VIN2A_D8, (M11 | PIN_OUTPUT)}, /* vin2a_d8.pr1_mii1_txd3 */
+       {VIN2A_D9, (M11 | PIN_OUTPUT)}, /* vin2a_d9.pr1_mii1_txd2 */
+       {VOUT1_VSYNC, (M12 | PIN_INPUT_PULLUP)},        /* vout1_vsync.pr1_mii1_rxer */
+       {VOUT1_D0, (M12 | PIN_INPUT)},  /* vout1_d0.pr1_mii1_rxlink */
+       {VOUT1_D1, (M12 | PIN_INPUT_PULLUP)},   /* vout1_d1.pr1_mii1_crs */
+       {VOUT1_D2, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d2.pr1_mii_mr1_clk */
+       {VOUT1_D3, (M12 | PIN_INPUT_PULLDOWN)}, /* vout1_d3.pr1_mii1_rxdv */
+       {VOUT1_D4, (M12 | PIN_INPUT)},  /* vout1_d4.pr1_mii1_rxd3 */
+       {VOUT1_D5, (M12 | PIN_INPUT)},  /* vout1_d5.pr1_mii1_rxd2 */
+       {VOUT1_D6, (M12 | PIN_INPUT)},  /* vout1_d6.pr1_mii1_rxd1 */
+       {VOUT1_D7, (M12 | PIN_INPUT)},  /* vout1_d7.pr1_mii1_rxd0 */
+};
+
+const struct pad_conf_entry core_padconf_array_vout_am571x_idk[] = {
+       {VOUT1_CLK, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_clk.vout1_clk */
+       {VOUT1_DE, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_de.vout1_de */
+       {VOUT1_HSYNC, (M0 | PIN_INPUT_PULLDOWN)},       /* vout1_hsync.vout1_hsync */
+       {VOUT1_VSYNC, (M0 | PIN_INPUT_PULLDOWN)},       /* vout1_vsync.vout1_vsync */
+       {VOUT1_D0, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d0.vout1_d0 */
+       {VOUT1_D1, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d1.vout1_d1 */
+       {VOUT1_D2, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d2.vout1_d2 */
+       {VOUT1_D3, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d3.vout1_d3 */
+       {VOUT1_D4, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d4.vout1_d4 */
+       {VOUT1_D5, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d5.vout1_d5 */
+       {VOUT1_D6, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d6.vout1_d6 */
+       {VOUT1_D7, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d7.vout1_d7 */
+       {VOUT1_D8, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d8.vout1_d8 */
+       {VOUT1_D9, (M0 | PIN_INPUT_PULLDOWN)},  /* vout1_d9.vout1_d9 */
+       {VOUT1_D10, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d10.vout1_d10 */
+       {VOUT1_D11, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d11.vout1_d11 */
+       {VOUT1_D12, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d12.vout1_d12 */
+       {VOUT1_D13, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d13.vout1_d13 */
+       {VOUT1_D14, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d14.vout1_d14 */
+       {VOUT1_D15, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d15.vout1_d15 */
+       {VOUT1_D16, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d16.vout1_d16 */
+       {VOUT1_D17, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d17.vout1_d17 */
+       {VOUT1_D18, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d18.vout1_d18 */
+       {VOUT1_D19, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d19.vout1_d19 */
+       {VOUT1_D20, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d20.vout1_d20 */
+       {VOUT1_D21, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d21.vout1_d21 */
+       {VOUT1_D22, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d22.vout1_d22 */
+       {VOUT1_D23, (M0 | PIN_INPUT_PULLDOWN)}, /* vout1_d23.vout1_d23 */
+};
+
 const struct pad_conf_entry early_padconf[] = {
        {UART2_CTSN, (M2 | PIN_INPUT_SLEW)},    /* uart2_ctsn.uart3_rxd */
        {UART2_RTSN, (M1 | PIN_INPUT_SLEW)},    /* uart2_rtsn.uart3_txd */
index adf73abc9358561941f69a850b215920bec88b90..15b5ccf741b627e273e2b3f8372e5bbf309465e1 100644 (file)
@@ -3,3 +3,13 @@ config TI_I2C_BOARD_DETECT
        help
           Support for detection board information on Texas Instrument's
           Evaluation Boards which have I2C based EEPROM detection
+
+config EEPROM_BUS_ADDRESS
+       int "Board EEPROM's I2C bus address"
+       range 0 8
+       default 0
+
+config EEPROM_CHIP_ADDRESS
+       hex "Board EEPROM's I2C chip address"
+       range 0 0xff
+       default 0x50
index a5dba94e5e01138036ec2745180235764f244701..c55e24e321512cda5837e26299ce143f5970f19c 100644 (file)
@@ -314,3 +314,65 @@ void __maybe_unused set_board_info_env(char *name)
        else
                setenv("board_serial", unknown);
 }
+
+static u64 mac_to_u64(u8 mac[6])
+{
+       int i;
+       u64 addr = 0;
+
+       for (i = 0; i < 6; i++) {
+               addr <<= 8;
+               addr |= mac[i];
+       }
+
+       return addr;
+}
+
+static void u64_to_mac(u64 addr, u8 mac[6])
+{
+       mac[5] = addr;
+       mac[4] = addr >> 8;
+       mac[3] = addr >> 16;
+       mac[2] = addr >> 24;
+       mac[1] = addr >> 32;
+       mac[0] = addr >> 40;
+}
+
+void board_ti_set_ethaddr(int index)
+{
+       uint8_t mac_addr[6];
+       int i;
+       u64 mac1, mac2;
+       u8 mac_addr1[6], mac_addr2[6];
+       int num_macs;
+       /*
+        * Export any Ethernet MAC addresses from EEPROM.
+        * The 2 MAC addresses in EEPROM define the address range.
+        */
+       board_ti_get_eth_mac_addr(0, mac_addr1);
+       board_ti_get_eth_mac_addr(1, mac_addr2);
+
+       if (is_valid_ethaddr(mac_addr1) && is_valid_ethaddr(mac_addr2)) {
+               mac1 = mac_to_u64(mac_addr1);
+               mac2 = mac_to_u64(mac_addr2);
+
+               /* must contain an address range */
+               num_macs = mac2 - mac1 + 1;
+               if (num_macs <= 0)
+                       return;
+
+               if (num_macs > 50) {
+                       printf("%s: Too many MAC addresses: %d. Limiting to 50\n",
+                              __func__, num_macs);
+                       num_macs = 50;
+               }
+
+               for (i = 0; i < num_macs; i++) {
+                       u64_to_mac(mac1 + i, mac_addr);
+                       if (is_valid_ethaddr(mac_addr)) {
+                               eth_setenv_enetaddr_by_index("eth", i + index,
+                                                            mac_addr);
+                       }
+               }
+       }
+}
index 343fcb463edd162f963ce3299468e33354bc4e41..88b0a59f812fe3960c8c289f822ff0554a6270d8 100644 (file)
@@ -98,7 +98,7 @@ struct ti_common_eeprom {
 };
 
 #define TI_EEPROM_DATA ((struct ti_common_eeprom *)\
-                               OMAP_SRAM_SCRATCH_BOARD_EEPROM_START)
+                               TI_SRAM_SCRATCH_BOARD_EEPROM_START)
 
 /**
  * ti_i2c_eeprom_am_get() - Consolidated eeprom data collection for AM* TI EVMs
@@ -193,4 +193,16 @@ u64 board_ti_get_emif2_size(void);
  */
 void set_board_info_env(char *name);
 
+/**
+ * board_ti_set_ethaddr- Sets the ethaddr environment from EEPROM
+ * @index: The first eth<index>addr environment variable to set
+ *
+ * EEPROM should be already read before calling this function.
+ * The EEPROM contains 2 MAC addresses which define the MAC address
+ * range (i.e. first and last MAC address).
+ * This function sets the ethaddr environment variable for all
+ * the available MAC addresses starting from eth<index>addr.
+ */
+void board_ti_set_ethaddr(int index);
+
 #endif /* __BOARD_DETECT_H */
index c0568ec50c5a2a416e4ddf8520aa926b481fb412..9477f5336b8d871d91e8fe5583328b046c72a9d5 100644 (file)
@@ -49,3 +49,5 @@ config SYS_CONFIG_NAME
        default "k2g_evm"
 
 endif
+
+source "board/ti/common/Kconfig"
index 372fc35a5c666144c179784bb480b62eaed2b850..79e110ef48ad0e77d62ca789dbcbeec0ad6f87c2 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/arch/psc_defs.h>
 #include <asm/arch/mmc_host_def.h>
 #include "mux-k2g.h"
+#include "../common/board_detect.h"
 
 #define SYS_CLK                24000000
 
@@ -149,6 +150,24 @@ int board_early_init_f(void)
 }
 #endif
 
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_TI_I2C_BOARD_DETECT)
+       int rc;
+
+       rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
+                       CONFIG_EEPROM_CHIP_ADDRESS);
+       if (rc)
+               printf("ti_i2c_eeprom_init failed %d\n", rc);
+
+       board_ti_set_ethaddr(1);
+#endif
+
+       return 0;
+}
+#endif
+
 #ifdef CONFIG_SPL_BUILD
 void spl_init_keystone_plls(void)
 {
index d98b9fcb9ade2285b50caedbce7483db5ded78da..0d1e08245f6afa70392f3d8715f1cf0aa75c8d8f 100644 (file)
@@ -227,10 +227,11 @@ int spl_early_init(void)
 int spl_init(void)
 {
        int ret;
+       bool setup_malloc = !(IS_ENABLED(CONFIG_SPL_STACK_R) &&
+                       IS_ENABLED(CONFIG_SPL_SYS_MALLOC_SIMPLE));
 
        if (!(gd->flags & GD_FLG_SPL_EARLY_INIT)) {
-               ret = spl_common_init(
-                       !IS_ENABLED(CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN));
+               ret = spl_common_init(setup_malloc);
                if (ret)
                        return ret;
        }
index 5d238ce5580532f295f9eb5b934eea071fb1e4f4..1f68af6b4a035614d601ee13442bd40306d94cd7 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_AM43XX=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am437x-gp-evm"
@@ -72,4 +73,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
-CONFIG_SPL_OF_LIBFDT=y
index 3aafecab0947bc32a921651198c4649a3e30905c..68bb6d883948da89551239cd44c08b9a4b5591b5 100644 (file)
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL=y
+# CONFIG_SPL_SYS_MALLOC_SIMPLE is not set
 CONFIG_SPL_ETH_SUPPORT=y
 CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_NET_SUPPORT=y
index b7f14882e4f7ed9698c56829db78fab4a731d6af..592398384a4b6ae3d2208f6259371b7ef5eea492 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_AM43XX=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_ISW_ENTRY_ADDR=0x40300350
 CONFIG_SPL_STACK_R_ADDR=0x82000000
@@ -70,4 +71,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
-CONFIG_SPL_OF_LIBFDT=y
index f1c94453846de775abb106425144d0a07bc2bb56..17217e9051e45112e1af99ffdeb4cfec21df815f 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_AM43XX=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TI_SECURE_DEVICE=y
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_ISW_ENTRY_ADDR=0x403018e0
@@ -73,4 +74,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
-CONFIG_SPL_OF_LIBFDT=y
index 789cc977d22382779bbf2e6627b7c4cd76b7b853..97bd08ed88f26d757df7b6b3d4d17c9e26b57b96 100644 (file)
@@ -1,12 +1,13 @@
 CONFIG_ARM=y
 CONFIG_OMAP54XX=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_AM57XX_EVM=y
 # CONFIG_SPL_NAND_SUPPORT is not set
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_ARMV7_LPAE=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_DEFAULT_DEVICE_TREE="am57xx-beagle-x15"
+CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_OF_BOARD_SETUP=y
@@ -14,7 +15,9 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_HUSH_PARSER=y
@@ -52,8 +55,10 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am572x-idk am571x-idk"
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 # CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
@@ -87,4 +92,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_SPL_OF_LIBFDT=y
index 2e27e08c1fc735fcba87772a29a058b4dea6a388..956e39f1f8bca6b0e830f23e4ab70852c31be7f7 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_OMAP54XX=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TI_SECURE_DEVICE=y
 CONFIG_TARGET_AM57XX_EVM=y
 CONFIG_TI_SECURE_EMIF_REGION_START=0xbe000000
@@ -19,7 +20,9 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_FASTBOOT=y
@@ -55,7 +58,9 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 # CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
@@ -85,4 +90,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_SPL_OF_LIBFDT=y
diff --git a/configs/bcm958712k_defconfig b/configs/bcm958712k_defconfig
new file mode 100644 (file)
index 0000000..96e4bce
--- /dev/null
@@ -0,0 +1,10 @@
+CONFIG_ARM=y
+CONFIG_TARGET_BCMNS2=y
+CONFIG_IDENT_STRING=" Broadcom Northstar 2"
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_BOOTDELAY=5
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_SYS_PROMPT="u-boot> "
+# CONFIG_CMD_IMLS is not set
+CONFIG_SYS_NS16550=y
+CONFIG_OF_LIBFDT=y
index 0293d4528ee6fb17a2bcb72a5bae06f39bc1c03e..42f87b34db5402ba7c48423092f8a696fde12052 100644 (file)
@@ -1,7 +1,8 @@
 CONFIG_ARM=y
 CONFIG_OMAP54XX=y
-CONFIG_TARGET_DRA7XX_EVM=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 # CONFIG_SPL_NAND_SUPPORT is not set
+CONFIG_TARGET_DRA7XX_EVM=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
 CONFIG_ARMV7_LPAE=y
@@ -14,7 +15,9 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_HUSH_PARSER=y
@@ -52,8 +55,10 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm"
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 # CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
@@ -96,4 +101,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_SPL_OF_LIBFDT=y
index 3b95650e872f1fcee8e1c0557081dfbc93fda340..f3a9c680082922fe1491e51eea6f76dfaf619a2d 100644 (file)
@@ -20,7 +20,9 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL=y
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
 CONFIG_SPL_STACK_R=y
+CONFIG_SPL_SEPARATE_BSS=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_FASTBOOT=y
@@ -57,8 +59,10 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm"
 CONFIG_DM=y
+CONFIG_SPL_DM=y
 # CONFIG_BLK is not set
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
@@ -101,4 +105,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_SPL_OF_LIBFDT=y
index 16ff52da3eb484939bc32443b7b47e286647e764..8e328b47ef146da28955865077b366105add9532 100644 (file)
@@ -79,6 +79,19 @@ config EFI_PARTITION
          common when EFI is the bootloader.  Note 2TB partition limit;
          see disk/part_efi.c
 
+config EFI_PARTITION_ENTRIES_OFF
+        int "Offset (in bytes) of the EFI partition entries"
+       depends on EFI_PARTITION
+       default 0
+       help
+         Specify an earliest location (in bytes) where the partition
+         entries may be located. This is meant to allow "punching a
+         hole into a device" to create a gap for an SPL, its payload
+         and the U-Boot environment.
+
+         If unsure, leave at 0 (which will locate the partition
+         entries at the first possible LBA following the GPT header).
+
 config SPL_EFI_PARTITION
        bool "Enable EFI GPT partition table for SPL"
        depends on  SPL && PARTITIONS
index db0c890d5b449987e2a4f1a530bfa8f2341476bc..1b7ba2794778ec0b3116534e2679fb8a4e915cbd 100644 (file)
 #include <asm/unaligned.h>
 #include <common.h>
 #include <command.h>
+#include <fdtdec.h>
 #include <ide.h>
 #include <inttypes.h>
 #include <malloc.h>
 #include <memalign.h>
 #include <part_efi.h>
+#include <linux/compiler.h>
 #include <linux/ctype.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -373,8 +375,8 @@ int write_gpt_table(struct blk_desc *dev_desc,
        if (blk_dwrite(dev_desc, 1, 1, gpt_h) != 1)
                goto err;
 
-       if (blk_dwrite(dev_desc, 2, pte_blk_cnt, gpt_e)
-           != pte_blk_cnt)
+       if (blk_dwrite(dev_desc, le64_to_cpu(gpt_h->partition_entry_lba),
+                      pte_blk_cnt, gpt_e) != pte_blk_cnt)
                goto err;
 
        prepare_backup_gpt_header(gpt_h);
@@ -498,6 +500,49 @@ int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
        return 0;
 }
 
+static uint32_t partition_entries_offset(struct blk_desc *dev_desc)
+{
+       uint32_t offset_blks = 2;
+       int __maybe_unused config_offset;
+
+#if defined(CONFIG_EFI_PARTITION_ENTRIES_OFF)
+       /*
+        * Some architectures require their SPL loader at a fixed
+        * address within the first 16KB of the disk.  To avoid an
+        * overlap with the partition entries of the EFI partition
+        * table, the first safe offset (in bytes, from the start of
+        * the disk) for the entries can be set in
+        * CONFIG_EFI_PARTITION_ENTRIES_OFF.
+        */
+       offset_blks =
+               PAD_TO_BLOCKSIZE(CONFIG_EFI_PARTITION_ENTRIES_OFF, dev_desc);
+#endif
+
+#if defined(CONFIG_OF_CONTROL)
+       /*
+        * Allow the offset of the first partition entires (in bytes
+        * from the start of the device) to be specified as a property
+        * of the device tree '/config' node.
+        */
+       config_offset = fdtdec_get_config_int(gd->fdt_blob,
+                                             "u-boot,efi-partition-entries-offset",
+                                             -EINVAL);
+       if (config_offset != -EINVAL)
+               offset_blks = PAD_TO_BLOCKSIZE(config_offset, dev_desc);
+#endif
+
+       debug("efi: partition entries offset (in blocks): %d\n", offset_blks);
+
+       /*
+        * The earliest LBA this can be at is LBA#2 (i.e. right behind
+        * the (protective) MBR and the GPT header.
+        */
+       if (offset_blks < 2)
+               offset_blks = 2;
+
+       return offset_blks;
+}
+
 int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
                char *str_guid, int parts_count)
 {
@@ -506,9 +551,11 @@ int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
        gpt_h->header_size = cpu_to_le32(sizeof(gpt_header));
        gpt_h->my_lba = cpu_to_le64(1);
        gpt_h->alternate_lba = cpu_to_le64(dev_desc->lba - 1);
-       gpt_h->first_usable_lba = cpu_to_le64(34);
        gpt_h->last_usable_lba = cpu_to_le64(dev_desc->lba - 34);
-       gpt_h->partition_entry_lba = cpu_to_le64(2);
+       gpt_h->partition_entry_lba =
+               cpu_to_le64(partition_entries_offset(dev_desc));
+       gpt_h->first_usable_lba =
+               cpu_to_le64(le64_to_cpu(gpt_h->partition_entry_lba) + 32);
        gpt_h->num_partition_entries = cpu_to_le32(GPT_ENTRY_NUMBERS);
        gpt_h->sizeof_partition_entry = cpu_to_le32(sizeof(gpt_entry));
        gpt_h->header_crc32 = 0;
index 2913fcb360c7c7bfdc52446348040bd00669c970..c9656299053b4e21a0ae0cadb71b8249e322afb3 100644 (file)
@@ -168,22 +168,6 @@ After board configuration is done, fdt supported u-boot can be build in two ways
     $ make DEVICE_TREE=<dts-file-name>
 
 
-Configuration Options
----------------------
-
-A number of run-time configuration options are provided in the /config node
-of the control device tree. You can access these using fdtdec_get_config_int(),
-fdtdec_get_config_bool() and fdtdec_get_config_string().
-
-Available options are:
-
-silent-console
-       If present and non-zero, the console is silenced by default on boot.
-
-no-keyboard
-       Tells U-Boot not to expect an attached keyboard with a VGA console
-
-
 Limitations
 -----------
 
diff --git a/doc/device-tree-bindings/config.txt b/doc/device-tree-bindings/config.txt
new file mode 100644 (file)
index 0000000..5640bae
--- /dev/null
@@ -0,0 +1,22 @@
+The /config node (Configuration Options)
+----------------------------------------
+
+A number of run-time configuration options are provided in the /config node
+of the control device tree. You can access these using fdtdec_get_config_int(),
+fdtdec_get_config_bool() and fdtdec_get_config_string().
+
+Available options are:
+
+silent-console
+       If present and non-zero, the console is silenced by default on boot.
+
+no-keyboard
+       Tells U-Boot not to expect an attached keyboard with a VGA console
+
+u-boot,efi-partition-entries-offset
+       If present, this provides an offset (in bytes, from the start of a
+       device) that should be skipped over before the partition entries.
+       This is used by the EFI/GPT partition implementation when a device
+       is formatted.
+
+       This setting will override any values configured via Kconfig.
index 1d622eff2f82f3d1ae3d4e3e5934a83bda81c7d1..ec99958fcd5027cb5e8cd06f261bc26ab01bf224 100644 (file)
@@ -18,9 +18,9 @@
 
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550_CLK         48000000
-#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
+#if !defined(CONFIG_SPL_DM) || !defined(CONFIG_DM_SERIAL)
+#define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #endif
 
 /* I2C Configuration */
  * DM support in SPL
  */
 #ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_MMC
-#undef CONFIG_DM_SPI
-#undef CONFIG_DM_SPI_FLASH
 #undef CONFIG_TIMER
 #endif
 
index d545e1b6a567171b1357c03fdae4051ef2f520ed..dc7a370208670718631c4ad887a93f8fa80b5908 100644 (file)
 #define CONFIG_SYS_SCSI_MAX_DEVICE     (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
                                                CONFIG_SYS_SCSI_MAX_LUN)
 
-/* EEPROM */
-#define CONFIG_EEPROM_CHIP_ADDRESS 0x50
-#define CONFIG_EEPROM_BUS_ADDRESS 0
-
 /*
  * Default to using SPI for environment, etc.
  * 0x000000 - 0x040000 : QSPI.SPL (256KiB)
 #define CONFIG_SYS_SPI_ARGS_OFFS        0x140000
 #define CONFIG_SYS_SPI_ARGS_SIZE        0x80000
 
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_SPI
-#undef CONFIG_DM_SPI_FLASH
-#endif
-
 /* SPI SPL */
 #define CONFIG_TI_EDMA3
 #define CONFIG_SPL_SPI_LOAD
diff --git a/include/configs/bcm_northstar2.h b/include/configs/bcm_northstar2.h
new file mode 100644 (file)
index 0000000..ec2ce3f
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Configuration for Broadcom NS2.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __BCM_NORTHSTAR2_H
+#define __BCM_NORTHSTAR2_H
+
+#include <linux/sizes.h>
+
+#define CONFIG_HOSTNAME                                northstar2
+
+/* Physical Memory Map */
+#define V2M_BASE                               0x80000000
+#define PHYS_SDRAM_1                           V2M_BASE
+
+#define CONFIG_NR_DRAM_BANKS                   2
+#define PHYS_SDRAM_1_SIZE                      (4UL * SZ_1G)
+#define PHYS_SDRAM_2_SIZE                      (4UL * SZ_1G)
+#define CONFIG_SYS_SDRAM_BASE                  PHYS_SDRAM_1
+
+/* define text_base for U-boot image */
+#define CONFIG_SYS_TEXT_BASE                   0x85000000
+#define CONFIG_SYS_INIT_SP_ADDR                        (PHYS_SDRAM_1 + 0x7ff00)
+#define CONFIG_SYS_LOAD_ADDR                   0x90000000
+#define CONFIG_SYS_MALLOC_LEN                  SZ_16M
+
+/* Serial Configuration */
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE            (-4)
+#define CONFIG_SYS_NS16550_CLK                 25000000
+#define CONFIG_SYS_NS16550_COM1                        0x66100000
+#define CONFIG_SYS_NS16550_COM2                        0x66110000
+#define CONFIG_SYS_NS16550_COM3                        0x66120000
+#define CONFIG_SYS_NS16550_COM4                        0x66130000
+#define CONFIG_CONS_INDEX                      4
+#define CONFIG_BAUDRATE                                115200
+
+#define CONFIG_ENV_SIZE                                SZ_8K
+#define CONFIG_ENV_IS_NOWHERE
+
+/* console configuration */
+#define CONFIG_SYS_CBSIZE                      SZ_1K
+#define CONFIG_SYS_PBSIZE                      (CONFIG_SYS_CBSIZE + \
+                                                sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_MAXARGS                     64
+#define CONFIG_SYS_BARGSIZE                    CONFIG_SYS_CBSIZE
+
+/* version string, parser, etc */
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_COMMAND_HISTORY
+#define CONFIG_SYS_LONGHELP
+
+#endif /* __BCM_NORTHSTAR2_H */
index 43e74a29e9110197bda78c6238b0ce4c9f3484df..7d6f7ff2788cc6b4f4654478820bb9665f766a6b 100644 (file)
 #define CONFIG_SF_DEFAULT_MODE                 SPI_MODE_0
 #define CONFIG_QSPI_QUAD_SUPPORT
 
-#ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_SPI
-#undef CONFIG_DM_SPI_FLASH
-#endif
-
 /*
  * Default to using SPI for environment, etc.
  * 0x000000 - 0x040000 : QSPI.SPL (256KiB)
 #endif
 #endif  /* NOR support */
 
-/* EEPROM */
-#define CONFIG_EEPROM_CHIP_ADDRESS 0x50
-#define CONFIG_EEPROM_BUS_ADDRESS 0
-
 #endif /* __CONFIG_DRA7XX_EVM_H */
index 5d4ef58e5f1a369c8b756605403a6a53dc0fd288..f76e0a5c1fb957d138578ff49a6cb241d82dd309 100644 (file)
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     CONFIG_SPL_PAD_TO
 
+/* SRAM scratch space entries  */
+#define SRAM_SCRATCH_SPACE_ADDR        CONFIG_SPL_STACK + 0x8
+
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_START     (SRAM_SCRATCH_SPACE_ADDR)
+#define TI_SRAM_SCRATCH_BOARD_EEPROM_END       (SRAM_SCRATCH_SPACE_ADDR + 0x200)
+#define KEYSTONE_SRAM_SCRATCH_SPACE_END                (TI_SRAM_SCRATCH_BOARD_EEPROM_END)
+
 /* UART Configuration */
 #define CONFIG_SYS_NS16550_MEM32
 #if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
index 7fb1bb60df0bf739fba1cc785ac4cd7c24461741..97bd874e6cdd4973ab9231528f686de63b5cf180 100644 (file)
@@ -42,7 +42,7 @@
  * Hardware drivers
  */
 #define CONFIG_SYS_NS16550_CLK         48000000
-#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_DM_SERIAL)
+#if !defined(CONFIG_DM_SERIAL)
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #endif
 #define CONFIG_SPL_NAND_AM33XX_BCH     /* ELM support */
 #endif
 
-/*
- * Disable MMC DM for SPL build and can be re-enabled after adding
- * DM support in SPL
- */
 #ifdef CONFIG_SPL_BUILD
-#undef CONFIG_DM_MMC
 #undef CONFIG_TIMER
-#undef CONFIG_DM_ETH
 #endif
 
 #endif /* __CONFIG_TI_OMAP5_COMMON_H */
index 09ec3582423bc0fc30c37531ade495e06f65fa01..fde1ac108d0f2703bc77ed4b8b47a55bd324291b 100644 (file)
@@ -1,6 +1,6 @@
 config RSA
        bool "Use RSA Library"
-       select RSA_FREESCALE_EXP if FSL_CAAM
+       select RSA_FREESCALE_EXP if FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
        select RSA_SOFTWARE_EXP if !RSA_FREESCALE_EXP
        help
          RSA support. This enables the RSA algorithm used for FIT image
@@ -29,7 +29,7 @@ config RSA_SOFTWARE_EXP
 
 config RSA_FREESCALE_EXP
        bool "Enable RSA Modular Exponentiation with FSL crypto accelerator"
-       depends on DM && RSA && FSL_CAAM
+       depends on DM && RSA && FSL_CAAM && !ARCH_MX7 && !ARCH_MX6 && !ARCH_MX5
        help
        Enables driver for RSA modular exponentiation using Freescale cryptographic
        accelerator - CAAM.
index e9d3c66741201f5ccfe321cf1431e3339f1ed18b..58fa295771020639ba8924d906787dc3f9d78430 100644 (file)
@@ -34,6 +34,9 @@ int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
 {
        char buf[ARP_HLEN_ASCII + 1];
 
+       if (eth_getenv_enetaddr(name, (uchar *)buf))
+               return -EEXIST;
+
        sprintf(buf, "%pM", enetaddr);
 
        return setenv(name, buf);
index db0649fca8d0138103a4bfc7b26246138728ba92..b0d0538919770e29caf0012f74fa4cfa1ae522fb 100755 (executable)
@@ -11,6 +11,9 @@
 # make O=sandbox sandbox_config
 # make O=sandbox
 # ./test/image/test-fit.py -u sandbox/u-boot
+#
+# Note: The above testing requires the Python development package, typically
+# called python-devel or something similar.
 
 import doctest
 from optparse import OptionParser
@@ -115,8 +118,8 @@ base_fdt = '''
 };
 '''
 
-# This is the U-Boot script that is run for each test. First load the fit,
-# then do the 'bootm' command, then save out memory from the places where
+# This is the U-Boot script that is run for each test. First load the FIT,
+# then run the 'bootm' command, then save out memory from the places where
 # we expect 'bootm' to write things. Then quit.
 base_script = '''
 sb load hostfs 0 %(fit_addr)x %(fit)s
@@ -266,7 +269,7 @@ def find_matching(text, match):
 
     >>> find_matching('first line:10\\nsecond_line:20', 'first line:')
     '10'
-    >>> find_matching('first line:10\\nsecond_line:20', 'second linex')
+    >>> find_matching('first line:10\\nsecond_line:20', 'second line')
     Traceback (most recent call last):
       ...
     ValueError: Test aborted
@@ -389,7 +392,7 @@ def run_fit_test(mkimage, u_boot):
         fail('Ramdisk loaded but should not be', stdout)
 
     # Find out the offset in the FIT where U-Boot has found the FDT
-    line = find_matching(stdout, 'Booting using the fdt blob at ')
+    line = find_matching(stdout, 'Booting using the FDT blob at ')
     fit_offset = int(line, 16) - params['fit_addr']
     fdt_magic = struct.pack('>L', 0xd00dfeed)
     data = read_file(fit)
@@ -469,7 +472,7 @@ def run_tests():
     print '\nTests passed'
     print 'Caveat: this is only a sanity check - test coverage is poor'
 
-    # Remove the tempoerary directory unless we are asked to keep it
+    # Remove the temporary directory unless we are asked to keep it
     if options.keep:
         print "Output files are in '%s'" % base_dir
     else:
index a894b5c9d235a8f4181b506f4e37d9aff8b353d7..e9cde02c906c56fa4611b6ca440e820484a58953 100644 (file)
@@ -120,7 +120,7 @@ _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
 libfdt:
 
 tools/_libfdt.so: $(patsubst %.o,%.c,$(LIBFDT_OBJS)) tools/libfdt_wrap.c
-       LDFLAGS="$(HOSTLDFLAGS)" python $(srctree)/lib/libfdt/setup.py \
+       LDFLAGS="$(HOSTLDFLAGS)" CFLAGS= python $(srctree)/lib/libfdt/setup.py \
                "$(_hostc_flags)" $^
        mv _libfdt.so $@