xref: /linux/arch/loongarch/boot/dts/loongson-2k1000-ref.dts (revision e78f70bad29c5ae1e1076698b690b15794e9b81e)
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&gmac0 {
52	status = "okay";
53
54	phy-mode = "rgmii-id";
55	phy-handle = <&phy0>;
56	mdio {
57		compatible = "snps,dwmac-mdio";
58		#address-cells = <1>;
59		#size-cells = <0>;
60		phy0: ethernet-phy@0 {
61			reg = <0>;
62		};
63	};
64};
65
66&gmac1 {
67	status = "okay";
68
69	phy-mode = "rgmii-id";
70	phy-handle = <&phy1>;
71	mdio {
72		compatible = "snps,dwmac-mdio";
73		#address-cells = <1>;
74		#size-cells = <0>;
75		phy1: ethernet-phy@1 {
76			reg = <16>;
77		};
78	};
79};
80
81&i2c2 {
82	status = "okay";
83
84	pinctrl-0 = <&i2c0_pins_default>;
85	pinctrl-names = "default";
86
87	#address-cells = <1>;
88	#size-cells = <0>;
89	eeprom@57 {
90		compatible = "atmel,24c16";
91		reg = <0x57>;
92		pagesize = <16>;
93	};
94};
95
96&spi0 {
97	status = "okay";
98
99	#address-cells = <1>;
100	#size-cells = <0>;
101};
102
103&pwm1 {
104	status = "okay";
105
106	pinctrl-0 = <&pwm1_pins_default>;
107	pinctrl-names = "default";
108};
109
110&cpu_thermal {
111	cooling-maps {
112		map0 {
113			trip = <&cpu_alert>;
114			cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
115		};
116	};
117};
118
119&ehci0 {
120	status = "okay";
121};
122
123&ohci0 {
124	status = "okay";
125};
126
127&sata {
128	status = "okay";
129};
130
131&uart0 {
132	status = "okay";
133};
134
135&rtc0 {
136	status = "okay";
137};
138
139&pctrl {
140	status = "okay";
141
142	sdio_pins_default: sdio-pins {
143		sdio-pinmux {
144			groups = "sdio";
145			function = "sdio";
146		};
147		sdio-det-pinmux {
148			groups = "pwm2";
149			function = "gpio";
150		};
151	};
152
153	pwm1_pins_default: pwm1-pins {
154		pinmux {
155			groups = "pwm1";
156			function = "pwm1";
157		};
158	};
159
160	pwm0_pins_default: pwm0-pins {
161		pinmux {
162			groups = "pwm0";
163			function = "pwm0";
164		};
165	};
166
167	i2c1_pins_default: i2c1-pins {
168		pinmux {
169			groups = "i2c1";
170			function = "i2c1";
171		};
172	};
173
174	i2c0_pins_default: i2c0-pins {
175		pinmux {
176			groups = "i2c0";
177			function = "i2c0";
178		};
179	};
180
181	nand_pins_default: nand-pins {
182		pinmux {
183			groups = "nand";
184			function = "nand";
185		};
186	};
187
188	hda_pins_default: hda-pins {
189		grp0-pinmux {
190			groups = "hda";
191			function = "hda";
192		};
193		grp1-pinmux {
194			groups = "i2s";
195			function = "gpio";
196		};
197	};
198};
199