xref: /freebsd/sys/contrib/device-tree/src/arm/ti/omap/dra7-evm-common.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * Copyright (C) 2017 Texas Instruments Incorporated - https://www.ti.com/
4f126890aSEmmanuel Vadot */
5f126890aSEmmanuel Vadot
6f126890aSEmmanuel Vadot#include "dra74-ipu-dsp-common.dtsi"
7f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
8f126890aSEmmanuel Vadot#include <dt-bindings/clock/ti-dra7-atl.h>
9f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
10f126890aSEmmanuel Vadot
11f126890aSEmmanuel Vadot/ {
12f126890aSEmmanuel Vadot	chosen {
13f126890aSEmmanuel Vadot		stdout-path = &uart1;
14f126890aSEmmanuel Vadot	};
15f126890aSEmmanuel Vadot
16f126890aSEmmanuel Vadot	extcon_usb1: extcon_usb1 {
17f126890aSEmmanuel Vadot		compatible = "linux,extcon-usb-gpio";
18*8d13bc63SEmmanuel Vadot		id-gpios = <&pcf_gpio_21 1 GPIO_ACTIVE_HIGH>;
19f126890aSEmmanuel Vadot	};
20f126890aSEmmanuel Vadot
21f126890aSEmmanuel Vadot	extcon_usb2: extcon_usb2 {
22f126890aSEmmanuel Vadot		compatible = "linux,extcon-usb-gpio";
23*8d13bc63SEmmanuel Vadot		id-gpios = <&pcf_gpio_21 2 GPIO_ACTIVE_HIGH>;
24f126890aSEmmanuel Vadot	};
25f126890aSEmmanuel Vadot
26f126890aSEmmanuel Vadot	sound0: sound0 {
27f126890aSEmmanuel Vadot		compatible = "simple-audio-card";
28f126890aSEmmanuel Vadot		simple-audio-card,name = "DRA7xx-EVM";
29f126890aSEmmanuel Vadot		simple-audio-card,widgets =
30f126890aSEmmanuel Vadot			"Headphone", "Headphone Jack",
31f126890aSEmmanuel Vadot			"Line", "Line Out",
32f126890aSEmmanuel Vadot			"Microphone", "Mic Jack",
33f126890aSEmmanuel Vadot			"Line", "Line In";
34f126890aSEmmanuel Vadot		simple-audio-card,routing =
35f126890aSEmmanuel Vadot			"Headphone Jack",	"HPLOUT",
36f126890aSEmmanuel Vadot			"Headphone Jack",	"HPROUT",
37f126890aSEmmanuel Vadot			"Line Out",		"LLOUT",
38f126890aSEmmanuel Vadot			"Line Out",		"RLOUT",
39f126890aSEmmanuel Vadot			"MIC3L",		"Mic Jack",
40f126890aSEmmanuel Vadot			"MIC3R",		"Mic Jack",
41f126890aSEmmanuel Vadot			"Mic Jack",		"Mic Bias",
42f126890aSEmmanuel Vadot			"LINE1L",		"Line In",
43f126890aSEmmanuel Vadot			"LINE1R",		"Line In";
44f126890aSEmmanuel Vadot		simple-audio-card,format = "dsp_b";
45f126890aSEmmanuel Vadot		simple-audio-card,bitclock-master = <&sound0_master>;
46f126890aSEmmanuel Vadot		simple-audio-card,frame-master = <&sound0_master>;
47f126890aSEmmanuel Vadot		simple-audio-card,bitclock-inversion;
48f126890aSEmmanuel Vadot
49f126890aSEmmanuel Vadot		sound0_master: simple-audio-card,cpu {
50f126890aSEmmanuel Vadot			sound-dai = <&mcasp3>;
51f126890aSEmmanuel Vadot			system-clock-frequency = <5644800>;
52f126890aSEmmanuel Vadot		};
53f126890aSEmmanuel Vadot
54f126890aSEmmanuel Vadot		simple-audio-card,codec {
55f126890aSEmmanuel Vadot			sound-dai = <&tlv320aic3106>;
56f126890aSEmmanuel Vadot			clocks = <&atl_clkin2_ck>;
57f126890aSEmmanuel Vadot		};
58f126890aSEmmanuel Vadot	};
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot	leds {
61f126890aSEmmanuel Vadot		compatible = "gpio-leds";
62f126890aSEmmanuel Vadot		led0 {
63f126890aSEmmanuel Vadot			label = "dra7:usr1";
64f126890aSEmmanuel Vadot			gpios = <&pcf_lcd 4 GPIO_ACTIVE_LOW>;
65f126890aSEmmanuel Vadot			default-state = "off";
66f126890aSEmmanuel Vadot		};
67f126890aSEmmanuel Vadot
68f126890aSEmmanuel Vadot		led1 {
69f126890aSEmmanuel Vadot			label = "dra7:usr2";
70f126890aSEmmanuel Vadot			gpios = <&pcf_lcd 5 GPIO_ACTIVE_LOW>;
71f126890aSEmmanuel Vadot			default-state = "off";
72f126890aSEmmanuel Vadot		};
73f126890aSEmmanuel Vadot
74f126890aSEmmanuel Vadot		led2 {
75f126890aSEmmanuel Vadot			label = "dra7:usr3";
76f126890aSEmmanuel Vadot			gpios = <&pcf_lcd 6 GPIO_ACTIVE_LOW>;
77f126890aSEmmanuel Vadot			default-state = "off";
78f126890aSEmmanuel Vadot		};
79f126890aSEmmanuel Vadot
80f126890aSEmmanuel Vadot		led3 {
81f126890aSEmmanuel Vadot			label = "dra7:usr4";
82f126890aSEmmanuel Vadot			gpios = <&pcf_lcd 7 GPIO_ACTIVE_LOW>;
83f126890aSEmmanuel Vadot			default-state = "off";
84f126890aSEmmanuel Vadot		};
85f126890aSEmmanuel Vadot	};
86f126890aSEmmanuel Vadot
87f126890aSEmmanuel Vadot	gpio_keys {
88f126890aSEmmanuel Vadot		compatible = "gpio-keys";
89f126890aSEmmanuel Vadot		#address-cells = <1>;
90f126890aSEmmanuel Vadot		#size-cells = <0>;
91f126890aSEmmanuel Vadot		autorepeat;
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot		USER1 {
94f126890aSEmmanuel Vadot			label = "btnUser1";
95f126890aSEmmanuel Vadot			linux,code = <BTN_0>;
96f126890aSEmmanuel Vadot			gpios = <&pcf_lcd 2 GPIO_ACTIVE_LOW>;
97f126890aSEmmanuel Vadot		};
98f126890aSEmmanuel Vadot
99f126890aSEmmanuel Vadot		USER2 {
100f126890aSEmmanuel Vadot			label = "btnUser2";
101f126890aSEmmanuel Vadot			linux,code = <BTN_1>;
102f126890aSEmmanuel Vadot			gpios = <&pcf_lcd 3 GPIO_ACTIVE_LOW>;
103f126890aSEmmanuel Vadot		};
104f126890aSEmmanuel Vadot	};
105f126890aSEmmanuel Vadot};
106f126890aSEmmanuel Vadot
107f126890aSEmmanuel Vadot&i2c3 {
108f126890aSEmmanuel Vadot	status = "okay";
109f126890aSEmmanuel Vadot	clock-frequency = <400000>;
110f126890aSEmmanuel Vadot};
111f126890aSEmmanuel Vadot
112f126890aSEmmanuel Vadot&mcspi1 {
113f126890aSEmmanuel Vadot	status = "okay";
114f126890aSEmmanuel Vadot};
115f126890aSEmmanuel Vadot
116f126890aSEmmanuel Vadot&mcspi2 {
117f126890aSEmmanuel Vadot	status = "okay";
118f126890aSEmmanuel Vadot};
119f126890aSEmmanuel Vadot
120f126890aSEmmanuel Vadot&uart1 {
121f126890aSEmmanuel Vadot	status = "okay";
122f126890aSEmmanuel Vadot	interrupts-extended = <&crossbar_mpu GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
123f126890aSEmmanuel Vadot			      <&dra7_pmx_core 0x3e0>;
124f126890aSEmmanuel Vadot};
125f126890aSEmmanuel Vadot
126f126890aSEmmanuel Vadot&uart2 {
127f126890aSEmmanuel Vadot	status = "okay";
128f126890aSEmmanuel Vadot};
129f126890aSEmmanuel Vadot
130f126890aSEmmanuel Vadot&uart3 {
131f126890aSEmmanuel Vadot	status = "okay";
132f126890aSEmmanuel Vadot};
133f126890aSEmmanuel Vadot
134f126890aSEmmanuel Vadot&qspi {
135f126890aSEmmanuel Vadot	status = "okay";
136f126890aSEmmanuel Vadot
137f126890aSEmmanuel Vadot	spi-max-frequency = <76800000>;
138f126890aSEmmanuel Vadot	flash@0 {
139f126890aSEmmanuel Vadot		compatible = "s25fl256s1";
140f126890aSEmmanuel Vadot		spi-max-frequency = <76800000>;
141f126890aSEmmanuel Vadot		reg = <0>;
142f126890aSEmmanuel Vadot		spi-tx-bus-width = <1>;
143f126890aSEmmanuel Vadot		spi-rx-bus-width = <4>;
144f126890aSEmmanuel Vadot		#address-cells = <1>;
145f126890aSEmmanuel Vadot		#size-cells = <1>;
146f126890aSEmmanuel Vadot
147f126890aSEmmanuel Vadot		/* MTD partition table.
148f126890aSEmmanuel Vadot		 * The ROM checks the first four physical blocks
149f126890aSEmmanuel Vadot		 * for a valid file to boot and the flash here is
150f126890aSEmmanuel Vadot		 * 64KiB block size.
151f126890aSEmmanuel Vadot		 */
152f126890aSEmmanuel Vadot		partition@0 {
153f126890aSEmmanuel Vadot			label = "QSPI.SPL";
154f126890aSEmmanuel Vadot			reg = <0x00000000 0x00010000>;
155f126890aSEmmanuel Vadot		};
156f126890aSEmmanuel Vadot		partition@1 {
157f126890aSEmmanuel Vadot			label = "QSPI.SPL.backup1";
158f126890aSEmmanuel Vadot			reg = <0x00010000 0x00010000>;
159f126890aSEmmanuel Vadot		};
160f126890aSEmmanuel Vadot		partition@2 {
161f126890aSEmmanuel Vadot			label = "QSPI.SPL.backup2";
162f126890aSEmmanuel Vadot			reg = <0x00020000 0x00010000>;
163f126890aSEmmanuel Vadot		};
164f126890aSEmmanuel Vadot		partition@3 {
165f126890aSEmmanuel Vadot			label = "QSPI.SPL.backup3";
166f126890aSEmmanuel Vadot			reg = <0x00030000 0x00010000>;
167f126890aSEmmanuel Vadot		};
168f126890aSEmmanuel Vadot		partition@4 {
169f126890aSEmmanuel Vadot			label = "QSPI.u-boot";
170f126890aSEmmanuel Vadot			reg = <0x00040000 0x00100000>;
171f126890aSEmmanuel Vadot		};
172f126890aSEmmanuel Vadot		partition@5 {
173f126890aSEmmanuel Vadot			label = "QSPI.u-boot-spl-os";
174f126890aSEmmanuel Vadot			reg = <0x00140000 0x00080000>;
175f126890aSEmmanuel Vadot		};
176f126890aSEmmanuel Vadot		partition@6 {
177f126890aSEmmanuel Vadot			label = "QSPI.u-boot-env";
178f126890aSEmmanuel Vadot			reg = <0x001c0000 0x00010000>;
179f126890aSEmmanuel Vadot		};
180f126890aSEmmanuel Vadot		partition@7 {
181f126890aSEmmanuel Vadot			label = "QSPI.u-boot-env.backup1";
182f126890aSEmmanuel Vadot			reg = <0x001d0000 0x0010000>;
183f126890aSEmmanuel Vadot		};
184f126890aSEmmanuel Vadot		partition@8 {
185f126890aSEmmanuel Vadot			label = "QSPI.kernel";
186f126890aSEmmanuel Vadot			reg = <0x001e0000 0x0800000>;
187f126890aSEmmanuel Vadot		};
188f126890aSEmmanuel Vadot		partition@9 {
189f126890aSEmmanuel Vadot			label = "QSPI.file-system";
190f126890aSEmmanuel Vadot			reg = <0x009e0000 0x01620000>;
191f126890aSEmmanuel Vadot		};
192f126890aSEmmanuel Vadot	};
193f126890aSEmmanuel Vadot};
194f126890aSEmmanuel Vadot
195f126890aSEmmanuel Vadot&omap_dwc3_1 {
196f126890aSEmmanuel Vadot	extcon = <&extcon_usb1>;
197f126890aSEmmanuel Vadot};
198f126890aSEmmanuel Vadot
199f126890aSEmmanuel Vadot&usb1 {
200f126890aSEmmanuel Vadot	dr_mode = "otg";
201f126890aSEmmanuel Vadot	extcon = <&extcon_usb1>;
202f126890aSEmmanuel Vadot};
203f126890aSEmmanuel Vadot
204f126890aSEmmanuel Vadot&omap_dwc3_2 {
205f126890aSEmmanuel Vadot	extcon = <&extcon_usb2>;
206f126890aSEmmanuel Vadot};
207f126890aSEmmanuel Vadot
208f126890aSEmmanuel Vadot&usb2 {
209f126890aSEmmanuel Vadot	dr_mode = "host";
210f126890aSEmmanuel Vadot	extcon = <&extcon_usb2>;
211f126890aSEmmanuel Vadot};
212f126890aSEmmanuel Vadot
213f126890aSEmmanuel Vadot&atl {
214f126890aSEmmanuel Vadot	assigned-clocks = <&abe_dpll_sys_clk_mux>,
215f126890aSEmmanuel Vadot			  <&atl_clkctrl DRA7_ATL_ATL_CLKCTRL 26>,
216f126890aSEmmanuel Vadot			  <&dpll_abe_ck>,
217f126890aSEmmanuel Vadot			  <&dpll_abe_m2x2_ck>,
218f126890aSEmmanuel Vadot			  <&atl_clkin2_ck>;
219f126890aSEmmanuel Vadot	assigned-clock-parents = <&sys_clkin2>, <&dpll_abe_m2_ck>;
220f126890aSEmmanuel Vadot	assigned-clock-rates = <0>, <0>, <180633600>, <361267200>, <5644800>;
221f126890aSEmmanuel Vadot
222f126890aSEmmanuel Vadot	status = "okay";
223f126890aSEmmanuel Vadot
224f126890aSEmmanuel Vadot	atl2 {
225f126890aSEmmanuel Vadot		bws = <DRA7_ATL_WS_MCASP2_FSX>;
226f126890aSEmmanuel Vadot		aws = <DRA7_ATL_WS_MCASP3_FSX>;
227f126890aSEmmanuel Vadot	};
228f126890aSEmmanuel Vadot};
229f126890aSEmmanuel Vadot
230f126890aSEmmanuel Vadot&mcasp3 {
231f126890aSEmmanuel Vadot	#sound-dai-cells = <0>;
232f126890aSEmmanuel Vadot
233f126890aSEmmanuel Vadot	assigned-clocks = <&l4per2_clkctrl DRA7_L4PER2_MCASP3_CLKCTRL 24>;
234f126890aSEmmanuel Vadot	assigned-clock-parents = <&atl_clkin2_ck>;
235f126890aSEmmanuel Vadot
236f126890aSEmmanuel Vadot	status = "okay";
237f126890aSEmmanuel Vadot
238f126890aSEmmanuel Vadot	op-mode = <0>;          /* MCASP_IIS_MODE */
239f126890aSEmmanuel Vadot	tdm-slots = <2>;
240f126890aSEmmanuel Vadot	/* 4 serializer */
241f126890aSEmmanuel Vadot	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
242f126890aSEmmanuel Vadot		1 2 0 0
243f126890aSEmmanuel Vadot	>;
244f126890aSEmmanuel Vadot	tx-num-evt = <32>;
245f126890aSEmmanuel Vadot	rx-num-evt = <32>;
246f126890aSEmmanuel Vadot};
247f126890aSEmmanuel Vadot
248f126890aSEmmanuel Vadot&pcie1_rc {
249f126890aSEmmanuel Vadot	status = "okay";
250f126890aSEmmanuel Vadot};
251f126890aSEmmanuel Vadot
252f126890aSEmmanuel Vadot&mmc4 {
253f126890aSEmmanuel Vadot	bus-width = <4>;
254f126890aSEmmanuel Vadot	cap-power-off-card;
255f126890aSEmmanuel Vadot	keep-power-in-suspend;
256f126890aSEmmanuel Vadot	non-removable;
257f126890aSEmmanuel Vadot	#address-cells = <1>;
258f126890aSEmmanuel Vadot	#size-cells = <0>;
259f126890aSEmmanuel Vadot	wifi@2 {
260f126890aSEmmanuel Vadot		compatible = "ti,wl1835";
261f126890aSEmmanuel Vadot		reg = <2>;
262f126890aSEmmanuel Vadot		interrupt-parent = <&gpio5>;
263f126890aSEmmanuel Vadot		interrupts = <7 IRQ_TYPE_EDGE_RISING>;
264f126890aSEmmanuel Vadot	};
265f126890aSEmmanuel Vadot};
266