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