mx7ulp_evk.c 841 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2016 Freescale Semiconductor, Inc.
  4. */
  5. #include <common.h>
  6. #include <asm/io.h>
  7. #include <asm/arch/sys_proto.h>
  8. #include <asm/arch/mx7ulp-pins.h>
  9. #include <asm/arch/iomux.h>
  10. DECLARE_GLOBAL_DATA_PTR;
  11. #define UART_PAD_CTRL (PAD_CTL_PUS_UP)
  12. int dram_init(void)
  13. {
  14. gd->ram_size = PHYS_SDRAM_SIZE;
  15. return 0;
  16. }
  17. static iomux_cfg_t const lpuart4_pads[] = {
  18. MX7ULP_PAD_PTC3__LPUART4_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
  19. MX7ULP_PAD_PTC2__LPUART4_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
  20. };
  21. static void setup_iomux_uart(void)
  22. {
  23. mx7ulp_iomux_setup_multiple_pads(lpuart4_pads,
  24. ARRAY_SIZE(lpuart4_pads));
  25. }
  26. int board_early_init_f(void)
  27. {
  28. setup_iomux_uart();
  29. return 0;
  30. }
  31. int board_init(void)
  32. {
  33. /* address of boot parameters */
  34. gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
  35. return 0;
  36. }