Marvell DB-XC3-24G4XG board support
Subsystems (3)
v3 cover Marvell DB-XC3-24G4XG board support
This series adds support for Marvell's Switches with integrated CPUs and the DB-XC3-24G4XG board. The CPU side is similar to the Armada range.
For now the DDR training code needs to come from the Marvell bin_hdr. It's one area where the integrated SoCs differ from the Armada range so neither the Armada-XP nor Armada-38x training code will work as-is. I'm asking Marvell about the possibility of re-licensing the code under a Proprietary/BSD/GPL as they did with Armada-38x.
I also have access to a DB-DXBC2-MM board with a different chip. I'll look at adding support for that as well at some point. It's harder to work with because it has no USB, but other than that it's similar to the DB-XC3.
Changes in v3:
- use the filename binary.0 to determine if the destaddr needs to match execaddr.
- Adjust path to binary.0 in kwbimage.cfg to handle external build output directories.
Changes in v2:
- use CONFIG_ARMADA_MSYS instead of just CONFIG_MSYS
- Disable MBUS Error proagation
- new, split out from Add DB-XC3-24G4XG board with a better explanation
- u-boot specific changes in u-boot.dtsi
- remove unnecessary entries from board config.h
- move some changes to earlier patches
Chris Packham (4):
arm: mvebu: Add Marvell's integrated CPUs
arm: mvebu: NAND clock support for MSYS devices
tools: kwbimage: don't adjust for image_header for Armada MSYS
arm: mvebu: Add DB-XC3-24G4XG board
arch/arm/dts/Makefile | 3 +- arch/arm/dts/armada-xp-98dx3236.dtsi | 343 ++++++++++++++++++ arch/arm/dts/armada-xp-98dx3336.dtsi | 39 ++ arch/arm/dts/armada-xp-98dx4251.dtsi | 54 +++ .../dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 24 ++ arch/arm/dts/armada-xp-db-xc3-24g4xg.dts | 110 ++++++ arch/arm/mach-mvebu/Kconfig | 26 +- arch/arm/mach-mvebu/Makefile | 1 + arch/arm/mach-mvebu/cpu.c | 33 +- arch/arm/mach-mvebu/include/mach/config.h | 2 +- arch/arm/mach-mvebu/include/mach/cpu.h | 3 + arch/arm/mach-mvebu/include/mach/soc.h | 31 ++ arch/arm/mach-mvebu/mbus.c | 5 + board/Marvell/db-xc3-24g4xg/.gitignore | 1 + board/Marvell/db-xc3-24g4xg/MAINTAINERS | 7 + board/Marvell/db-xc3-24g4xg/Makefile | 14 + board/Marvell/db-xc3-24g4xg/README | 4 + board/Marvell/db-xc3-24g4xg/binary.0 | 11 + board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c | 68 ++++ board/Marvell/db-xc3-24g4xg/kwbimage.cfg.in | 12 + configs/db-xc3-24g4xg_defconfig | 55 +++ drivers/ddr/marvell/axp/xor_regs.h | 4 + include/configs/db-xc3-24g4xg.h | 41 +++ tools/kwbimage.c | 7 + 24 files changed, 893 insertions(+), 5 deletions(-) create mode 100644 arch/arm/dts/armada-xp-98dx3236.dtsi create mode 100644 arch/arm/dts/armada-xp-98dx3336.dtsi create mode 100644 arch/arm/dts/armada-xp-98dx4251.dtsi create mode 100644 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi create mode 100644 arch/arm/dts/armada-xp-db-xc3-24g4xg.dts create mode 100644 board/Marvell/db-xc3-24g4xg/.gitignore create mode 100644 board/Marvell/db-xc3-24g4xg/MAINTAINERS create mode 100644 board/Marvell/db-xc3-24g4xg/Makefile create mode 100644 board/Marvell/db-xc3-24g4xg/README create mode 100644 board/Marvell/db-xc3-24g4xg/binary.0 create mode 100644 board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c create mode 100644 board/Marvell/db-xc3-24g4xg/kwbimage.cfg.in create mode 100644 configs/db-xc3-24g4xg_defconfig create mode 100644 include/configs/db-xc3-24g4xg.h
Signature · 1 line
2.21.0
PATCH v3 1/4 arm: mvebu: Add Marvell's integrated CPUs
Marvell's switch chips with integrated CPUs (collectively referred to as MSYS) share common ancestry with the Armada SoCs. Some of the IP blocks (e.g. xor) are located at different addresses and DFX server exists as a separate target on the MBUS (on Armada-38x it's just part of the core complex registers).
---
Changes in v3: None
Changes in v2:
- use CONFIG_ARMADA_MSYS instead of just CONFIG_MSYS
- Disable MBUS Error proagation
arch/arm/mach-mvebu/Kconfig | 18 ++++++++++++- arch/arm/mach-mvebu/Makefile | 1 + arch/arm/mach-mvebu/cpu.c | 31 +++++++++++++++++++++-- arch/arm/mach-mvebu/include/mach/config.h | 2 +- arch/arm/mach-mvebu/include/mach/cpu.h | 3 +++ arch/arm/mach-mvebu/include/mach/soc.h | 20 +++++++++++++++ arch/arm/mach-mvebu/mbus.c | 5 ++++ drivers/ddr/marvell/axp/xor_regs.h | 4 +++ 8 files changed, 80 insertions(+), 4 deletions(-)
arch/arm/mach-mvebu/Kconfig +17 -1
@@ -46,7 +46,7 @@ config ARMADA_8K # Armada PLL frequency (used for NAND clock generation) config SYS_MVEBU_PLL_CLOCK int - default "2000000000" if ARMADA_XP || ARMADA_3700 || ARMADA_8K + default "2000000000" if ARMADA_XP || ARMADA_3700 || ARMADA_8K || ARMADA_MSYS default "1000000000" if ARMADA_38X || ARMADA_375 # Armada XP/38x SoC types...
@@ -63,6 +63,22 @@ config MV78460 bool select ARMADA_XP +config ARMADA_MSYS + bool + select ARMADA_32BIT + +config 98DX4251 + bool + select ARMADA_MSYS + +config 98DX3336 + bool + select ARMADA_MSYS + +config 98DX3236 + bool + select ARMADA_MSYS + config 88F6820 bool select ARMADA_38X
arch/arm/mach-mvebu/Makefile +1 -0
@@ -24,6 +24,7 @@ ifndef CONFIG_SPL_BUILD obj-$(CONFIG_ARMADA_375) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_ARMADA_38X) += ../../../drivers/ddr/marvell/a38x/xor.o obj-$(CONFIG_ARMADA_XP) += ../../../drivers/ddr/marvell/axp/xor.o +obj-$(CONFIG_ARMADA_MSYS) += ../../../drivers/ddr/marvell/axp/xor.o obj-$(CONFIG_MVEBU_EFUSE) += efuse.o extra-y += kwbimage.cfg
arch/arm/mach-mvebu/cpu.c +29 -2
@@ -23,6 +23,11 @@ static struct mbus_win windows[] = {/* NOR */ {MBUS_BOOTROM_BASE ,MBUS_BOOTROM_SIZE , CPU_TARGET_DEVICEBUS_BOOTROM_SPI, CPU_ATTR_BOOTROM }, + +#ifdef CONFIG_ARMADA_MSYS + /* DFX */ + { MBUS_DFX_BASE, MBUS_DFX_SIZE, CPU_TARGET_DFX, 0 }, +#endif };void lowlevel_init (void )
@@ -121,6 +126,14 @@ static const struct sar_freq_modes sar_freq_tab[] = { { 0x13, 0x0, 2000, 1000, 933 }, { 0xff, 0xff, 0, 0, 0 } /* 0xff marks end of array */ }; +#elif defined(CONFIG_ARMADA_MSYS) +static const struct sar_freq_modes sar_freq_tab[] = { + {0x0 ,0x0 ,400 ,400 ,400 }, + {0x2 ,0x0 ,667 ,333 ,667 }, + {0x3 ,0x0 ,800 ,400 ,800 }, + {0x5 ,0x0 ,800 ,400 ,800 }, + {0xff ,0xff ,0 ,0 ,0 }/* 0xff marks end of array */ +};#else /* SAR frequency values for Armada XP */ static const struct sar_freq_modes sar_freq_tab[] = {
@@ -144,7 +157,7 @@ void get_sar_freq(struct sar_freq_modes *sar_freq)u32 freq;int i; -#if defined(CONFIG_ARMADA_375 ) +#if defined(CONFIG_ARMADA_375 ) || defined(CONFIG_ARMADA_MSYS ) val =readl (CONFIG_SAR2_REG );/* SAR - Sample At Reset */ #else val =readl (CONFIG_SAR_REG );/* SAR - Sample At Reset */
@@ -160,7 +173,7 @@ void get_sar_freq(struct sar_freq_modes *sar_freq)#endif for (i =0 ; sar_freq_tab[i].val !=0xff ; i++) {if (sar_freq_tab[i].val == freq) { -#if defined(CONFIG_ARMADA_375 ) || defined(CONFIG_ARMADA_38X ) +#if defined(CONFIG_ARMADA_375 ) || defined(CONFIG_ARMADA_38X ) || defined(CONFIG_ARMADA_MSYS ) *sar_freq = sar_freq_tab[i];return ;#else
@@ -270,6 +283,20 @@ int print_cpuinfo(void) } } +if (mvebu_soc_family () ==MVEBU_SOC_MSYS ) { +switch (revid) { +case 3 : +puts ("A0" ); +break ; +case 4 : +puts ("A1" ); +break ; +default : +printf ("?? (%x)" , revid); +break ; + } + } +get_sar_freq (&sar_freq);printf (" at %d MHz\n" , sar_freq.p_clk);
arch/arm/mach-mvebu/include/mach/config.h +1 -1
@@ -17,7 +17,7 @@#include <asm/arch/soc.h> #if defined(CONFIG_ARMADA_XP ) || defined(CONFIG_ARMADA_375 ) \ - || defined(CONFIG_ARMADA_38X ) + || defined(CONFIG_ARMADA_38X ) || defined(CONFIG_ARMADA_MSYS )/* * Set this for the common xor register definitions needed in dram.c * for A38x as well here.
arch/arm/mach-mvebu/include/mach/cpu.h +3 -0
@@ -34,6 +34,7 @@ enum cpu_target {CPU_TARGET_PCIE02 =0x4 ,CPU_TARGET_ETH01 =0x7 ,CPU_TARGET_PCIE13 =0x8 , +CPU_TARGET_DFX =0x8 ,CPU_TARGET_SASRAM =0x9 ,CPU_TARGET_SATA01 =0xa ,/* A38X */ CPU_TARGET_NAND = 0xd,
@@ -79,6 +80,8 @@ enum {#define MBUS_PCI_IO_SIZE (64 << 10)#define MBUS_SPI_BASE 0xF4000000#define MBUS_SPI_SIZE (8 << 20) +#define MBUS_DFX_BASE 0xF6000000 +#define MBUS_DFX_SIZE (1 << 20)#define MBUS_BOOTROM_BASE 0xF8000000#define MBUS_BOOTROM_SIZE (8 << 20)
arch/arm/mach-mvebu/include/mach/soc.h +20 -0
@@ -76,7 +76,11 @@#define MVEBU_NAND_BASE (MVEBU_REGISTER(0xd0000))#define MVEBU_SDIO_BASE (MVEBU_REGISTER(0xd8000))#define MVEBU_LCD_BASE (MVEBU_REGISTER(0xe0000)) +#ifdef CONFIG_ARMADA_MSYS +#define MVEBU_DFX_BASE (MBUS_DFX_BASE) +#else #define MVEBU_DFX_BASE (MVEBU_REGISTER(0xe4000)) +#endif #define SOC_COHERENCY_FABRIC_CTRL_REG (MVEBU_REGISTER(0x20200))#define MBUS_ERR_PROP_EN (1 << 8)
@@ -149,6 +153,22 @@#define BOOT_FROM_SPI 0x32#define BOOT_FROM_MMC 0x30#define BOOT_FROM_MMC_ALT 0x31 +#elif defined(CONFIG_ARMADA_MSYS ) +/* SAR values for MSYS */ +#define CONFIG_SAR_REG (MBUS_DFX_BASE + 0xf8200) +#define CONFIG_SAR2_REG (MBUS_DFX_BASE + 0xf8204) + +#define SAR_CPU_FREQ_OFFS 18 +#define SAR_CPU_FREQ_MASK (0x7 << SAR_CPU_FREQ_OFFS) +#define SAR_BOOT_DEVICE_OFFS 11 +#define SAR_BOOT_DEVICE_MASK (0x7 << SAR_BOOT_DEVICE_OFFS) + +#define BOOT_DEV_SEL_OFFS 11 +#define BOOT_DEV_SEL_MASK (0x7 << BOOT_DEV_SEL_OFFS) + +#define BOOT_FROM_NAND 0x1 +#define BOOT_FROM_UART 0x2 +#define BOOT_FROM_SPI 0x3#else /* SAR values for Armada XP */ #define CONFIG_SAR_REG (MVEBU_REGISTER(0x18230))
arch/arm/mach-mvebu/mbus.c +5 -0
@@ -344,6 +344,11 @@ static void mvebu_mbus_default_setup_cpu_target(struct mvebu_mbus_state *mbus) } } mbus_dram_info.num_cs = cs; + +#if defined(CONFIG_ARMADA_MSYS ) +/* Disable MBUS Err Prop - in order to avoid data aborts */ +clrbits_le32 (mbus->mbuswins_base +0x200 ,BIT (8 )); +#endif } static const struct mvebu_mbus_soc_data
drivers/ddr/marvell/axp/xor_regs.h +4 -0
@@ -13,7 +13,11 @@#define XOR_UNIT (chan) ((chan) >> 1)#define XOR_CHAN (chan) ((chan) & 1) +#ifdef CONFIG_ARMADA_MSYS +#define MV_XOR_REGS_OFFSET (unit) (0xF0800) +#else #define MV_XOR_REGS_OFFSET (unit) (0x60900) +#endif #define MV_XOR_REGS_BASE (unit) (MV_XOR_REGS_OFFSET(unit))/* XOR Engine Control Register Map */
Signature · 1 line
2.21.0
PATCH v3 1/4 arm: mvebu: Add Marvell's integrated CPUs
Quoted 7 lines · Chris Packham
Marvell's switch chips with integrated CPUs (collectively referred to as MSYS) share common ancestry with the Armada SoCs. Some of the IP blocks (e.g. xor) are located at different addresses and DFX server exists as a separate target on the MBUS (on Armada-38x it's just part of the core complex registers).
Signed-off-by Chris Packham <[email protected]>
Thanks,
Stefan
PATCH v3 1/4 arm: mvebu: Add Marvell's integrated CPUs
In reply to Chris PackhamQuoted 6 lines · Chris Packham
Marvell's switch chips with integrated CPUs (collectively referred to as MSYS) share common ancestry with the Armada SoCs. Some of the IP blocks (e.g. xor) are located at different addresses and DFX server exists as a separate target on the MBUS (on Armada-38x it's just part of the core complex registers).
Quoted 7 lines
Signed-off-by Chris Packham <[email protected]>---
Changes in v3: None
Changes in v2:
- useCONFIG_ARMADA_MSYSinstead of justCONFIG_MSYS
- Disable MBUS Error proagation
Applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH v3 2/4 arm: mvebu: NAND clock support for MSYS devices
In reply to Chris PackhamOne difference with the integrated CPUs is that they use a different clock control block to the Armada devices. Update mvebu_get_nand_clock() accordingly.
---
This could probably be squashed into the previous change. I was trying to separate things to aid review but it's hard to do so and keep bisectability.
Changes in v3: None
Changes in v2: None
arch/arm/mach-mvebu/cpu.c | 2 ++ arch/arm/mach-mvebu/include/mach/soc.h | 11 +++++++++++ 2 files changed, 13 insertions(+)
arch/arm/mach-mvebu/cpu.c +2 -0
@@ -499,6 +499,8 @@ u32 mvebu_get_nand_clock(void)if (mvebu_soc_family () ==MVEBU_SOC_A38X ) reg =MVEBU_DFX_DIV_CLK_CTRL (1 ); +else if (mvebu_soc_family () ==MVEBU_SOC_MSYS ) + reg =MVEBU_DFX_DIV_CLK_CTRL (8 );else reg =MVEBU_CORE_DIV_CLK_CTRL (1 );
arch/arm/mach-mvebu/include/mach/soc.h +11 -0
@@ -100,9 +100,20 @@#define SPI_PUP_EN BIT(5)#define MVEBU_CORE_DIV_CLK_CTRL (i) (MVEBU_CLOCK_BASE + ((i) * 0x8)) +#ifdef CONFIG_ARMADA_MSYS +#define MVEBU_DFX_DIV_CLK_CTRL (i) (MVEBU_DFX_BASE + 0xf8000 + 0x250 + ((i) * 0x4)) +#define NAND_ECC_DIVCKL_RATIO_OFFS 6 +#define NAND_ECC_DIVCKL_RATIO_MASK (0xF << NAND_ECC_DIVCKL_RATIO_OFFS) +#else #define MVEBU_DFX_DIV_CLK_CTRL (i) (MVEBU_DFX_BASE + 0x250 + ((i) * 0x4)) +#endif +#ifdef CONFIG_ARMADA_MSYS +#define NAND_ECC_DIVCKL_RATIO_OFFS 6 +#define NAND_ECC_DIVCKL_RATIO_MASK (0xF << NAND_ECC_DIVCKL_RATIO_OFFS) +#else #define NAND_ECC_DIVCKL_RATIO_OFFS 8#define NAND_ECC_DIVCKL_RATIO_MASK (0x3F << NAND_ECC_DIVCKL_RATIO_OFFS) +#endif #define SDRAM_MAX_CS 4#define SDRAM_ADDR_MASK 0xFF000000
Signature · 1 line
2.21.0
PATCH v3 2/4 arm: mvebu: NAND clock support for MSYS devices
Quoted 5 lines · Chris Packham
One difference with the integrated CPUs is that they use a different clock control block to the Armada devices. Update
mvebu_get_nand_clock()accordingly.Signed-off-by Chris Packham <[email protected]>
Thanks,
Stefan
PATCH v3 2/4 arm: mvebu: NAND clock support for MSYS devices
In reply to Chris PackhamQuoted 4 lines · Chris Packham
One difference with the integrated CPUs is that they use a different clock control block to the Armada devices. Update
mvebu_get_nand_clock()accordingly.
Quoted 8 lines
Signed-off-by Chris Packham <[email protected]>---
This could probably be squashed into the previous change. I was trying to separate things to aid review but it's hard to do so and keep bisectability.Changes in v3: None
Changes in v2: None
Applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH v3 3/4 tools: kwbimage: don't adjust for image_header for Armada MSYS
In reply to Chris PackhamFor the time being the Armada MSYS SoCs need to use the bin_hdr from the Marvell U-Boot. Because of this the binary.0 does not contain the image header that a proper u-boot SPL would so the adjustment introduced by commit 94084eea3bd3 ("tools: kwbimage: Fix dest addr") does not apply.
---
Changes in v3:
- use the filename binary.0 to determine if the destaddr needs to match execaddr.
Changes in v2:
- new, split out from Add DB-XC3-24G4XG board with a better explanation
tools/kwbimage.c | 7 +++++++ 1 file changed, 7 insertions(+)
tools/kwbimage.c +7 -0
@@ -1273,6 +1273,13 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, e =image_find_option (IMAGE_CFG_DEBUG );if (e) main_hdr->flags = e->debug ?0x1 :0 ; + e =image_find_option (IMAGE_CFG_BINARY ); +if (e) { +char *s =strrchr (e->binary.file,'/' ); + +if (strcmp (s,"/binary.0" ) ==0 ) + main_hdr->destaddr =cpu_to_le32 (params->addr); + }#if defined(CONFIG_KWB_SECURE )if (image_get_csk_index () >=0 ) {
Signature · 1 line
2.21.0
PATCH v3 3/4 tools: kwbimage: don't adjust for image_header for Armada MSYS
Quoted 6 lines · Chris Packham
For the time being the Armada MSYS SoCs need to use the
bin_hdrfrom the Marvell U-Boot. Because of this the binary.0 does not contain the image header that a proper u-boot SPL would so the adjustment introduced by commit94084eea3bd3("tools: kwbimage: Fix dest addr") does not apply.Signed-off-by Chris Packham <[email protected]>
Quoted 8 lines
---
Changes in v3:
- use the filename binary.0 to determine if the destaddr needs to match execaddr.Changes in v2:
- new, split out from Add DB-XC3-24G4XG board with a better explanation
Thanks,
Stefan
PATCH v3 3/4 tools: kwbimage: don't adjust for image_header for Armada MSYS
In reply to Chris PackhamQuoted 6 lines · Chris Packham
For the time being the Armada MSYS SoCs need to use the
bin_hdrfrom the Marvell U-Boot. Because of this the binary.0 does not contain the image header that a proper u-boot SPL would so the adjustment introduced by commit94084eea3bd3("tools: kwbimage: Fix dest addr") does not apply.Signed-off-by Chris Packham <[email protected]>
Quoted 8 lines
---
Changes in v3:
- use the filename binary.0 to determine if the destaddr needs to match execaddr.Changes in v2:
- new, split out from Add DB-XC3-24G4XG board with a better explanation
Applied to u-boot-marvell/master.
Thanks,
Stefan
PATCH v3 4/4 arm: mvebu: Add DB-XC3-24G4XG board
In reply to Chris PackhamFrom: Chris Packham <[email protected]>
The DB-XC3-24G4XG is a switch development board from Marvell. It can either use and external CPU card such as the db-88f6820-amc or the internal CPU that is integrated into the switch.
Add support for running U-Boot on the internal CPU and enable the USB, SPI and NAND peripherals. For now this needs the bin_hdr from the Marvell U-Boot for this board.
---
Changes in v3:
- Adjust path to binary.0 in kwbimage.cfg to handle external build output directories.
Changes in v2:
- u-boot specific changes in u-boot.dtsi
- remove unnecessary entries from board config.h
- move some changes to earlier patches
arch/arm/dts/Makefile | 3 +- arch/arm/dts/armada-xp-98dx3236.dtsi | 343 ++++++++++++++++++ arch/arm/dts/armada-xp-98dx3336.dtsi | 39 ++ arch/arm/dts/armada-xp-98dx4251.dtsi | 54 +++ .../dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi | 24 ++ arch/arm/dts/armada-xp-db-xc3-24g4xg.dts | 110 ++++++ arch/arm/mach-mvebu/Kconfig | 8 + board/Marvell/db-xc3-24g4xg/.gitignore | 1 + board/Marvell/db-xc3-24g4xg/MAINTAINERS | 7 + board/Marvell/db-xc3-24g4xg/Makefile | 14 + board/Marvell/db-xc3-24g4xg/README | 4 + board/Marvell/db-xc3-24g4xg/binary.0 | 11 + board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c | 68 ++++ board/Marvell/db-xc3-24g4xg/kwbimage.cfg.in | 12 + configs/db-xc3-24g4xg_defconfig | 55 +++ include/configs/db-xc3-24g4xg.h | 41 +++ 16 files changed, 793 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/armada-xp-98dx3236.dtsi create mode 100644 arch/arm/dts/armada-xp-98dx3336.dtsi create mode 100644 arch/arm/dts/armada-xp-98dx4251.dtsi create mode 100644 arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi create mode 100644 arch/arm/dts/armada-xp-db-xc3-24g4xg.dts create mode 100644 board/Marvell/db-xc3-24g4xg/.gitignore create mode 100644 board/Marvell/db-xc3-24g4xg/MAINTAINERS create mode 100644 board/Marvell/db-xc3-24g4xg/Makefile create mode 100644 board/Marvell/db-xc3-24g4xg/README create mode 100644 board/Marvell/db-xc3-24g4xg/binary.0 create mode 100644 board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c create mode 100644 board/Marvell/db-xc3-24g4xg/kwbimage.cfg.in create mode 100644 configs/db-xc3-24g4xg_defconfig create mode 100644 include/configs/db-xc3-24g4xg.h
arch/arm/dts/Makefile +2 -1
@@ -151,7 +151,8 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-xp-theadorable.dtb \ armada-38x-controlcenterdc.dtb \ armada-385-atl-x530.dtb \ - armada-385-atl-x530DP.dtb + armada-385-atl-x530DP.dtb \ + armada-xp-db-xc3-24g4xg.dtb dtb-$(CONFIG_ARCH_UNIPHIER_LD11) += \ uniphier-ld11-global.dtb \
arch/arm/dts/armada-xp-98dx3236.dtsi new file +343 -0
343 lines not on this page · raw message
arch/arm/dts/armada-xp-98dx3336.dtsi new file +39 -0
@@ -0,0 +1,39 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree Include file for Marvell 98dx3336 family SoC + * + * Copyright (C) 2016 Allied Telesis Labs + * + * Contains definitions specific to the 98dx3236 SoC that are not + * common to all Armada XP SoCs. + */ + +#include "armada-xp-98dx3236.dtsi" + +/ { + model = "Marvell 98DX3336 SoC"; + compatible = "marvell,armadaxp-98dx3336", "marvell,armadaxp-98dx3236", "marvell,armada-370-xp"; + + cpus { + cpu at 1 { + device_type = "cpu"; + compatible = "marvell,sheeva-v7"; + reg = <1>; + clocks = <&cpuclk 1>; + clock-latency = <1000000>; + }; + }; + + soc { + internal-regs { + resume at 20980 { + compatible = "marvell,98dx3336-resume-ctrl"; + reg = <0x20980 0x10>; + }; + }; + }; +}; + +&pp0 { + compatible = "marvell,prestera-98dx3336", "marvell,prestera"; +};
arch/arm/dts/armada-xp-98dx4251.dtsi new file +54 -0
54 lines not on this page · raw message
arch/arm/dts/armada-xp-db-xc3-24g4xg-u-boot.dtsi new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +&uart0 { + u-boot,dm-pre-reloc; +}; + +&nand_controller { + compatible="marvell,mvebu-pxa3xx-nand"; + status = "okay"; + label = "pxa3xx_nand-0"; + nand-rb = <0>; + marvell,nand-keep-config; + nand-on-flash-bbt; + nand-ecc-strength = <4>; + nand-ecc-step-size = <512>; +}; + +&spi0 { + u-boot,dm-pre-reloc; + + spi-flash at 0 { + u-boot,dm-pre-reloc; + }; +};
arch/arm/dts/armada-xp-db-xc3-24g4xg.dts new file +110 -0
110 lines not on this page · raw message
arch/arm/mach-mvebu/Kconfig +8 -0
@@ -152,6 +152,10 @@ config TARGET_X530 bool "Support Allied Telesis x530" select 88F6820 +config TARGET_DB_XC3_24G4XG + bool "Support DB-XC3-24G4XG" + select 98DX3336 + endchoice config SYS_BOARD
@@ -170,6 +174,7 @@ config SYS_BOARD default "theadorable" if TARGET_THEADORABLE default "a38x" if TARGET_CONTROLCENTERDC default "x530" if TARGET_X530 + default "db-xc3-24g4xg" if TARGET_DB_XC3_24G4XG config SYS_CONFIG_NAME default "clearfog" if TARGET_CLEARFOG
@@ -187,6 +192,7 @@ config SYS_CONFIG_NAME default "turris_mox" if TARGET_TURRIS_MOX default "controlcenterdc" if TARGET_CONTROLCENTERDC default "x530" if TARGET_X530 + default "db-xc3-24g4xg" if TARGET_DB_XC3_24G4XG config SYS_VENDOR default "Marvell" if TARGET_DB_MV784MP_GP
@@ -195,6 +201,8 @@ config SYS_VENDOR default "Marvell" if TARGET_DB_88F6820_GP default "Marvell" if TARGET_DB_88F6820_AMC default "Marvell" if TARGET_MVEBU_ARMADA_8K + default "Marvell" if TARGET_DB_XC3_24G4XG + default "Marvell" if TARGET_MVEBU_DB_88F7040 default "solidrun" if TARGET_CLEARFOG default "kobol" if TARGET_HELIOS4 default "Synology" if TARGET_DS414
board/Marvell/db-xc3-24g4xg/.gitignore new file +1 -0
@@ -0,0 +1 @@ +kwbimage.cfg
board/Marvell/db-xc3-24g4xg/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +DB-XC3-24G4XG BOARD +M: Chris Packham <[email protected]> +S: Maintained +F: board/Marvell/db-xc3-24g4xg/ +F: include/configs/db-xc3-24g4xg.h +F: configs/db-xc3-24g4xg-amc_defconfig +F: arch/arm/dts/armada-xp-db-xc3-24g4xg.dts
board/Marvell/db-xc3-24g4xg/Makefile new file +14 -0
@@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2015 Stefan Roese <[email protected]> + +obj-y := db-xc3-24g4xg.o +extra-y := kwbimage.cfg + +quiet_cmd_sed = SED $@ + cmd_sed = sed $(SEDFLAGS_$(@F)) $< >$(dir $<)$(@F) + +SEDFLAGS_kwbimage.cfg =-e "s|^BINARY.*|BINARY $(srctree)/$(@D)/binary.0 0000005b 00000068|" +$(src)/kwbimage.cfg: $(src)/kwbimage.cfg.in include/autoconf.mk \ + include/config/auto.conf + $(call if_changed,sed)
board/Marvell/db-xc3-24g4xg/README new file +4 -0
@@ -0,0 +1,4 @@ +To generate binary.0 from Marvell's bin_hdr.elf use the following command + + arm-softfloat-linux-gnueabi-objcopy -S -O binary bin_hdr.elf \ + board/Marvell/db-xc3-24g4xg/binary.0
board/Marvell/db-xc3-24g4xg/binary.0 new file +11 -0
@@ -0,0 +1,11 @@ +-------- +WARNING: +-------- +This file should contain the bin_hdr generated by the original Marvell +U-Boot implementation. As this is currently not included in this +U-Boot version, we have added this placeholder, so that the U-Boot +image can be generated without errors. + +If you have a known to be working bin_hdr for your board, then you +just need to replace this text file here with the binary header +and recompile U-Boot.
board/Marvell/db-xc3-24g4xg/db-xc3-24g4xg.c new file +68 -0
68 lines not on this page · raw message
board/Marvell/db-xc3-24g4xg/kwbimage.cfg.in new file +12 -0
@@ -0,0 +1,12 @@ +# +# Copyright (C) 2014 Stefan Roese <[email protected]> +# + +# Armada XP uses version 1 image format +VERSION 1 + +# Boot Media configurations +BOOT_FROM spi + +# Binary Header (bin_hdr) with DDR3 training code +BINARY board/Marvell/db-xc3-24g4xg/binary.0 0000005b 00000068
configs/db-xc3-24g4xg_defconfig new file +55 -0
55 lines not on this page · raw message
include/configs/db-xc3-24g4xg.h new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH v3 4/4 arm: mvebu: Add DB-XC3-24G4XG board
Quoted 13 lines · Chris Packham
From: Chris Packham <[email protected]>
The DB-XC3-24G4XG is a switch development board from Marvell. It can either use and external CPU card such as the db-88f6820-amc or the internal CPU that is integrated into the switch.
Add support for running U-Boot on the internal CPU and enable the USB, SPI and NAND peripherals. For now this needs the
bin_hdrfrom the Marvell U-Boot for this board.Signed-off-by Chris Packham <[email protected]>---
Quoted 8 lines
Changes in v3:
- Adjust path to binary.0 in kwbimage.cfg to handle external build output directories.Changes in v2:
- u-boot specific changes inu-boot.dtsi
- remove unnecessary entries from boardconfig.h
- move some changes to earlier patches
Thanks,
Stefan
PATCH v3 4/4 arm: mvebu: Add DB-XC3-24G4XG board
In reply to Chris PackhamQuoted 13 lines · Chris Packham
From: Chris Packham <[email protected]>
The DB-XC3-24G4XG is a switch development board from Marvell. It can either use and external CPU card such as the db-88f6820-amc or the internal CPU that is integrated into the switch.
Add support for running U-Boot on the internal CPU and enable the USB, SPI and NAND peripherals. For now this needs the
bin_hdrfrom the Marvell U-Boot for this board.Signed-off-by Chris Packham <[email protected]>---
Quoted 8 lines
Changes in v3:
- Adjust path to binary.0 in kwbimage.cfg to handle external build output directories.Changes in v2:
- u-boot specific changes inu-boot.dtsi
- remove unnecessary entries from boardconfig.h
- move some changes to earlier patches
Applied to u-boot-marvell/master.
Thanks,
Stefan