1 // SPDX-License-Identifier: GPL-2.0+
3 * Olimex MX23 Olinuxino board
5 * Copyright (C) 2013 Marek Vasut <marex@denx.de>
11 #include <asm/arch/iomux-mx23.h>
12 #include <asm/arch/imx-regs.h>
13 #include <asm/arch/clock.h>
14 #include <asm/arch/sys_proto.h>
15 #ifdef CONFIG_LED_STATUS
16 #include <status_led.h>
19 DECLARE_GLOBAL_DATA_PTR;
24 int board_early_init_f(void)
26 /* IO0 clock at 480MHz */
27 mxs_set_ioclk(MXC_IOCLK0, 480000);
29 /* SSP0 clock at 96MHz */
30 mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
36 int board_ehci_hcd_init(int port)
38 /* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
39 gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 1);
44 int board_ehci_hcd_exit(int port)
46 /* Enable LAN9512 (Maxi) or GL850G (Mini) USB HUB power. */
47 gpio_direction_output(MX23_PAD_GPMI_ALE__GPIO_0_17, 0);
54 return mxs_dram_init();
58 static int mx23_olx_mmc_cd(int id)
60 return 1; /* Card always present */
63 int board_mmc_init(bd_t *bis)
65 return mxsmmc_initialize(bis, 0, NULL, mx23_olx_mmc_cd);
71 /* Adress of boot parameters */
72 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
74 #if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
75 status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);