1// SPDX-License-Identifier:     GPL-2.0
2/*
3 * Copyright (C) 2021, Intel Corporation
4 */
5#include "socfpga_agilex.dtsi"
6
7/ {
8	model = "eASIC N5X SoCDK";
9	compatible = "intel,n5x-socdk", "intel,socfpga-agilex";
10
11	aliases {
12		serial0 = &uart0;
13		ethernet0 = &gmac0;
14		ethernet1 = &gmac1;
15		ethernet2 = &gmac2;
16	};
17
18	chosen {
19		stdout-path = "serial0:115200n8";
20	};
21
22	memory {
23		device_type = "memory";
24		/* We expect the bootloader to fill in the reg */
25		reg = <0 0 0 0>;
26	};
27};
28
29&clkmgr {
30	compatible = "intel,easic-n5x-clkmgr";
31};
32
33&gmac0 {
34	status = "okay";
35	phy-mode = "rgmii";
36	phy-handle = <&phy0>;
37
38	max-frame-size = <9000>;
39
40	mdio0 {
41		#address-cells = <1>;
42		#size-cells = <0>;
43		compatible = "snps,dwmac-mdio";
44		phy0: ethernet-phy@0 {
45			reg = <4>;
46
47			txd0-skew-ps = <0>; /* -420ps */
48			txd1-skew-ps = <0>; /* -420ps */
49			txd2-skew-ps = <0>; /* -420ps */
50			txd3-skew-ps = <0>; /* -420ps */
51			rxd0-skew-ps = <420>; /* 0ps */
52			rxd1-skew-ps = <420>; /* 0ps */
53			rxd2-skew-ps = <420>; /* 0ps */
54			rxd3-skew-ps = <420>; /* 0ps */
55			txen-skew-ps = <0>; /* -420ps */
56			txc-skew-ps = <900>; /* 0ps */
57			rxdv-skew-ps = <420>; /* 0ps */
58			rxc-skew-ps = <1680>; /* 780ps */
59		};
60	};
61};
62
63&mmc {
64	status = "okay";
65	cap-sd-highspeed;
66	broken-cd;
67	bus-width = <4>;
68};
69
70&osc1 {
71	clock-frequency = <25000000>;
72};
73
74&qspi {
75	status = "okay";
76	flash@0 {
77		#address-cells = <1>;
78		#size-cells = <1>;
79		compatible = "micron,mt25qu02g", "jedec,spi-nor";
80		reg = <0>;
81		spi-max-frequency = <100000000>;
82
83		m25p,fast-read;
84		cdns,page-size = <256>;
85		cdns,block-size = <16>;
86		cdns,read-delay = <2>;
87		cdns,tshsl-ns = <50>;
88		cdns,tsd2d-ns = <50>;
89		cdns,tchsh-ns = <4>;
90		cdns,tslch-ns = <4>;
91
92		partitions {
93			compatible = "fixed-partitions";
94			#address-cells = <1>;
95			#size-cells = <1>;
96
97			qspi_boot: partition@0 {
98				label = "Boot and fpga data";
99				reg = <0x0 0x03FE0000>;
100			};
101
102			qspi_rootfs: partition@3FE0000 {
103				label = "Root Filesystem - JFFS2";
104				reg = <0x03FE0000 0x0C020000>;
105			};
106		};
107	};
108};
109
110&uart0 {
111	status = "okay";
112};
113
114&usb0 {
115	status = "okay";
116	disable-over-current;
117};
118
119&watchdog0 {
120	status = "okay";
121};
122