Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "bone/black.h"
- // pinout option 1 (conflicts with HDMI audio):
- //
- // ad7771 mcasp muxmode pin
- // ------ ----- ------- ---------------
- // dclk clk 0 P9_31
- // drdy fs 0 P9_29
- // dout0 d0 0 P9_30
- // dout1 d1 0 P9_41b
- // dout2 d2 2 P9_42b or P9_28
- // dout3 d3 2 P9_27 or P9_25
- //
- // pinout option 2 (conflicts with HDMI entirely):
- //
- // ad7771 mcasp muxmode pin
- // ------ ----- ------- --------------
- // dclk clk 3 P8_37
- // drdy fs 3 P8_38
- // dout0 d0 3 P8_36
- // dout1 d1 3 P8_31
- // dout2 d2 4 P8_34 or P8_35
- // dout3 d3 4 P8_33 or P8_32
- // note: P9.41 and P9.42 both connect to two processor pins each, which
- // cape-universal calls P9_41/42 and P9_91/92 respectively.
- USES_PIN(P8_37);
- USES_PIN(P8_38);
- USES_PIN(P8_36);
- USES_PIN(P8_31);
- USES_PIN(P8_34);
- USES_PIN(P8_33);
- &mcasp0 {
- status = "okay";
- #sound-dai-cells = <0>; // XXX this ought to be in the base dts
- pinctrl-names = "default";
- pinctrl-0 = <&asp0_pins>;
- // data pins (0 = unused, 1 = tx, 2 = rx)
- serial-dir = <2 2 2 2>;
- // data slots (= channels per pin)
- tdm-slots = <2>;
- // dma fifo levels
- tx-num-evt = <32>;
- rx-num-evt = <32>;
- };
- &am33xx_pinmux {
- asp0_pins: asp0 {
- pinctrl-single,pins = <
- PIN_PULLUP( P8_37, 3 ) // clk
- PIN_PULLDN( P8_38, 3 ) // fs
- PIN_PULLDN( P8_36, 3 ) // d0
- PIN_PULLDN( P8_31, 3 ) // d1
- PIN_PULLDN( P8_34, 4 ) // d2
- PIN_PULLDN( P8_33, 4 ) // d3
- >;
- };
- };
- / {
- ad7771_dai: ad7771-dai {
- #if 0
- // XXX driver is not in rcn's kernel tree
- compatible = "linux,tdm-audio";
- #sound-dai-cells = <0>;
- capture {
- input-widget-name = "From AD7771";
- channels = <8>;
- rates = <128000>;
- samplebits = <32>;
- };
- #else
- // XXX this codec driver accept basically any format and
- // configuration, so it's up to userspace to make sure to
- // select the correct samplerate, format, and number of channels
- compatible = "linux,spdif-dir";
- #sound-dai-cells = <0>;
- #endif
- };
- ad7771-card {
- compatible = "simple-audio-card";
- simple-audio-card,name = "AD7771";
- simple-audio-card,dai-link@0 {
- format = "dsp_a";
- bitclock-inversion;
- frame-master = <&ad7771_tx_master>;
- bitclock-master = <&ad7771_tx_master>;
- cpu {
- sound-dai = <&mcasp0>;
- dai-tdm-slot-width = <32>;
- dai-tdm-slot-num = <2>;
- };
- ad7771_tx_master: codec {
- sound-dai = <&ad7771_dai>;
- // is any clock spec needed?
- };
- };
- };
- };
Add Comment
Please, Sign In to add comment