Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.56 KB | None | 0 0
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (C) 2018 PHYTEC Messtechnik GmbH
  4. * Author: Christian Hemp <c.hemp@phytec.de>
  5. */
  6.  
  7. /dts-v1/;
  8. #include "imx6q.dtsi"
  9. #include "imx6qdl-phytec-phycore-som.dtsi"
  10. #include "imx6qdl-phytec-mira.dtsi"
  11. #include "imx6qdl-phytec-mira-peb-eval-01.dtsi"
  12. #include "imx6qdl-phytec-mira-peb-av-02.dtsi"
  13. #include "imx6qdl-phytec-peb-wlbt-01.dtsi"
  14. #include <dt-bindings/sound/fsl-imx-audmux.h>
  15.  
  16. / {
  17. model = "PHYTEC phyBOARD-Mira Quad full featured with NAND";
  18. compatible = "phytec,imx6q-pbac06-nand", "phytec,imx6q-pbac06",
  19. "phytec,imx6qdl-pcm058", "fsl,imx6q";
  20.  
  21. chosen {
  22. linux,stdout-path = &uart2;
  23. };
  24. };
  25.  
  26. #define SSI_TEST_MASTER
  27. /*
  28. * port 4 is datasheet port 5 (aud5)
  29. * port 6 is datasheet port 7 (ssi3)
  30. */
  31. #define AUDMUX_EXT_PORT 4
  32. #define AUDMUX_INT_PORT MX31_AUDMUX_PORT1_SSI0
  33. #define AUDMUX_INT_PORT_NAME aud5
  34. &audmux {
  35. status = "okay";
  36. //ssi3 {
  37. ssi1 {
  38. fsl,audmux-port = <AUDMUX_INT_PORT>;
  39. fsl,port-config = <
  40. #ifdef SSI_TEST_MASTER
  41. IMX_AUDMUX_V2_PTCR_SYN
  42. #else
  43. (IMX_AUDMUX_V2_PTCR_TFSDIR |
  44. IMX_AUDMUX_V2_PTCR_TFSEL(AUDMUX_EXT_PORT) |
  45. IMX_AUDMUX_V2_PTCR_TCLKDIR |
  46. IMX_AUDMUX_V2_PTCR_TCSEL(AUDMUX_EXT_PORT) |
  47. IMX_AUDMUX_V2_PTCR_SYN
  48. )
  49. #endif
  50. IMX_AUDMUX_V2_PDCR_RXDSEL(AUDMUX_EXT_PORT)
  51. >;
  52. };
  53.  
  54. AUDMUX_INT_PORT_NAME {
  55. fsl,audmux-port = <AUDMUX_EXT_PORT>;
  56. fsl,port-config = <
  57. #ifdef SSI_TEST_MASTER
  58. (IMX_AUDMUX_V2_PTCR_TFSDIR |
  59. IMX_AUDMUX_V2_PTCR_TFSEL(AUDMUX_INT_PORT) |
  60. IMX_AUDMUX_V2_PTCR_TCLKDIR |
  61. IMX_AUDMUX_V2_PTCR_TCSEL(AUDMUX_INT_PORT) |
  62. IMX_AUDMUX_V2_PTCR_SYN
  63. )
  64. #else
  65. IMX_AUDMUX_V2_PTCR_SYN
  66. #endif
  67. IMX_AUDMUX_V2_PDCR_RXDSEL(AUDMUX_INT_PORT)
  68. >;
  69. };
  70. };
  71.  
  72.  
  73. &ssi1 {
  74. pinctrl-names = "default";
  75. pinctrl-0 = <&pinctrl_audmux>;
  76. fsl,mode = "i2s-master";
  77. status = "okay";
  78.  
  79. // select the a clock parent suitable for 48000 Hz sampling rate
  80. assigned-clocks = <&clks IMX6QDL_CLK_SSI1_SEL>, <&clks IMX6QDL_CLK_SSI1>;
  81. assigned-clock-parents = <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
  82. assigned-clock-rates = <0>, <49152000>;
  83. };
  84.  
  85. //&ssi3 {
  86. // pinctrl-names = "default";
  87. // pinctrl-0 = <&pinctrl_audmux>;
  88. // fsl,mode = "i2s-master";
  89. // status = "okay";
  90. //
  91. // // select the a clock parent suitable for 48000 Hz sampling rate
  92. // assigned-clocks = <&clks IMX6QDL_CLK_SSI3_SEL>, <&clks IMX6QDL_CLK_SSI3>;
  93. // assigned-clock-parents = <&clks IMX6QDL_CLK_PLL4_AUDIO_DIV>;
  94. // assigned-clock-rates = <0>, <49152000>;
  95. //};
  96.  
  97. / {
  98. codec_test: codec_test {
  99. compatible = "linux,snd-soc-dummy";
  100. #sound-dai-cells = <0>;
  101. };
  102.  
  103.  
  104. sound@2 {
  105. compatible = "simple-audio-card";
  106. simple-audio-card,name = "loopback-ssi-test";
  107. simple-audio-card,format="dsp_a";
  108.  
  109. #ifdef SSI_TEST_MASTER
  110. simple-audio-card,frame-master = <&sound2_ssi>;
  111. simple-audio-card,bitclock-master = <&sound2_ssi>;
  112. #else
  113. simple-audio-card,frame-master = <&codec_test>;
  114. simple-audio-card,bitclock-master = <&codec_test>;
  115. #endif
  116. sound2_ssi: simple-audio-card,cpu {
  117. //sound-dai = <&ssi3>;
  118. sound-dai = <&ssi1>;
  119. system-clock-frequency = <1536000>;
  120. dai-tdm-slot-num = <8>;
  121. dai-tdm-slot-width = <16>;
  122. };
  123. sound2codec: simple-audio-card,codec {
  124. sound-dai = <&codec_test>;
  125. };
  126. };
  127.  
  128. };
  129.  
  130. &iomuxc {
  131.  
  132. pinctrl-names = "default";
  133.  
  134. pinctrl_audmux: audmuxgrp {
  135. fsl,pins = <
  136. MX6QDL_PAD_DISP0_DAT19__AUD5_RXD 0x130b0 // wandboard jp1.20
  137. MX6QDL_PAD_DISP0_DAT16__AUD5_TXC 0x130b0 // wandboard, jp1.14
  138. MX6QDL_PAD_DISP0_DAT17__AUD5_TXD 0x110b0 // wandboard jp1.16
  139. MX6QDL_PAD_DISP0_DAT18__AUD5_TXFS 0x130b0 // wandboard jp1.18
  140. MX6QDL_PAD_GPIO_19__CCM_CLKO1 0x130b0 // wandboard jp4.18
  141. >;
  142. };
  143. };
  144.  
  145. &can1 {
  146. status = "okay";
  147. };
  148.  
  149. &dim_gpio_leds {
  150. status = "okay";
  151. };
  152.  
  153. &fec {
  154. status = "okay";
  155. };
  156.  
  157. &gpmi {
  158. status = "okay";
  159. };
  160.  
  161. &hdmi {
  162. status = "okay";
  163. };
  164.  
  165. &i2c1 {
  166. status = "okay";
  167. };
  168.  
  169. &i2c2 {
  170. status = "okay";
  171. };
  172.  
  173. &i2c_rtc {
  174. status = "okay";
  175. };
  176.  
  177. &leddim {
  178. status = "okay";
  179. };
  180.  
  181. &m25p80 {
  182. status = "okay";
  183. };
  184.  
  185. &pcie {
  186. status = "okay";
  187. };
  188.  
  189. &uart3 {
  190. status = "okay";
  191. };
  192.  
  193. &usbh1 {
  194. status = "okay";
  195. };
  196.  
  197. &usbotg {
  198. status = "okay";
  199. };
  200.  
  201. &usdhc1 {
  202. status = "okay";
  203. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement