3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
6 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/system.h>
16 #define MVEBU_REG_PCIE_DEVID (MVEBU_REG_PCIE_BASE + 0x00)
17 #define MVEBU_REG_PCIE_REVID (MVEBU_REG_PCIE_BASE + 0x08)
32 CPU_TARGET_DRAM = 0x0,
33 CPU_TARGET_DEVICEBUS_BOOTROM_SPI = 0x1,
34 CPU_TARGET_ETH23 = 0x3,
35 CPU_TARGET_PCIE02 = 0x4,
36 CPU_TARGET_ETH01 = 0x7,
37 CPU_TARGET_PCIE13 = 0x8,
38 CPU_TARGET_SASRAM = 0x9,
39 CPU_TARGET_NAND = 0xd,
43 CPU_ATTR_SASRAM = 0x01,
44 CPU_ATTR_DRAM_CS0 = 0x0e,
45 CPU_ATTR_DRAM_CS1 = 0x0d,
46 CPU_ATTR_DRAM_CS2 = 0x0b,
47 CPU_ATTR_DRAM_CS3 = 0x07,
48 CPU_ATTR_NANDFLASH = 0x2f,
49 CPU_ATTR_SPIFLASH = 0x1e,
50 CPU_ATTR_BOOTROM = 0x1d,
51 CPU_ATTR_PCIE_IO = 0xe0,
52 CPU_ATTR_PCIE_MEM = 0xe8,
53 CPU_ATTR_DEV_CS0 = 0x3e,
54 CPU_ATTR_DEV_CS1 = 0x3d,
55 CPU_ATTR_DEV_CS2 = 0x3b,
56 CPU_ATTR_DEV_CS3 = 0x37,
66 * Default Device Address MAP BAR values
68 #define MBUS_PCI_MEM_BASE 0xE8000000
69 #define MBUS_PCI_MEM_SIZE (128 << 20)
70 #define MBUS_PCI_IO_BASE 0xF1100000
71 #define MBUS_PCI_IO_SIZE (64 << 10)
72 #define MBUS_SPI_BASE 0xF4000000
73 #define MBUS_SPI_SIZE (8 << 20)
74 #define MBUS_BOOTROM_BASE 0xF8000000
75 #define MBUS_BOOTROM_SIZE (8 << 20)
86 * Ref: Datasheet sec:A.28
88 struct mvebu_system_registers {
90 u32 rstoutn_mask; /* 0x60 */
91 u32 sys_soft_rst; /* 0x64 */
96 * Ref: Datasheet sec:A.19
98 struct kwgpio_registers {
109 struct sar_freq_modes {
111 u8 ffc; /* Fabric Frequency Configuration */
117 /* Needed for dynamic (board-specific) mbus configuration */
118 extern struct mvebu_mbus_state mbus_state;
123 unsigned int mvebu_sdram_bar(enum memory_bank bank);
124 unsigned int mvebu_sdram_bs(enum memory_bank bank);
125 void mvebu_sdram_size_adjust(enum memory_bank bank);
126 int mvebu_mbus_probe(struct mbus_win windows[], int count);
127 int mvebu_soc_family(void);
128 u32 mvebu_get_nand_clock(void);
130 void return_to_bootrom(void);
132 int mv_sdh_init(unsigned long regbase, u32 max_clk, u32 min_clk, u32 quirks);
134 void get_sar_freq(struct sar_freq_modes *sar_freq);
137 * Highspeed SERDES PHY config init, ported from bin_hdr
140 int serdes_phy_config(void);
143 * DDR3 init / training code ported from Marvell bin_hdr. Now
144 * available in mainline U-Boot in:
145 * drivers/ddr/marvell
148 #endif /* __ASSEMBLY__ */
149 #endif /* _MVEBU_CPU_H */