som-db5800-som-6867.c 2.3 KB

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