1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2023 Loongson Technology Corporation Limited
4 */
5
6/dts-v1/;
7
8#include "loongson-2k1000.dtsi"
9
10/ {
11	compatible = "loongson,ls2k1000-ref", "loongson,ls2k1000";
12	model = "Loongson-2K1000 Reference Board";
13
14	aliases {
15		serial0 = &uart0;
16	};
17
18	chosen {
19		stdout-path = "serial0:115200n8";
20	};
21
22	memory@200000 {
23		device_type = "memory";
24		reg = <0x0 0x00200000 0x0 0x06e00000>,
25		      <0x0 0x08000000 0x0 0x07000000>,
26		      <0x0 0x90000000 0x1 0xe0000000>;
27	};
28
29	reserved-memory {
30		#address-cells = <2>;
31		#size-cells = <2>;
32		ranges;
33
34		linux,cma {
35			compatible = "shared-dma-pool";
36			reusable;
37			size = <0x0 0x2000000>;
38			linux,cma-default;
39		};
40	};
41};
42
43&gmac0 {
44	status = "okay";
45
46	phy-mode = "rgmii-id";
47	phy-handle = <&phy0>;
48	mdio {
49		compatible = "snps,dwmac-mdio";
50		#address-cells = <1>;
51		#size-cells = <0>;
52		phy0: ethernet-phy@0 {
53			reg = <0>;
54		};
55	};
56};
57
58&gmac1 {
59	status = "okay";
60
61	phy-mode = "rgmii-id";
62	phy-handle = <&phy1>;
63	mdio {
64		compatible = "snps,dwmac-mdio";
65		#address-cells = <1>;
66		#size-cells = <0>;
67		phy1: ethernet-phy@1 {
68			reg = <16>;
69		};
70	};
71};
72
73&i2c2 {
74	status = "okay";
75
76	pinctrl-0 = <&i2c0_pins_default>;
77	pinctrl-names = "default";
78
79	#address-cells = <1>;
80	#size-cells = <0>;
81	eeprom@57 {
82		compatible = "atmel,24c16";
83		reg = <0x57>;
84		pagesize = <16>;
85	};
86};
87
88&spi0 {
89	status = "okay";
90
91	#address-cells = <1>;
92	#size-cells = <0>;
93};
94
95&ehci0 {
96	status = "okay";
97};
98
99&ohci0 {
100	status = "okay";
101};
102
103&sata {
104	status = "okay";
105};
106
107&uart0 {
108	status = "okay";
109};
110
111&rtc0 {
112	status = "okay";
113};
114
115&pctrl {
116	status = "okay";
117
118	sdio_pins_default: sdio-pins {
119		sdio-pinmux {
120			groups = "sdio";
121			function = "sdio";
122		};
123		sdio-det-pinmux {
124			groups = "pwm2";
125			function = "gpio";
126		};
127	};
128
129	pwm1_pins_default: pwm1-pins {
130		pinmux {
131			groups = "pwm1";
132			function = "pwm1";
133		};
134	};
135
136	pwm0_pins_default: pwm0-pins {
137		pinmux {
138			groups = "pwm0";
139			function = "pwm0";
140		};
141	};
142
143	i2c1_pins_default: i2c1-pins {
144		pinmux {
145			groups = "i2c1";
146			function = "i2c1";
147		};
148	};
149
150	i2c0_pins_default: i2c0-pins {
151		pinmux {
152			groups = "i2c0";
153			function = "i2c0";
154		};
155	};
156
157	nand_pins_default: nand-pins {
158		pinmux {
159			groups = "nand";
160			function = "nand";
161		};
162	};
163
164	hda_pins_default: hda-pins {
165		grp0-pinmux {
166			groups = "hda";
167			function = "hda";
168		};
169		grp1-pinmux {
170			groups = "i2s";
171			function = "gpio";
172		};
173	};
174};
175