1// SPDX-License-Identifier: GPL-2.0+
2/dts-v1/;
3#include "aspeed-g5.dtsi"
4#include <dt-bindings/gpio/aspeed-gpio.h>
5#include <dt-bindings/leds/leds-pca955x.h>
6
7/ {
8	model = "Witherspoon BMC";
9	compatible = "ibm,witherspoon-bmc", "aspeed,ast2500";
10
11	chosen {
12		stdout-path = &uart5;
13		bootargs = "console=ttyS4,115200 earlycon";
14	};
15
16	memory@80000000 {
17		reg = <0x80000000 0x20000000>;
18	};
19
20	reserved-memory {
21		#address-cells = <1>;
22		#size-cells = <1>;
23		ranges;
24
25		flash_memory: region@98000000 {
26			no-map;
27			reg = <0x98000000 0x04000000>; /* 64M */
28		};
29
30		vga_memory: region@9f000000 {
31			no-map;
32			compatible = "shared-dma-pool";
33			reg = <0x9f000000 0x01000000>; /* 16M */
34		};
35
36		gfx_memory: framebuffer {
37			size = <0x01000000>;
38			alignment = <0x01000000>;
39			compatible = "shared-dma-pool";
40			reusable;
41		};
42
43		video_engine_memory: jpegbuffer {
44			size = <0x02000000>;	/* 32MM */
45			alignment = <0x01000000>;
46			compatible = "shared-dma-pool";
47			reusable;
48		};
49	};
50
51	gpio-keys {
52		compatible = "gpio-keys";
53
54		event-air-water {
55			label = "air-water";
56			gpios = <&gpio ASPEED_GPIO(B, 5) GPIO_ACTIVE_LOW>;
57			linux,code = <ASPEED_GPIO(B, 5)>;
58		};
59
60		event-checkstop {
61			label = "checkstop";
62			gpios = <&gpio ASPEED_GPIO(J, 2) GPIO_ACTIVE_LOW>;
63			linux,code = <ASPEED_GPIO(J, 2)>;
64		};
65
66		event-ps0-presence {
67			label = "ps0-presence";
68			gpios = <&gpio ASPEED_GPIO(P, 7) GPIO_ACTIVE_LOW>;
69			linux,code = <ASPEED_GPIO(P, 7)>;
70		};
71
72		event-ps1-presence {
73			label = "ps1-presence";
74			gpios = <&gpio ASPEED_GPIO(N, 0) GPIO_ACTIVE_LOW>;
75			linux,code = <ASPEED_GPIO(N, 0)>;
76		};
77	};
78
79	iio-hwmon-battery {
80		compatible = "iio-hwmon";
81		io-channels = <&adc 12>;
82	};
83
84	gpio-keys-polled {
85		compatible = "gpio-keys-polled";
86		poll-interval = <1000>;
87
88		event-fan0-presence {
89			label = "fan0-presence";
90			gpios = <&pca0 4 GPIO_ACTIVE_LOW>;
91			linux,code = <4>;
92		};
93
94		event-fan1-presence {
95			label = "fan1-presence";
96			gpios = <&pca0 5 GPIO_ACTIVE_LOW>;
97			linux,code = <5>;
98		};
99
100		event-fan2-presence {
101			label = "fan2-presence";
102			gpios = <&pca0 6 GPIO_ACTIVE_LOW>;
103			linux,code = <6>;
104		};
105
106		event-fan3-presence {
107			label = "fan3-presence";
108			gpios = <&pca0 7 GPIO_ACTIVE_LOW>;
109			linux,code = <7>;
110		};
111	};
112
113	leds {
114		compatible = "gpio-leds";
115
116		fan0 {
117			retain-state-shutdown;
118			default-state = "keep";
119			gpios = <&pca0 0 GPIO_ACTIVE_LOW>;
120		};
121
122		fan1 {
123			retain-state-shutdown;
124			default-state = "keep";
125			gpios = <&pca0 1 GPIO_ACTIVE_LOW>;
126		};
127
128		fan2 {
129			retain-state-shutdown;
130			default-state = "keep";
131			gpios = <&pca0 2 GPIO_ACTIVE_LOW>;
132		};
133
134		fan3 {
135			retain-state-shutdown;
136			default-state = "keep";
137			gpios = <&pca0 3 GPIO_ACTIVE_LOW>;
138		};
139
140		front-fault {
141			retain-state-shutdown;
142			default-state = "keep";
143			gpios = <&pca0 13 GPIO_ACTIVE_LOW>;
144		};
145
146		front-power {
147			retain-state-shutdown;
148			default-state = "keep";
149			gpios = <&pca0 14 GPIO_ACTIVE_LOW>;
150		};
151
152		front-id {
153			retain-state-shutdown;
154			default-state = "keep";
155			gpios = <&pca0 15 GPIO_ACTIVE_LOW>;
156		};
157
158		rear-fault {
159			gpios = <&gpio ASPEED_GPIO(N, 2) GPIO_ACTIVE_LOW>;
160		};
161
162		rear-id {
163			gpios = <&gpio ASPEED_GPIO(N, 4) GPIO_ACTIVE_LOW>;
164		};
165
166		rear-power {
167			gpios = <&gpio ASPEED_GPIO(N, 3) GPIO_ACTIVE_LOW>;
168		};
169
170		power-button {
171			gpios = <&gpio ASPEED_GPIO(R, 5) GPIO_ACTIVE_LOW>;
172		};
173	};
174
175	fsi: gpio-fsi {
176		compatible = "fsi-master-gpio", "fsi-master";
177		#address-cells = <2>;
178		#size-cells = <0>;
179		no-gpio-delays;
180
181		clock-gpios = <&gpio ASPEED_GPIO(AA, 0) GPIO_ACTIVE_HIGH>;
182		data-gpios = <&gpio ASPEED_GPIO(E, 0) GPIO_ACTIVE_HIGH>;
183		mux-gpios = <&gpio ASPEED_GPIO(A, 6) GPIO_ACTIVE_HIGH>;
184		enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
185		trans-gpios = <&gpio ASPEED_GPIO(R, 2) GPIO_ACTIVE_HIGH>;
186	};
187
188	iio-hwmon-dps310 {
189		compatible = "iio-hwmon";
190		io-channels = <&dps 0>;
191	};
192
193	iio-hwmon-bmp280 {
194		compatible = "iio-hwmon";
195		io-channels = <&bmp 1>;
196	};
197
198};
199
200&gpio {
201	gpio-line-names =
202	/*A0-A7*/	"","cfam-reset","","","","","fsi-mux","",
203	/*B0-B7*/	"","","","","","air-water","","",
204	/*C0-C7*/	"","","","","","","","",
205	/*D0-D7*/	"fsi-enable","","","","","","","",
206	/*E0-E7*/	"fsi-data","","","","","","","",
207	/*F0-F7*/	"","","","","","","","",
208	/*G0-G7*/	"","","","","","","","",
209	/*H0-H7*/	"","","","","","","","",
210	/*I0-I7*/	"","","","","","","","",
211	/*J0-J7*/	"","","checkstop","","","","","",
212	/*K0-K7*/	"","","","","","","","",
213	/*L0-L7*/	"","","","","","","","",
214	/*M0-M7*/	"","","","","","","","",
215	/*N0-N7*/	"presence-ps1","","led-rear-fault","led-rear-power",
216		        "led-rear-id","","","",
217	/*O0-O7*/	"","","","","","","","",
218	/*P0-P7*/	"","","","","","","","presence-ps0",
219	/*Q0-Q7*/	"","","","","","","","",
220	/*R0-R7*/	"","","fsi-trans","","","power-button","","",
221	/*S0-S7*/	"","","","","","","","",
222	/*T0-T7*/	"","","","","","","","",
223	/*U0-U7*/	"","","","","","","","",
224	/*V0-V7*/	"","","","","","","","",
225	/*W0-W7*/	"","","","","","","","",
226	/*X0-X7*/	"","","","","","","","",
227	/*Y0-Y7*/	"","","","","","","","",
228	/*Z0-Z7*/	"","","","","","","","",
229	/*AA0-AA7*/	"fsi-clock","","","","","","","",
230	/*AB0-AB7*/	"","","","","","","","",
231	/*AC0-AC7*/	"","","","","","","","";
232};
233
234&fmc {
235	status = "okay";
236
237	flash@0 {
238		status = "okay";
239		label = "bmc";
240		m25p,fast-read;
241		spi-max-frequency = <50000000>;
242
243		partitions {
244			#address-cells = < 1 >;
245			#size-cells = < 1 >;
246			compatible = "fixed-partitions";
247			u-boot@0 {
248				reg = < 0 0x60000 >;
249				label = "u-boot";
250			};
251			u-boot-env@60000 {
252				reg = < 0x60000 0x20000 >;
253				label = "u-boot-env";
254			};
255			obmc-ubi@80000 {
256				reg = < 0x80000 0x1F80000 >;
257				label = "obmc-ubi";
258			};
259		};
260	};
261
262	flash@1 {
263		status = "okay";
264		label = "alt-bmc";
265		m25p,fast-read;
266		spi-max-frequency = <50000000>;
267
268		partitions {
269			#address-cells = < 1 >;
270			#size-cells = < 1 >;
271			compatible = "fixed-partitions";
272			u-boot@0 {
273				reg = < 0 0x60000 >;
274				label = "alt-u-boot";
275			};
276			u-boot-env@60000 {
277				reg = < 0x60000 0x20000 >;
278				label = "alt-u-boot-env";
279			};
280			obmc-ubi@80000 {
281				reg = < 0x80000 0x1F80000 >;
282				label = "alt-obmc-ubi";
283			};
284		};
285	};
286};
287
288&spi1 {
289	status = "okay";
290	pinctrl-names = "default";
291	pinctrl-0 = <&pinctrl_spi1_default>;
292
293	flash@0 {
294		status = "okay";
295		label = "pnor";
296		m25p,fast-read;
297		spi-max-frequency = <100000000>;
298	};
299};
300
301&uart1 {
302	/* Rear RS-232 connector */
303	status = "okay";
304	pinctrl-names = "default";
305	pinctrl-0 = <&pinctrl_txd1_default
306			&pinctrl_rxd1_default
307			&pinctrl_nrts1_default
308			&pinctrl_ndtr1_default
309			&pinctrl_ndsr1_default
310			&pinctrl_ncts1_default
311			&pinctrl_ndcd1_default
312			&pinctrl_nri1_default>;
313};
314
315&uart2 {
316	/* APSS */
317	status = "okay";
318	pinctrl-names = "default";
319	pinctrl-0 = <&pinctrl_txd2_default &pinctrl_rxd2_default>;
320};
321
322&uart5 {
323	status = "okay";
324};
325
326&lpc_ctrl {
327	status = "okay";
328	memory-region = <&flash_memory>;
329	flash = <&spi1>;
330};
331
332&mac0 {
333	status = "okay";
334	pinctrl-names = "default";
335	pinctrl-0 = <&pinctrl_rmii1_default>;
336	clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>,
337		 <&syscon ASPEED_CLK_MAC1RCLK>;
338	clock-names = "MACCLK", "RCLK";
339	use-ncsi;
340};
341
342&i2c2 {
343	status = "okay";
344
345	/* MUX ->
346	 *    Samtec 1
347	 *    Samtec 2
348	 */
349};
350
351&i2c3 {
352	status = "okay";
353
354	bmp: bmp280@77 {
355		compatible = "bosch,bmp280";
356		reg = <0x77>;
357		#io-channel-cells = <1>;
358	};
359
360	max31785@52 {
361		compatible = "maxim,max31785a";
362		reg = <0x52>;
363		#address-cells = <1>;
364		#size-cells = <0>;
365
366		fan@0 {
367			compatible = "pmbus-fan";
368			reg = <0>;
369			tach-pulses = <2>;
370			maxim,fan-rotor-input = "tach";
371			maxim,fan-pwm-freq = <25000>;
372			maxim,fan-dual-tach;
373			maxim,fan-no-watchdog;
374			maxim,fan-no-fault-ramp;
375			maxim,fan-ramp = <2>;
376			maxim,fan-fault-pin-mon;
377		};
378
379		fan@1 {
380			compatible = "pmbus-fan";
381			reg = <1>;
382			tach-pulses = <2>;
383			maxim,fan-rotor-input = "tach";
384			maxim,fan-pwm-freq = <25000>;
385			maxim,fan-dual-tach;
386			maxim,fan-no-watchdog;
387			maxim,fan-no-fault-ramp;
388			maxim,fan-ramp = <2>;
389			maxim,fan-fault-pin-mon;
390		};
391
392		fan@2 {
393			compatible = "pmbus-fan";
394			reg = <2>;
395			tach-pulses = <2>;
396			maxim,fan-rotor-input = "tach";
397			maxim,fan-pwm-freq = <25000>;
398			maxim,fan-dual-tach;
399			maxim,fan-no-watchdog;
400			maxim,fan-no-fault-ramp;
401			maxim,fan-ramp = <2>;
402			maxim,fan-fault-pin-mon;
403		};
404
405		fan@3 {
406			compatible = "pmbus-fan";
407			reg = <3>;
408			tach-pulses = <2>;
409			maxim,fan-rotor-input = "tach";
410			maxim,fan-pwm-freq = <25000>;
411			maxim,fan-dual-tach;
412			maxim,fan-no-watchdog;
413			maxim,fan-no-fault-ramp;
414			maxim,fan-ramp = <2>;
415			maxim,fan-fault-pin-mon;
416		};
417	};
418
419	dps: dps310@76 {
420		compatible = "infineon,dps310";
421		reg = <0x76>;
422		#io-channel-cells = <0>;
423	};
424
425	pca0: pca9552@60 {
426		compatible = "nxp,pca9552";
427		reg = <0x60>;
428		#address-cells = <1>;
429		#size-cells = <0>;
430
431		gpio-controller;
432		#gpio-cells = <2>;
433
434		gpio@0 {
435			reg = <0>;
436			type = <PCA955X_TYPE_GPIO>;
437		};
438
439		gpio@1 {
440			reg = <1>;
441			type = <PCA955X_TYPE_GPIO>;
442		};
443
444		gpio@2 {
445			reg = <2>;
446			type = <PCA955X_TYPE_GPIO>;
447		};
448
449		gpio@3 {
450			reg = <3>;
451			type = <PCA955X_TYPE_GPIO>;
452		};
453
454		gpio@4 {
455			reg = <4>;
456			type = <PCA955X_TYPE_GPIO>;
457		};
458
459		gpio@5 {
460			reg = <5>;
461			type = <PCA955X_TYPE_GPIO>;
462		};
463
464		gpio@6 {
465			reg = <6>;
466			type = <PCA955X_TYPE_GPIO>;
467		};
468
469		gpio@7 {
470			reg = <7>;
471			type = <PCA955X_TYPE_GPIO>;
472		};
473
474		gpio@8 {
475			reg = <8>;
476			type = <PCA955X_TYPE_GPIO>;
477		};
478
479		gpio@9 {
480			reg = <9>;
481			type = <PCA955X_TYPE_GPIO>;
482		};
483
484		gpio@10 {
485			reg = <10>;
486			type = <PCA955X_TYPE_GPIO>;
487		};
488
489		gpio@11 {
490			reg = <11>;
491			type = <PCA955X_TYPE_GPIO>;
492		};
493
494		gpio@12 {
495			reg = <12>;
496			type = <PCA955X_TYPE_GPIO>;
497		};
498
499		gpio@13 {
500			reg = <13>;
501			type = <PCA955X_TYPE_GPIO>;
502		};
503
504		gpio@14 {
505			reg = <14>;
506			type = <PCA955X_TYPE_GPIO>;
507		};
508
509		gpio@15 {
510			reg = <15>;
511			type = <PCA955X_TYPE_GPIO>;
512		};
513	};
514
515	power-supply@68 {
516		compatible = "ibm,cffps1";
517		reg = <0x68>;
518	};
519
520	power-supply@69 {
521		compatible = "ibm,cffps1";
522		reg = <0x69>;
523	};
524};
525
526&i2c4 {
527	status = "okay";
528
529	tmp423a@4c {
530		compatible = "ti,tmp423";
531		reg = <0x4c>;
532	};
533
534	ir35221@70 {
535		compatible = "infineon,ir35221";
536		reg = <0x70>;
537	};
538
539	ir35221@71 {
540		compatible = "infineon,ir35221";
541		reg = <0x71>;
542	};
543};
544
545
546&i2c5 {
547	status = "okay";
548
549	tmp423a@4c {
550		compatible = "ti,tmp423";
551		reg = <0x4c>;
552	};
553
554	ir35221@70 {
555		compatible = "infineon,ir35221";
556		reg = <0x70>;
557	};
558
559	ir35221@71 {
560		compatible = "infineon,ir35221";
561		reg = <0x71>;
562	};
563};
564
565&i2c9 {
566	status = "okay";
567
568	tmp275@4a {
569		compatible = "ti,tmp275";
570		reg = <0x4a>;
571	};
572};
573
574&i2c10 {
575	/* MUX
576	 *   -> PCIe Slot 3
577	 *   -> PCIe Slot 4
578	 */
579	status = "okay";
580};
581
582&i2c11 {
583	status = "okay";
584
585	pca9552: pca9552@60 {
586		compatible = "nxp,pca9552";
587		reg = <0x60>;
588		#address-cells = <1>;
589		#size-cells = <0>;
590		gpio-controller;
591		#gpio-cells = <2>;
592
593		gpio-line-names = "PS_SMBUS_RESET_N", "APSS_RESET_N",
594			"GPU0_TH_OVERT_N_BUFF",	"GPU1_TH_OVERT_N_BUFF",
595			"GPU2_TH_OVERT_N_BUFF", "GPU3_TH_OVERT_N_BUFF",
596			"GPU4_TH_OVERT_N_BUFF",	"GPU5_TH_OVERT_N_BUFF",
597			"GPU0_PWR_GOOD_BUFF", "GPU1_PWR_GOOD_BUFF",
598			"GPU2_PWR_GOOD_BUFF", "GPU3_PWR_GOOD_BUFF",
599			"GPU4_PWR_GOOD_BUFF", "GPU5_PWR_GOOD_BUFF",
600			"12V_BREAKER_FLT_N", "THROTTLE_UNLATCHED_N";
601
602		gpio@0 {
603			reg = <0>;
604			type = <PCA955X_TYPE_GPIO>;
605		};
606
607		gpio@1 {
608			reg = <1>;
609			type = <PCA955X_TYPE_GPIO>;
610		};
611
612		gpio@2 {
613			reg = <2>;
614			type = <PCA955X_TYPE_GPIO>;
615		};
616
617		gpio@3 {
618			reg = <3>;
619			type = <PCA955X_TYPE_GPIO>;
620		};
621
622		gpio@4 {
623			reg = <4>;
624			type = <PCA955X_TYPE_GPIO>;
625		};
626
627		gpio@5 {
628			reg = <5>;
629			type = <PCA955X_TYPE_GPIO>;
630		};
631
632		gpio@6 {
633			reg = <6>;
634			type = <PCA955X_TYPE_GPIO>;
635		};
636
637		gpio@7 {
638			reg = <7>;
639			type = <PCA955X_TYPE_GPIO>;
640		};
641
642		gpio@8 {
643			reg = <8>;
644			type = <PCA955X_TYPE_GPIO>;
645		};
646
647		gpio@9 {
648			reg = <9>;
649			type = <PCA955X_TYPE_GPIO>;
650		};
651
652		gpio@10 {
653			reg = <10>;
654			type = <PCA955X_TYPE_GPIO>;
655		};
656
657		gpio@11 {
658			reg = <11>;
659			type = <PCA955X_TYPE_GPIO>;
660		};
661
662		gpio@12 {
663			reg = <12>;
664			type = <PCA955X_TYPE_GPIO>;
665		};
666
667		gpio@13 {
668			reg = <13>;
669			type = <PCA955X_TYPE_GPIO>;
670		};
671
672		gpio@14 {
673			reg = <14>;
674			type = <PCA955X_TYPE_GPIO>;
675		};
676
677		gpio@15 {
678			reg = <15>;
679			type = <PCA955X_TYPE_GPIO>;
680		};
681	};
682
683	rtc@32 {
684		compatible = "epson,rx8900";
685		reg = <0x32>;
686	};
687
688	eeprom@51 {
689		compatible = "atmel,24c64";
690		reg = <0x51>;
691	};
692
693	ucd90160@64 {
694		compatible = "ti,ucd90160";
695		reg = <0x64>;
696	};
697};
698
699&i2c12 {
700	status = "okay";
701};
702
703&i2c13 {
704	status = "okay";
705};
706
707&vuart {
708	status = "okay";
709};
710
711&gfx {
712	status = "okay";
713	memory-region = <&gfx_memory>;
714};
715
716&wdt1 {
717	aspeed,reset-type = "none";
718	aspeed,external-signal;
719	aspeed,ext-push-pull;
720	aspeed,ext-active-high;
721
722	pinctrl-names = "default";
723	pinctrl-0 = <&pinctrl_wdtrst1_default>;
724};
725
726&wdt2 {
727	aspeed,alt-boot;
728};
729
730&ibt {
731	status = "okay";
732};
733
734&adc {
735	status = "okay";
736};
737
738&vhub {
739	status = "okay";
740};
741
742&video {
743	status = "okay";
744	memory-region = <&video_engine_memory>;
745};
746
747&xdma {
748	status = "okay";
749	memory-region = <&vga_memory>;
750};
751
752#include "ibm-power9-dual.dtsi"
753