summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/am3517-evm-ui.dtsi
blob: 7d8f32bf70db2c632713931ed4aff6d987fe9178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2018 Logic PD, Inc - https://www.logicpd.com/
 */

#include <dt-bindings/input/input.h>

/ {
	codec1 {
		compatible = "simple-audio-card";
		simple-audio-card,name = "tlv320aic23-hifi";

		simple-audio-card,widgets =
			"Microphone", "Mic In",
			"Line", "Line In",
			"Line", "Line Out";

		simple-audio-card,routing =
			"Line Out", "LOUT",
			"Line Out", "ROUT",
			"LLINEIN", "Line In",
			"RLINEIN", "Line In",
			"MICIN", "Mic In";

		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&sound_master>;
		simple-audio-card,frame-master = <&sound_master>;

		simple-audio-card,cpu {
			sound-dai = <&mcbsp1>;
		};

		sound_master: simple-audio-card,codec {
			sound-dai = <&tlv320aic23_1>;
			system-clock-frequency = <12000000>;
		};
	};

	codec2 {
		compatible = "simple-audio-card";
		simple-audio-card,name = "tlv320aic23-hifi";

		simple-audio-card,widgets =
			"Microphone", "Mic In",
			"Line", "Line In",
			"Line", "Line Out";

		simple-audio-card,routing =
			"Line Out", "LOUT",
			"Line Out", "ROUT",
			"LLINEIN", "Line In",
			"RLINEIN", "Line In",
			"MICIN", "Mic In";

		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&sound_master2>;
		simple-audio-card,frame-master = <&sound_master2>;

		simple-audio-card,cpu {
			sound-dai = <&mcbsp2>;
		};

		sound_master2: simple-audio-card,codec {
			sound-dai = <&tlv320aic23_2>;
			system-clock-frequency = <12000000>;
		};
	};

	expander-keys {
		compatible = "gpio-keys-polled";
		poll-interval = <100>;

		record {
			label = "Record";
			/* linux,code = <BTN_0>; */
			gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
		};

		play {
			label = "Play";
			linux,code = <KEY_PLAY>;
			gpios = <&tca6416_2 14 GPIO_ACTIVE_LOW>;
		};

		Stop {
			label = "Stop";
			linux,code = <KEY_STOP>;
			gpios = <&tca6416_2 13 GPIO_ACTIVE_LOW>;
		};

		fwd {
			label = "FWD";
			linux,code = <KEY_FASTFORWARD>;
			gpios = <&tca6416_2 12 GPIO_ACTIVE_LOW>;
		};

		rwd {
			label = "RWD";
			linux,code = <KEY_REWIND>;
			gpios = <&tca6416_2 11 GPIO_ACTIVE_LOW>;
		};

		shift {
			label = "Shift";
			linux,code = <KEY_LEFTSHIFT>;
			gpios = <&tca6416_2 10 GPIO_ACTIVE_LOW>;
		};

		Mode {
			label = "Mode";
			linux,code = <BTN_MODE>;
			gpios = <&tca6416_2 9 GPIO_ACTIVE_LOW>;
		};

		Menu {
			label = "Menu";
			linux,code = <KEY_MENU>;
			gpios = <&tca6416_2 8 GPIO_ACTIVE_LOW>;
		};

		Up {
			label = "Up";
			linux,code = <KEY_UP>;
			gpios = <&tca6416_2 7 GPIO_ACTIVE_LOW>;
		};

		Down {
			label = "Down";
			linux,code = <KEY_DOWN>;
			gpios = <&tca6416_2 6 GPIO_ACTIVE_LOW>;
		};
	};
};

&i2c2 {
	/* Audio codecs */
	tlv320aic23_1: codec@1a {
		compatible = "ti,tlv320aic23";
		reg = <0x1a>;
		#sound-dai-cells= <0>;
		status = "okay";
	};

	tlv320aic23_2: codec@1b {
		compatible = "ti,tlv320aic23";
		reg = <0x1b>;
		#sound-dai-cells= <0>;
		status = "okay";
	};
};

&i2c3 {
	/* Audio codecs */
	tlv320aic23_3: codec@1a {
		compatible = "ti,tlv320aic23";
		reg = <0x1a>;
		#sound-dai-cells= <0>;
		status = "okay";
	};

	/* GPIO Expanders */
	tca6416_2: gpio@20 {
		compatible = "ti,tca6416";
		reg = <0x20>;
		gpio-controller;
		#gpio-cells = <2>;
		vcc-supply = <&vdd_io_reg>;
	};

	tca6416_3: gpio@21 {
		compatible = "ti,tca6416";
		reg = <0x21>;
		gpio-controller;
		#gpio-cells = <2>;
		vcc-supply = <&vdd_io_reg>;
	};

	/* TVP5146 Analog Video decoder input */
	tvp5146@5c {
		compatible = "ti,tvp5146m2";
		reg = <0x5c>;
	};
};

&mcbsp1 {
	status = "okay";
	#sound-dai-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&mcbsp1_pins>;
};

&mcbsp2 {
	status = "okay";
	#sound-dai-cells = <0>;
	pinctrl-names = "default";
	pinctrl-0 = <&mcbsp2_pins>;
};

&omap3_pmx_core {
	mcbsp1_pins: pinmux_mcbsp1_pins {
		pinctrl-single,pins = <
			OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0)	/* mcbsp1_dx.mcbsp1_dx */
			OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0)	/* mcbsp1_dx.mcbsp1_dr */
			OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0)	/* mcbsp_clks.mcbsp1_fsx */
			OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0)	/* mcbsp1_clkx.mcbsp1_clkx */
		>;
	};

	mcbsp2_pins: pinmux_mcbsp2_pins {
		pinctrl-single,pins = <
			OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0)	/* mcbsp2_fsx.mcbsp2_fsx */
			OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0)	/* mcbsp2_clkx.mcbsp2_clkx */
			OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0)	/* mcbsp2_dr.mcbsp2.dr */
			OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0)	/* mcbsp2_dx.mcbsp2_dx */
		>;
	};
};