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