1// SPDX-License-Identifier: GPL-2.0-or-later
2// Copyright 2019 IBM Corp.
3/dts-v1/;
4
5#include "aspeed-g6.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 = "Tacoma";
12	compatible = "ibm,tacoma-bmc", "aspeed,ast2600";
13
14	chosen {
15		stdout-path = &uart5;
16		bootargs = "console=ttyS4,115200n8";
17	};
18
19	memory@80000000 {
20		device_type = "memory";
21		reg = <0x80000000 0x40000000>;
22	};
23
24	reserved-memory {
25		#address-cells = <1>;
26		#size-cells = <1>;
27		ranges;
28
29		flash_memory: region@b8000000 {
30			no-map;
31			reg = <0xb8000000 0x4000000>; /* 64M */
32		};
33
34		ramoops@bc000000 {
35			compatible = "ramoops";
36			reg = <0xbc000000 0x180000>; /* 16 * (3 * 0x8000) */
37			record-size = <0x8000>;
38			console-size = <0x8000>;
39			pmsg-size = <0x8000>;
40			max-reason = <3>; /* KMSG_DUMP_EMERG */
41		};
42
43		vga_memory: region@bf000000 {
44			no-map;
45			compatible = "shared-dma-pool";
46			reg = <0xbf000000 0x01000000>;	/* 16M */
47		};
48	};
49
50	gpio-keys {
51		compatible = "gpio-keys";
52
53		ps0-presence {
54			label = "ps0-presence";
55			gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>;
56			linux,code = <ASPEED_GPIO(H, 3)>;
57		};
58
59		ps1-presence {
60			label = "ps1-presence";
61			gpios = <&gpio0 ASPEED_GPIO(E, 5) GPIO_ACTIVE_LOW>;
62			linux,code = <ASPEED_GPIO(E, 5)>;
63		};
64	};
65
66	gpio-keys-polled {
67		compatible = "gpio-keys-polled";
68		#address-cells = <1>;
69		#size-cells = <0>;
70		poll-interval = <1000>;
71
72		fan0-presence {
73			label = "fan0-presence";
74			gpios = <&pca0 4 GPIO_ACTIVE_LOW>;
75			linux,code = <4>;
76		};
77
78		fan1-presence {
79			label = "fan1-presence";
80			gpios = <&pca0 5 GPIO_ACTIVE_LOW>;
81			linux,code = <5>;
82		};
83
84		fan2-presence {
85			label = "fan2-presence";
86			gpios = <&pca0 6 GPIO_ACTIVE_LOW>;
87			linux,code = <6>;
88		};
89
90		fan3-presence {
91			label = "fan3-presence";
92			gpios = <&pca0 7 GPIO_ACTIVE_LOW>;
93			linux,code = <7>;
94		};
95	};
96
97	iio-hwmon-dps310 {
98		compatible = "iio-hwmon";
99		io-channels = <&dps 0>;
100	};
101
102	iio-hwmon-bmp280 {
103		compatible = "iio-hwmon";
104		io-channels = <&bmp 1>;
105	};
106};
107
108&ehci1 {
109	status = "okay";
110};
111
112&gpio0 {
113	gpio-line-names =
114	/*A0-A7*/	"","","","","","","","",
115	/*B0-B7*/	"fsi-mux","","","","","","","",
116	/*C0-C7*/	"","","","","","","","",
117	/*D0-D7*/	"","","","","","","","",
118	/*E0-E7*/	"power-button","","","checkstop","","presence-ps1","","led-rear-fault",
119	/*F0-F7*/	"","","","","","","","",
120	/*G0-G7*/	"","","","","","","","",
121	/*H0-H7*/	"","","","presence-ps0","","","","",
122	/*I0-I7*/	"","","","","","","","",
123	/*J0-J7*/	"","","","","","","","",
124	/*K0-K7*/	"","","","","","","","",
125	/*L0-L7*/	"","","","","","","","",
126	/*M0-M7*/	"","","","","","","","",
127	/*N0-N7*/	"","","","","","","","",
128	/*O0-O7*/	"led-rear-power","led-rear-id","","usb-power","","","","",
129	/*P0-P7*/	"","","","","","","","",
130	/*Q0-Q7*/	"cfam-reset","","","","","","","fsi-routing",
131	/*R0-R7*/	"","","","","","","","",
132	/*S0-S7*/	"","","","","","","","",
133	/*T0-T7*/	"","","","","","","","",
134	/*U0-U7*/	"","","","","","","","",
135	/*V0-V7*/	"","","","","","","","",
136	/*W0-W7*/	"","","","","","","","",
137	/*X0-X7*/	"","","","","","","","",
138	/*Y0-Y7*/	"","","","","","","","",
139	/*Z0-Z7*/	"","","","","","","","",
140	/*AA0-AA7*/	"","","","","","","","",
141	/*AB0-AB7*/	"","","","","","","","",
142	/*AC0-AC7*/	"","","","","","","","";
143};
144
145&fmc {
146	status = "okay";
147	flash@0 {
148		status = "okay";
149		m25p,fast-read;
150		label = "bmc";
151		spi-max-frequency = <50000000>;
152#include "openbmc-flash-layout-128.dtsi"
153	};
154
155	flash@1 {
156		status = "okay";
157		m25p,fast-read;
158		label = "alt-bmc";
159		spi-max-frequency = <50000000>;
160	};
161};
162
163&spi1 {
164	status = "okay";
165	pinctrl-names = "default";
166	pinctrl-0 = <&pinctrl_spi1_default>;
167
168	flash@0 {
169		status = "okay";
170		m25p,fast-read;
171		label = "pnor";
172		spi-max-frequency = <100000000>;
173	};
174};
175
176&mac2 {
177	status = "okay";
178	pinctrl-names = "default";
179	pinctrl-0 = <&pinctrl_rmii3_default>;
180	clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>,
181		 <&syscon ASPEED_CLK_MAC3RCLK>;
182	clock-names = "MACCLK", "RCLK";
183	use-ncsi;
184};
185
186&emmc_controller {
187	status = "okay";
188};
189
190&emmc {
191	status = "okay";
192};
193
194&fsim0 {
195	status = "okay";
196
197	#address-cells = <2>;
198	#size-cells = <0>;
199
200	fsi-routing-gpios = <&gpio0 ASPEED_GPIO(Q, 7) GPIO_ACTIVE_HIGH>;
201	fsi-mux-gpios = <&gpio0 ASPEED_GPIO(B, 0) GPIO_ACTIVE_HIGH>;
202	cfam-reset-gpios = <&gpio0 ASPEED_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
203
204	cfam@0,0 {
205		reg = <0 0>;
206		#address-cells = <1>;
207		#size-cells = <1>;
208		chip-id = <0>;
209
210		scom@1000 {
211			compatible = "ibm,fsi2pib";
212			reg = <0x1000 0x400>;
213		};
214
215		i2c@1800 {
216			compatible = "ibm,fsi-i2c-master";
217			reg = <0x1800 0x400>;
218			#address-cells = <1>;
219			#size-cells = <0>;
220
221			cfam0_i2c0: i2c-bus@0 {
222				reg = <0>;
223			};
224
225			cfam0_i2c1: i2c-bus@1 {
226				reg = <1>;
227			};
228
229			cfam0_i2c2: i2c-bus@2 {
230				reg = <2>;
231			};
232
233			cfam0_i2c3: i2c-bus@3 {
234				reg = <3>;
235			};
236
237			cfam0_i2c4: i2c-bus@4 {
238				reg = <4>;
239			};
240
241			cfam0_i2c5: i2c-bus@5 {
242				reg = <5>;
243			};
244
245			cfam0_i2c6: i2c-bus@6 {
246				reg = <6>;
247			};
248
249			cfam0_i2c7: i2c-bus@7 {
250				reg = <7>;
251			};
252
253			cfam0_i2c8: i2c-bus@8 {
254				reg = <8>;
255			};
256
257			cfam0_i2c9: i2c-bus@9 {
258				reg = <9>;
259			};
260
261			cfam0_i2c10: i2c-bus@a {
262				reg = <10>;
263			};
264
265			cfam0_i2c11: i2c-bus@b {
266				reg = <11>;
267			};
268
269			cfam0_i2c12: i2c-bus@c {
270				reg = <12>;
271			};
272
273			cfam0_i2c13: i2c-bus@d {
274				reg = <13>;
275			};
276
277			cfam0_i2c14: i2c-bus@e {
278				reg = <14>;
279			};
280		};
281
282		sbefifo@2400 {
283			compatible = "ibm,p9-sbefifo";
284			reg = <0x2400 0x400>;
285			#address-cells = <1>;
286			#size-cells = <0>;
287
288			fsi_occ0: occ {
289				compatible = "ibm,p9-occ";
290			};
291		};
292
293		fsi_hub0: hub@3400 {
294			compatible = "fsi-master-hub";
295			reg = <0x3400 0x400>;
296			#address-cells = <2>;
297			#size-cells = <0>;
298
299			no-scan-on-init;
300		};
301	};
302};
303
304&fsi_hub0 {
305	cfam@1,0 {
306		reg = <1 0>;
307		#address-cells = <1>;
308		#size-cells = <1>;
309		chip-id = <1>;
310
311		scom@1000 {
312			compatible = "ibm,fsi2pib";
313			reg = <0x1000 0x400>;
314		};
315
316		i2c@1800 {
317			compatible = "ibm,fsi-i2c-master";
318			reg = <0x1800 0x400>;
319			#address-cells = <1>;
320			#size-cells = <0>;
321
322			cfam1_i2c0: i2c-bus@0 {
323				reg = <0>;
324			};
325
326			cfam1_i2c1: i2c-bus@1 {
327				reg = <1>;
328			};
329
330			cfam1_i2c2: i2c-bus@2 {
331				reg = <2>;
332			};
333
334			cfam1_i2c3: i2c-bus@3 {
335				reg = <3>;
336			};
337
338			cfam1_i2c4: i2c-bus@4 {
339				reg = <4>;
340			};
341
342			cfam1_i2c5: i2c-bus@5 {
343				reg = <5>;
344			};
345
346			cfam1_i2c6: i2c-bus@6 {
347				reg = <6>;
348			};
349
350			cfam1_i2c7: i2c-bus@7 {
351				reg = <7>;
352			};
353
354			cfam1_i2c8: i2c-bus@8 {
355				reg = <8>;
356			};
357
358			cfam1_i2c9: i2c-bus@9 {
359				reg = <9>;
360			};
361
362			cfam1_i2c10: i2c-bus@a {
363				reg = <10>;
364			};
365
366			cfam1_i2c11: i2c-bus@b {
367				reg = <11>;
368			};
369
370			cfam1_i2c12: i2c-bus@c {
371				reg = <12>;
372			};
373
374			cfam1_i2c13: i2c-bus@d {
375				reg = <13>;
376			};
377
378			cfam1_i2c14: i2c-bus@e {
379				reg = <14>;
380			};
381		};
382
383		sbefifo@2400 {
384			compatible = "ibm,p9-sbefifo";
385			reg = <0x2400 0x400>;
386			#address-cells = <1>;
387			#size-cells = <0>;
388
389			fsi_occ1: occ {
390				compatible = "ibm,p9-occ";
391			};
392		};
393
394		fsi_hub1: hub@3400 {
395			compatible = "fsi-master-hub";
396			reg = <0x3400 0x400>;
397			#address-cells = <2>;
398			#size-cells = <0>;
399
400			no-scan-on-init;
401		};
402	};
403};
404
405/* Legacy OCC numbering (to get rid of when userspace is fixed) */
406&fsi_occ0 {
407	reg = <1>;
408};
409
410&fsi_occ1 {
411	reg = <2>;
412};
413
414/ {
415	aliases {
416		i2c100 = &cfam0_i2c0;
417		i2c101 = &cfam0_i2c1;
418		i2c102 = &cfam0_i2c2;
419		i2c103 = &cfam0_i2c3;
420		i2c104 = &cfam0_i2c4;
421		i2c105 = &cfam0_i2c5;
422		i2c106 = &cfam0_i2c6;
423		i2c107 = &cfam0_i2c7;
424		i2c108 = &cfam0_i2c8;
425		i2c109 = &cfam0_i2c9;
426		i2c110 = &cfam0_i2c10;
427		i2c111 = &cfam0_i2c11;
428		i2c112 = &cfam0_i2c12;
429		i2c113 = &cfam0_i2c13;
430		i2c114 = &cfam0_i2c14;
431		i2c200 = &cfam1_i2c0;
432		i2c201 = &cfam1_i2c1;
433		i2c202 = &cfam1_i2c2;
434		i2c203 = &cfam1_i2c3;
435		i2c204 = &cfam1_i2c4;
436		i2c205 = &cfam1_i2c5;
437		i2c206 = &cfam1_i2c6;
438		i2c207 = &cfam1_i2c7;
439		i2c208 = &cfam1_i2c8;
440		i2c209 = &cfam1_i2c9;
441		i2c210 = &cfam1_i2c10;
442		i2c211 = &cfam1_i2c11;
443		i2c212 = &cfam1_i2c12;
444		i2c213 = &cfam1_i2c13;
445		i2c214 = &cfam1_i2c14;
446	};
447
448};
449
450&i2c0 {
451	multi-master;
452	status = "okay";
453
454	ibm-panel@62 {
455		compatible = "ibm,op-panel";
456		reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
457	};
458};
459
460&i2c1 {
461	status = "okay";
462
463	tpm: tpm@2e {
464		compatible = "tcg,tpm-tis-i2c";
465		reg = <0x2e>;
466	};
467};
468
469&i2c2 {
470	status = "okay";
471};
472
473&i2c3 {
474	status = "okay";
475
476	bmp: bmp280@77 {
477		compatible = "bosch,bmp280";
478		reg = <0x77>;
479		#io-channel-cells = <1>;
480	};
481
482	max31785@52 {
483		compatible = "maxim,max31785a";
484		reg = <0x52>;
485		#address-cells = <1>;
486		#size-cells = <0>;
487
488		fan@0 {
489			compatible = "pmbus-fan";
490			reg = <0>;
491			tach-pulses = <2>;
492			maxim,fan-rotor-input = "tach";
493			maxim,fan-pwm-freq = <25000>;
494			maxim,fan-dual-tach;
495			maxim,fan-no-watchdog;
496			maxim,fan-no-fault-ramp;
497			maxim,fan-ramp = <2>;
498			maxim,fan-fault-pin-mon;
499		};
500
501		fan@1 {
502			compatible = "pmbus-fan";
503			reg = <1>;
504			tach-pulses = <2>;
505			maxim,fan-rotor-input = "tach";
506			maxim,fan-pwm-freq = <25000>;
507			maxim,fan-dual-tach;
508			maxim,fan-no-watchdog;
509			maxim,fan-no-fault-ramp;
510			maxim,fan-ramp = <2>;
511			maxim,fan-fault-pin-mon;
512		};
513
514		fan@2 {
515			compatible = "pmbus-fan";
516			reg = <2>;
517			tach-pulses = <2>;
518			maxim,fan-rotor-input = "tach";
519			maxim,fan-pwm-freq = <25000>;
520			maxim,fan-dual-tach;
521			maxim,fan-no-watchdog;
522			maxim,fan-no-fault-ramp;
523			maxim,fan-ramp = <2>;
524			maxim,fan-fault-pin-mon;
525		};
526
527		fan@3 {
528			compatible = "pmbus-fan";
529			reg = <3>;
530			tach-pulses = <2>;
531			maxim,fan-rotor-input = "tach";
532			maxim,fan-pwm-freq = <25000>;
533			maxim,fan-dual-tach;
534			maxim,fan-no-watchdog;
535			maxim,fan-no-fault-ramp;
536			maxim,fan-ramp = <2>;
537			maxim,fan-fault-pin-mon;
538		};
539	};
540
541	dps: dps310@76 {
542		compatible = "infineon,dps310";
543		reg = <0x76>;
544		#io-channel-cells = <0>;
545	};
546
547	pca0: pca9552@60 {
548		compatible = "nxp,pca9552";
549		reg = <0x60>;
550		#address-cells = <1>;
551		#size-cells = <0>;
552
553		gpio-controller;
554		#gpio-cells = <2>;
555
556		gpio@0 {
557			reg = <0>;
558			type = <PCA955X_TYPE_GPIO>;
559		};
560
561		gpio@1 {
562			reg = <1>;
563			type = <PCA955X_TYPE_GPIO>;
564		};
565
566		gpio@2 {
567			reg = <2>;
568			type = <PCA955X_TYPE_GPIO>;
569		};
570
571		gpio@3 {
572			reg = <3>;
573			type = <PCA955X_TYPE_GPIO>;
574		};
575
576		gpio@4 {
577			reg = <4>;
578			type = <PCA955X_TYPE_GPIO>;
579		};
580
581		gpio@5 {
582			reg = <5>;
583			type = <PCA955X_TYPE_GPIO>;
584		};
585
586		gpio@6 {
587			reg = <6>;
588			type = <PCA955X_TYPE_GPIO>;
589		};
590
591		gpio@7 {
592			reg = <7>;
593			type = <PCA955X_TYPE_GPIO>;
594		};
595
596		gpio@8 {
597			reg = <8>;
598			type = <PCA955X_TYPE_GPIO>;
599		};
600
601		gpio@9 {
602			reg = <9>;
603			type = <PCA955X_TYPE_GPIO>;
604		};
605
606		gpio@10 {
607			reg = <10>;
608			type = <PCA955X_TYPE_GPIO>;
609		};
610
611		gpio@11 {
612			reg = <11>;
613			type = <PCA955X_TYPE_GPIO>;
614		};
615
616		gpio@12 {
617			reg = <12>;
618			type = <PCA955X_TYPE_GPIO>;
619		};
620
621		gpio@13 {
622			reg = <13>;
623			type = <PCA955X_TYPE_GPIO>;
624		};
625
626		gpio@14 {
627			reg = <14>;
628			type = <PCA955X_TYPE_GPIO>;
629		};
630
631		gpio@15 {
632			reg = <15>;
633			type = <PCA955X_TYPE_GPIO>;
634		};
635	};
636
637	power-supply@68 {
638		compatible = "ibm,cffps1";
639		reg = <0x68>;
640	};
641
642	power-supply@69 {
643		compatible = "ibm,cffps1";
644		reg = <0x69>;
645	};
646};
647
648&i2c4 {
649	status = "okay";
650
651	tmp423a@4c {
652		compatible = "ti,tmp423";
653		reg = <0x4c>;
654	};
655
656	ir35221@70 {
657		compatible = "infineon,ir35221";
658		reg = <0x70>;
659	};
660
661	ir35221@71 {
662		compatible = "infineon,ir35221";
663		reg = <0x71>;
664	};
665};
666
667&i2c5 {
668	status = "okay";
669
670	tmp423a@4c {
671		compatible = "ti,tmp423";
672		reg = <0x4c>;
673	};
674
675	ir35221@70 {
676		compatible = "infineon,ir35221";
677		reg = <0x70>;
678	};
679
680	ir35221@71 {
681		compatible = "infineon,ir35221";
682		reg = <0x71>;
683	};
684};
685
686&i2c7 {
687	status = "okay";
688};
689
690&i2c9 {
691	status = "okay";
692
693	tmp275@4a {
694		compatible = "ti,tmp275";
695		reg = <0x4a>;
696	};
697};
698
699&i2c10 {
700	status = "okay";
701};
702
703&i2c11 {
704	status = "okay";
705
706	pca9552: pca9552@60 {
707		compatible = "nxp,pca9552";
708		reg = <0x60>;
709		#address-cells = <1>;
710		#size-cells = <0>;
711		gpio-controller;
712		#gpio-cells = <2>;
713
714		gpio-line-names = "PS_SMBUS_RESET_N", "APSS_RESET_N",
715			"GPU0_TH_OVERT_N_BUFF",	"GPU1_TH_OVERT_N_BUFF",
716			"GPU2_TH_OVERT_N_BUFF", "GPU3_TH_OVERT_N_BUFF",
717			"GPU4_TH_OVERT_N_BUFF",	"GPU5_TH_OVERT_N_BUFF",
718			"GPU0_PWR_GOOD_BUFF", "GPU1_PWR_GOOD_BUFF",
719			"GPU2_PWR_GOOD_BUFF", "GPU3_PWR_GOOD_BUFF",
720			"GPU4_PWR_GOOD_BUFF", "GPU5_PWR_GOOD_BUFF",
721			"12V_BREAKER_FLT_N", "THROTTLE_UNLATCHED_N";
722
723		gpio@0 {
724			reg = <0>;
725			type = <PCA955X_TYPE_GPIO>;
726		};
727
728		gpio@1 {
729			reg = <1>;
730			type = <PCA955X_TYPE_GPIO>;
731		};
732
733		gpio@2 {
734			reg = <2>;
735			type = <PCA955X_TYPE_GPIO>;
736		};
737
738		gpio@3 {
739			reg = <3>;
740			type = <PCA955X_TYPE_GPIO>;
741		};
742
743		gpio@4 {
744			reg = <4>;
745			type = <PCA955X_TYPE_GPIO>;
746		};
747
748		gpio@5 {
749			reg = <5>;
750			type = <PCA955X_TYPE_GPIO>;
751		};
752
753		gpio@6 {
754			reg = <6>;
755			type = <PCA955X_TYPE_GPIO>;
756		};
757
758		gpio@7 {
759			reg = <7>;
760			type = <PCA955X_TYPE_GPIO>;
761		};
762
763		gpio@8 {
764			reg = <8>;
765			type = <PCA955X_TYPE_GPIO>;
766		};
767
768		gpio@9 {
769			reg = <9>;
770			type = <PCA955X_TYPE_GPIO>;
771		};
772
773		gpio@10 {
774			reg = <10>;
775			type = <PCA955X_TYPE_GPIO>;
776		};
777
778		gpio@11 {
779			reg = <11>;
780			type = <PCA955X_TYPE_GPIO>;
781		};
782
783		gpio@12 {
784			reg = <12>;
785			type = <PCA955X_TYPE_GPIO>;
786		};
787
788		gpio@13 {
789			reg = <13>;
790			type = <PCA955X_TYPE_GPIO>;
791		};
792
793		gpio@14 {
794			reg = <14>;
795			type = <PCA955X_TYPE_GPIO>;
796		};
797
798		gpio@15 {
799			reg = <15>;
800			type = <PCA955X_TYPE_GPIO>;
801		};
802	};
803
804	rtc@32 {
805		compatible = "epson,rx8900";
806		reg = <0x32>;
807	};
808
809	eeprom@51 {
810		compatible = "atmel,24c64";
811		reg = <0x51>;
812	};
813
814	ucd90160@64 {
815		compatible = "ti,ucd90160";
816		reg = <0x64>;
817	};
818};
819
820&i2c12 {
821	status = "okay";
822};
823
824&i2c13 {
825	status = "okay";
826};
827
828&ibt {
829	status = "okay";
830};
831
832&uart1 {
833	status = "okay";
834	// Workaround for A0
835	compatible = "snps,dw-apb-uart";
836};
837
838&uart5 {
839	// Workaround for A0
840	compatible = "snps,dw-apb-uart";
841};
842
843&vuart1 {
844	status = "okay";
845};
846
847&vuart2 {
848	status = "okay";
849};
850
851&lpc_ctrl {
852	status = "okay";
853	memory-region = <&flash_memory>;
854	flash = <&spi1>;
855};
856
857&wdt1 {
858	aspeed,reset-type = "none";
859	aspeed,external-signal;
860	aspeed,ext-push-pull;
861	aspeed,ext-active-high;
862
863	pinctrl-names = "default";
864	pinctrl-0 = <&pinctrl_wdtrst1_default>;
865};
866
867&wdt2 {
868	status = "okay";
869};
870
871&pinctrl {
872	/* Hog these as no driver is probed for the entire LPC block */
873	pinctrl-names = "default";
874	pinctrl-0 = <&pinctrl_lpc_default>,
875		    <&pinctrl_lsirq_default>;
876};
877
878&xdma {
879	status = "okay";
880	memory-region = <&vga_memory>;
881};
882