1// SPDX-License-Identifier: GPL-2.0
2// Copyright (c) 2021 Inspur Corporation
3/dts-v1/;
4
5#include "aspeed-g5.dtsi"
6#include <dt-bindings/gpio/aspeed-gpio.h>
7#include <dt-bindings/i2c/i2c.h>
8#include <dt-bindings/leds/leds-pca955x.h>
9
10/ {
11	model = "NF5280M6 BMC";
12	compatible = "inspur,nf5280m6-bmc", "aspeed,ast2500";
13
14	chosen {
15		stdout-path = &uart5;
16		bootargs = "console=ttyS4,115200 earlycon";
17	};
18
19	memory@80000000 {
20		reg = <0x80000000 0x40000000>;
21	};
22
23	reserved-memory {
24		#address-cells = <1>;
25		#size-cells = <1>;
26		ranges;
27
28		vga_memory: framebuffer@9f000000 {
29			no-map;
30			reg = <0x9f000000 0x01000000>; /* 16M */
31		};
32
33		video_engine_memory: jpegbuffer {
34			size = <0x02000000>;	/* 32M */
35			alignment = <0x01000000>;
36			compatible = "shared-dma-pool";
37			reusable;
38		};
39	};
40
41	leds {
42	    compatible = "gpio-leds";
43
44		bmc_alive {
45			label = "bmc_alive";
46			gpios = <&gpio ASPEED_GPIO(B, 0) GPIO_ACTIVE_LOW>;
47			linux,default-trigger = "timer";
48			led-pattern = <1000 1000>;
49		};
50
51		front-fan {
52			label = "front-fan";
53			gpios = <&gpio ASPEED_GPIO(F,2) GPIO_ACTIVE_LOW>;
54		};
55
56	    front-psu {
57			label = "front-psu";
58			gpios = <&gpio ASPEED_GPIO(F,3) GPIO_ACTIVE_LOW>;
59		};
60
61	    front-syshot {
62			label = "front-syshot";
63			gpios = <&gpio ASPEED_GPIO(J, 3) GPIO_ACTIVE_LOW>;
64		};
65
66		front-memory {
67			label = "front-memory";
68			gpios = <&gpio ASPEED_GPIO(S, 7) GPIO_ACTIVE_LOW>;
69		};
70
71		identify {
72			label = "identify";
73			gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_LOW>;
74		};
75	};
76
77	iio-hwmon {
78		compatible = "iio-hwmon";
79		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
80			<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>,
81			<&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>,
82			<&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>;
83	};
84};
85
86&fmc {
87	status = "okay";
88	flash@0 {
89		status = "okay";
90		m25p,fast-read;
91		label = "bmc";
92		spi-max-frequency = <50000000>;
93#include "openbmc-flash-layout.dtsi"
94	};
95};
96
97&spi1 {
98	status = "okay";
99	pinctrl-names = "default";
100	pinctrl-0 = <&pinctrl_spi1_default>;
101	flash@0 {
102		status = "okay";
103		m25p,fast-read;
104		label = "bios";
105		spi-max-frequency = <100000000>;
106	};
107};
108
109&uart1 {
110	status = "okay";
111};
112
113&uart5 {
114	status = "okay";
115};
116
117&mac0 {
118	status = "okay";
119
120	pinctrl-names = "default";
121	pinctrl-0 = <&pinctrl_rmii1_default>;
122	clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>,
123		<&syscon ASPEED_CLK_MAC1RCLK>;
124	clock-names = "MACCLK", "RCLK";
125	use-ncsi;
126};
127
128&mac1 {
129	status = "okay";
130
131	pinctrl-names = "default";
132	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
133};
134
135&gpio {
136	status = "okay";
137	/* Enable GPIOE0 and GPIOE2 pass-through by default */
138	pinctrl-names = "pass-through";
139	pinctrl-0 = <&pinctrl_gpie0_default
140			&pinctrl_gpie2_default>;
141	gpio-line-names =
142	/*A0-A7*/	"","MAC2LINK","BMC_RESET_CPLD","","BMC_SCL9","","MAC2MDC_R","",
143	/*B0-B7*/	"BMC_INIT_OK","FM_SKU_ID2","FM_SPD_DDRCPU_LVLSHFT_DIS_R_N",
144				"FM_CPU_MSMI_CATERR_LVT3_BMC_N","","FM_CPU0_PROCHOT_LVT3_N",
145				"FM_CPU_MEM_THERMTRIP_LVT3_N","BIOS_LOAD_DEFAULT_R_N",
146	/*C0-C7*/	"","","","","","","","",
147	/*D0-D7*/	"","BMC_SD2CMD","BMC_SD2DAT0","BMC_SD2DAT1","BMC_SD2DAT2",
148				"BMC_SD2DAT3","BMC_SD2DET","BMC_SD2WPT",
149	/*E0-E7*/	"FM_BOARD_ID0","FM_BOARD_ID1","FM_BOARD_ID2","FM_BOARD_ID3",
150				"FM_BOARD_ID4","FM_BOARD_ID5","","",
151	/*F0-F7*/	"PSU1_PRESENT_N","PSU2_PRESENT_N","FAN_FAULT_LED_N","PSU_FAULT_LED_N",
152				"BIOS_DEBUG_MODE_N","FP_LCD_RESET","FAN_TYPE_SEL",
153				"RST_GLB_RST_WARN_N",
154	/*G0-G7*/	"IRQ_LPTM21L_ALERT_N","IRQ_PLD_ALERT_N","AC_FAIL_N","FP_LCD_PRESENT_BMC",
155				"BMC_JTAG_TCK_MUX_SEL","BMC_BIOS_RESERVED","SYS_NMI_N","BMC_NMI_N",
156	/*H0-H7*/	"JTAG_BMC_TDI","JTAG_BMC_TDO","JTAG_BMC_TCK","JTAG_BMC_TMS","FM_BOARD_ID6",
157				"FM_SKU_ID0","IRQ_SML1_PMBUS_ALERT_N","IRQ_SML0_ALERT_MUX_N",
158	/*I0-I7*/	"FM_CPU_ERR0_LVT3_BMC_N","FM_CPU_ERR1_LVT3_BMC_N","FM_BMC_PCH_SCI_LPC_N",
159				"FM_SYS_THROTTLE_LVC3","SPI2_PCH_CS0_N","","","",
160	/*J0-J7*/	"FM_CPU0_SKTOCC_LVT3_N","FM_CPU1_SKTOCC_LVT3_N","","SYSHOT_FAULT_LED_N",
161				"VGA_HSYNC","VGA_VSYNC","","",
162	/*K0-K7*/	"","","","","","","","",
163	/*L0-L7*/	"","","","","","","SYS_UART_TXD1","SYS_UART_RXD1",
164	/*M0-M7*/	"","","","","","","","",
165	/*N0-N7*/	"","","","","","","","",
166	/*O0-O7*/	"","","","","","","","",
167	/*P0-P7*/	"","","","","","","","",
168	/*Q0-Q7*/	"","","","","","","FM_PCH_BMC_THERMTRIP_N","INTRUDER_N",
169	/*R0-R7*/	"SPI_BMC_BOOT_CS1_R_N","FM_CPU_MEMHOT_LVC3_N",
170				"DBP_CPU_PREQ_N","FM_CPU_ERR2_LVT3_BMC_N",
171				"RISER_NCSI_EN_N","","LOM_NCSI_EN_N","OCP_NCSI_EN_N",
172	/*S0-S7*/	"BMC_XDP_PRDY_N","SIO_POWER_GOOD","BMC_PWR_DEBUG_R_N","BMC_DEBUG_EN_R_N","",
173				"GPIOS5_BMC","","GPIOS7_BMC",
174	/*T0-T7*/	"","","","","","","","",
175	/*U0-U7*/	"","","","","","","","",
176	/*V0-V7*/	"","","","","","","","",
177	/*W0-W7*/	"","","","","","","","",
178	/*X0-X7*/	"","","","","","","","",
179	/*Y0-Y7*/	"","BMC_DET_UID_N","BMC_JTAG_SEL","SIO_ONCONTROL","","","","",
180	/*Z0-Z7*/	"XDP_PRESENT_N","DBP_SYSPWROK","BMC_JTAG_SEL","FM_SMI_ACTIVE_N","",
181				"GPIOZ5","","",
182	/*AA0-AA7*/	"FP_BMC_SYSLED_N","PS_PWROK","RST_PLTRST_BMC_N","HDA_SDO_BMC",
183				"FM_SLPS4_R_N","","POWER_BUTTON","POWER_OUT",
184	/*AB0-AB7*/	"RESET_OUT","RESET_BUTTON","BIOS_REFLASH","POST_COMPLETE","","","","",
185	/*AC0-AC7*/	"","","","","","","","";
186};
187
188&i2c0 {
189	/* FP_LCD */
190	status = "okay";
191};
192
193&i2c1 {
194	status = "okay";
195
196	eeprom@50 {
197		compatible = "atmel,24c256";
198		reg = <0x50>;
199		label = "fru";
200	};
201};
202
203&i2c2 {
204	status = "okay";
205
206	tmp112@48 {
207		compatible = "ti,tmp112";
208		reg = <0x48>;
209		label = "inlet";
210	};
211
212	tmp112@49 {
213		compatible = "ti,tmp112";
214		reg = <0x49>;
215		label = "outlet";
216	};
217
218	i2c-mux@70 {
219		compatible = "nxp,pca9548";
220		reg = <0x70>;
221	};
222};
223
224&i2c3 {
225	status = "okay";
226
227	i2c-mux@70 {
228		compatible = "nxp,pca9548";
229		reg = <0x70>;
230	};
231
232	i2c-mux@71 {
233		compatible = "nxp,pca9548";
234		reg = <0x71>;
235	};
236
237	i2c-mux@72 {
238		compatible = "nxp,pca9548";
239		reg = <0x72>;
240	};
241};
242
243&i2c4 {
244	/* IPMB */
245	status = "okay";
246};
247
248&i2c5 {
249	status = "okay";
250
251	i2c-mux@70 {
252		compatible = "nxp,pca9548";
253		reg = <0x70>;
254	};
255};
256
257&i2c6 {
258	status = "okay";
259
260	i2c-mux@70 {
261		compatible = "nxp,pca9548";
262		reg = <0x70>;
263	};
264};
265
266&i2c7 {
267	status = "okay";
268
269	adm1278@33 {
270		compatible = "adi,adm1293";
271		reg = <0x33>;
272	};
273
274	adm1278@32 {
275		compatible = "adi,adm1293";
276		reg = <0x32>;
277	};
278
279	adm1278@20 {
280		compatible = "adi,adm1293";
281		reg = <0x20>;
282	};
283};
284
285&i2c8 {
286	status = "okay";
287
288	pca0: pca9555@23 {
289		compatible = "nxp,pca9555";
290		reg = <0x23>;
291		#address-cells = <1>;
292		#size-cells = <0>;
293
294		gpio-controller;
295		#gpio-cells = <2>;
296
297		gpio@0 {
298			reg = <0>;
299			type = <PCA955X_TYPE_GPIO>;
300		};
301
302		gpio@1 {
303			reg = <1>;
304			type = <PCA955X_TYPE_GPIO>;
305		};
306
307		gpio@2 {
308			reg = <2>;
309			type = <PCA955X_TYPE_GPIO>;
310		};
311
312		gpio@3 {
313			reg = <3>;
314			type = <PCA955X_TYPE_GPIO>;
315		};
316
317		gpio@4 {
318			reg = <4>;
319			type = <PCA955X_TYPE_GPIO>;
320		};
321
322		gpio@5 {
323			reg = <5>;
324			type = <PCA955X_TYPE_GPIO>;
325		};
326
327		gpio@6 {
328			reg = <6>;
329			type = <PCA955X_TYPE_GPIO>;
330		};
331	};
332
333	pca1: pca9555@22 {
334		compatible = "nxp,pca9555";
335		reg = <0x22>;
336		#address-cells = <1>;
337		#size-cells = <0>;
338
339		gpio-controller;
340		#gpio-cells = <2>;
341
342		gpio@0 {
343			reg = <0>;
344			type = <PCA955X_TYPE_GPIO>;
345		};
346
347		gpio@1 {
348			reg = <1>;
349			type = <PCA955X_TYPE_GPIO>;
350		};
351
352		gpio@2 {
353			reg = <2>;
354			type = <PCA955X_TYPE_GPIO>;
355		};
356
357		gpio@3 {
358			reg = <3>;
359			type = <PCA955X_TYPE_GPIO>;
360		};
361
362		gpio@4 {
363			reg = <4>;
364			type = <PCA955X_TYPE_GPIO>;
365		};
366
367		gpio@5 {
368			reg = <5>;
369			type = <PCA955X_TYPE_GPIO>;
370		};
371
372		gpio@6 {
373			reg = <6>;
374			type = <PCA955X_TYPE_GPIO>;
375		};
376
377		gpio@7 {
378			reg = <7>;
379			type = <PCA955X_TYPE_GPIO>;
380		};
381	};
382
383	pca2: pca9555@20 {
384		compatible = "nxp,pca9555";
385		reg = <0x20>;
386		#address-cells = <1>;
387		#size-cells = <0>;
388
389		gpio-controller;
390		#gpio-cells = <2>;
391
392		gpio@0 {
393			reg = <0>;
394			type = <PCA955X_TYPE_GPIO>;
395		};
396
397		gpio@1 {
398			reg = <1>;
399			type = <PCA955X_TYPE_GPIO>;
400		};
401
402		gpio@2 {
403			reg = <2>;
404			type = <PCA955X_TYPE_GPIO>;
405		};
406
407		gpio@3 {
408			reg = <3>;
409			type = <PCA955X_TYPE_GPIO>;
410		};
411
412		gpio@4 {
413			reg = <4>;
414			type = <PCA955X_TYPE_GPIO>;
415		};
416
417		gpio@5 {
418			reg = <5>;
419			type = <PCA955X_TYPE_GPIO>;
420		};
421
422		gpio@6 {
423			reg = <6>;
424			type = <PCA955X_TYPE_GPIO>;
425		};
426
427		gpio@7 {
428			reg = <7>;
429			type = <PCA955X_TYPE_GPIO>;
430		};
431	};
432
433	pca3: pca9555@21 {
434		compatible = "nxp,pca9555";
435		reg = <0x21>;
436		#address-cells = <1>;
437		#size-cells = <0>;
438
439		gpio-controller;
440		#gpio-cells = <2>;
441
442		gpio@0 {
443			reg = <0>;
444			type = <PCA955X_TYPE_GPIO>;
445		};
446
447		gpio@1 {
448			reg = <1>;
449			type = <PCA955X_TYPE_GPIO>;
450		};
451
452		gpio@2 {
453			reg = <2>;
454			type = <PCA955X_TYPE_GPIO>;
455		};
456
457		gpio@3 {
458			reg = <3>;
459			type = <PCA955X_TYPE_GPIO>;
460		};
461
462		gpio@4 {
463			reg = <4>;
464			type = <PCA955X_TYPE_GPIO>;
465		};
466
467		gpio@5 {
468			reg = <5>;
469			type = <PCA955X_TYPE_GPIO>;
470		};
471
472		gpio@6 {
473			reg = <6>;
474			type = <PCA955X_TYPE_GPIO>;
475		};
476
477		gpio@7 {
478			reg = <7>;
479			type = <PCA955X_TYPE_GPIO>;
480		};
481	};
482};
483
484&i2c9 {
485	/* cpld */
486	status = "okay";
487};
488
489&i2c10 {
490	status = "okay";
491
492	pca4: pca9555@24 {
493		compatible = "nxp,pca9555";
494		reg = <0x24>;
495		#address-cells = <1>;
496		#size-cells = <0>;
497
498		gpio-controller;
499		#gpio-cells = <2>;
500
501		gpio@0 {
502			reg = <0>;
503			type = <PCA955X_TYPE_GPIO>;
504		};
505
506		gpio@1 {
507			reg = <1>;
508			type = <PCA955X_TYPE_GPIO>;
509		};
510
511		gpio@2 {
512			reg = <2>;
513			type = <PCA955X_TYPE_GPIO>;
514		};
515
516		gpio@3 {
517			reg = <3>;
518			type = <PCA955X_TYPE_GPIO>;
519		};
520
521		gpio@4 {
522			reg = <4>;
523			type = <PCA955X_TYPE_GPIO>;
524		};
525
526		gpio@5 {
527			reg = <5>;
528			type = <PCA955X_TYPE_GPIO>;
529		};
530
531		gpio@6 {
532			reg = <6>;
533			type = <PCA955X_TYPE_GPIO>;
534		};
535
536		gpio@7 {
537			reg = <7>;
538			type = <PCA955X_TYPE_GPIO>;
539		};
540	};
541
542	pca5: pca9555@25 {
543		compatible = "nxp,pca9555";
544		reg = <0x25>;
545		#address-cells = <1>;
546		#size-cells = <0>;
547
548		gpio-controller;
549		#gpio-cells = <2>;
550
551		gpio@0 {
552			reg = <0>;
553			type = <PCA955X_TYPE_GPIO>;
554		};
555
556		gpio@1 {
557			reg = <1>;
558			type = <PCA955X_TYPE_GPIO>;
559		};
560
561		gpio@2 {
562			reg = <2>;
563			type = <PCA955X_TYPE_GPIO>;
564		};
565
566		gpio@3 {
567			reg = <3>;
568			type = <PCA955X_TYPE_GPIO>;
569		};
570
571		gpio@4 {
572			reg = <4>;
573			type = <PCA955X_TYPE_GPIO>;
574		};
575
576		gpio@5 {
577			reg = <5>;
578			type = <PCA955X_TYPE_GPIO>;
579		};
580
581		gpio@6 {
582			reg = <6>;
583			type = <PCA955X_TYPE_GPIO>;
584		};
585	};
586};
587
588&i2c11 {
589	status = "okay";
590
591	power-supply@58 {
592		compatible = "inspur,ipsps1";
593		reg = <0x58>;
594	};
595
596	power-supply@59 {
597		compatible = "inspur,ipsps1";
598		reg = <0x59>;
599	};
600};
601
602&i2c12 {
603	status = "okay";
604};
605
606&i2c13 {
607	status = "okay";
608};
609
610&pwm_tacho {
611	status = "okay";
612	pinctrl-names = "default";
613	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
614		&pinctrl_pwm2_default &pinctrl_pwm3_default
615		&pinctrl_pwm4_default &pinctrl_pwm5_default
616		&pinctrl_pwm6_default &pinctrl_pwm7_default>;
617
618	fan@0 {
619		reg = <0x00>;
620		aspeed,fan-tach-ch = /bits/ 8 <0x00 0x01>;
621	};
622
623	fan@1 {
624		reg = <0x01>;
625		aspeed,fan-tach-ch = /bits/ 8 <0x02 0x03>;
626	};
627
628	fan@2 {
629		reg = <0x02>;
630		aspeed,fan-tach-ch = /bits/ 8 <0x04 0x05>;
631	};
632
633	fan@3 {
634		reg = <0x03>;
635		aspeed,fan-tach-ch = /bits/ 8 <0x06 0x07>;
636	};
637
638	fan@4 {
639		reg = <0x04>;
640		aspeed,fan-tach-ch = /bits/ 8 <0x08 0x09>;
641	};
642
643	fan@5 {
644		reg = <0x05>;
645		aspeed,fan-tach-ch = /bits/ 8 <0x0a 0x0b>;
646	};
647
648	fan@6 {
649		reg = <0x06>;
650		aspeed,fan-tach-ch = /bits/ 8 <0x0c 0x0d>;
651	};
652
653	fan@7 {
654		reg = <0x07>;
655		aspeed,fan-tach-ch = /bits/ 8 <0x0e 0x0f>;
656	};
657};
658
659&kcs3 {
660	status = "okay";
661	aspeed,lpc-io-reg = <0xca2>;
662};
663
664&kcs4 {
665	status = "okay";
666	aspeed,lpc-io-reg = <0xca4>;
667};
668
669&adc {
670	status = "okay";
671	pinctrl-names = "default";
672	pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
673	 &pinctrl_adc2_default &pinctrl_adc3_default &pinctrl_adc4_default
674	 &pinctrl_adc5_default &pinctrl_adc6_default &pinctrl_adc7_default
675	 &pinctrl_adc8_default &pinctrl_adc9_default &pinctrl_adc10_default
676	 &pinctrl_adc11_default &pinctrl_adc12_default &pinctrl_adc13_default
677	 &pinctrl_adc14_default &pinctrl_adc15_default>;
678};
679
680&vhub {
681	status = "okay";
682};
683
684&video {
685	status = "okay";
686	memory-region = <&video_engine_memory>;
687};
688
689&vuart {
690	status = "okay";
691};
692