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