2 * TNETV107X-EVM: Board initialization
4 * SPDX-License-Identifier: GPL-2.0+
9 #include <linux/mtd/nand.h>
10 #include <asm/arch/hardware.h>
11 #include <asm/arch/clock.h>
13 #include <asm/mach-types.h>
14 #include <asm/arch/nand_defs.h>
15 #include <asm/arch/mux.h>
17 DECLARE_GLOBAL_DATA_PTR;
19 static struct async_emif_config async_emif_config[ASYNC_EMIF_NUM_CS] = {
21 .mode = ASYNC_EMIF_MODE_NAND,
29 .width = ASYNC_EMIF_8,
32 .mode = ASYNC_EMIF_MODE_NOR,
40 .width = ASYNC_EMIF_PRESERVE,
43 .mode = ASYNC_EMIF_MODE_NOR,
51 .width = ASYNC_EMIF_PRESERVE,
54 .mode = ASYNC_EMIF_MODE_NOR,
62 .width = ASYNC_EMIF_8,
66 static struct pll_init_data pll_config[] = {
70 .pll_freq = 500000000,
72 5000000, 50000000, 125000000, 250000000, 25000000,
77 static const short sdio1_pins[] = {
78 TNETV107X_PIN_SDIO1_CLK_1, TNETV107X_PIN_SDIO1_CMD_1,
79 TNETV107X_PIN_SDIO1_DATA0_1, TNETV107X_PIN_SDIO1_DATA1_1,
80 TNETV107X_PIN_SDIO1_DATA2_1, TNETV107X_PIN_SDIO1_DATA3_1,
84 static const short uart1_pins[] = {
85 TNETV107X_PIN_UART1_RD, TNETV107X_PIN_UART1_TD, -1
88 static const short ssp_pins[] = {
89 TNETV107X_PIN_SSP0_0, TNETV107X_PIN_SSP0_1, TNETV107X_PIN_SSP0_2,
90 TNETV107X_PIN_SSP1_0, TNETV107X_PIN_SSP1_1, TNETV107X_PIN_SSP1_2,
91 TNETV107X_PIN_SSP1_3, -1
96 #ifndef CONFIG_USE_IRQ
97 __raw_writel(0, INTC_GLB_EN); /* Global disable */
98 __raw_writel(0, INTC_HINT_EN); /* Disable host ints */
99 __raw_writel(0, INTC_EN_CLR0 + 0); /* Clear enable */
100 __raw_writel(0, INTC_EN_CLR0 + 4); /* Clear enable */
101 __raw_writel(0, INTC_EN_CLR0 + 8); /* Clear enable */
104 gd->bd->bi_arch_number = MACH_TYPE_TNETV107X;
105 gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
107 init_plls(ARRAY_SIZE(pll_config), pll_config);
109 init_async_emif(ARRAY_SIZE(async_emif_config), async_emif_config);
111 mux_select_pin(TNETV107X_PIN_ASR_CS3);
112 mux_select_pins(sdio1_pins);
113 mux_select_pins(uart1_pins);
114 mux_select_pins(ssp_pins);
121 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
122 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
127 #ifdef CONFIG_NAND_DAVINCI
128 int board_nand_init(struct nand_chip *nand)
130 davinci_nand_init(nand);