1354d7675SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2354d7675SEmmanuel Vadot/*
3354d7675SEmmanuel Vadot * Device Tree file for Travese Ten64 (LS1088) board
4354d7675SEmmanuel Vadot * Based on fsl-ls1088a-rdb.dts
5354d7675SEmmanuel Vadot * Copyright 2017-2020 NXP
6354d7675SEmmanuel Vadot * Copyright 2019-2021 Traverse Technologies
7354d7675SEmmanuel Vadot *
8354d7675SEmmanuel Vadot * Author: Mathew McBride <matt@traverse.com.au>
9354d7675SEmmanuel Vadot */
10354d7675SEmmanuel Vadot
11354d7675SEmmanuel Vadot/dts-v1/;
12354d7675SEmmanuel Vadot
13354d7675SEmmanuel Vadot#include "fsl-ls1088a.dtsi"
14354d7675SEmmanuel Vadot
15354d7675SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
16354d7675SEmmanuel Vadot#include <dt-bindings/input/input.h>
17354d7675SEmmanuel Vadot
18354d7675SEmmanuel Vadot/ {
19354d7675SEmmanuel Vadot	model = "Traverse Ten64";
20354d7675SEmmanuel Vadot	compatible = "traverse,ten64", "fsl,ls1088a";
21354d7675SEmmanuel Vadot
22354d7675SEmmanuel Vadot	aliases {
23354d7675SEmmanuel Vadot		serial0 = &duart0;
24354d7675SEmmanuel Vadot		serial1 = &duart1;
25354d7675SEmmanuel Vadot	};
26354d7675SEmmanuel Vadot
27354d7675SEmmanuel Vadot	chosen {
28354d7675SEmmanuel Vadot		stdout-path = "serial0:115200n8";
29354d7675SEmmanuel Vadot	};
30354d7675SEmmanuel Vadot
31354d7675SEmmanuel Vadot	buttons {
32354d7675SEmmanuel Vadot		compatible = "gpio-keys";
33354d7675SEmmanuel Vadot
34354d7675SEmmanuel Vadot		/* Fired by system controller when
35354d7675SEmmanuel Vadot		 * external power off (e.g ATX Power Button)
36354d7675SEmmanuel Vadot		 * asserted
37354d7675SEmmanuel Vadot		 */
38b97ee269SEmmanuel Vadot		button-powerdn {
39354d7675SEmmanuel Vadot			label = "External Power Down";
40354d7675SEmmanuel Vadot			gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
41354d7675SEmmanuel Vadot			linux,code = <KEY_POWER>;
42354d7675SEmmanuel Vadot		};
43354d7675SEmmanuel Vadot
44354d7675SEmmanuel Vadot		/* Rear Panel 'ADMIN' button (GPIO_H) */
45b97ee269SEmmanuel Vadot		button-admin {
46354d7675SEmmanuel Vadot			label = "ADMIN button";
47354d7675SEmmanuel Vadot			gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
48354d7675SEmmanuel Vadot			linux,code = <KEY_WPS_BUTTON>;
49354d7675SEmmanuel Vadot		};
50354d7675SEmmanuel Vadot	};
51354d7675SEmmanuel Vadot
52354d7675SEmmanuel Vadot	leds {
53354d7675SEmmanuel Vadot		compatible = "gpio-leds";
54354d7675SEmmanuel Vadot
55b97ee269SEmmanuel Vadot		led-0 {
56354d7675SEmmanuel Vadot			label = "ten64:green:sfp1:down";
57354d7675SEmmanuel Vadot			gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
58354d7675SEmmanuel Vadot		};
59354d7675SEmmanuel Vadot
60b97ee269SEmmanuel Vadot		led-1 {
61354d7675SEmmanuel Vadot			label = "ten64:green:sfp2:up";
62354d7675SEmmanuel Vadot			gpios = <&gpio3 12 GPIO_ACTIVE_HIGH>;
63354d7675SEmmanuel Vadot		};
64354d7675SEmmanuel Vadot
65b97ee269SEmmanuel Vadot		led-2 {
66354d7675SEmmanuel Vadot			label = "ten64:admin";
67354d7675SEmmanuel Vadot			gpios = <&sfpgpio 12 GPIO_ACTIVE_HIGH>;
68354d7675SEmmanuel Vadot		};
69354d7675SEmmanuel Vadot	};
70354d7675SEmmanuel Vadot
71354d7675SEmmanuel Vadot	sfp_xg0: dpmac2-sfp {
72354d7675SEmmanuel Vadot		compatible = "sff,sfp";
73354d7675SEmmanuel Vadot		i2c-bus = <&sfplower_i2c>;
74354d7675SEmmanuel Vadot		tx-fault-gpios = <&sfpgpio 0 GPIO_ACTIVE_HIGH>;
75354d7675SEmmanuel Vadot		tx-disable-gpios = <&sfpgpio 1 GPIO_ACTIVE_HIGH>;
76354d7675SEmmanuel Vadot		mod-def0-gpios = <&sfpgpio 2 GPIO_ACTIVE_LOW>;
77354d7675SEmmanuel Vadot		los-gpios = <&sfpgpio 3 GPIO_ACTIVE_HIGH>;
78354d7675SEmmanuel Vadot		maximum-power-milliwatt = <2000>;
79354d7675SEmmanuel Vadot	};
80354d7675SEmmanuel Vadot
81354d7675SEmmanuel Vadot	sfp_xg1: dpmac1-sfp {
82354d7675SEmmanuel Vadot		compatible = "sff,sfp";
83354d7675SEmmanuel Vadot		i2c-bus = <&sfpupper_i2c>;
84354d7675SEmmanuel Vadot		tx-fault-gpios = <&sfpgpio 4 GPIO_ACTIVE_HIGH>;
85354d7675SEmmanuel Vadot		tx-disable-gpios = <&sfpgpio 5 GPIO_ACTIVE_HIGH>;
86354d7675SEmmanuel Vadot		mod-def0-gpios = <&sfpgpio 6 GPIO_ACTIVE_LOW>;
87354d7675SEmmanuel Vadot		los-gpios = <&sfpgpio 7 GPIO_ACTIVE_HIGH>;
88354d7675SEmmanuel Vadot		maximum-power-milliwatt = <2000>;
89354d7675SEmmanuel Vadot	};
90354d7675SEmmanuel Vadot};
91354d7675SEmmanuel Vadot
92354d7675SEmmanuel Vadot/* XG1 - Upper SFP */
93354d7675SEmmanuel Vadot&dpmac1 {
94354d7675SEmmanuel Vadot	sfp = <&sfp_xg1>;
95354d7675SEmmanuel Vadot	pcs-handle = <&pcs1>;
96354d7675SEmmanuel Vadot	phy-connection-type = "10gbase-r";
97354d7675SEmmanuel Vadot	managed = "in-band-status";
98354d7675SEmmanuel Vadot};
99354d7675SEmmanuel Vadot
100354d7675SEmmanuel Vadot/* XG0 - Lower SFP */
101354d7675SEmmanuel Vadot&dpmac2 {
102354d7675SEmmanuel Vadot	sfp = <&sfp_xg0>;
103354d7675SEmmanuel Vadot	pcs-handle = <&pcs2>;
104354d7675SEmmanuel Vadot	phy-connection-type = "10gbase-r";
105354d7675SEmmanuel Vadot	managed = "in-band-status";
106354d7675SEmmanuel Vadot};
107354d7675SEmmanuel Vadot
108354d7675SEmmanuel Vadot/* DPMAC3..6 is GE4 to GE8 */
109354d7675SEmmanuel Vadot&dpmac3 {
110354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy5>;
111354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
112354d7675SEmmanuel Vadot	managed = "in-band-status";
113354d7675SEmmanuel Vadot	pcs-handle = <&pcs3_0>;
114354d7675SEmmanuel Vadot};
115354d7675SEmmanuel Vadot
116354d7675SEmmanuel Vadot&dpmac4 {
117354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy6>;
118354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
119354d7675SEmmanuel Vadot	managed = "in-band-status";
120354d7675SEmmanuel Vadot	pcs-handle = <&pcs3_1>;
121354d7675SEmmanuel Vadot};
122354d7675SEmmanuel Vadot
123354d7675SEmmanuel Vadot&dpmac5 {
124354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy7>;
125354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
126354d7675SEmmanuel Vadot	managed = "in-band-status";
127354d7675SEmmanuel Vadot	pcs-handle = <&pcs3_2>;
128354d7675SEmmanuel Vadot};
129354d7675SEmmanuel Vadot
130354d7675SEmmanuel Vadot&dpmac6 {
131354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy8>;
132354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
133354d7675SEmmanuel Vadot	managed = "in-band-status";
134354d7675SEmmanuel Vadot	pcs-handle = <&pcs3_3>;
135354d7675SEmmanuel Vadot};
136354d7675SEmmanuel Vadot
137354d7675SEmmanuel Vadot/* DPMAC7..10 is GE0 to GE3 */
138354d7675SEmmanuel Vadot&dpmac7 {
139354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy1>;
140354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
141354d7675SEmmanuel Vadot	managed = "in-band-status";
142354d7675SEmmanuel Vadot	pcs-handle = <&pcs7_0>;
143354d7675SEmmanuel Vadot};
144354d7675SEmmanuel Vadot
145354d7675SEmmanuel Vadot&dpmac8 {
146354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy2>;
147354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
148354d7675SEmmanuel Vadot	managed = "in-band-status";
149354d7675SEmmanuel Vadot	pcs-handle = <&pcs7_1>;
150354d7675SEmmanuel Vadot};
151354d7675SEmmanuel Vadot
152354d7675SEmmanuel Vadot&dpmac9 {
153354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy3>;
154354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
155354d7675SEmmanuel Vadot	managed = "in-band-status";
156354d7675SEmmanuel Vadot	pcs-handle = <&pcs7_2>;
157354d7675SEmmanuel Vadot};
158354d7675SEmmanuel Vadot
159354d7675SEmmanuel Vadot&dpmac10 {
160354d7675SEmmanuel Vadot	phy-handle = <&mdio1_phy4>;
161354d7675SEmmanuel Vadot	phy-connection-type = "qsgmii";
162354d7675SEmmanuel Vadot	managed = "in-band-status";
163354d7675SEmmanuel Vadot	pcs-handle = <&pcs7_3>;
164354d7675SEmmanuel Vadot};
165354d7675SEmmanuel Vadot
166354d7675SEmmanuel Vadot&duart0 {
167354d7675SEmmanuel Vadot	status = "okay";
168354d7675SEmmanuel Vadot};
169354d7675SEmmanuel Vadot
170354d7675SEmmanuel Vadot&duart1 {
171354d7675SEmmanuel Vadot	status = "okay";
172354d7675SEmmanuel Vadot};
173354d7675SEmmanuel Vadot
174354d7675SEmmanuel Vadot&emdio1 {
175354d7675SEmmanuel Vadot	status = "okay";
176354d7675SEmmanuel Vadot
177354d7675SEmmanuel Vadot	mdio1_phy5: ethernet-phy@c {
178354d7675SEmmanuel Vadot		reg = <0xc>;
179354d7675SEmmanuel Vadot	};
180354d7675SEmmanuel Vadot
181354d7675SEmmanuel Vadot	mdio1_phy6: ethernet-phy@d {
182354d7675SEmmanuel Vadot		reg = <0xd>;
183354d7675SEmmanuel Vadot	};
184354d7675SEmmanuel Vadot
185354d7675SEmmanuel Vadot	mdio1_phy7: ethernet-phy@e {
186354d7675SEmmanuel Vadot		reg = <0xe>;
187354d7675SEmmanuel Vadot	};
188354d7675SEmmanuel Vadot
189354d7675SEmmanuel Vadot	mdio1_phy8: ethernet-phy@f {
190354d7675SEmmanuel Vadot		reg = <0xf>;
191354d7675SEmmanuel Vadot	};
192354d7675SEmmanuel Vadot
193354d7675SEmmanuel Vadot	mdio1_phy1: ethernet-phy@1c {
194354d7675SEmmanuel Vadot		reg = <0x1c>;
195354d7675SEmmanuel Vadot	};
196354d7675SEmmanuel Vadot
197354d7675SEmmanuel Vadot	mdio1_phy2: ethernet-phy@1d {
198354d7675SEmmanuel Vadot		reg = <0x1d>;
199354d7675SEmmanuel Vadot	};
200354d7675SEmmanuel Vadot
201354d7675SEmmanuel Vadot	mdio1_phy3: ethernet-phy@1e {
202354d7675SEmmanuel Vadot		reg = <0x1e>;
203354d7675SEmmanuel Vadot	};
204354d7675SEmmanuel Vadot
205354d7675SEmmanuel Vadot	mdio1_phy4: ethernet-phy@1f {
206354d7675SEmmanuel Vadot		reg = <0x1f>;
207354d7675SEmmanuel Vadot	};
208354d7675SEmmanuel Vadot};
209354d7675SEmmanuel Vadot
210354d7675SEmmanuel Vadot&esdhc {
211354d7675SEmmanuel Vadot	status = "okay";
212354d7675SEmmanuel Vadot};
213354d7675SEmmanuel Vadot
214354d7675SEmmanuel Vadot&i2c0 {
215354d7675SEmmanuel Vadot	status = "okay";
216354d7675SEmmanuel Vadot
217354d7675SEmmanuel Vadot	sfpgpio: gpio@76 {
218354d7675SEmmanuel Vadot		compatible = "ti,tca9539";
219354d7675SEmmanuel Vadot		reg = <0x76>;
220354d7675SEmmanuel Vadot		#gpio-cells = <2>;
221354d7675SEmmanuel Vadot		gpio-controller;
222354d7675SEmmanuel Vadot
223354d7675SEmmanuel Vadot		admin_led_lower {
224354d7675SEmmanuel Vadot			gpio-hog;
225354d7675SEmmanuel Vadot			gpios = <13 GPIO_ACTIVE_HIGH>;
226354d7675SEmmanuel Vadot			output-low;
227354d7675SEmmanuel Vadot		};
228354d7675SEmmanuel Vadot	};
229354d7675SEmmanuel Vadot
230354d7675SEmmanuel Vadot	at97sc: tpm@29 {
231354d7675SEmmanuel Vadot		compatible = "atmel,at97sc3204t";
232354d7675SEmmanuel Vadot		reg = <0x29>;
233354d7675SEmmanuel Vadot	};
234354d7675SEmmanuel Vadot};
235354d7675SEmmanuel Vadot
236354d7675SEmmanuel Vadot&i2c2 {
237354d7675SEmmanuel Vadot	status = "okay";
238354d7675SEmmanuel Vadot
239354d7675SEmmanuel Vadot	rx8035: rtc@32 {
240354d7675SEmmanuel Vadot		compatible = "epson,rx8035";
241354d7675SEmmanuel Vadot		reg = <0x32>;
242354d7675SEmmanuel Vadot	};
243354d7675SEmmanuel Vadot};
244354d7675SEmmanuel Vadot
245354d7675SEmmanuel Vadot&i2c3 {
246354d7675SEmmanuel Vadot	status = "okay";
247354d7675SEmmanuel Vadot
248*8bab661aSEmmanuel Vadot	i2c-mux@70 {
249354d7675SEmmanuel Vadot		compatible = "nxp,pca9540";
250354d7675SEmmanuel Vadot		#address-cells = <1>;
251354d7675SEmmanuel Vadot		#size-cells = <0>;
252354d7675SEmmanuel Vadot		reg = <0x70>;
253354d7675SEmmanuel Vadot
254354d7675SEmmanuel Vadot		sfpupper_i2c: i2c@0 {
255354d7675SEmmanuel Vadot			#address-cells = <1>;
256354d7675SEmmanuel Vadot			#size-cells = <0>;
257354d7675SEmmanuel Vadot			reg = <0>;
258354d7675SEmmanuel Vadot		};
259354d7675SEmmanuel Vadot
260354d7675SEmmanuel Vadot		sfplower_i2c: i2c@1 {
261354d7675SEmmanuel Vadot			#address-cells = <1>;
262354d7675SEmmanuel Vadot			#size-cells = <0>;
263354d7675SEmmanuel Vadot			reg = <1>;
264354d7675SEmmanuel Vadot		};
265354d7675SEmmanuel Vadot	};
266354d7675SEmmanuel Vadot};
267354d7675SEmmanuel Vadot
268354d7675SEmmanuel Vadot&pcs_mdio1 {
269354d7675SEmmanuel Vadot	status = "okay";
270354d7675SEmmanuel Vadot};
271354d7675SEmmanuel Vadot
272354d7675SEmmanuel Vadot&pcs_mdio2 {
273354d7675SEmmanuel Vadot	status = "okay";
274354d7675SEmmanuel Vadot};
275354d7675SEmmanuel Vadot
276354d7675SEmmanuel Vadot&pcs_mdio3 {
277354d7675SEmmanuel Vadot	status = "okay";
278354d7675SEmmanuel Vadot};
279354d7675SEmmanuel Vadot
280354d7675SEmmanuel Vadot&pcs_mdio7 {
281354d7675SEmmanuel Vadot	status = "okay";
282354d7675SEmmanuel Vadot};
283354d7675SEmmanuel Vadot
284354d7675SEmmanuel Vadot&qspi {
285354d7675SEmmanuel Vadot	status = "okay";
286354d7675SEmmanuel Vadot
287354d7675SEmmanuel Vadot	en25s64: flash@0 {
288354d7675SEmmanuel Vadot		compatible = "jedec,spi-nor";
289354d7675SEmmanuel Vadot		#address-cells = <1>;
290354d7675SEmmanuel Vadot		#size-cells = <1>;
291354d7675SEmmanuel Vadot		reg = <0>;
292354d7675SEmmanuel Vadot		spi-max-frequency = <20000000>;
293354d7675SEmmanuel Vadot		spi-rx-bus-width = <4>;
294354d7675SEmmanuel Vadot		spi-tx-bus-width = <4>;
295354d7675SEmmanuel Vadot
296354d7675SEmmanuel Vadot		partitions {
297354d7675SEmmanuel Vadot			compatible = "fixed-partitions";
298354d7675SEmmanuel Vadot			#address-cells = <1>;
299354d7675SEmmanuel Vadot			#size-cells = <1>;
300354d7675SEmmanuel Vadot
301354d7675SEmmanuel Vadot			partition@0 {
302354d7675SEmmanuel Vadot				label = "bl2";
303354d7675SEmmanuel Vadot				reg = <0 0x100000>;
304354d7675SEmmanuel Vadot			};
305354d7675SEmmanuel Vadot
306354d7675SEmmanuel Vadot			partition@100000 {
307354d7675SEmmanuel Vadot				label = "bl3";
308354d7675SEmmanuel Vadot				reg = <0x100000 0x200000>;
309354d7675SEmmanuel Vadot			};
310354d7675SEmmanuel Vadot
311354d7675SEmmanuel Vadot			partition@300000 {
312354d7675SEmmanuel Vadot				label = "mcfirmware";
313354d7675SEmmanuel Vadot				reg = <0x300000 0x200000>;
314354d7675SEmmanuel Vadot			};
315354d7675SEmmanuel Vadot
316354d7675SEmmanuel Vadot			partition@500000 {
317354d7675SEmmanuel Vadot				label = "ubootenv";
318354d7675SEmmanuel Vadot				reg = <0x500000 0x80000>;
319354d7675SEmmanuel Vadot			};
320354d7675SEmmanuel Vadot
321354d7675SEmmanuel Vadot			partition@580000 {
322354d7675SEmmanuel Vadot				label = "dpl";
323354d7675SEmmanuel Vadot				reg = <0x580000 0x40000>;
324354d7675SEmmanuel Vadot			};
325354d7675SEmmanuel Vadot
326354d7675SEmmanuel Vadot			partition@5C0000 {
327354d7675SEmmanuel Vadot				label = "dpc";
328354d7675SEmmanuel Vadot				reg = <0x5C0000 0x40000>;
329354d7675SEmmanuel Vadot			};
330354d7675SEmmanuel Vadot
331354d7675SEmmanuel Vadot			partition@600000 {
332354d7675SEmmanuel Vadot				label = "devicetree";
333354d7675SEmmanuel Vadot				reg = <0x600000 0x40000>;
334354d7675SEmmanuel Vadot			};
335354d7675SEmmanuel Vadot		};
336354d7675SEmmanuel Vadot	};
337354d7675SEmmanuel Vadot
338354d7675SEmmanuel Vadot	nand: flash@1 {
339354d7675SEmmanuel Vadot		compatible = "spi-nand";
340354d7675SEmmanuel Vadot		#address-cells = <1>;
341354d7675SEmmanuel Vadot		#size-cells = <1>;
342354d7675SEmmanuel Vadot		reg = <1>;
343354d7675SEmmanuel Vadot		spi-max-frequency = <20000000>;
344354d7675SEmmanuel Vadot		spi-rx-bus-width = <4>;
345354d7675SEmmanuel Vadot		spi-tx-bus-width = <4>;
346354d7675SEmmanuel Vadot
347354d7675SEmmanuel Vadot		partitions {
348354d7675SEmmanuel Vadot			compatible = "fixed-partitions";
349354d7675SEmmanuel Vadot			#address-cells = <1>;
350354d7675SEmmanuel Vadot			#size-cells = <1>;
351354d7675SEmmanuel Vadot
352354d7675SEmmanuel Vadot			/* reserved for future boot direct from NAND flash
353354d7675SEmmanuel Vadot			 * (this would use the same layout as the 8MiB NOR flash)
354354d7675SEmmanuel Vadot			 */
355354d7675SEmmanuel Vadot			partition@0 {
356354d7675SEmmanuel Vadot				label = "nand-boot-reserved";
357354d7675SEmmanuel Vadot				reg = <0 0x800000>;
358354d7675SEmmanuel Vadot			};
359354d7675SEmmanuel Vadot
360354d7675SEmmanuel Vadot			/* recovery / install environment */
361354d7675SEmmanuel Vadot			partition@800000 {
362354d7675SEmmanuel Vadot				label = "recovery";
363354d7675SEmmanuel Vadot				reg = <0x800000 0x2000000>;
364354d7675SEmmanuel Vadot			};
365354d7675SEmmanuel Vadot
366354d7675SEmmanuel Vadot			/* ubia (first OpenWrt) - a/b names to prevent confusion with ubi0/1/etc. */
367354d7675SEmmanuel Vadot			partition@2800000 {
368354d7675SEmmanuel Vadot				label = "ubia";
369354d7675SEmmanuel Vadot				reg = <0x2800000 0x6C00000>;
370354d7675SEmmanuel Vadot			};
371354d7675SEmmanuel Vadot
372354d7675SEmmanuel Vadot			/* ubib (second OpenWrt) */
373354d7675SEmmanuel Vadot			partition@9400000 {
374354d7675SEmmanuel Vadot				label = "ubib";
375354d7675SEmmanuel Vadot				reg = <0x9400000 0x6C00000>;
376354d7675SEmmanuel Vadot			};
377354d7675SEmmanuel Vadot		};
378354d7675SEmmanuel Vadot	};
379354d7675SEmmanuel Vadot};
380354d7675SEmmanuel Vadot
381354d7675SEmmanuel Vadot&usb0 {
382354d7675SEmmanuel Vadot	status = "okay";
383354d7675SEmmanuel Vadot};
384354d7675SEmmanuel Vadot
385354d7675SEmmanuel Vadot&usb1 {
386354d7675SEmmanuel Vadot	status = "okay";
387354d7675SEmmanuel Vadot};
388