Advertisement
JetForMe

Untitled

Apr 5th, 2016
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.46 KB | None | 0 0
  1. #include "dt-bindings/gpio/gpio.h"
  2. #include "dt-bindings/pinctrl/am33xx.h"
  3.  
  4. /dts-v1/;
  5. /plugin/;
  6.  
  7. / {
  8. compatible = "ti,beaglebone-black", "ti,beaglebone-green";
  9.  
  10. /* identification */
  11. part-number = "LZ-PODTIQUE1";
  12.  
  13. /* version */
  14. version = "00A0";
  15.  
  16. fragment@0 {
  17. target = <&am33xx_pinmux>;
  18. __overlay__ {
  19.  
  20. lz_podtique_reg_pins: pinmux_lz_podtique_reg_pins {
  21. pinctrl-single,pins = <
  22. 0x048 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P9_14, gpio1_18, GPIO 50, CODEC regulator enable
  23. 0x04c (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P9_16, gpio1_19, GPIO 48, CODEC nRESET
  24. 0x1a4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P9_27, gpio3_19, GPIO 115, Front Panel Power
  25. >;
  26. };
  27.  
  28. i2c2_pins: pinmux_i2c2_pins {
  29. pinctrl-single,pins = <
  30. 0x150 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE2) // P9_22, spi0_scl.i2c2_sda
  31. 0x154 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE2) // P9_21, spi0_d0.i2c2_scl
  32. >;
  33. };
  34.  
  35. pru_pins: pinmux_pru_pins {
  36. pinctrl-single,pins = <
  37. 0x034 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) // P8_11, gpio1_13, GPIO 45, spi0_scl.i2c2_sda, NeoPixel data out
  38. >;
  39. };
  40.  
  41. i2s_pins: pinmux_i2s_pins {
  42. pinctrl-single,pins = < // Hdr I2S TLV SoC
  43. 0x190 (PIN_INPUT | MUX_MODE0) // P9_31 BCLK BCLK mcasp0_aclkx
  44. 0x194 (PIN_INPUT | MUX_MODE0) // P9_29 WCLK WCLK mcasp0_fsx
  45. 0x198 (PIN_INPUT | MUX_MODE0) // P9_30 RX SDOUT mcasp0_axr0
  46. 0x19c (PIN_INPUT | MUX_MODE2) // P9_28 TX SDIN mcasp0_axr2
  47. 0x1ac (PIN_INPUT | MUX_MODE0) // P9_25 MCLK MCLK mcasp0_ahclkx
  48. >;
  49. };
  50. };
  51. };
  52.  
  53. // GPIOs…
  54.  
  55. fragment@2 {
  56. target = <&ocp>;
  57. __overlay__ {
  58. gpio_helper {
  59. compatible = "gpio-of-helper";
  60. status = "okay";
  61. pinctrl-names = "default";
  62. pinctrl-0 = <&lz_podtique_reg_pins>;
  63. };
  64. };
  65. };
  66.  
  67. // Set up the codec regulator…
  68.  
  69. fragment@3 {
  70. target-path="/";
  71. __overlay__ {
  72. lz_codec_reg: fixedregulator@1 {
  73. compatible = "regulator-fixed";
  74. regulator-name = "lz-codec-reg";
  75. gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>; // GPIO_ACTIVE_HIGH is ignored by regulator-fixed,
  76. enable-active-high; // need to also have enable-active-high.
  77. };
  78. };
  79. };
  80.  
  81. // Configure the i2c bus to the audio CODEC…
  82.  
  83. fragment@4 {
  84. target = <&i2c2>;
  85. __overlay__ {
  86. #address-cells = <1>;
  87. #size-cells = <0>;
  88. clock-frequency = <100000>;
  89. status = "okay";
  90. pinctrl-names = "default";
  91. pinctrl-0 = <&i2c2_pins>;
  92.  
  93. tlv320aic3104: tlv320aic3104@0 {
  94. #sound-dai-cells = <0>;
  95. compatible = "ti,tlv320aic3104";
  96. reg = <0x18>;
  97. gpio-reset = <&gpio1 19 GPIO_ACTIVE_LOW>;
  98.  
  99. AVDD-supply = <&lz_codec_reg>;
  100. IOVDD-supply = <&lz_codec_reg>;
  101. DRVDD-supply = <&lz_codec_reg>;
  102. DVDD-supply = <&lz_codec_reg>;
  103. };
  104. };
  105. };
  106.  
  107. // Configure the McASP audio…
  108.  
  109. fragment@5 {
  110. target = <&mcasp0>;
  111. __overlay__ {
  112. #sound-dai-cells = <0>;
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&i2s_pins>;
  115.  
  116. status = "okay";
  117.  
  118. op-mode = <0>; /* MCASP_IIS_MODE */
  119. tdm-slots = <2>;
  120. num-serializer = <16>;
  121. serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
  122. 2 0 1 0
  123. 0 0 0 0
  124. 0 0 0 0
  125. 0 0 0 0
  126. >;
  127. tx-num-evt = <1>;
  128. rx-num-evt = <1>;
  129. };
  130. };
  131.  
  132. // Create a sound card device…
  133.  
  134. fragment@6 {
  135. target-path="/";
  136. __overlay__ {
  137. sound {
  138. compatible = "simple-audio-card";
  139. simple-audio-card,name = "Podtique Cape Rev A";
  140. simple-audio-card,widgets =
  141. "Speaker", "External Speaker";
  142. simple-audio-card,routing =
  143. "External Speaker", "LLOUT",
  144. "External Speaker", "RLOUT";
  145. simple-audio-card,format = "dsp_b";
  146. simple-audio-card,bitclock-master = <&sound_master>;
  147. simple-audio-card,frame-master = <&sound_master>;
  148. simple-audio-card,bitclock-inversion;
  149.  
  150. simple-audio-card,cpu {
  151. sound-dai = <&mcasp0>;
  152. };
  153.  
  154. sound_master: simple-audio-card,codec {
  155. #sound-dai-cells = <0>;
  156. sound-dai = <&tlv320aic3104>;
  157. clocks = <&clk_mcasp0>;
  158. clock-names = "mclk";
  159. };
  160. };
  161. };
  162. };
  163.  
  164. // Enable ADC…
  165.  
  166. fragment@7 {
  167. target = <&tscadc>;
  168. __overlay__ {
  169.  
  170. status = "okay";
  171. adc {
  172. ti,adc-channels = <0 1 2>;
  173. };
  174. };
  175. };
  176.  
  177. // Enable the PRUSS
  178.  
  179. fragment@8 {
  180. target = <&pruss>;
  181. __overlay__ {
  182. status = "okay";
  183. pinctrl-names = "default";
  184. pinctrl-0 = <&pru_pins>;
  185. };
  186. };
  187. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement