harmony.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * (C) Copyright 2010,2011
  3. * NVIDIA Corporation <www.nvidia.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #include <common.h>
  8. #include <lcd.h>
  9. #include <asm/io.h>
  10. #include <asm/arch/clock.h>
  11. #include <asm/arch/funcmux.h>
  12. #include <asm/arch/pinmux.h>
  13. #include <asm/arch/tegra.h>
  14. #include <asm/gpio.h>
  15. #ifdef CONFIG_TEGRA_MMC
  16. /*
  17. * Routine: pin_mux_mmc
  18. * Description: setup the pin muxes/tristate values for the SDMMC(s)
  19. */
  20. void pin_mux_mmc(void)
  21. {
  22. funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
  23. funcmux_select(PERIPH_ID_SDMMC2, FUNCMUX_SDMMC2_DTA_DTD_8BIT);
  24. /* For power GPIO PI6 */
  25. pinmux_tristate_disable(PMUX_PINGRP_ATA);
  26. /* For CD GPIO PH2 */
  27. pinmux_tristate_disable(PMUX_PINGRP_ATD);
  28. /* For power GPIO PT3 */
  29. pinmux_tristate_disable(PMUX_PINGRP_DTB);
  30. /* For CD GPIO PI5 */
  31. pinmux_tristate_disable(PMUX_PINGRP_ATC);
  32. }
  33. #endif
  34. void pin_mux_usb(void)
  35. {
  36. funcmux_select(PERIPH_ID_USB2, FUNCMUX_USB2_ULPI);
  37. pinmux_set_func(PMUX_PINGRP_CDEV2, PMUX_FUNC_PLLP_OUT4);
  38. pinmux_tristate_disable(PMUX_PINGRP_CDEV2);
  39. /* USB2 PHY reset GPIO */
  40. pinmux_tristate_disable(PMUX_PINGRP_UAC);
  41. }
  42. void pin_mux_display(void)
  43. {
  44. pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM);
  45. pinmux_tristate_disable(PMUX_PINGRP_SDC);
  46. }