diff options
Diffstat (limited to 'roms/u-boot/arch/arm/include/asm/arch-pantheon')
4 files changed, 208 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/include/asm/arch-pantheon/config.h b/roms/u-boot/arch/arm/include/asm/arch-pantheon/config.h new file mode 100644 index 00000000..fdccd222 --- /dev/null +++ b/roms/u-boot/arch/arm/include/asm/arch-pantheon/config.h @@ -0,0 +1,54 @@ +/* + * (C) Copyright 2011 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Lei Wen <leiwen@marvell.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _PANTHEON_CONFIG_H +#define _PANTHEON_CONFIG_H + +#include <asm/arch/pantheon.h> + +#define CONFIG_ARM926EJS 1 /* Basic Architecture */ +/* default Dcache Line length for pantheon */ +#define CONFIG_SYS_CACHELINE_SIZE 32 + +#define CONFIG_SYS_TCLK (14745600) /* NS16550 clk config */ +#define CONFIG_SYS_HZ_CLOCK (3250000) /* Timer Freq. 3.25MHZ */ +#define CONFIG_MARVELL_MFP /* Enable mvmfp driver */ +#define MV_MFPR_BASE PANTHEON_MFPR_BASE +#define MV_UART_CONSOLE_BASE PANTHEON_UART1_BASE +#define CONFIG_SYS_NS16550_IER (1 << 6) /* Bit 6 in UART_IER register + represents UART Unit Enable */ +/* + * I2C definition + */ +#ifdef CONFIG_CMD_I2C +#define CONFIG_I2C_MV 1 +#define CONFIG_MV_I2C_REG 0xd4011000 +#define CONFIG_HARD_I2C 1 +#define CONFIG_SYS_I2C_SPEED 0 +#define CONFIG_SYS_I2C_SLAVE 0xfe +#endif + +/* + * MMC definition + */ +#ifdef CONFIG_CMD_MMC +#define CONFIG_CMD_FAT 1 +#define CONFIG_MMC 1 +#define CONFIG_GENERIC_MMC 1 +#define CONFIG_SDHCI 1 +#define CONFIG_MMC_SDHCI_IO_ACCESSORS 1 +#define CONFIG_SYS_MMC_MAX_BLK_COUNT 0x1000 +#define CONFIG_MMC_SDMA 1 +#define CONFIG_MV_SDHCI 1 +#define CONFIG_DOS_PARTITION 1 +#define CONFIG_EFI_PARTITION 1 +#define CONFIG_SYS_MMC_NUM 2 +#define CONFIG_SYS_MMC_BASE {0xD4280000, 0xd4281000} +#endif + +#endif /* _PANTHEON_CONFIG_H */ diff --git a/roms/u-boot/arch/arm/include/asm/arch-pantheon/cpu.h b/roms/u-boot/arch/arm/include/asm/arch-pantheon/cpu.h new file mode 100644 index 00000000..3ccdf8a3 --- /dev/null +++ b/roms/u-boot/arch/arm/include/asm/arch-pantheon/cpu.h @@ -0,0 +1,77 @@ +/* + * (C) Copyright 2011 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Lei Wen <leiwen@marvell.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _PANTHEON_CPU_H +#define _PANTHEON_CPU_H + +#include <asm/io.h> +#include <asm/system.h> + +/* + * Main Power Management (MPMU) Registers + * Refer Register Datasheet 9.1 + */ +struct panthmpmu_registers { + u8 pad0[0x0024]; + u32 ccgr; /*0x0024*/ + u8 pad1[0x0200 - 0x024 - 4]; + u32 wdtpcr; /*0x0200*/ + u8 pad2[0x1020 - 0x200 - 4]; + u32 aprr; /*0x1020*/ + u32 acgr; /*0x1024*/ +}; + +/* + * Application Power Management (APMU) Registers + * Refer Register Datasheet 9.2 + */ +struct panthapmu_registers { + u8 pad0[0x0054]; + u32 sd1; /*0x0054*/ + u8 pad1[0x00e0 - 0x054 - 4]; + u32 sd3; /*0x00e0*/ +}; + +/* + * APB Clock Reset/Control Registers + * Refer Register Datasheet 6.14 + */ +struct panthapb_registers { + u32 uart0; /*0x000*/ + u32 uart1; /*0x004*/ + u32 gpio; /*0x008*/ + u8 pad0[0x02c - 0x08 - 4]; + u32 twsi; /*0x02c*/ + u8 pad1[0x034 - 0x2c - 4]; + u32 timers; /*0x034*/ +}; + +/* + * CPU Interface Registers + * Refer Register Datasheet 4.3 + */ +struct panthcpu_registers { + u32 chip_id; /* Chip Id Reg */ + u32 pad; + u32 cpu_conf; /* CPU Conf Reg */ + u32 pad1; + u32 cpu_sram_spd; /* CPU SRAM Speed Reg */ + u32 pad2; + u32 cpu_l2c_spd; /* CPU L2cache Speed Conf */ + u32 mcb_conf; /* MCB Conf Reg */ + u32 sys_boot_ctl; /* Sytem Boot Control */ +}; + +/* + * Functions + */ +u32 panth_sdram_base(int); +u32 panth_sdram_size(int); +int mv_sdh_init(u32 regbase, u32 max_clk, u32 min_clk, u32 quirks); + +#endif /* _PANTHEON_CPU_H */ diff --git a/roms/u-boot/arch/arm/include/asm/arch-pantheon/mfp.h b/roms/u-boot/arch/arm/include/asm/arch-pantheon/mfp.h new file mode 100644 index 00000000..7909d53d --- /dev/null +++ b/roms/u-boot/arch/arm/include/asm/arch-pantheon/mfp.h @@ -0,0 +1,39 @@ +/* + * Based on arch/arm/include/asm/arch-armada100/mfp.h + * (C) Copyright 2011 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Lei Wen <leiwen@marvell.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __PANTHEON_MFP_H +#define __PANTHEON_MFP_H + +/* + * Frequently used MFP Configuration macros for all PANTHEON family of SoCs + * + * offset, pull,pF, drv,dF, edge,eF ,afn,aF + */ +/* UART2 */ +#define MFP47_UART2_RXD (MFP_REG(0x198) | MFP_AF6 | MFP_DRIVE_MEDIUM) +#define MFP48_UART2_TXD (MFP_REG(0x19c) | MFP_AF6 | MFP_DRIVE_MEDIUM) +#define MFP53_CI2C_SCL (MFP_REG(0x1b0) | MFP_AF2 | MFP_DRIVE_MEDIUM) +#define MFP54_CI2C_SDA (MFP_REG(0x1b4) | MFP_AF2 | MFP_DRIVE_MEDIUM) + +/* More macros can be defined here... */ +#define MFP_MMC1_DAT7 (MFP_REG(0x84) | MFP_AF0 | MFP_DRIVE_MEDIUM) +#define MFP_MMC1_DAT6 (MFP_REG(0x88) | MFP_AF0 | MFP_DRIVE_MEDIUM) +#define MFP_MMC1_DAT5 (MFP_REG(0x8c) | MFP_AF0 | MFP_DRIVE_MEDIUM) +#define MFP_MMC1_DAT4 (MFP_REG(0x90) | MFP_AF0 | MFP_DRIVE_MEDIUM) +#define MFP_MMC1_DAT3 (MFP_REG(0x94) | MFP_AF0 | MFP_DRIVE_FAST) +#define MFP_MMC1_DAT2 (MFP_REG(0x98) | MFP_AF0 | MFP_DRIVE_FAST) +#define MFP_MMC1_DAT1 (MFP_REG(0x9c) | MFP_AF0 | MFP_DRIVE_FAST) +#define MFP_MMC1_DAT0 (MFP_REG(0xa0) | MFP_AF0 | MFP_DRIVE_FAST) +#define MFP_MMC1_CMD (MFP_REG(0xa4) | MFP_AF0 | MFP_DRIVE_FAST) +#define MFP_MMC1_CLK (MFP_REG(0xa8) | MFP_AF0 | MFP_DRIVE_FAST) +#define MFP_MMC1_CD (MFP_REG(0xac) | MFP_AF0 | MFP_DRIVE_MEDIUM) +#define MFP_MMC1_WP (MFP_REG(0xb0) | MFP_AF0 | MFP_DRIVE_MEDIUM) + +#define MFP_PIN_MAX 117 +#endif diff --git a/roms/u-boot/arch/arm/include/asm/arch-pantheon/pantheon.h b/roms/u-boot/arch/arm/include/asm/arch-pantheon/pantheon.h new file mode 100644 index 00000000..c3a71bfc --- /dev/null +++ b/roms/u-boot/arch/arm/include/asm/arch-pantheon/pantheon.h @@ -0,0 +1,38 @@ +/* + * (C) Copyright 2011 + * Marvell Semiconductor <www.marvell.com> + * Written-by: Lei Wen <leiwen@marvell.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _PANTHEON_H +#define _PANTHEON_H + +/* Common APB clock register bit definitions */ +#define APBC_APBCLK (1<<0) /* APB Bus Clock Enable */ +#define APBC_FNCLK (1<<1) /* Functional Clock Enable */ +#define APBC_RST (1<<2) /* Reset Generation */ +/* Functional Clock Selection Mask */ +#define APBC_FNCLKSEL(x) (((x) & 0xf) << 4) + +/* Common APMU register bit definitions */ +#define APMU_PERI_CLK (1<<4) /* Peripheral Clock Enable */ +#define APMU_AXI_CLK (1<<3) /* AXI Clock Enable*/ +#define APMU_PERI_RST (1<<1) /* Peripheral Reset */ +#define APMU_AXI_RST (1<<0) /* AXI Reset */ + +/* Register Base Addresses */ +#define PANTHEON_DRAM_BASE 0xB0000000 +#define PANTHEON_TIMER_BASE 0xD4014000 +#define PANTHEON_WD_TIMER_BASE 0xD4080000 +#define PANTHEON_APBC_BASE 0xD4015000 +#define PANTHEON_UART1_BASE 0xD4017000 +#define PANTHEON_UART2_BASE 0xD4018000 +#define PANTHEON_GPIO_BASE 0xD4019000 +#define PANTHEON_MFPR_BASE 0xD401E000 +#define PANTHEON_MPMU_BASE 0xD4050000 +#define PANTHEON_APMU_BASE 0xD4282800 +#define PANTHEON_CPU_BASE 0xD4282C00 + +#endif /* _PANTHEON_H */ |