From 2bd8711ef019ee4247e80a3dfd789f47f26f28f9 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 3 Aug 2015 12:13:09 +0200 Subject: arm: mvebu: db-mv784mp-gp.h: Fix image creation - use correct offset Signed-off-by: Stefan Roese --- include/configs/db-mv784mp-gp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index 41e6fdcb526..c6863b3a063 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -136,6 +136,7 @@ #define CONFIG_SPL_SPI_BUS 0 #define CONFIG_SPL_SPI_CS 0 #define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 +#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */ #define CONFIG_SYS_MVEBU_DDR_AXP -- cgit v1.3.1 From 49114c87381accd930985a38413b73dda3f5357e Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 22 Jul 2015 18:05:43 +0200 Subject: arm: mvebu: db-mv785mp-gp: Add USB/EHCI support This patch enabled the USB/EHCI support for the Marvell DB-MV784MP-GP Armada XP eval board. Signed-off-by: Stefan Roese Cc: Anton Schubert Cc: Marek Vasut Cc: Luka Perkov --- include/configs/db-mv784mp-gp.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index c6863b3a063..3911b428be1 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -33,6 +33,7 @@ #define CONFIG_CMD_SPI #define CONFIG_CMD_TFTPPUT #define CONFIG_CMD_TIME +#define CONFIG_CMD_USB /* I2C */ #define CONFIG_SYS_I2C @@ -41,6 +42,12 @@ #define CONFIG_SYS_I2C_SLAVE 0x0 #define CONFIG_SYS_I2C_SPEED 100000 +/* USB/EHCI configuration */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_STORAGE +#define CONFIG_USB_EHCI_MARVELL +#define CONFIG_EHCI_IS_TDI + /* SPI NOR flash default params, used by sf commands */ #define CONFIG_SF_DEFAULT_SPEED 1000000 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_3 -- cgit v1.3.1 From 8a3337161d0fdedcfbe6d6be884f811496feedc1 Mon Sep 17 00:00:00 2001 From: Anton Schubert Date: Thu, 23 Jul 2015 15:02:09 +0200 Subject: arm: mvebu: add multiple usb-hostcontroller support for AXP This patch adds support for multiple hostcontrollers to the ehci-marvell driver and enables all 3 usb-hcs on the db-mv784mp-gp board. It depends on the initial Armada XP usb support patch from Stefan. Signed-off-by: Anton Schubert Reviewed-by: Stefan Roese Cc: Luka Perkov --- drivers/usb/host/ehci-marvell.c | 19 +++++++++++-------- include/configs/db-mv784mp-gp.h | 1 + 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index fda812e94c5..50fa01c0798 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -38,13 +38,14 @@ DECLARE_GLOBAL_DATA_PTR; #define MVUSB0_BASE \ (mvebu_soc_family() == MVEBU_SOC_A38X ? \ MVEBU_USB20_BASE : MVEBU_AXP_USB_BASE) +#define MVUSB_BASE(port) MVUSB0_BASE + ((port) << 12) /* * Once all the older Marvell SoC's (Orion, Kirkwood) are converted * to the common mvebu archticture including the mbus setup, this * will be the only function needed to configure the access windows */ -static void usb_brg_adrdec_setup(void) +static void usb_brg_adrdec_setup(int index) { const struct mbus_dram_target_info *dram; int i; @@ -52,8 +53,8 @@ static void usb_brg_adrdec_setup(void) dram = mvebu_mbus_dram_info(); for (i = 0; i < 4; i++) { - writel(0, MVUSB0_BASE + USB_WINDOW_CTRL(i)); - writel(0, MVUSB0_BASE + USB_WINDOW_BASE(i)); + writel(0, MVUSB_BASE(index) + USB_WINDOW_CTRL(i)); + writel(0, MVUSB_BASE(index) + USB_WINDOW_BASE(i)); } for (i = 0; i < dram->num_cs; i++) { @@ -62,14 +63,16 @@ static void usb_brg_adrdec_setup(void) /* Write size, attributes and target id to control register */ writel(((cs->size - 1) & 0xffff0000) | (cs->mbus_attr << 8) | (dram->mbus_dram_target_id << 4) | 1, - MVUSB0_BASE + USB_WINDOW_CTRL(i)); + MVUSB_BASE(index) + USB_WINDOW_CTRL(i)); /* Write base address to base register */ - writel(cs->base, MVUSB0_BASE + USB_WINDOW_BASE(i)); + writel(cs->base, MVUSB_BASE(index) + USB_WINDOW_BASE(i)); } } #else -static void usb_brg_adrdec_setup(void) +#define MVUSB_BASE(port) MVUSB0_BASE + +static void usb_brg_adrdec_setup(int index) { int i; u32 size, base, attrib; @@ -118,9 +121,9 @@ static void usb_brg_adrdec_setup(void) int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { - usb_brg_adrdec_setup(); + usb_brg_adrdec_setup(index); - *hccr = (struct ehci_hccr *)(MVUSB0_BASE + 0x100); + *hccr = (struct ehci_hccr *)(MVUSB_BASE(index) + 0x100); *hcor = (struct ehci_hcor *)((uint32_t) *hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index 3911b428be1..64cabf4dfc3 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -47,6 +47,7 @@ #define CONFIG_USB_STORAGE #define CONFIG_USB_EHCI_MARVELL #define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_MAX_CONTROLLER_COUNT 3 /* SPI NOR flash default params, used by sf commands */ #define CONFIG_SF_DEFAULT_SPEED 1000000 -- cgit v1.3.1 From 2923c2d2febad412c1d7a955ca1b08c8bdd31cf4 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 6 Aug 2015 14:27:36 +0200 Subject: arm: mvebu: Move CONFIG_SYS_TEXT_BASE to an address < 16 MiB This patch moves CONFIG_SYS_TEXT_BASE to 0x00800000 for all Armada XP / 38x boards in mainline U-Boot. This is done in preparation for the ECC SDRAM scrubbing that needs to be done in the main U-Boot. The SPL (previously bin_hdr) has already scrubbed the area: 0x0000.0000 - 0x0100.0000 In this area this main U-Boot needs to get loaded. The main U-Boot then can scrub the remaining SDRAM area while running from this location. Signed-off-by: Stefan Roese Cc: Luka Perkov --- include/configs/db-88f6820-gp.h | 7 ++++++- include/configs/db-mv784mp-gp.h | 7 ++++++- include/configs/maxbcm.h | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h index 739c2bf3d55..7c32edb378c 100644 --- a/include/configs/db-88f6820-gp.h +++ b/include/configs/db-88f6820-gp.h @@ -20,7 +20,12 @@ #define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO_LATE -#define CONFIG_SYS_TEXT_BASE 0x04000000 +/* + * TEXT_BASE needs to be below 16MiB, since this area is scrubbed + * for DDR ECC byte filling in the SPL before loading the main + * U-Boot into it. + */ +#define CONFIG_SYS_TEXT_BASE 0x00800000 #define CONFIG_SYS_TCLK 250000000 /* 250MHz */ /* diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index 64cabf4dfc3..f4e669dd795 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -17,7 +17,12 @@ #define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO_LATE -#define CONFIG_SYS_TEXT_BASE 0x04000000 +/* + * TEXT_BASE needs to be below 16MiB, since this area is scrubbed + * for DDR ECC byte filling in the SPL before loading the main + * U-Boot into it. + */ +#define CONFIG_SYS_TEXT_BASE 0x00800000 #define CONFIG_SYS_TCLK 250000000 /* 250MHz */ /* diff --git a/include/configs/maxbcm.h b/include/configs/maxbcm.h index 0fb117f9d36..3530a262138 100644 --- a/include/configs/maxbcm.h +++ b/include/configs/maxbcm.h @@ -15,7 +15,12 @@ #define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO_LATE -#define CONFIG_SYS_TEXT_BASE 0x04000000 +/* + * TEXT_BASE needs to be below 16MiB, since this area is scrubbed + * for DDR ECC byte filling in the SPL before loading the main + * U-Boot into it. + */ +#define CONFIG_SYS_TEXT_BASE 0x00800000 #define CONFIG_SYS_TCLK 250000000 /* 250MHz */ /* -- cgit v1.3.1 From 41e705ac799a40d6f58d0e38e5a295fb20d5a226 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 11 Aug 2015 09:36:15 +0200 Subject: arm: mvebu: db-mv784mp-gp: Enable PCI support This patch enabled the MVEBU PCIe support on the db-mv784mp-gp AXP eval board. It also enabled the Intel E1000 driver support and adds the initialization of PCIe network controllers to the board code. Signed-off-by: Stefan Roese Cc: Anton Schubert Cc: Luka Perkov --- board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c | 7 +++++++ include/configs/db-mv784mp-gp.h | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'include') diff --git a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c index 78c7b7e4e6b..d7aa1499adf 100644 --- a/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c +++ b/board/Marvell/db-mv784mp-gp/db-mv784mp-gp.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -80,6 +81,12 @@ int checkboard(void) return 0; } +int board_eth_init(bd_t *bis) +{ + cpu_eth_init(bis); /* Built in controller(s) come first */ + return pci_eth_init(bis); +} + #ifdef CONFIG_RESET_PHY_R /* Configure and enable MV88E1545 PHY */ void reset_phy(void) diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index f4e669dd795..eec2ba933ff 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -33,6 +33,7 @@ #define CONFIG_CMD_ENV #define CONFIG_CMD_I2C #define CONFIG_CMD_IDE +#define CONFIG_CMD_PCI #define CONFIG_CMD_PING #define CONFIG_CMD_SF #define CONFIG_CMD_SPI @@ -102,6 +103,13 @@ #define CONFIG_DOS_PARTITION #endif /* CONFIG_CMD_IDE */ +/* PCIe support */ +#define CONFIG_PCI +#define CONFIG_PCI_MVEBU +#define CONFIG_PCI_PNP +#define CONFIG_PCI_SCAN_SHOW +#define CONFIG_E1000 /* enable Intel E1000 support for testing */ + /* * mv-common.h should be defined after CMD configs since it used them * to enable certain macros -- cgit v1.3.1 From ce2cb1d3ed92e91b24db516802be3688f7c28e26 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 11 Aug 2015 12:50:58 +0200 Subject: arm: mvebu: db-88f6820-gp: Enable PCI support This patch enabled the MVEBU PCIe support on the db-88f6820-gp A38x eval board. It also enabled the Intel E1000 driver support and adds the initialization of PCIe network controllers to the board code. Signed-off-by: Stefan Roese Cc: Anton Schubert Cc: Luka Perkov Cc: Dirk Eibach --- board/Marvell/db-88f6820-gp/db-88f6820-gp.c | 7 +++++++ include/configs/db-88f6820-gp.h | 8 ++++++++ 2 files changed, 15 insertions(+) (limited to 'include') diff --git a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c index 0eb17f62a2c..84ca55c7d50 100644 --- a/board/Marvell/db-88f6820-gp/db-88f6820-gp.c +++ b/board/Marvell/db-88f6820-gp/db-88f6820-gp.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -130,3 +131,9 @@ int checkboard(void) return 0; } + +int board_eth_init(bd_t *bis) +{ + cpu_eth_init(bis); /* Built in controller(s) come first */ + return pci_eth_init(bis); +} diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h index 7c32edb378c..1dd41821366 100644 --- a/include/configs/db-88f6820-gp.h +++ b/include/configs/db-88f6820-gp.h @@ -41,6 +41,7 @@ #define CONFIG_CMD_FS_GENERIC #define CONFIG_CMD_I2C #define CONFIG_CMD_MMC +#define CONFIG_CMD_PCI #define CONFIG_CMD_PING #define CONFIG_CMD_SCSI #define CONFIG_CMD_SF @@ -106,6 +107,13 @@ #define CONFIG_SYS_NETA_INTERFACE_TYPE PHY_INTERFACE_MODE_RGMII #define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */ +/* PCIe support */ +#define CONFIG_PCI +#define CONFIG_PCI_MVEBU +#define CONFIG_PCI_PNP +#define CONFIG_PCI_SCAN_SHOW +#define CONFIG_E1000 /* enable Intel E1000 support for testing */ + #define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ #define CONFIG_SYS_ALT_MEMTEST -- cgit v1.3.1