xref: /linux/arch/arm/boot/dts/aspeed/aspeed-bmc-ufispace-ncplite.dts (revision 8e07e0e3964ca4e23ce7b68e2096fe660a888942)
1// SPDX-License-Identifier: GPL-2.0-or-later
2// Copyright (c) 2022 Ufispace Co., Ltd.
3/dts-v1/;
4
5#include "aspeed-g6.dtsi"
6#include <dt-bindings/i2c/i2c.h>
7#include <dt-bindings/gpio/aspeed-gpio.h>
8
9/ {
10	model = "Ufispace NCPLite BMC";
11	compatible = "ufispace,ncplite-bmc", "aspeed,ast2600";
12
13	aliases {
14		serial4 = &uart5;
15	};
16
17	chosen {
18		stdout-path = &uart5;
19		bootargs = "console=ttyS4,115200n8 earlycon";
20	};
21
22	memory@80000000 {
23		device_type = "memory";
24		reg = <0x80000000 0x80000000>;
25	};
26
27	iio-hwmon {
28		compatible = "iio-hwmon";
29		io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>,
30			      <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,
31			      <&adc1 0>, <&adc1 1>, <&adc1 2>, <&adc1 3>,
32			      <&adc1 4>, <&adc1 5>, <&adc1 6>, <&adc1 7>;
33	};
34
35	gpio-keys {
36		compatible = "gpio-keys";
37
38		fan-status-int-l {
39			label = "fan-status-int-l";
40			gpios = <&gpio0 ASPEED_GPIO(M, 2) GPIO_ACTIVE_LOW>;
41			linux,code = <ASPEED_GPIO(M, 2)>;
42		};
43
44		allpwr-good {
45			label = "allpwr-good";
46			gpios = <&gpio0 ASPEED_GPIO(V, 4) GPIO_ACTIVE_HIGH>;
47			linux,code = <ASPEED_GPIO(V, 4)>;
48		};
49
50		psu0-alert-n {
51			label = "psu0-alert-n";
52			gpios = <&gpio0 ASPEED_GPIO(V, 1) GPIO_ACTIVE_LOW>;
53			linux,code = <ASPEED_GPIO(V, 1)>;
54		};
55
56		psu1-alert-n {
57			label = "psu1-alert-n";
58			gpios = <&gpio0 ASPEED_GPIO(V, 2) GPIO_ACTIVE_LOW>;
59			linux,code = <ASPEED_GPIO(V, 2)>;
60		};
61
62		int-thermal-alert {
63			label = "int-thermal-alert";
64			gpios = <&gpio0 ASPEED_GPIO(P, 2) GPIO_ACTIVE_LOW>;
65			linux,code = <ASPEED_GPIO(P, 2)>;
66		};
67
68		cpu-caterr-l {
69			label = "cpu-caterr-l";
70			gpios = <&gpio0 ASPEED_GPIO(N, 3) GPIO_ACTIVE_LOW>;
71			linux,code = <ASPEED_GPIO(N, 3)>;
72		};
73
74		cpu-thermtrip-l {
75			label = "cpu-thermtrip-l";
76			gpios = <&gpio0 ASPEED_GPIO(V, 5) GPIO_ACTIVE_LOW>;
77			linux,code = <ASPEED_GPIO(V, 5)>;
78		};
79
80		psu0-presence-l {
81			label = "psu0-presence-l";
82			gpios = <&gpio0 ASPEED_GPIO(F, 6) GPIO_ACTIVE_LOW>;
83			linux,code = <ASPEED_GPIO(F, 6)>;
84		};
85
86		psu1-presence-l {
87			label = "psu1-presence-l";
88			gpios = <&gpio0 ASPEED_GPIO(F, 7) GPIO_ACTIVE_LOW>;
89			linux,code = <ASPEED_GPIO(F, 7)>;
90		};
91
92		psu0-power-ok {
93			label = "psu0-power-ok";
94			gpios = <&gpio0 ASPEED_GPIO(M, 4) GPIO_ACTIVE_HIGH>;
95			linux,code = <ASPEED_GPIO(M, 4)>;
96		};
97
98		psu1-power-ok {
99			label = "psu1-power-ok";
100			gpios = <&gpio0 ASPEED_GPIO(M, 5) GPIO_ACTIVE_HIGH>;
101			linux,code = <ASPEED_GPIO(M, 5)>;
102		};
103	};
104
105	gpio-keys-polled {
106		compatible = "gpio-keys-polled";
107		#address-cells = <1>;
108		#size-cells = <0>;
109		poll-interval = <1000>;
110
111		fan0-presence {
112			label = "fan0-presence";
113			gpios = <&fan_ioexp 2 GPIO_ACTIVE_LOW>;
114			linux,code = <2>;
115		};
116
117		fan1-presence {
118			label = "fan1-presence";
119			gpios = <&fan_ioexp 6 GPIO_ACTIVE_LOW>;
120			linux,code = <6>;
121		};
122
123		fan2-presence {
124			label = "fan2-presence";
125			gpios = <&fan_ioexp 10 GPIO_ACTIVE_LOW>;
126			linux,code = <10>;
127		};
128
129		fan3-presence {
130			label = "fan3-presence";
131			gpios = <&fan_ioexp 14 GPIO_ACTIVE_LOW>;
132			linux,code = <14>;
133		};
134	};
135};
136
137&mac2 {
138	status = "okay";
139	use-ncsi;
140
141	pinctrl-names = "default";
142	pinctrl-0 = <&pinctrl_rmii3_default>;
143	clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>,
144		 <&syscon ASPEED_CLK_MAC3RCLK>;
145	clock-names = "MACCLK", "RCLK";
146};
147
148&fmc {
149	status = "okay";
150	flash@0 {
151		status = "okay";
152		m25p,fast-read;
153		label = "bmc";
154		spi-max-frequency = <50000000>;
155#include "openbmc-flash-layout-64.dtsi"
156	};
157
158	flash@1 {
159		status = "okay";
160		m25p,fast-read;
161		label = "alt-bmc";
162		spi-max-frequency = <50000000>;
163#include "openbmc-flash-layout-64-alt.dtsi"
164	};
165};
166
167&uart1 {
168	status = "okay";
169};
170
171&uart4 {
172	status = "okay";
173};
174
175&uart5 {
176	status = "okay";
177};
178
179&kcs3 {
180	status = "okay";
181	aspeed,lpc-io-reg = <0xca2>;
182};
183
184&lpc_reset {
185	status = "okay";
186};
187
188&lpc_ctrl {
189	status = "okay";
190};
191
192&uart_routing {
193	status = "okay";
194};
195
196&wdt1 {
197	status = "okay";
198};
199
200&wdt2 {
201	status = "okay";
202};
203
204&peci0 {
205	status = "okay";
206};
207
208&udc {
209	status = "okay";
210};
211
212&adc0 {
213	vref = <2500>;
214	status = "okay";
215
216	pinctrl-names = "default";
217	pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
218		&pinctrl_adc2_default &pinctrl_adc3_default
219		&pinctrl_adc4_default &pinctrl_adc5_default
220		&pinctrl_adc6_default &pinctrl_adc7_default>;
221};
222
223&adc1 {
224	vref = <2500>;
225	status = "okay";
226
227	pinctrl-names = "default";
228	pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default
229		&pinctrl_adc10_default &pinctrl_adc11_default
230		&pinctrl_adc12_default &pinctrl_adc13_default
231		&pinctrl_adc14_default &pinctrl_adc15_default>;
232};
233
234&i2c0 {
235	status = "okay";
236};
237
238&i2c1 {
239	status = "okay";
240
241	lm75@48 {
242		compatible = "national,lm75";
243		reg = <0x48>;
244	};
245
246	lm75@49 {
247		compatible = "national,lm75";
248		reg = <0x49>;
249	};
250
251	lm86@4c {
252		compatible = "national,lm86";
253		reg = <0x4c>;
254	};
255};
256
257&i2c2 {
258	status = "okay";
259
260	lm75@4f {
261		cpmpatible = "national,lm75";
262		reg = <0x4f>;
263	};
264
265	fan_ioexp: pca9535@20 {
266		compatible = "nxp,pca9535";
267		reg = <0x20>;
268		#address-cells = <1>;
269		#size-cells = <0>;
270		gpio-controller;
271		#gpio-cells = <2>;
272
273		gpio-line-names =
274		"","","presence-fan0","",
275		"","","presence-fan1","",
276		"","","presence-fan2","",
277		"","","presence-fan3","";
278	};
279};
280
281&i2c3 {
282	status = "okay";
283
284	eeprom@50 {
285		compatible = "atmel,24c128";
286		reg = <0x50>;
287		pagesize = <64>;
288	};
289};
290
291&i2c4 {
292	status = "okay";
293
294	psu@58 {
295		compatible = "pmbus";
296		reg = <0x58>;
297	};
298
299	eeprom@50 {
300		compatible = "atmel,24c02";
301		reg = <0x50>;
302		pagesize = <1>;
303	};
304};
305
306&i2c5 {
307	status = "okay";
308
309	psu@58 {
310		compatible = "pmbus";
311		reg = <0x58>;
312	};
313
314	eeprom@50 {
315		compatible = "atmel,24c02";
316		reg = <0x50>;
317		pagesize = <1>;
318	};
319};
320
321&i2c8 {
322	status = "okay";
323};
324
325&i2c10 {
326	status = "okay";
327
328	lm75@4d {
329		compatible = "national,lm75";
330		reg = <0x4d>;
331	};
332};
333
334&gpio0 {
335	status = "okay";
336
337	gpio-line-names =
338	/*A0-A7*/	"","","","","","","","",
339	/*B0-B7*/	"","","","","","","","",
340	/*C0-C7*/	"","","","","","","","",
341	/*D0-D7*/	"","","","","","","","",
342	/*E0-E7*/	"","","","","","","","",
343	/*F0-F7*/	"CPU_PWRGD","","","power-button","host0-ready","","presence-ps0","presence-ps1",
344	/*G0-G7*/	"","","","","","","","",
345	/*H0-H7*/	"","","","","","","","",
346	/*I0-I7*/	"","","","","","reset-button","","",
347	/*J0-J7*/	"","","","","","","","",
348	/*K0-K7*/	"","","","","","","","",
349	/*L0-L7*/	"","","","","","","","",
350	/*M0-M7*/	"","","","","","","","",
351	/*N0-N7*/	"power-chassis-control0","power-chassis-control1","","","","","","",
352	/*O0-O7*/	"","","","","","","","",
353	/*P0-P7*/	"","","","","","","","",
354	/*Q0-Q7*/	"","","","","","","","",
355	/*R0-R7*/	"","","","","","","","",
356	/*S0-S7*/	"","","","","","","","",
357	/*T0-T7*/	"","","","","","","","",
358	/*U0-U7*/	"","","","","","","","",
359	/*V0-V7*/	"","","","","power-chassis-good","","","";
360};
361