2 * Olimex MX23 Olinuxino board
4 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
6 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/iomux.h>
13 #include <asm/arch/iomux-mx23.h>
14 #include <asm/arch/imx-regs.h>
15 #include <asm/arch/clock.h>
16 #include <asm/arch/sys_proto.h>
17 #ifdef CONFIG_STATUS_LED
18 #include <status_led.h>
21 DECLARE_GLOBAL_DATA_PTR;
26 int board_early_init_f(void)
28 /* IO0 clock at 480MHz */
29 mxs_set_ioclk(MXC_IOCLK0, 480000);
31 /* SSP0 clock at 96MHz */
32 mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
38 int board_ehci_hcd_init(int port)
40 /* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
41 gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_GPMI_ALE__GPIO_0_17), 1);
46 int board_ehci_hcd_exit(int port)
48 /* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
49 gpio_direction_output(MXS_PAD_TO_GPIO(MX23_PAD_GPMI_ALE__GPIO_0_17), 0);
56 return mxs_dram_init();
60 static int mx23_olx_mmc_cd(int id)
62 return 1; /* Card always present */
65 int board_mmc_init(bd_t *bis)
67 return mxsmmc_initialize(bis, 0, NULL, mx23_olx_mmc_cd);
73 /* Adress of boot parameters */
74 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
76 #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
77 status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE);