Siegurd

ad7771-mcasp08.dtsi

Dec 9th, 2023
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. #include "bone/black.h"
  2.  
  3. // pinout option 1 (conflicts with HDMI audio):
  4. //
  5. // ad7771 mcasp muxmode pin
  6. // ------ ----- ------- ---------------
  7. // dclk clk 0 P9_31
  8. // drdy fs 0 P9_29
  9. // dout0 d0 0 P9_30
  10. // dout1 d1 0 P9_41b
  11. // dout2 d2 2 P9_42b or P9_28
  12. // dout3 d3 2 P9_27 or P9_25
  13. //
  14. // pinout option 2 (conflicts with HDMI entirely):
  15. //
  16. // ad7771 mcasp muxmode pin
  17. // ------ ----- ------- --------------
  18. // dclk clk 3 P8_37
  19. // drdy fs 3 P8_38
  20. // dout0 d0 3 P8_36
  21. // dout1 d1 3 P8_31
  22. // dout2 d2 4 P8_34 or P8_35
  23. // dout3 d3 4 P8_33 or P8_32
  24.  
  25. // note: P9.41 and P9.42 both connect to two processor pins each, which
  26. // cape-universal calls P9_41/42 and P9_91/92 respectively.
  27. USES_PIN(P8_37);
  28. USES_PIN(P8_38);
  29. USES_PIN(P8_36);
  30. USES_PIN(P8_31);
  31. USES_PIN(P8_34);
  32. USES_PIN(P8_33);
  33.  
  34. &mcasp0 {
  35. status = "okay";
  36.  
  37. #sound-dai-cells = <0>; // XXX this ought to be in the base dts
  38.  
  39. pinctrl-names = "default";
  40. pinctrl-0 = <&asp0_pins>;
  41.  
  42. // data pins (0 = unused, 1 = tx, 2 = rx)
  43. serial-dir = <2 2 2 2>;
  44.  
  45. // data slots (= channels per pin)
  46. tdm-slots = <2>;
  47.  
  48. // dma fifo levels
  49. tx-num-evt = <32>;
  50. rx-num-evt = <32>;
  51. };
  52.  
  53. &am33xx_pinmux {
  54. asp0_pins: asp0 {
  55. pinctrl-single,pins = <
  56. PIN_PULLUP( P8_37, 3 ) // clk
  57. PIN_PULLDN( P8_38, 3 ) // fs
  58. PIN_PULLDN( P8_36, 3 ) // d0
  59. PIN_PULLDN( P8_31, 3 ) // d1
  60. PIN_PULLDN( P8_34, 4 ) // d2
  61. PIN_PULLDN( P8_33, 4 ) // d3
  62.  
  63. >;
  64. };
  65. };
  66.  
  67. / {
  68. ad7771_dai: ad7771-dai {
  69. #if 0
  70. // XXX driver is not in rcn's kernel tree
  71. compatible = "linux,tdm-audio";
  72. #sound-dai-cells = <0>;
  73.  
  74. capture {
  75. input-widget-name = "From AD7771";
  76. channels = <8>;
  77. rates = <128000>;
  78. samplebits = <32>;
  79. };
  80. #else
  81. // XXX this codec driver accept basically any format and
  82. // configuration, so it's up to userspace to make sure to
  83. // select the correct samplerate, format, and number of channels
  84. compatible = "linux,spdif-dir";
  85. #sound-dai-cells = <0>;
  86. #endif
  87. };
  88.  
  89. ad7771-card {
  90. compatible = "simple-audio-card";
  91. simple-audio-card,name = "AD7771";
  92.  
  93. simple-audio-card,dai-link@0 {
  94. format = "dsp_a";
  95. bitclock-inversion;
  96. frame-master = <&ad7771_tx_master>;
  97. bitclock-master = <&ad7771_tx_master>;
  98.  
  99. cpu {
  100. sound-dai = <&mcasp0>;
  101. dai-tdm-slot-width = <32>;
  102. dai-tdm-slot-num = <2>;
  103. };
  104.  
  105. ad7771_tx_master: codec {
  106. sound-dai = <&ad7771_dai>;
  107. // is any clock spec needed?
  108. };
  109. };
  110. };
  111. };
  112.  
Add Comment
Please, Sign In to add comment