xref: /linux/arch/arm64/boot/dts/freescale/fsl-ls1028a-kontron-sl28.dts (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Device Tree file for the Kontron SMARC-sAL28 board.
4 *
5 * Copyright (C) 2019 Michael Walle <michael@walle.cc>
6 *
7 */
8
9/dts-v1/;
10#include "fsl-ls1028a.dtsi"
11#include <dt-bindings/interrupt-controller/irq.h>
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/input/input.h>
14
15/ {
16	model = "Kontron SMARC-sAL28";
17	compatible = "kontron,sl28", "fsl,ls1028a";
18
19	aliases {
20		crypto = &crypto;
21		serial0 = &duart0;
22		serial1 = &duart1;
23		serial2 = &lpuart1;
24		spi0 = &fspi;
25		spi1 = &dspi2;
26		mmc0 = &esdhc1;
27		mmc1 = &esdhc;
28	};
29
30	buttons0 {
31		compatible = "gpio-keys";
32
33		power-button {
34			interrupts-extended = <&sl28cpld_intc
35					       4 IRQ_TYPE_EDGE_BOTH>;
36			linux,code = <KEY_POWER>;
37			label = "Power";
38		};
39
40		sleep-button {
41			interrupts-extended = <&sl28cpld_intc
42					       5 IRQ_TYPE_EDGE_BOTH>;
43			linux,code = <KEY_SLEEP>;
44			label = "Sleep";
45		};
46	};
47
48	buttons1 {
49		compatible = "gpio-keys-polled";
50		poll-interval = <200>;
51
52		lid-switch {
53			linux,input-type = <EV_SW>;
54			linux,code = <SW_LID>;
55			gpios = <&sl28cpld_gpio3 4 GPIO_ACTIVE_LOW>;
56			label = "Lid";
57		};
58	};
59
60	chosen {
61		stdout-path = "serial0:115200n8";
62	};
63};
64
65&can0 {
66	status = "okay";
67};
68
69&dspi2 {
70	status = "okay";
71};
72
73&duart0 {
74	status = "okay";
75};
76
77&duart1 {
78	status = "okay";
79};
80
81&enetc_port0 {
82	phy-handle = <&phy0>;
83	phy-connection-type = "sgmii";
84	managed = "in-band-status";
85	status = "okay";
86
87	mdio {
88		#address-cells = <1>;
89		#size-cells = <0>;
90
91		phy0: ethernet-phy@5 {
92			reg = <0x5>;
93			eee-broken-1000t;
94			eee-broken-100tx;
95		};
96	};
97};
98
99&esdhc {
100	sd-uhs-sdr104;
101	sd-uhs-sdr50;
102	sd-uhs-sdr25;
103	sd-uhs-sdr12;
104	status = "okay";
105};
106
107&esdhc1 {
108	mmc-hs200-1_8v;
109	mmc-hs400-1_8v;
110	bus-width = <8>;
111	status = "okay";
112};
113
114&fspi {
115	status = "okay";
116
117	flash@0 {
118		#address-cells = <1>;
119		#size-cells = <1>;
120		compatible = "jedec,spi-nor";
121		m25p,fast-read;
122		spi-max-frequency = <133000000>;
123		reg = <0>;
124		/* The following setting enables 1-1-2 (CMD-ADDR-DATA) mode */
125		spi-rx-bus-width = <2>; /* 2 SPI Rx lines */
126		spi-tx-bus-width = <1>; /* 1 SPI Tx line */
127
128		partition@0 {
129			reg = <0x000000 0x010000>;
130			label = "rcw";
131			read-only;
132		};
133
134		partition@10000 {
135			reg = <0x010000 0x0f0000>;
136			label = "failsafe bootloader";
137			read-only;
138		};
139
140		partition@100000 {
141			reg = <0x100000 0x040000>;
142			label = "failsafe DP firmware";
143			read-only;
144		};
145
146		partition@140000 {
147			reg = <0x140000 0x0a0000>;
148			label = "failsafe trusted firmware";
149			read-only;
150		};
151
152		partition@1e0000 {
153			reg = <0x1e0000 0x020000>;
154			label = "reserved";
155			read-only;
156		};
157
158		partition@200000 {
159			reg = <0x200000 0x010000>;
160			label = "configuration store";
161		};
162
163		partition@210000 {
164			reg = <0x210000 0x1d0000>;
165			label = "bootloader";
166		};
167
168		partition@3e0000 {
169			reg = <0x3e0000 0x020000>;
170			label = "bootloader environment";
171		};
172	};
173};
174
175&gpio1 {
176	gpio-line-names =
177		"", "", "", "", "", "", "", "",
178		"", "", "", "", "", "", "", "",
179		"", "", "", "", "", "", "TDO", "TCK",
180		"", "", "", "", "", "", "", "";
181};
182
183&gpio2 {
184	gpio-line-names =
185		"", "", "", "", "", "", "TMS", "TDI",
186		"", "", "", "", "", "", "", "",
187		"", "", "", "", "", "", "", "",
188		"", "", "", "", "", "", "", "";
189};
190
191&i2c0 {
192	status = "okay";
193
194	rtc@32 {
195		compatible = "microcrystal,rv8803";
196		reg = <0x32>;
197	};
198
199	sl28cpld@4a {
200		compatible = "kontron,sl28cpld";
201		reg = <0x4a>;
202		#address-cells = <1>;
203		#size-cells = <0>;
204
205		watchdog@4 {
206			compatible = "kontron,sl28cpld-wdt";
207			reg = <0x4>;
208			kontron,assert-wdt-timeout-pin;
209		};
210
211		hwmon@b {
212			compatible = "kontron,sl28cpld-fan";
213			reg = <0xb>;
214		};
215
216		sl28cpld_pwm0: pwm@c {
217			compatible = "kontron,sl28cpld-pwm";
218			reg = <0xc>;
219			#pwm-cells = <2>;
220		};
221
222		sl28cpld_pwm1: pwm@e {
223			compatible = "kontron,sl28cpld-pwm";
224			reg = <0xe>;
225			#pwm-cells = <2>;
226		};
227
228		sl28cpld_gpio0: gpio@10 {
229			compatible = "kontron,sl28cpld-gpio";
230			reg = <0x10>;
231			interrupts-extended = <&gpio2 6
232					       IRQ_TYPE_EDGE_FALLING>;
233
234			gpio-controller;
235			#gpio-cells = <2>;
236			gpio-line-names =
237				"GPIO0_CAM0_PWR_N", "GPIO1_CAM1_PWR_N",
238				"GPIO2_CAM0_RST_N", "GPIO3_CAM1_RST_N",
239				"GPIO4_HDA_RST_N", "GPIO5_PWM_OUT",
240				"GPIO6_TACHIN", "GPIO7";
241
242			interrupt-controller;
243			#interrupt-cells = <2>;
244		};
245
246		sl28cpld_gpio1: gpio@15 {
247			compatible = "kontron,sl28cpld-gpio";
248			reg = <0x15>;
249			interrupts-extended = <&gpio2 6
250					       IRQ_TYPE_EDGE_FALLING>;
251
252			gpio-controller;
253			#gpio-cells = <2>;
254			gpio-line-names =
255				"GPIO8", "GPIO9", "GPIO10", "GPIO11",
256				"", "", "", "";
257
258			interrupt-controller;
259			#interrupt-cells = <2>;
260		};
261
262		sl28cpld_gpio2: gpio@1a {
263			compatible = "kontron,sl28cpld-gpo";
264			reg = <0x1a>;
265
266			gpio-controller;
267			#gpio-cells = <2>;
268			gpio-line-names =
269				"LCD0 voltage enable",
270				"LCD0 backlight enable",
271				"eMMC reset", "LVDS bridge reset",
272				"LVDS bridge power-down",
273				"SDIO power enable",
274				"", "";
275		};
276
277		sl28cpld_gpio3: gpio@1b {
278			compatible = "kontron,sl28cpld-gpi";
279			reg = <0x1b>;
280
281			gpio-controller;
282			#gpio-cells = <2>;
283			gpio-line-names =
284				"Power button", "Force recovery", "Sleep",
285				"Battery low", "Lid state", "Charging",
286				"Charger present", "";
287		};
288
289		sl28cpld_intc: interrupt-controller@1c {
290			compatible = "kontron,sl28cpld-intc";
291			reg = <0x1c>;
292			interrupts-extended = <&gpio2 6
293					       IRQ_TYPE_EDGE_FALLING>;
294
295			interrupt-controller;
296			#interrupt-cells = <2>;
297		};
298	};
299
300	eeprom@50 {
301		compatible = "atmel,24c32";
302		reg = <0x50>;
303		pagesize = <32>;
304	};
305};
306
307&i2c3 {
308	status = "okay";
309};
310
311&i2c4 {
312	status = "okay";
313
314	eeprom@50 {
315		compatible = "atmel,24c32";
316		reg = <0x50>;
317		pagesize = <32>;
318	};
319};
320
321&lpuart1 {
322	status = "okay";
323};
324