mx23evk.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Freescale MX23EVK board
  4. *
  5. * (C) Copyright 2013 O.S. Systems Software LTDA.
  6. *
  7. * Author: Otavio Salvador <otavio@ossystems.com.br>
  8. *
  9. * Based on m28evk.c:
  10. * Copyright (C) 2011 Marek Vasut <marek.vasut@gmail.com>
  11. * on behalf of DENX Software Engineering GmbH
  12. */
  13. #include <common.h>
  14. #include <init.h>
  15. #include <asm/global_data.h>
  16. #include <asm/gpio.h>
  17. #include <asm/arch/imx-regs.h>
  18. #include <asm/arch/clock.h>
  19. #include <asm/arch/iomux-mx23.h>
  20. #include <asm/arch/sys_proto.h>
  21. DECLARE_GLOBAL_DATA_PTR;
  22. /*
  23. * Functions
  24. */
  25. int board_early_init_f(void)
  26. {
  27. /* IO0 clock at 480MHz */
  28. mxs_set_ioclk(MXC_IOCLK0, 480000);
  29. /* SSP0 clock at 96MHz */
  30. mxs_set_sspclk(MXC_SSPCLK0, 96000, 0);
  31. /* Power on LCD */
  32. gpio_direction_output(MX23_PAD_LCD_RESET__GPIO_1_18, 1);
  33. /* Set contrast to maximum */
  34. gpio_direction_output(MX23_PAD_PWM2__GPIO_1_28, 1);
  35. return 0;
  36. }
  37. int dram_init(void)
  38. {
  39. return mxs_dram_init();
  40. }
  41. int board_init(void)
  42. {
  43. /* Adress of boot parameters */
  44. gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
  45. return 0;
  46. }