0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003 * Copyright (C) 2018 Logic PD, Inc - https://www.logicpd.com/
0004 */
0005
0006 #include <dt-bindings/input/input.h>
0007
0008 / {
0009 codec1 {
0010 compatible = "simple-audio-card";
0011 simple-audio-card,name = "tlv320aic23-hifi";
0012
0013 simple-audio-card,widgets =
0014 "Microphone", "Mic In",
0015 "Line", "Line In",
0016 "Line", "Line Out";
0017
0018 simple-audio-card,routing =
0019 "Line Out", "LOUT",
0020 "Line Out", "ROUT",
0021 "LLINEIN", "Line In",
0022 "RLINEIN", "Line In",
0023 "MICIN", "Mic In";
0024
0025 simple-audio-card,format = "i2s";
0026 simple-audio-card,bitclock-master = <&sound_master>;
0027 simple-audio-card,frame-master = <&sound_master>;
0028
0029 simple-audio-card,cpu {
0030 sound-dai = <&mcbsp1>;
0031 };
0032
0033 sound_master: simple-audio-card,codec {
0034 sound-dai = <&tlv320aic23_1>;
0035 system-clock-frequency = <12000000>;
0036 };
0037 };
0038
0039 codec2 {
0040 compatible = "simple-audio-card";
0041 simple-audio-card,name = "tlv320aic23-hifi";
0042
0043 simple-audio-card,widgets =
0044 "Microphone", "Mic In",
0045 "Line", "Line In",
0046 "Line", "Line Out";
0047
0048 simple-audio-card,routing =
0049 "Line Out", "LOUT",
0050 "Line Out", "ROUT",
0051 "LLINEIN", "Line In",
0052 "RLINEIN", "Line In",
0053 "MICIN", "Mic In";
0054
0055 simple-audio-card,format = "i2s";
0056 simple-audio-card,bitclock-master = <&sound_master2>;
0057 simple-audio-card,frame-master = <&sound_master2>;
0058
0059 simple-audio-card,cpu {
0060 sound-dai = <&mcbsp2>;
0061 };
0062
0063 sound_master2: simple-audio-card,codec {
0064 sound-dai = <&tlv320aic23_2>;
0065 system-clock-frequency = <12000000>;
0066 };
0067 };
0068
0069 expander-keys {
0070 compatible = "gpio-keys-polled";
0071 poll-interval = <100>;
0072
0073 key-record {
0074 label = "Record";
0075 /* linux,code = <BTN_0>; */
0076 gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
0077 };
0078
0079 key-play {
0080 label = "Play";
0081 linux,code = <KEY_PLAY>;
0082 gpios = <&tca6416_2 14 GPIO_ACTIVE_LOW>;
0083 };
0084
0085 key-stop {
0086 label = "Stop";
0087 linux,code = <KEY_STOP>;
0088 gpios = <&tca6416_2 13 GPIO_ACTIVE_LOW>;
0089 };
0090
0091 key-fwd {
0092 label = "FWD";
0093 linux,code = <KEY_FASTFORWARD>;
0094 gpios = <&tca6416_2 12 GPIO_ACTIVE_LOW>;
0095 };
0096
0097 key-rwd {
0098 label = "RWD";
0099 linux,code = <KEY_REWIND>;
0100 gpios = <&tca6416_2 11 GPIO_ACTIVE_LOW>;
0101 };
0102
0103 key-shift {
0104 label = "Shift";
0105 linux,code = <KEY_LEFTSHIFT>;
0106 gpios = <&tca6416_2 10 GPIO_ACTIVE_LOW>;
0107 };
0108
0109 key-mode {
0110 label = "Mode";
0111 linux,code = <BTN_MODE>;
0112 gpios = <&tca6416_2 9 GPIO_ACTIVE_LOW>;
0113 };
0114
0115 key-menu {
0116 label = "Menu";
0117 linux,code = <KEY_MENU>;
0118 gpios = <&tca6416_2 8 GPIO_ACTIVE_LOW>;
0119 };
0120
0121 key-up {
0122 label = "Up";
0123 linux,code = <KEY_UP>;
0124 gpios = <&tca6416_2 7 GPIO_ACTIVE_LOW>;
0125 };
0126
0127 key-down {
0128 label = "Down";
0129 linux,code = <KEY_DOWN>;
0130 gpios = <&tca6416_2 6 GPIO_ACTIVE_LOW>;
0131 };
0132 };
0133 };
0134
0135 &i2c2 {
0136 /* Audio codecs */
0137 tlv320aic23_1: codec@1a {
0138 compatible = "ti,tlv320aic23";
0139 reg = <0x1a>;
0140 #sound-dai-cells = <0>;
0141 status = "okay";
0142 };
0143
0144 tlv320aic23_2: codec@1b {
0145 compatible = "ti,tlv320aic23";
0146 reg = <0x1b>;
0147 #sound-dai-cells = <0>;
0148 status = "okay";
0149 };
0150 };
0151
0152 &i2c3 {
0153 /* Audio codecs */
0154 tlv320aic23_3: codec@1a {
0155 compatible = "ti,tlv320aic23";
0156 reg = <0x1a>;
0157 #sound-dai-cells = <0>;
0158 status = "okay";
0159 };
0160
0161 /* GPIO Expanders */
0162 tca6416_2: gpio@20 {
0163 compatible = "ti,tca6416";
0164 reg = <0x20>;
0165 gpio-controller;
0166 #gpio-cells = <2>;
0167 vcc-supply = <&vdd_io_reg>;
0168 };
0169
0170 tca6416_3: gpio@21 {
0171 compatible = "ti,tca6416";
0172 reg = <0x21>;
0173 gpio-controller;
0174 #gpio-cells = <2>;
0175 vcc-supply = <&vdd_io_reg>;
0176 };
0177
0178 /* TVP5146 Analog Video decoder input */
0179 tvp5146@5c {
0180 compatible = "ti,tvp5146m2";
0181 reg = <0x5c>;
0182 };
0183 };
0184
0185 &mcbsp1 {
0186 status = "okay";
0187 #sound-dai-cells = <0>;
0188 pinctrl-names = "default";
0189 pinctrl-0 = <&mcbsp1_pins>;
0190 };
0191
0192 &mcbsp2 {
0193 status = "okay";
0194 #sound-dai-cells = <0>;
0195 pinctrl-names = "default";
0196 pinctrl-0 = <&mcbsp2_pins>;
0197 };
0198
0199 &omap3_pmx_core {
0200 mcbsp1_pins: pinmux_mcbsp1_pins {
0201 pinctrl-single,pins = <
0202 OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dx */
0203 OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* mcbsp1_dx.mcbsp1_dr */
0204 OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* mcbsp_clks.mcbsp1_fsx */
0205 OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* mcbsp1_clkx.mcbsp1_clkx */
0206 >;
0207 };
0208
0209 mcbsp2_pins: pinmux_mcbsp2_pins {
0210 pinctrl-single,pins = <
0211 OMAP3_CORE1_IOPAD(0x213c, PIN_INPUT | MUX_MODE0) /* mcbsp2_fsx.mcbsp2_fsx */
0212 OMAP3_CORE1_IOPAD(0x213e, PIN_INPUT | MUX_MODE0) /* mcbsp2_clkx.mcbsp2_clkx */
0213 OMAP3_CORE1_IOPAD(0x2140, PIN_INPUT | MUX_MODE0) /* mcbsp2_dr.mcbsp2.dr */
0214 OMAP3_CORE1_IOPAD(0x2142, PIN_OUTPUT | MUX_MODE0) /* mcbsp2_dx.mcbsp2_dx */
0215 >;
0216 };
0217 };