som-db5800-som-6867.c 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2016 Stefan Roese <sr@denx.de>
  4. * Copyright (C) 2016 George McCollister <george.mccollister@gmail.com>
  5. */
  6. #include <common.h>
  7. #include <asm/fsp/fsp_support.h>
  8. /* ALC262 Verb Table - 10EC0262 */
  9. static const u32 verb_table_data13[] = {
  10. /* Pin Complex (NID 0x11) */
  11. 0x01171cf0,
  12. 0x01171d11,
  13. 0x01171e11,
  14. 0x01171f41,
  15. /* Pin Complex (NID 0x12) */
  16. 0x01271cf0,
  17. 0x01271d11,
  18. 0x01271e11,
  19. 0x01271f41,
  20. /* Pin Complex (NID 0x14) */
  21. 0x01471c10,
  22. 0x01471d40,
  23. 0x01471e01,
  24. 0x01471f01,
  25. /* Pin Complex (NID 0x15) */
  26. 0x01571cf0,
  27. 0x01571d11,
  28. 0x01571e11,
  29. 0x01571f41,
  30. /* Pin Complex (NID 0x16) */
  31. 0x01671cf0,
  32. 0x01671d11,
  33. 0x01671e11,
  34. 0x01671f41,
  35. /* Pin Complex (NID 0x18) */
  36. 0x01871c20,
  37. 0x01871d98,
  38. 0x01871ea1,
  39. 0x01871f01,
  40. /* Pin Complex (NID 0x19) */
  41. 0x01971c21,
  42. 0x01971d98,
  43. 0x01971ea1,
  44. 0x01971f02,
  45. /* Pin Complex (NID 0x1A) */
  46. 0x01a71c2f,
  47. 0x01a71d30,
  48. 0x01a71e81,
  49. 0x01a71f01,
  50. /* Pin Complex */
  51. 0x01b71c1f,
  52. 0x01b71d40,
  53. 0x01b71e21,
  54. 0x01b71f02,
  55. /* Pin Complex */
  56. 0x01c71cf0,
  57. 0x01c71d11,
  58. 0x01c71e11,
  59. 0x01c71f41,
  60. /* Pin Complex */
  61. 0x01d71c01,
  62. 0x01d71dc6,
  63. 0x01d71e14,
  64. 0x01d71f40,
  65. /* Pin Complex */
  66. 0x01e71cf0,
  67. 0x01e71d11,
  68. 0x01e71e11,
  69. 0x01e71f41,
  70. /* Pin Complex */
  71. 0x01f71cf0,
  72. 0x01f71d11,
  73. 0x01f71e11,
  74. 0x01f71f41,
  75. };
  76. /*
  77. * This needs to be in ROM since if we put it in CAR, FSP init loses it when
  78. * it drops CAR.
  79. *
  80. * VerbTable: (RealTek ALC262)
  81. * Revision ID = 0xFF, support all steps
  82. * Codec Verb Table For AZALIA
  83. * Codec Address: CAd value (0/1/2)
  84. * Codec Vendor: 0x10EC0262
  85. */
  86. static const struct azalia_verb_table azalia_verb_table[] = {
  87. {
  88. {
  89. 0x10ec0262,
  90. 0x0000,
  91. 0xff,
  92. 0x01,
  93. 0x000b,
  94. 0x0002,
  95. },
  96. verb_table_data13
  97. }
  98. };
  99. static const struct azalia_config azalia_config = {
  100. .pme_enable = 1,
  101. .docking_supported = 1,
  102. .docking_attached = 0,
  103. .hdmi_codec_enable = 1,
  104. .azalia_v_ci_enable = 1,
  105. .rsvdbits = 0,
  106. .verb_table_num = 1,
  107. .verb_table = azalia_verb_table,
  108. .reset_wait_timer_ms = 300
  109. };
  110. void update_fsp_azalia_configs(const struct azalia_config **azalia)
  111. {
  112. *azalia = &azalia_config;
  113. }
  114. int board_early_init_f(void)
  115. {
  116. /*
  117. * The FSP enables the BayTrail internal legacy UART (again).
  118. * Disable it again, so that the one on the EC can be used.
  119. */
  120. setup_internal_uart(0);
  121. return 0;
  122. }