1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2016 Savoir-faire Linux Inc.
5 * Author: Sebastien Bourdelin <sebastien.bourdelin@savoirfairelinux.com>
7 * Based on work from TS7680 code by:
8 * Kris Bahnsen <kris@embeddedarm.com>
9 * Mark Featherston <mark@embeddedarm.com>
10 * https://github.com/embeddedarm/u-boot/tree/master/board/technologic/ts7680
12 * Derived from MX28EVK code by
13 * Freescale Semiconductor, Inc.
19 #include <asm/arch/imx-regs.h>
20 #include <asm/arch/iomux-mx28.h>
21 #include <asm/arch/clock.h>
22 #include <asm/arch/sys_proto.h>
23 #include <linux/mii.h>
28 DECLARE_GLOBAL_DATA_PTR;
30 int board_early_init_f(void)
32 /* IO0 clock at 480MHz */
33 mxs_set_ioclk(MXC_IOCLK0, 480000);
34 /* IO1 clock at 480MHz */
35 mxs_set_ioclk(MXC_IOCLK1, 480000);
37 /* SSP0 clocks at 96MHz */
38 mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
45 return mxs_dram_init();
50 /* Adress of boot parameters */
51 gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
57 static int ts4600_mmc_cd(int id)
62 int board_mmc_init(bd_t *bis)
66 mxs_iomux_setup_pad(MX28_PAD_PWM3__GPIO_3_28);
69 gpio_direction_output(MX28_PAD_PWM3__GPIO_3_28, 1);
71 gpio_direction_output(MX28_PAD_PWM3__GPIO_3_28, 0);
74 ret = mxsmmc_initialize(bis, 0, NULL, ts4600_mmc_cd);
76 printf("SD controller initialized with %d\n", ret);
85 puts("Board: TS4600\n");