am3517-evm-ui.dtsi 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (C) 2018 Logic PD, Inc - https://www.logicpd.com/
  4. */
  5. #include <dt-bindings/input/input.h>
  6. / {
  7. codec1 {
  8. compatible = "simple-audio-card";
  9. simple-audio-card,name = "tlv320aic23-hifi";
  10. simple-audio-card,widgets =
  11. "Microphone", "Mic In",
  12. "Line", "Line In",
  13. "Line", "Line Out";
  14. simple-audio-card,routing =
  15. "Line Out", "LOUT",
  16. "Line Out", "ROUT",
  17. "LLINEIN", "Line In",
  18. "RLINEIN", "Line In",
  19. "MICIN", "Mic In";
  20. simple-audio-card,format = "i2s";
  21. simple-audio-card,bitclock-master = <&sound_master>;
  22. simple-audio-card,frame-master = <&sound_master>;
  23. simple-audio-card,cpu {
  24. sound-dai = <&mcbsp1>;
  25. };
  26. sound_master: simple-audio-card,codec {
  27. sound-dai = <&tlv320aic23_1>;
  28. system-clock-frequency = <12000000>;
  29. };
  30. };
  31. codec2 {
  32. compatible = "simple-audio-card";
  33. simple-audio-card,name = "tlv320aic23-hifi";
  34. simple-audio-card,widgets =
  35. "Microphone", "Mic In",
  36. "Line", "Line In",
  37. "Line", "Line Out";
  38. simple-audio-card,routing =
  39. "Line Out", "LOUT",
  40. "Line Out", "ROUT",
  41. "LLINEIN", "Line In",
  42. "RLINEIN", "Line In",
  43. "MICIN", "Mic In";
  44. simple-audio-card,format = "i2s";
  45. simple-audio-card,bitclock-master = <&sound_master2>;
  46. simple-audio-card,frame-master = <&sound_master2>;
  47. simple-audio-card,cpu {
  48. sound-dai = <&mcbsp2>;
  49. };
  50. sound_master2: simple-audio-card,codec {
  51. sound-dai = <&tlv320aic23_2>;
  52. system-clock-frequency = <12000000>;
  53. };
  54. };
  55. expander-keys {
  56. compatible = "gpio-keys-polled";
  57. poll-interval = <100>;
  58. key-record {
  59. label = "Record";
  60. /* linux,code = <BTN_0>; */
  61. gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
  62. };
  63. key-play {
  64. label = "Play";
  65. linux,code = <KEY_PLAY>;
  66. gpios = <&tca6416_2 14 GPIO_ACTIVE_LOW>;
  67. };
  68. key-stop {
  69. label = "Stop";
  70. linux,code = <KEY_STOP>;
  71. gpios = <&tca6416_2 13 GPIO_ACTIVE_LOW>;
  72. };
  73. key-fwd {
  74. label = "FWD";
  75. linux,code = <KEY_FASTFORWARD>;
  76. gpios = <&tca6416_2 12 GPIO_ACTIVE_LOW>;
  77. };
  78. key-rwd {
  79. label = "RWD";
  80. linux,code = <KEY_REWIND>;
  81. gpios = <&tca6416_2 11 GPIO_ACTIVE_LOW>;
  82. };
  83. key-shift {
  84. label = "Shift";
  85. linux,code = <KEY_LEFTSHIFT>;
  86. gpios = <&tca6416_2 10 GPIO_ACTIVE_LOW>;
  87. };
  88. key-mode {
  89. label = "Mode";
  90. linux,code = <BTN_MODE>;
  91. gpios = <&tca6416_2 9 GPIO_ACTIVE_LOW>;
  92. };
  93. key-menu {
  94. label = "Menu";
  95. linux,code = <KEY_MENU>;
  96. gpios = <&tca6416_2 8 GPIO_ACTIVE_LOW>;
  97. };
  98. key-up {
  99. label = "Up";
  100. linux,code = <KEY_UP>;
  101. gpios = <&tca6416_2 7 GPIO_ACTIVE_LOW>;
  102. };
  103. key-down {
  104. label = "Down";
  105. linux,code = <KEY_DOWN>;
  106. gpios = <&tca6416_2 6 GPIO_ACTIVE_LOW>;
  107. };
  108. };
  109. };
  110. &i2c2 {
  111. /* Audio codecs */
  112. tlv320aic23_1: codec@1a {
  113. compatible = "ti,tlv320aic23";
  114. reg = <0x1a>;
  115. #sound-dai-cells = <0>;
  116. status = "okay";
  117. };
  118. tlv320aic23_2: codec@1b {
  119. compatible = "ti,tlv320aic23";
  120. reg = <0x1b>;
  121. #sound-dai-cells = <0>;
  122. status = "okay";
  123. };
  124. };
  125. &i2c3 {
  126. /* Audio codecs */
  127. tlv320aic23_3: codec@1a {
  128. compatible = "ti,tlv320aic23";
  129. reg = <0x1a>;
  130. #sound-dai-cells = <0>;
  131. status = "okay";
  132. };
  133. /* GPIO Expanders */
  134. tca6416_2: gpio@20 {
  135. compatible = "ti,tca6416";
  136. reg = <0x20>;
  137. gpio-controller;
  138. #gpio-cells = <2>;
  139. vcc-supply = <&vdd_io_reg>;
  140. };
  141. tca6416_3: gpio@21 {
  142. compatible = "ti,tca6416";
  143. reg = <0x21>;
  144. gpio-controller;
  145. #gpio-cells = <2>;
  146. vcc-supply = <&vdd_io_reg>;
  147. };
  148. /* TVP5146 Analog Video decoder input */
  149. tvp5146@5c {
  150. compatible = "ti,tvp5146m2";
  151. reg = <0x5c>;
  152. };
  153. };
  154. &mcbsp1 {
  155. status = "okay";
  156. #sound-dai-cells = <0>;
  157. pinctrl-names = "default";
  158. pinctrl-0 = <&mcbsp1_pins>;
  159. };
  160. &mcbsp2 {
  161. status = "okay";
  162. #sound-dai-cells = <0>;
  163. pinctrl-names = "default";
  164. pinctrl-0 = <&mcbsp2_pins>;
  165. };
  166. &omap3_pmx_core {
  167. mcbsp1_pins: pinmux_mcbsp1_pins {
  168. pinctrl-single,pins = <
  169. OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dx */
  170. OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dr */
  171. OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp1_fsx */
  172. OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* mcbsp1_clkx.mcbsp1_clkx */
  173. >;
  174. };
  175. mcbsp2_pins: pinmux_mcbsp2_pins {
  176. pinctrl-single,pins = <
  177. OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */
  178. OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0) /* mcbsp2_clkx.mcbsp2_clkx */
  179. OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2.dr */
  180. OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dx.mcbsp2_dx */
  181. >;
  182. };
  183. };