blob: 75ad42179aeebeb9e1b43f39cf6f0719ba2235b7 [file] [log] [blame]
Adam Ford72ce7812022-02-26 15:17:23 -06001// SPDX-License-Identifier: GPL-2.0-only
Adam Ford5792f0d2018-12-03 08:06:28 -06002/*
Adam Ford72ce7812022-02-26 15:17:23 -06003 * Copyright (C) 2018 Logic PD, Inc - https://www.logicpd.com/
Adam Ford5792f0d2018-12-03 08:06:28 -06004 */
5
6#include <dt-bindings/input/input.h>
7
8/ {
9 codec1 {
10 compatible = "simple-audio-card";
11 simple-audio-card,name = "tlv320aic23-hifi";
12
13 simple-audio-card,widgets =
14 "Microphone", "Mic In",
15 "Line", "Line In",
16 "Line", "Line Out";
17
18 simple-audio-card,routing =
19 "Line Out", "LOUT",
20 "Line Out", "ROUT",
21 "LLINEIN", "Line In",
22 "RLINEIN", "Line In",
23 "MICIN", "Mic In";
24
25 simple-audio-card,format = "i2s";
26 simple-audio-card,bitclock-master = <&sound_master>;
27 simple-audio-card,frame-master = <&sound_master>;
28
29 simple-audio-card,cpu {
30 sound-dai = <&mcbsp1>;
31 };
32
33 sound_master: simple-audio-card,codec {
34 sound-dai = <&tlv320aic23_1>;
35 system-clock-frequency = <12000000>;
36 };
37 };
38
39 codec2 {
40 compatible = "simple-audio-card";
41 simple-audio-card,name = "tlv320aic23-hifi";
42
43 simple-audio-card,widgets =
44 "Microphone", "Mic In",
45 "Line", "Line In",
46 "Line", "Line Out";
47
48 simple-audio-card,routing =
49 "Line Out", "LOUT",
50 "Line Out", "ROUT",
51 "LLINEIN", "Line In",
52 "RLINEIN", "Line In",
53 "MICIN", "Mic In";
54
55 simple-audio-card,format = "i2s";
56 simple-audio-card,bitclock-master = <&sound_master2>;
57 simple-audio-card,frame-master = <&sound_master2>;
58
59 simple-audio-card,cpu {
60 sound-dai = <&mcbsp2>;
61 };
62
63 sound_master2: simple-audio-card,codec {
64 sound-dai = <&tlv320aic23_2>;
65 system-clock-frequency = <12000000>;
66 };
67 };
68
69 expander-keys {
70 compatible = "gpio-keys-polled";
71 poll-interval = <100>;
72
Andrew Davis211b3d72023-04-11 13:25:05 -050073 key-record {
Adam Ford5792f0d2018-12-03 08:06:28 -060074 label = "Record";
Andrew Davis211b3d72023-04-11 13:25:05 -050075 /* linux,code = <BTN_0>; */
Adam Ford5792f0d2018-12-03 08:06:28 -060076 gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
77 };
78
Andrew Davis211b3d72023-04-11 13:25:05 -050079 key-play {
Adam Ford5792f0d2018-12-03 08:06:28 -060080 label = "Play";
81 linux,code = <KEY_PLAY>;
82 gpios = <&tca6416_2 14 GPIO_ACTIVE_LOW>;
83 };
84
Andrew Davis211b3d72023-04-11 13:25:05 -050085 key-stop {
Adam Ford5792f0d2018-12-03 08:06:28 -060086 label = "Stop";
87 linux,code = <KEY_STOP>;
88 gpios = <&tca6416_2 13 GPIO_ACTIVE_LOW>;
89 };
90
Andrew Davis211b3d72023-04-11 13:25:05 -050091 key-fwd {
Adam Ford5792f0d2018-12-03 08:06:28 -060092 label = "FWD";
93 linux,code = <KEY_FASTFORWARD>;
94 gpios = <&tca6416_2 12 GPIO_ACTIVE_LOW>;
95 };
96
Andrew Davis211b3d72023-04-11 13:25:05 -050097 key-rwd {
Adam Ford5792f0d2018-12-03 08:06:28 -060098 label = "RWD";
99 linux,code = <KEY_REWIND>;
100 gpios = <&tca6416_2 11 GPIO_ACTIVE_LOW>;
101 };
102
Andrew Davis211b3d72023-04-11 13:25:05 -0500103 key-shift {
Adam Ford5792f0d2018-12-03 08:06:28 -0600104 label = "Shift";
105 linux,code = <KEY_LEFTSHIFT>;
106 gpios = <&tca6416_2 10 GPIO_ACTIVE_LOW>;
107 };
108
Andrew Davis211b3d72023-04-11 13:25:05 -0500109 key-mode {
Adam Ford5792f0d2018-12-03 08:06:28 -0600110 label = "Mode";
111 linux,code = <BTN_MODE>;
112 gpios = <&tca6416_2 9 GPIO_ACTIVE_LOW>;
113 };
114
Andrew Davis211b3d72023-04-11 13:25:05 -0500115 key-menu {
Adam Ford5792f0d2018-12-03 08:06:28 -0600116 label = "Menu";
117 linux,code = <KEY_MENU>;
118 gpios = <&tca6416_2 8 GPIO_ACTIVE_LOW>;
119 };
120
Andrew Davis211b3d72023-04-11 13:25:05 -0500121 key-up {
Adam Ford5792f0d2018-12-03 08:06:28 -0600122 label = "Up";
123 linux,code = <KEY_UP>;
124 gpios = <&tca6416_2 7 GPIO_ACTIVE_LOW>;
125 };
126
Andrew Davis211b3d72023-04-11 13:25:05 -0500127 key-down {
Adam Ford5792f0d2018-12-03 08:06:28 -0600128 label = "Down";
129 linux,code = <KEY_DOWN>;
130 gpios = <&tca6416_2 6 GPIO_ACTIVE_LOW>;
131 };
132 };
133};
134
135&i2c2 {
136 /* Audio codecs */
137 tlv320aic23_1: codec@1a {
138 compatible = "ti,tlv320aic23";
139 reg = <0x1a>;
Andrew Davis211b3d72023-04-11 13:25:05 -0500140 #sound-dai-cells = <0>;
Adam Ford5792f0d2018-12-03 08:06:28 -0600141 status = "okay";
142 };
143
144 tlv320aic23_2: codec@1b {
145 compatible = "ti,tlv320aic23";
146 reg = <0x1b>;
Andrew Davis211b3d72023-04-11 13:25:05 -0500147 #sound-dai-cells = <0>;
Adam Ford5792f0d2018-12-03 08:06:28 -0600148 status = "okay";
149 };
150};
151
152&i2c3 {
153 /* Audio codecs */
154 tlv320aic23_3: codec@1a {
155 compatible = "ti,tlv320aic23";
156 reg = <0x1a>;
Andrew Davis211b3d72023-04-11 13:25:05 -0500157 #sound-dai-cells = <0>;
Adam Ford5792f0d2018-12-03 08:06:28 -0600158 status = "okay";
159 };
160
161 /* GPIO Expanders */
162 tca6416_2: gpio@20 {
163 compatible = "ti,tca6416";
164 reg = <0x20>;
165 gpio-controller;
166 #gpio-cells = <2>;
167 vcc-supply = <&vdd_io_reg>;
168 };
169
170 tca6416_3: gpio@21 {
171 compatible = "ti,tca6416";
172 reg = <0x21>;
173 gpio-controller;
174 #gpio-cells = <2>;
175 vcc-supply = <&vdd_io_reg>;
176 };
177
178 /* TVP5146 Analog Video decoder input */
179 tvp5146@5c {
180 compatible = "ti,tvp5146m2";
181 reg = <0x5c>;
182 };
183};
184
185&mcbsp1 {
Roger Quadros72f78c62021-08-24 14:07:27 +0300186 status = "okay";
Adam Ford5792f0d2018-12-03 08:06:28 -0600187 #sound-dai-cells = <0>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&mcbsp1_pins>;
190};
191
192&mcbsp2 {
Roger Quadros72f78c62021-08-24 14:07:27 +0300193 status = "okay";
Adam Ford5792f0d2018-12-03 08:06:28 -0600194 #sound-dai-cells = <0>;
195 pinctrl-names = "default";
196 pinctrl-0 = <&mcbsp2_pins>;
197};
198
199&omap3_pmx_core {
200 mcbsp1_pins: pinmux_mcbsp1_pins {
201 pinctrl-single,pins = <
202 OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dx */
203 OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dr */
204 OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp1_fsx */
205 OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* mcbsp1_clkx.mcbsp1_clkx */
206 >;
207 };
208
209 mcbsp2_pins: pinmux_mcbsp2_pins {
210 pinctrl-single,pins = <
211 OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */
212 OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0) /* mcbsp2_clkx.mcbsp2_clkx */
213 OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2.dr */
214 OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dx.mcbsp2_dx */
215 >;
216 };
217};