3 * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com.
5 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/arch/stv0991_periph.h>
12 #include <asm/arch/stv0991_defs.h>
13 #include <asm/arch/hardware.h>
14 #include <asm/arch/gpio.h>
17 #include <dm/platform_data/serial_pl01x.h>
19 DECLARE_GLOBAL_DATA_PTR;
21 struct gpio_regs *const gpioa_regs =
22 (struct gpio_regs *) GPIOA_BASE_ADDR;
24 #ifndef CONFIG_OF_CONTROL
25 static const struct pl01x_serial_platdata serial_platdata = {
31 U_BOOT_DEVICE(stv09911_serials) = {
32 .name = "serial_pl01x",
33 .platdata = &serial_platdata,
37 #ifdef CONFIG_SHOW_BOOT_PROGRESS
38 void show_boot_progress(int progress)
40 printf("%i\n", progress);
44 void enable_eth_phy(void)
46 /* Set GPIOA_06 pad HIGH (Appli board)*/
47 writel(readl(&gpioa_regs->dir) | 0x40, &gpioa_regs->dir);
48 writel(readl(&gpioa_regs->data) | 0x40, &gpioa_regs->data);
50 int board_eth_enable(void)
52 stv0991_pinmux_config(ETH_GPIOB_10_31_C_0_4);
53 clock_setup(ETH_CLOCK_CFG);
58 int board_qspi_enable(void)
60 stv0991_pinmux_config(QSPI_CS_CLK_PAD);
61 clock_setup(QSPI_CLOCK_CFG);
66 * Miscellaneous platform dependent initialisations
75 int board_uart_init(void)
77 stv0991_pinmux_config(UART_GPIOC_30_31);
78 clock_setup(UART_CLOCK_CFG);
82 #ifdef CONFIG_BOARD_EARLY_INIT_F
83 int board_early_init_f(void)
92 gd->ram_size = PHYS_SDRAM_1_SIZE;
96 int dram_init_banksize(void)
98 gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
99 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
104 #ifdef CONFIG_CMD_NET
105 int board_eth_init(bd_t *bis)
109 #if defined(CONFIG_ETH_DESIGNWARE)
110 u32 interface = PHY_INTERFACE_MODE_MII;
111 if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0)