1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2013 Steffen Trumtrar <s.trumtrar@pengutronix.de>
4 */
5
6#include "socfpga_cyclone5.dtsi"
7
8/ {
9	model = "Terasic SoCkit";
10	compatible = "terasic,socfpga-cyclone5-sockit", "altr,socfpga-cyclone5", "altr,socfpga";
11
12	chosen {
13		bootargs = "earlyprintk";
14		stdout-path = "serial0:115200n8";
15	};
16
17	memory@0 {
18		name = "memory";
19		device_type = "memory";
20		reg = <0x0 0x40000000>; /* 1GB */
21	};
22
23	aliases {
24		/* this allow the ethaddr uboot environmnet variable contents
25		 * to be added to the gmac1 device tree blob.
26		 */
27		ethernet0 = &gmac1;
28	};
29
30	leds {
31		compatible = "gpio-leds";
32
33		hps_led0 {
34			label = "hps:blue:led0";
35			gpios = <&portb 24 0>;	/* HPS_GPIO53 */
36			linux,default-trigger = "heartbeat";
37		};
38
39		hps_led1 {
40			label = "hps:blue:led1";
41			gpios = <&portb 25 0>;	/* HPS_GPIO54 */
42			linux,default-trigger = "heartbeat";
43		};
44
45		hps_led2 {
46			label = "hps:blue:led2";
47			gpios = <&portb 26 0>;	/* HPS_GPIO55 */
48			linux,default-trigger = "heartbeat";
49		};
50
51		hps_led3 {
52			label = "hps:blue:led3";
53			gpios = <&portb 27 0>;	/* HPS_GPIO56 */
54			linux,default-trigger = "heartbeat";
55		};
56	};
57
58	gpio-keys {
59		compatible = "gpio-keys";
60
61		hps_sw0 {
62			label = "hps_sw0";
63			gpios = <&portc 20 0>;	/* HPS_GPI7 */
64			linux,input-type = <5>;	/* EV_SW */
65			linux,code = <0x0>;	/* SW_LID */
66		};
67
68		hps_sw1 {
69			label = "hps_sw1";
70			gpios = <&portc 19 0>;	/* HPS_GPI6 */
71			linux,input-type = <5>;	/* EV_SW */
72			linux,code = <0x5>;	/* SW_DOCK */
73		};
74
75		hps_sw2 {
76			label = "hps_sw2";
77			gpios = <&portc 18 0>;	/* HPS_GPI5 */
78			linux,input-type = <5>;	/* EV_SW */
79			linux,code = <0xa>;	/* SW_KEYPAD_SLIDE */
80		};
81
82		hps_sw3 {
83			label = "hps_sw3";
84			gpios = <&portc 17 0>;	/* HPS_GPI4 */
85			linux,input-type = <5>;	/* EV_SW */
86			linux,code = <0xc>;	/* SW_ROTATE_LOCK */
87		};
88
89		hps_hkey0 {
90			label = "hps_hkey0";
91			gpios = <&portc 21 1>;	/* HPS_GPI8 */
92			linux,code = <187>;	/* KEY_F17 */
93		};
94
95		hps_hkey1 {
96			label = "hps_hkey1";
97			gpios = <&portc 22 1>;	/* HPS_GPI9 */
98			linux,code = <188>;	/* KEY_F18 */
99		};
100
101		hps_hkey2 {
102			label = "hps_hkey2";
103			gpios = <&portc 23 1>;	/* HPS_GPI10 */
104			linux,code = <189>;	/* KEY_F19 */
105		};
106
107		hps_hkey3 {
108			label = "hps_hkey3";
109			gpios = <&portc 24 1>;	/* HPS_GPI11 */
110			linux,code = <190>;	/* KEY_F20 */
111		};
112	};
113
114	regulator_3_3v: regulator {
115		compatible = "regulator-fixed";
116		regulator-name = "VCC3P3";
117		regulator-min-microvolt = <3300000>;
118		regulator-max-microvolt = <3300000>;
119	};
120};
121
122&gmac1 {
123	status = "okay";
124	phy-mode = "rgmii";
125
126	rxd0-skew-ps = <0>;
127	rxd1-skew-ps = <0>;
128	rxd2-skew-ps = <0>;
129	rxd3-skew-ps = <0>;
130	txen-skew-ps = <0>;
131	txc-skew-ps = <2600>;
132	rxdv-skew-ps = <0>;
133	rxc-skew-ps = <2000>;
134};
135
136&gpio0 {	/* GPIO 0..29 */
137	status = "okay";
138};
139
140&gpio1 {	/* GPIO 30..57 */
141	status = "okay";
142};
143
144&gpio2 {	/* GPIO 58..66 (HLGPI 0..13 at offset 13) */
145	status = "okay";
146};
147
148&i2c1 {
149	status = "okay";
150
151	accel1: accelerometer@53 {
152		compatible = "adi,adxl345";
153		reg = <0x53>;
154
155		interrupt-parent = <&portc>;
156		interrupts = <3 2>;
157	};
158};
159
160&mmc0 {
161	vmmc-supply = <&regulator_3_3v>;
162	vqmmc-supply = <&regulator_3_3v>;
163	status = "okay";
164};
165
166&qspi {
167	status = "okay";
168
169	flash: flash@0 {
170		#address-cells = <1>;
171		#size-cells = <1>;
172		compatible = "micron,mt25qu02g", "jedec,spi-nor";
173		reg = <0>;
174		spi-max-frequency = <100000000>;
175
176		m25p,fast-read;
177		cdns,read-delay = <4>;
178		cdns,tshsl-ns = <50>;
179		cdns,tsd2d-ns = <50>;
180		cdns,tchsh-ns = <4>;
181		cdns,tslch-ns = <4>;
182	};
183};
184
185&usb1 {
186	status = "okay";
187};
188