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