Linux Audio

Check our new training course

Loading...
v5.14.15
  1// SPDX-License-Identifier: GPL-2.0-or-later
  2/*
  3 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
 
 
 
 
 
 
 
  4 */
  5
  6#include <dt-bindings/sound/fsl-imx-audmux.h>
  7
  8/ {
  9	chosen {
 10		stdout-path = &uart4;
 11	};
 12
 13	regulators {
 14		sound_1v8: regulator@2 {
 15			compatible = "regulator-fixed";
 16			reg = <2>;
 17			regulator-name = "i2s-audio-1v8";
 18			regulator-min-microvolt = <1800000>;
 19			regulator-max-microvolt = <1800000>;
 20		};
 21
 22		sound_3v3: regulator@3 {
 23			compatible = "regulator-fixed";
 24			reg = <3>;
 25			regulator-name = "i2s-audio-3v3";
 26			regulator-min-microvolt = <3300000>;
 27			regulator-max-microvolt = <3300000>;
 28		};
 29	};
 30
 31	tlv320_mclk: oscillator {
 32		compatible = "fixed-clock";
 33		#clock-cells = <0>;
 34		clock-frequency = <19200000>;
 35		clock-output-names = "tlv320-mclk";
 36	};
 37
 38	sound {
 39		compatible = "simple-audio-card";
 40		simple-audio-card,name = "OnboardTLV320AIC3007";
 41		simple-audio-card,format = "i2s";
 42		simple-audio-card,bitclock-master = <&dailink_master>;
 43		simple-audio-card,frame-master = <&dailink_master>;
 44		simple-audio-card,widgets =
 45			"Microphone", "Mic Jack",
 46			"Line", "Line In",
 47			"Line", "Line Out",
 48			"Speaker", "Speaker",
 49			"Headphone", "Headphone Jack";
 50		simple-audio-card,routing =
 51			"Line Out", "LLOUT",
 52			"Line Out", "RLOUT",
 53			"Speaker", "SPOP",
 54			"Speaker", "SPOM",
 55			"Headphone Jack", "HPLOUT",
 56			"Headphone Jack", "HPROUT",
 57			"MIC3L", "Mic Jack",
 58			"MIC3R", "Mic Jack",
 59			"Mic Jack", "Mic Bias",
 60			"LINE1L", "Line In",
 61			"LINE1R", "Line In";
 62
 63		simple-audio-card,cpu {
 64			sound-dai = <&ssi2>;
 65		};
 66
 67		dailink_master: simple-audio-card,codec {
 68			sound-dai = <&codec>;
 69			clocks = <&tlv320_mclk>;
 70		};
 71	};
 72
 73};
 74
 75&audmux {
 76	status = "okay";
 77
 78	ssi2 {
 79		fsl,audmux-port = <1>;
 80		fsl,port-config = <
 81			(IMX_AUDMUX_V2_PTCR_SYN |
 82			IMX_AUDMUX_V2_PTCR_TFSDIR |
 83			IMX_AUDMUX_V2_PTCR_TFSEL(4) |
 84			IMX_AUDMUX_V2_PTCR_TCLKDIR |
 85			IMX_AUDMUX_V2_PTCR_TCSEL(4))
 86			IMX_AUDMUX_V2_PDCR_RXDSEL(4)
 87		>;
 88	};
 89
 90	pins5 {
 91		fsl,audmux-port = <4>;
 92		fsl,port-config = <
 93			IMX_AUDMUX_V2_PTCR_SYN
 94			IMX_AUDMUX_V2_PDCR_RXDSEL(1)
 95		>;
 96	};
 97};
 98
 99&can1 {
100	status = "okay";
101};
102
103&fec {
104	status = "okay";
105};
106
107&hdmi {
108	status = "okay";
109};
110
111&i2c2 {
112	status = "okay";
113
114	codec: tlv320@18 {
115		compatible = "ti,tlv320aic3007";
116		#sound-dai-cells = <0>;
117		reg = <0x18>;
118		ai3x-micbias-vg = <2>;
119
120		AVDD-supply = <&sound_3v3>;
121		IOVDD-supply = <&sound_3v3>;
122		DRVDD-supply = <&sound_3v3>;
123		DVDD-supply = <&sound_1v8>;
124	};
125
126	stmpe@41 {
127		compatible = "st,stmpe811";
128		reg = <0x41>;
129	};
130
131	rtc@51 {
132		compatible = "epson,rtc8564";
133		reg = <0x51>;
134	};
135
136	adc@64 {
137		compatible = "maxim,max1037";
138		reg = <0x64>;
139	};
140};
141
142&i2c3 {
143	status = "okay";
144};
145
146&pcie {
147	status = "okay";
148};
149
150&ssi2 {
151	status = "okay";
152};
153
154&uart3 {
155	status = "okay";
156};
157
158&uart4 {
159	status = "okay";
160};
161
162&usbh1 {
163	status = "okay";
164};
165
166&usbotg {
167	status = "okay";
168	dr_mode = "peripheral";
169};
170
171&usdhc2 {
172	status = "okay";
173};
174
175&usdhc3 {
176	status = "okay";
177};
v4.17
 
  1/*
  2 * Copyright 2013 Christian Hemp, Phytec Messtechnik GmbH
  3 *
  4 * The code contained herein is licensed under the GNU General Public
  5 * License. You may obtain a copy of the GNU General Public License
  6 * Version 2 or later at the following locations:
  7 *
  8 * http://www.opensource.org/licenses/gpl-license.html
  9 * http://www.gnu.org/copyleft/gpl.html
 10 */
 11
 12#include <dt-bindings/sound/fsl-imx-audmux.h>
 13
 14/ {
 15	chosen {
 16		stdout-path = &uart4;
 17	};
 18
 19	regulators {
 20		sound_1v8: regulator@2 {
 21			compatible = "regulator-fixed";
 22			reg = <2>;
 23			regulator-name = "i2s-audio-1v8";
 24			regulator-min-microvolt = <1800000>;
 25			regulator-max-microvolt = <1800000>;
 26		};
 27
 28		sound_3v3: regulator@3 {
 29			compatible = "regulator-fixed";
 30			reg = <3>;
 31			regulator-name = "i2s-audio-3v3";
 32			regulator-min-microvolt = <3300000>;
 33			regulator-max-microvolt = <3300000>;
 34		};
 35	};
 36
 37	tlv320_mclk: oscillator {
 38		compatible = "fixed-clock";
 39		#clock-cells = <0>;
 40		clock-frequency = <19200000>;
 41		clock-output-names = "tlv320-mclk";
 42	};
 43
 44	sound {
 45		compatible = "simple-audio-card";
 46		simple-audio-card,name = "OnboardTLV320AIC3007";
 47		simple-audio-card,format = "i2s";
 48		simple-audio-card,bitclock-master = <&dailink_master>;
 49		simple-audio-card,frame-master = <&dailink_master>;
 50		simple-audio-card,widgets =
 51			"Microphone", "Mic Jack",
 52			"Line", "Line In",
 53			"Line", "Line Out",
 54			"Speaker", "Speaker",
 55			"Headphone", "Headphone Jack";
 56		simple-audio-card,routing =
 57			"Line Out", "LLOUT",
 58			"Line Out", "RLOUT",
 59			"Speaker", "SPOP",
 60			"Speaker", "SPOM",
 61			"Headphone Jack", "HPLOUT",
 62			"Headphone Jack", "HPROUT",
 63			"MIC3L", "Mic Jack",
 64			"MIC3R", "Mic Jack",
 65			"Mic Jack", "Mic Bias",
 66			"LINE1L", "Line In",
 67			"LINE1R", "Line In";
 68
 69		simple-audio-card,cpu {
 70			sound-dai = <&ssi2>;
 71		};
 72
 73		dailink_master: simple-audio-card,codec {
 74			sound-dai = <&codec>;
 75			clocks = <&tlv320_mclk>;
 76		};
 77	};
 78
 79};
 80
 81&audmux {
 82	status = "okay";
 83
 84	ssi2 {
 85		fsl,audmux-port = <1>;
 86		fsl,port-config = <
 87			(IMX_AUDMUX_V2_PTCR_TFSDIR |
 
 88			IMX_AUDMUX_V2_PTCR_TFSEL(4) |
 89			IMX_AUDMUX_V2_PTCR_TCLKDIR |
 90			IMX_AUDMUX_V2_PTCR_TCSEL(4))
 91			IMX_AUDMUX_V2_PDCR_RXDSEL(4)
 92		>;
 93	};
 94
 95	pins5 {
 96		fsl,audmux-port = <4>;
 97		fsl,port-config = <
 98			0x00000000
 99			IMX_AUDMUX_V2_PDCR_RXDSEL(1)
100		>;
101	};
102};
103
104&can1 {
105	status = "okay";
106};
107
108&fec {
109	status = "okay";
110};
111
112&hdmi {
113	status = "okay";
114};
115
116&i2c2 {
117	status = "okay";
118
119	codec: tlv320@18 {
120		compatible = "ti,tlv320aic3007";
121		#sound-dai-cells = <0>;
122		reg = <0x18>;
123		ai3x-micbias-vg = <2>;
124
125		AVDD-supply = <&sound_3v3>;
126		IOVDD-supply = <&sound_3v3>;
127		DRVDD-supply = <&sound_3v3>;
128		DVDD-supply = <&sound_1v8>;
129	};
130
131	stmpe@41 {
132		compatible = "st,stmpe811";
133		reg = <0x41>;
134	};
135
136	rtc@51 {
137		compatible = "nxp,rtc8564";
138		reg = <0x51>;
139	};
140
141	adc@64 {
142		compatible = "maxim,max1037";
143		reg = <0x64>;
144	};
145};
146
147&i2c3 {
148	status = "okay";
149};
150
151&pcie {
152	status = "okay";
153};
154
155&ssi2 {
156	status = "okay";
157};
158
159&uart3 {
160	status = "okay";
161};
162
163&uart4 {
164	status = "okay";
165};
166
167&usbh1 {
168	status = "okay";
169};
170
171&usbotg {
172	status = "okay";
 
173};
174
175&usdhc2 {
176	status = "okay";
177};
178
179&usdhc3 {
180	status = "okay";
181};