Linux Audio

Check our new training course

Loading...
v5.14.15
  1// SPDX-License-Identifier: GPL-2.0 OR X11
  2/*
  3 * Copyright 2016-2019 Toradex AG
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  4 */
  5
  6/dts-v1/;
  7
  8#include <dt-bindings/input/input.h>
  9#include "tegra124-apalis.dtsi"
 10
 11/ {
 12	model = "Toradex Apalis TK1 on Apalis Evaluation Board";
 13	compatible = "toradex,apalis-tk1-eval", "toradex,apalis-tk1",
 14		     "nvidia,tegra124";
 15
 16	aliases {
 17		rtc0 = "/i2c@7000c000/rtc@68";
 18		rtc1 = "/i2c@7000d000/pmic@40";
 19		rtc2 = "/rtc@7000e000";
 20		serial0 = &uarta;
 21		serial1 = &uartb;
 22		serial2 = &uartc;
 23		serial3 = &uartd;
 24	};
 25
 26	chosen {
 27		stdout-path = "serial0:115200n8";
 28	};
 29
 30	pcie@1003000 {
 31		pci@1,0 {
 32			status = "okay";
 33		};
 34	};
 35
 36	host1x@50000000 {
 37		hdmi@54280000 {
 38			status = "okay";
 39			hdmi-supply = <&reg_5v0>;
 40		};
 41	};
 42
 43	/* Apalis UART1 */
 44	serial@70006000 {
 45		status = "okay";
 46	};
 47
 48	/* Apalis UART2 */
 49	serial@70006040 {
 50		status = "okay";
 51	};
 52
 53	/* Apalis UART3 */
 54	serial@70006200 {
 55		status = "okay";
 56	};
 57
 58	/* Apalis UART4 */
 59	serial@70006300 {
 60		status = "okay";
 61	};
 62
 63	pwm@7000a000 {
 64		status = "okay";
 65	};
 66
 67	/*
 68	 * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
 69	 * board)
 70	 */
 71	i2c@7000c000 {
 72		status = "okay";
 73		clock-frequency = <400000>;
 74
 75		pcie-switch@58 {
 76			compatible = "plx,pex8605";
 77			reg = <0x58>;
 78		};
 79
 80		/* M41T0M6 real time clock on carrier board */
 81		rtc@68 {
 82			compatible = "st,m41t0";
 83			reg = <0x68>;
 84		};
 85	};
 86
 87	/*
 88	 * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID)
 89	 */
 90	i2c@7000c400 {
 91		status = "okay";
 92	};
 93
 94	/*
 95	 * CAM_I2C: I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor
 96	 * on carrier board)
 97	 */
 98	i2c@7000c500 {
 99		status = "okay";
100		clock-frequency = <400000>;
101	};
102
103	/* I2C4 (DDC): unused */
104
105	/* SPI1: Apalis SPI1 */
106	spi@7000d400 {
107		status = "okay";
108		spi-max-frequency = <50000000>;
 
 
 
 
 
 
109	};
110
111	/* SPI4: Apalis SPI2 */
112	spi@7000da00 {
113		status = "okay";
114		spi-max-frequency = <50000000>;
 
 
 
 
 
 
115	};
116
117	/* Apalis Serial ATA */
118	sata@70020000 {
119		status = "okay";
120		target-5v-supply = <&reg_5v0>;
121		target-12v-supply = <&reg_12v0>;
122	};
123
124	hda@70030000 {
125		status = "okay";
126	};
127
128	usb@70090000 {
129		status = "okay";
130	};
131
132	/* Apalis MMC1 */
133	mmc@700b0000 {
134		status = "okay";
135		bus-width = <4>;
136		/* MMC1_CD# */
137		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
 
138		vqmmc-supply = <&vddio_sdmmc1>;
139	};
140
141	/* Apalis SD1 */
142	mmc@700b0400 {
143		status = "okay";
144		bus-width = <4>;
145		/* SD1_CD# */
146		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
 
147		vqmmc-supply = <&vddio_sdmmc3>;
148	};
149
150	/* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
151	usb@7d000000 {
152		status = "okay";
153		dr_mode = "otg";
154	};
155
156	usb-phy@7d000000 {
157		status = "okay";
158		vbus-supply = <&reg_usbo1_vbus>;
159	};
160
161	/* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
162	usb@7d004000 {
163		status = "okay";
164	};
165
166	usb-phy@7d004000 {
167		status = "okay";
168		vbus-supply = <&reg_usbh_vbus>;
169	};
170
171	/* EHCI instance 2: USB3_DP/N -> USBH4_DP/N */
172	usb@7d008000 {
173		status = "okay";
174	};
175
176	usb-phy@7d008000 {
177		status = "okay";
178		vbus-supply = <&reg_usbh_vbus>;
179	};
180
181	backlight: backlight {
182		compatible = "pwm-backlight";
 
183		brightness-levels = <255 231 223 207 191 159 127 0>;
184		default-brightness-level = <6>;
185		/* BKL1_ON */
186		enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
187		power-supply = <&reg_3v3>;
188		pwms = <&pwm 3 5000000>; /* BKL1_PWM */
189	};
190
191	gpio-keys {
192		compatible = "gpio-keys";
193
194		wakeup {
195			label = "WAKE1_MICO";
196			gpios = <&gpio TEGRA_GPIO(DD, 3) GPIO_ACTIVE_LOW>;
197			linux,code = <KEY_WAKEUP>;
198			debounce-interval = <10>;
199			wakeup-source;
200		};
201	};
202
203	reg_3v3: regulator-3v3 {
204		compatible = "regulator-fixed";
205		regulator-name = "3.3V_SW";
206		regulator-min-microvolt = <3300000>;
207		regulator-max-microvolt = <3300000>;
208	};
209
210	reg_5v0: regulator-5v0 {
211		compatible = "regulator-fixed";
212		regulator-name = "5V_SW";
213		regulator-min-microvolt = <5000000>;
214		regulator-max-microvolt = <5000000>;
215	};
216
217	reg_12v0: regulator-12v0 {
218		compatible = "regulator-fixed";
219		regulator-name = "12V_SW";
220		regulator-min-microvolt = <12000000>;
221		regulator-max-microvolt = <12000000>;
222	};
223
224	/* USBO1_EN */
225	reg_usbo1_vbus: regulator-usbo1-vbus {
226		compatible = "regulator-fixed";
227		regulator-name = "VCC_USBO1";
228		regulator-min-microvolt = <5000000>;
229		regulator-max-microvolt = <5000000>;
230		gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
231		enable-active-high;
232		vin-supply = <&reg_5v0>;
233	};
234
235	/* USBH_EN */
236	reg_usbh_vbus: regulator-usbh-vbus {
237		compatible = "regulator-fixed";
238		regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
239		regulator-min-microvolt = <5000000>;
240		regulator-max-microvolt = <5000000>;
241		gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
242		enable-active-high;
243		vin-supply = <&reg_5v0>;
244	};
245};
246
247&gpio {
248	/* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
249	pex-perst-n {
250		gpio-hog;
251		gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
252		output-high;
253		line-name = "PEX_PERST_N";
254	};
255};
v4.17
 
  1/*
  2 * Copyright 2016-2018 Toradex AG
  3 *
  4 * This file is dual-licensed: you can use it either under the terms
  5 * of the GPL or the X11 license, at your option. Note that this dual
  6 * licensing only applies to this file, and not this project as a
  7 * whole.
  8 *
  9 *  a) This file is free software; you can redistribute it and/or
 10 *     modify it under the terms of the GNU General Public License
 11 *     version 2 as published by the Free Software Foundation.
 12 *
 13 *     This file is distributed in the hope that it will be useful
 14 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 15 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 16 *     GNU General Public License for more details.
 17 *
 18 * Or, alternatively
 19 *
 20 *  b) Permission is hereby granted, free of charge, to any person
 21 *     obtaining a copy of this software and associated documentation
 22 *     files (the "Software"), to deal in the Software without
 23 *     restriction, including without limitation the rights to use
 24 *     copy, modify, merge, publish, distribute, sublicense, and/or
 25 *     sell copies of the Software, and to permit persons to whom the
 26 *     Software is furnished to do so, subject to the following
 27 *     conditions:
 28 *
 29 *     The above copyright notice and this permission notice shall be
 30 *     included in all copies or substantial portions of the Software.
 31 *
 32 *     THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND
 33 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 34 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 35 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 36 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
 37 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 38 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 39 *     OTHER DEALINGS IN THE SOFTWARE.
 40 */
 41
 42/dts-v1/;
 43
 44#include <dt-bindings/input/input.h>
 45#include "tegra124-apalis.dtsi"
 46
 47/ {
 48	model = "Toradex Apalis TK1 on Apalis Evaluation Board";
 49	compatible = "toradex,apalis-tk1-eval", "toradex,apalis-tk1",
 50		     "nvidia,tegra124";
 51
 52	aliases {
 53		rtc0 = "/i2c@7000c000/rtc@68";
 54		rtc1 = "/i2c@7000d000/pmic@40";
 55		rtc2 = "/rtc@7000e000";
 56		serial0 = &uarta;
 57		serial1 = &uartb;
 58		serial2 = &uartc;
 59		serial3 = &uartd;
 60	};
 61
 62	chosen {
 63		stdout-path = "serial0:115200n8";
 64	};
 65
 66	pcie@1003000 {
 67		pci@1,0 {
 68			status = "okay";
 69		};
 70	};
 71
 72	host1x@50000000 {
 73		hdmi@54280000 {
 74			status = "okay";
 
 75		};
 76	};
 77
 78	/* Apalis UART1 */
 79	serial@70006000 {
 80		status = "okay";
 81	};
 82
 83	/* Apalis UART2 */
 84	serial@70006040 {
 85		status = "okay";
 86	};
 87
 88	/* Apalis UART3 */
 89	serial@70006200 {
 90		status = "okay";
 91	};
 92
 93	/* Apalis UART4 */
 94	serial@70006300 {
 95		status = "okay";
 96	};
 97
 98	pwm@7000a000 {
 99		status = "okay";
100	};
101
102	/*
103	 * GEN1_I2C: I2C1_SDA/SCL on MXM3 pin 209/211 (e.g. RTC on carrier
104	 * board)
105	 */
106	i2c@7000c000 {
107		status = "okay";
108		clock-frequency = <400000>;
109
110		pcie-switch@58 {
111			compatible = "plx,pex8605";
112			reg = <0x58>;
113		};
114
115		/* M41T0M6 real time clock on carrier board */
116		rtc@68 {
117			compatible = "st,m41t0";
118			reg = <0x68>;
119		};
120	};
121
122	/*
123	 * GEN2_I2C: I2C2_SDA/SCL (DDC) on MXM3 pin 205/207 (e.g. display EDID)
124	 */
125	hdmi_ddc: i2c@7000c400 {
126		status = "okay";
127	};
128
129	/*
130	 * CAM_I2C: I2C3_SDA/SCL (CAM) on MXM3 pin 201/203 (e.g. camera sensor
131	 * on carrier board)
132	 */
133	i2c@7000c500 {
134		status = "okay";
135		clock-frequency = <400000>;
136	};
137
138	/* I2C4 (DDC): unused */
139
140	/* SPI1: Apalis SPI1 */
141	spi@7000d400 {
142		status = "okay";
143		spi-max-frequency = <50000000>;
144
145		spidev0: spidev@0 {
146			compatible = "spidev";
147			reg = <0>;
148			spi-max-frequency = <50000000>;
149		};
150	};
151
152	/* SPI4: Apalis SPI2 */
153	spi@7000da00 {
154		status = "okay";
155		spi-max-frequency = <50000000>;
156
157		spidev1: spidev@0 {
158			compatible = "spidev";
159			reg = <0>;
160			spi-max-frequency = <50000000>;
161		};
162	};
163
164	/* Apalis Serial ATA */
165	sata@70020000 {
166		status = "okay";
 
 
167	};
168
169	hda@70030000 {
170		status = "okay";
171	};
172
173	usb@70090000 {
174		status = "okay";
175	};
176
177	/* Apalis MMC1 */
178	sdhci@700b0000 {
179		status = "okay";
 
180		/* MMC1_CD# */
181		cd-gpios = <&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_LOW>;
182		bus-width = <4>;
183		vqmmc-supply = <&vddio_sdmmc1>;
184	};
185
186	/* Apalis SD1 */
187	sdhci@700b0400 {
188		status = "okay";
 
189		/* SD1_CD# */
190		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
191		bus-width = <4>;
192		vqmmc-supply = <&vddio_sdmmc3>;
193	};
194
195	/* EHCI instance 0: USB1_DP/N -> USBO1_DP/N */
196	usb@7d000000 {
197		status = "okay";
198		dr_mode = "otg";
199	};
200
201	usb-phy@7d000000 {
202		status = "okay";
203		vbus-supply = <&reg_usbo1_vbus>;
204	};
205
206	/* EHCI instance 1: USB2_DP/N -> USBH2_DP/N */
207	usb@7d004000 {
208		status = "okay";
209	};
210
211	usb-phy@7d004000 {
212		status = "okay";
213		vbus-supply = <&reg_usbh_vbus>;
214	};
215
216	/* EHCI instance 2: USB3_DP/N -> USBH4_DP/N */
217	usb@7d008000 {
218		status = "okay";
219	};
220
221	usb-phy@7d008000 {
222		status = "okay";
223		vbus-supply = <&reg_usbh_vbus>;
224	};
225
226	backlight: backlight {
227		compatible = "pwm-backlight";
228		pwms = <&pwm 3 5000000>; /* BKL1_PWM */
229		brightness-levels = <255 231 223 207 191 159 127 0>;
230		default-brightness-level = <6>;
231		/* BKL1_ON */
232		enable-gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_HIGH>;
 
 
233	};
234
235	gpio-keys {
236		compatible = "gpio-keys";
237
238		wakeup {
239			label = "WAKE1_MICO";
240			gpios = <&gpio TEGRA_GPIO(DD, 3) GPIO_ACTIVE_LOW>;
241			linux,code = <KEY_WAKEUP>;
242			debounce-interval = <10>;
243			wakeup-source;
244		};
245	};
246
 
 
 
 
 
 
 
247	reg_5v0: regulator-5v0 {
248		compatible = "regulator-fixed";
249		regulator-name = "5V_SW";
250		regulator-min-microvolt = <5000000>;
251		regulator-max-microvolt = <5000000>;
252	};
253
 
 
 
 
 
 
 
254	/* USBO1_EN */
255	reg_usbo1_vbus: regulator-usbo1-vbus {
256		compatible = "regulator-fixed";
257		regulator-name = "VCC_USBO1";
258		regulator-min-microvolt = <5000000>;
259		regulator-max-microvolt = <5000000>;
260		gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
261		enable-active-high;
262		vin-supply = <&reg_5v0>;
263	};
264
265	/* USBH_EN */
266	reg_usbh_vbus: regulator-usbh-vbus {
267		compatible = "regulator-fixed";
268		regulator-name = "VCC_USBH(2A|2C|2D|3|4)";
269		regulator-min-microvolt = <5000000>;
270		regulator-max-microvolt = <5000000>;
271		gpio = <&gpio TEGRA_GPIO(N, 5) GPIO_ACTIVE_HIGH>;
272		enable-active-high;
273		vin-supply = <&reg_5v0>;
274	};
275};
276
277&gpio {
278	/* Apalis GPIO7 MXM3 pin 15 PLX PEX 8605 PCIe Switch Reset */
279	pex_perst_n {
280		gpio-hog;
281		gpios = <TEGRA_GPIO(DD, 1) GPIO_ACTIVE_HIGH>;
282		output-high;
283		line-name = "PEX_PERST_N";
284	};
285};