1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2022, Ampere Computing LLC
3
4/dts-v1/;
5
6#include "aspeed-g6.dtsi"
7#include <dt-bindings/i2c/i2c.h>
8#include <dt-bindings/gpio/aspeed-gpio.h>
9
10/ {
11	model = "Ampere Mt.Mitchell BMC";
12	compatible = "ampere,mtmitchell-bmc", "aspeed,ast2600";
13
14	aliases {
15		serial7 = &uart8;
16		serial8 = &uart9;
17	};
18
19	chosen {
20		stdout-path = &uart5;
21	};
22
23	memory@80000000 {
24		device_type = "memory";
25		reg = <0x80000000 0x80000000>;
26	};
27
28	reserved-memory {
29		#address-cells = <1>;
30		#size-cells = <1>;
31		ranges;
32
33		gfx_memory: framebuffer {
34			size = <0x01000000>;
35			alignment = <0x01000000>;
36			compatible = "shared-dma-pool";
37			reusable;
38		};
39
40		video_engine_memory: video {
41			size = <0x04000000>;
42			alignment = <0x01000000>;
43			compatible = "shared-dma-pool";
44			reusable;
45		};
46
47		vga_memory: region@bf000000 {
48			no-map;
49			compatible = "shared-dma-pool";
50			reg = <0xbf000000 0x01000000>;  /* 16M */
51		};
52	};
53
54	voltage_mon_reg: voltage-mon-regulator {
55		compatible = "regulator-fixed";
56		regulator-name = "ltc2497_reg";
57		regulator-min-microvolt = <3300000>;
58		regulator-max-microvolt = <3300000>;
59		regulator-always-on;
60	};
61
62	gpioI5mux: mux-controller {
63		compatible = "gpio-mux";
64		#mux-control-cells = <0>;
65		mux-gpios = <&gpio0 ASPEED_GPIO(I, 5) GPIO_ACTIVE_HIGH>;
66	};
67
68	adc0mux: adc0mux {
69		compatible = "io-channel-mux";
70		io-channels = <&adc_i2c_0 0>;
71		#io-channel-cells = <1>;
72		io-channel-names = "parent";
73		mux-controls = <&gpioI5mux>;
74		settle-time-us = <10000>;
75		channels = "s0", "s1";
76	};
77
78	adc1mux: adc1mux {
79		compatible = "io-channel-mux";
80		io-channels = <&adc_i2c_0 1>;
81		#io-channel-cells = <1>;
82		io-channel-names = "parent";
83		mux-controls = <&gpioI5mux>;
84		settle-time-us = <10000>;
85		channels = "s0", "s1";
86	};
87
88	adc2mux: adc2mux {
89		compatible = "io-channel-mux";
90		io-channels = <&adc_i2c_0 2>;
91		#io-channel-cells = <1>;
92		io-channel-names = "parent";
93		mux-controls = <&gpioI5mux>;
94		settle-time-us = <10000>;
95		channels = "s0", "s1";
96	};
97
98	adc3mux: adc3mux {
99		compatible = "io-channel-mux";
100		io-channels = <&adc_i2c_0 3>;
101		#io-channel-cells = <1>;
102		io-channel-names = "parent";
103		mux-controls = <&gpioI5mux>;
104		settle-time-us = <10000>;
105		channels = "s0", "s1";
106	};
107
108	adc4mux: adc4mux {
109		compatible = "io-channel-mux";
110		io-channels = <&adc_i2c_0 4>;
111		#io-channel-cells = <1>;
112		io-channel-names = "parent";
113		mux-controls = <&gpioI5mux>;
114		settle-time-us = <10000>;
115		channels = "s0", "s1";
116	};
117
118	adc5mux: adc5mux {
119		compatible = "io-channel-mux";
120		io-channels = <&adc_i2c_0 5>;
121		#io-channel-cells = <1>;
122		io-channel-names = "parent";
123		mux-controls = <&gpioI5mux>;
124		settle-time-us = <10000>;
125		channels = "s0", "s1";
126	};
127
128	adc6mux: adc6mux {
129		compatible = "io-channel-mux";
130		io-channels = <&adc_i2c_0 6>;
131		#io-channel-cells = <1>;
132		io-channel-names = "parent";
133		mux-controls = <&gpioI5mux>;
134		settle-time-us = <10000>;
135		channels = "s0", "s1";
136	};
137
138	adc7mux: adc7mux {
139		compatible = "io-channel-mux";
140		io-channels = <&adc_i2c_0 7>;
141		#io-channel-cells = <1>;
142		io-channel-names = "parent";
143		mux-controls = <&gpioI5mux>;
144		settle-time-us = <10000>;
145		channels = "s0", "s1";
146	};
147
148	adc8mux: adc8mux {
149		compatible = "io-channel-mux";
150		io-channels = <&adc_i2c_0 8>;
151		#io-channel-cells = <1>;
152		io-channel-names = "parent";
153		mux-controls = <&gpioI5mux>;
154		settle-time-us = <10000>;
155		channels = "s0", "s1";
156	};
157
158	adc9mux: adc9mux {
159		compatible = "io-channel-mux";
160		io-channels = <&adc_i2c_0 9>;
161		#io-channel-cells = <1>;
162		io-channel-names = "parent";
163		mux-controls = <&gpioI5mux>;
164		settle-time-us = <10000>;
165		channels = "s0", "s1";
166	};
167
168	adc10mux: adc10mux {
169		compatible = "io-channel-mux";
170		io-channels = <&adc_i2c_0 10>;
171		#io-channel-cells = <1>;
172		io-channel-names = "parent";
173		mux-controls = <&gpioI5mux>;
174		settle-time-us = <10000>;
175		channels = "s0", "s1";
176	};
177
178	adc11mux: adc11mux {
179		compatible = "io-channel-mux";
180		io-channels = <&adc_i2c_0 11>;
181		#io-channel-cells = <1>;
182		io-channel-names = "parent";
183		mux-controls = <&gpioI5mux>;
184		settle-time-us = <10000>;
185		channels = "s0", "s1";
186	};
187
188	adc12mux: adc12mux {
189		compatible = "io-channel-mux";
190		io-channels = <&adc_i2c_0 12>;
191		#io-channel-cells = <1>;
192		io-channel-names = "parent";
193		mux-controls = <&gpioI5mux>;
194		settle-time-us = <10000>;
195		channels = "s0", "s1";
196	};
197
198	adc13mux: adc13mux {
199		compatible = "io-channel-mux";
200		io-channels = <&adc_i2c_0 13>;
201		#io-channel-cells = <1>;
202		io-channel-names = "parent";
203		mux-controls = <&gpioI5mux>;
204		settle-time-us = <10000>;
205		channels = "s0", "s1";
206	};
207
208	adc14mux: adc14mux {
209		compatible = "io-channel-mux";
210		io-channels = <&adc_i2c_0 14>;
211		#io-channel-cells = <1>;
212		io-channel-names = "parent";
213		mux-controls = <&gpioI5mux>;
214		settle-time-us = <10000>;
215		channels = "s0", "s1";
216	};
217
218	adc15mux: adc15mux {
219		compatible = "io-channel-mux";
220		io-channels = <&adc_i2c_0 15>;
221		#io-channel-cells = <1>;
222		io-channel-names = "parent";
223		mux-controls = <&gpioI5mux>;
224		settle-time-us = <10000>;
225		channels = "s0", "s1";
226	};
227
228	iio-hwmon {
229		compatible = "iio-hwmon";
230		io-channels =	<&adc0mux 0>, <&adc0mux 1>,
231				<&adc1mux 0>, <&adc1mux 1>,
232				<&adc2mux 0>, <&adc2mux 1>,
233				<&adc3mux 0>, <&adc3mux 1>,
234				<&adc4mux 0>, <&adc4mux 1>,
235				<&adc5mux 0>, <&adc5mux 1>,
236				<&adc6mux 0>, <&adc6mux 1>,
237				<&adc7mux 0>, <&adc7mux 1>,
238				<&adc8mux 0>, <&adc8mux 1>,
239				<&adc9mux 0>, <&adc9mux 1>,
240				<&adc10mux 0>, <&adc10mux 1>,
241				<&adc11mux 0>, <&adc11mux 1>,
242				<&adc12mux 0>, <&adc12mux 1>,
243				<&adc13mux 0>, <&adc13mux 1>,
244				<&adc14mux 0>, <&adc14mux 1>,
245				<&adc15mux 0>, <&adc15mux 1>,
246				<&adc_i2c_1 0>, <&adc_i2c_1 1>,
247				<&adc_i2c_1 2>, <&adc_i2c_1 3>,
248				<&adc_i2c_1 4>, <&adc_i2c_1 5>,
249				<&adc_i2c_1 6>, <&adc_i2c_1 7>,
250				<&adc_i2c_1 8>, <&adc_i2c_1 9>,
251				<&adc_i2c_1 10>, <&adc_i2c_1 11>,
252				<&adc_i2c_1 12>, <&adc_i2c_1 13>,
253				<&adc_i2c_1 14>, <&adc_i2c_1 15>,
254				<&adc0 0>, <&adc0 1>,
255				<&adc0 2>;
256	};
257};
258
259&mdio0 {
260	status = "okay";
261
262	ethphy0: ethernet-phy@0 {
263		compatible = "ethernet-phy-ieee802.3-c22";
264		reg = <0>;
265	};
266};
267
268&mac0 {
269	status = "okay";
270
271	phy-mode = "rgmii";
272	phy-handle = <&ethphy0>;
273
274	pinctrl-names = "default";
275	pinctrl-0 = <&pinctrl_rgmii1_default>;
276};
277
278&mac3 {
279	status = "okay";
280	pinctrl-names = "default";
281	pinctrl-0 = <&pinctrl_rmii4_default>;
282	clock-names = "MACCLK", "RCLK";
283	use-ncsi;
284};
285
286&fmc {
287	status = "okay";
288	flash@0 {
289		status = "okay";
290		m25p,fast-read;
291		label = "bmc";
292		spi-max-frequency = <50000000>;
293#include "openbmc-flash-layout-64.dtsi"
294	};
295
296	flash@1 {
297		status = "okay";
298		m25p,fast-read;
299		label = "alt-bmc";
300		spi-max-frequency = <50000000>;
301#include "openbmc-flash-layout-64-alt.dtsi"
302	};
303};
304
305&spi1 {
306	status = "okay";
307	pinctrl-names = "default";
308	pinctrl-0 = <&pinctrl_spi1_default>;
309
310	flash@0 {
311		status = "okay";
312		m25p,fast-read;
313		label = "pnor";
314		spi-max-frequency = <20000000>;
315	};
316};
317
318&uart1 {
319	status = "okay";
320};
321
322&uart2 {
323	status = "okay";
324};
325
326&uart3 {
327	status = "okay";
328};
329
330&uart4 {
331	status = "okay";
332};
333
334&uart8 {
335	status = "okay";
336};
337
338&uart9 {
339	status = "okay";
340};
341
342&i2c0 {
343	status = "okay";
344
345	temperature-sensor@2e {
346		compatible = "adi,adt7490";
347		reg = <0x2e>;
348	};
349};
350
351&i2c1 {
352	status = "okay";
353};
354
355&i2c2 {
356	status = "okay";
357
358	psu@58 {
359		compatible = "pmbus";
360		reg = <0x58>;
361	};
362
363	psu@59 {
364		compatible = "pmbus";
365		reg = <0x59>;
366	};
367};
368
369&i2c3 {
370	status = "okay";
371	bus-frequency = <1000000>;
372	multi-master;
373	mctp-controller;
374
375	mctp@10 {
376		compatible = "mctp-i2c-controller";
377		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
378	};
379};
380
381&i2c4 {
382	status = "okay";
383
384	adc_i2c_0: adc@14 {
385		compatible = "lltc,ltc2497";
386		reg = <0x14>;
387		vref-supply = <&voltage_mon_reg>;
388		#io-channel-cells = <1>;
389	 };
390
391	adc_i2c_1: adc@16 {
392		compatible = "lltc,ltc2497";
393		reg = <0x16>;
394		vref-supply = <&voltage_mon_reg>;
395		#io-channel-cells = <1>;
396	 };
397
398	eeprom@50 {
399		compatible = "atmel,24c64";
400		reg = <0x50>;
401		pagesize = <32>;
402	};
403
404	i2c-mux@70 {
405		compatible = "nxp,pca9545";
406		#address-cells = <1>;
407		#size-cells = <0>;
408		reg = <0x70>;
409		i2c-mux-idle-disconnect;
410
411		i2c4_bus70_chn0: i2c@0 {
412			#address-cells = <1>;
413			#size-cells = <0>;
414			reg = <0x0>;
415
416			outlet_temp1: temperature-sensor@48 {
417				compatible = "ti,tmp75";
418				reg = <0x48>;
419			};
420			psu1_inlet_temp2: temperature-sensor@49 {
421				compatible = "ti,tmp75";
422				reg = <0x49>;
423			};
424		};
425
426		i2c4_bus70_chn1: i2c@1 {
427			#address-cells = <1>;
428			#size-cells = <0>;
429			reg = <0x1>;
430
431			pcie_zone_temp1: temperature-sensor@48 {
432				compatible = "ti,tmp75";
433				reg = <0x48>;
434			};
435			psu0_inlet_temp2: temperature-sensor@49 {
436				compatible = "ti,tmp75";
437				reg = <0x49>;
438			};
439		};
440
441		i2c4_bus70_chn2: i2c@2 {
442			#address-cells = <1>;
443			#size-cells = <0>;
444			reg = <0x2>;
445
446			pcie_zone_temp2: temperature-sensor@48 {
447				compatible = "ti,tmp75";
448				reg = <0x48>;
449			};
450			outlet_temp2: temperature-sensor@49 {
451				compatible = "ti,tmp75";
452				reg = <0x49>;
453			};
454		};
455
456		i2c4_bus70_chn3: i2c@3 {
457			#address-cells = <1>;
458			#size-cells = <0>;
459			reg = <0x3>;
460
461			mb_inlet_temp1: temperature-sensor@7c {
462				compatible = "microchip,emc1413";
463				reg = <0x7c>;
464			};
465			mb_inlet_temp2: temperature-sensor@4c {
466				compatible = "microchip,emc1413";
467				reg = <0x4c>;
468			};
469		};
470	};
471};
472
473&i2c5 {
474	status = "okay";
475
476	i2c-mux@70 {
477		compatible = "nxp,pca9548";
478		#address-cells = <1>;
479		#size-cells = <0>;
480		reg = <0x70>;
481		i2c-mux-idle-disconnect;
482	};
483};
484
485&i2c6 {
486	status = "okay";
487	rtc@51 {
488		compatible = "nxp,pcf85063a";
489		reg = <0x51>;
490	};
491};
492
493&i2c7 {
494	status = "okay";
495};
496
497&i2c8 {
498	status = "okay";
499
500	gpio@77 {
501		compatible = "nxp,pca9539";
502		reg = <0x77>;
503		gpio-controller;
504		#address-cells = <1>;
505		#size-cells = <0>;
506		#gpio-cells = <2>;
507
508		bmc-ocp0-en-hog {
509			gpio-hog;
510			gpios = <7 GPIO_ACTIVE_LOW>;
511			output-high;
512			line-name = "bmc-ocp0-en-n";
513		};
514	};
515};
516
517&i2c9 {
518	status = "okay";
519};
520
521&i2c11 {
522	status = "okay";
523	ssif-bmc@10 {
524		compatible = "ssif-bmc";
525		reg = <0x10>;
526	};
527};
528
529&i2c14 {
530	status = "okay";
531	eeprom@50 {
532		compatible = "atmel,24c64";
533		reg = <0x50>;
534		pagesize = <32>;
535	};
536
537	bmc_ast2600_cpu: temperature-sensor@35 {
538		compatible = "ti,tmp175";
539		reg = <0x35>;
540	};
541};
542
543&adc0 {
544	ref_voltage = <2500>;
545	status = "okay";
546
547	pinctrl-names = "default";
548	pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
549		&pinctrl_adc2_default &pinctrl_adc3_default
550		&pinctrl_adc4_default &pinctrl_adc5_default
551		&pinctrl_adc6_default &pinctrl_adc7_default>;
552};
553
554&adc1 {
555	ref_voltage = <2500>;
556	status = "okay";
557
558	pinctrl-names = "default";
559	pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default
560		&pinctrl_adc10_default &pinctrl_adc11_default
561		&pinctrl_adc12_default &pinctrl_adc13_default
562		&pinctrl_adc14_default &pinctrl_adc15_default>;
563};
564
565&vhub {
566	status = "okay";
567};
568
569&video {
570	status = "okay";
571	memory-region = <&video_engine_memory>;
572};
573
574&gpio0 {
575	gpio-line-names =
576	/*A0-A7*/	"","","","","","i2c2-reset-n","i2c6-reset-n","i2c4-reset-n",
577	/*B0-B7*/	"","","","","host0-sysreset-n","host0-pmin-n","","",
578	/*C0-C7*/	"s0-vrd-fault-n","s1-vrd-fault-n","","",
579			"irq-n","","vrd-sel","spd-sel",
580	/*D0-D7*/	"presence-ps0","presence-ps1","hsc-12vmain-alt2-n","ext-high-temp-n",
581			"","bmc-ncsi-txen","","",
582	/*E0-E7*/	"","","clk50m-bmc-ncsi","","","","","",
583	/*F0-F7*/	"s0-pcp-oc-warn-n","s1-pcp-oc-warn-n","power-chassis-control",
584			"cpu-bios-recover","s0-heartbeat","hs-csout-prochot",
585			"s0-vr-hot-n","s1-vr-hot-n",
586	/*G0-G7*/	"","","hsc-12vmain-alt1-n","","","","","",
587	/*H0-H7*/	"","","wd-disable-n","power-chassis-good","","","","",
588	/*I0-I7*/	"","","","","","adc-sw","power-button","rtc-battery-voltage-read-enable",
589	/*J0-J7*/	"","","","","","","","",
590	/*K0-K7*/	"","","","","","","","",
591	/*L0-L7*/	"","","","","","","","",
592	/*M0-M7*/	"","s0-ddr-save","soc-spi-nor-access","presence-cpu0",
593			"s0-rtc-lock","","","",
594	/*N0-N7*/	"hpm-fw-recovery","hpm-stby-rst-n","jtag-sel-s0","led-sw-hb",
595			"jtag-dbgr-prsnt-n","s1-heartbeat","","",
596	/*O0-O7*/	"","","","","","","","",
597	/*P0-P7*/	"ps0-ac-loss-n","ps1-ac-loss-n","","",
598			"led-fault","cpld-user-mode","jtag-srst-n","led-bmc-hb",
599	/*Q0-Q7*/	"","","","","","","","",
600	/*R0-R7*/	"","","","","","","","",
601	/*S0-S7*/	"","","identify-button","led-identify",
602			"s1-ddr-save","spi-nor-access","sys-pgood","presence-cpu1",
603	/*T0-T7*/	"","","","","","","","",
604	/*U0-U7*/	"","","","","","","","",
605	/*V0-V7*/	"s0-hightemp-n","s0-fault-alert","s0-sys-auth-failure-n",
606			"host0-reboot-ack-n","host0-ready","host0-shd-req-n",
607			"host0-shd-ack-n","s0-overtemp-n",
608	/*W0-W7*/	"","ocp-main-pwren","ocp-pgood","",
609			"bmc-ok","bmc-ready","spi0-program-sel","spi0-backup-sel",
610	/*X0-X7*/	"i2c-backup-sel","s1-fault-alert","s1-fw-boot-ok",
611			"s1-hightemp-n","s0-spi-auth-fail-n","s1-sys-auth-failure-n",
612			"s1-overtemp-n","s1-spi-auth-fail-n",
613	/*Y0-Y7*/	"","","","","","","","host0-special-boot",
614	/*Z0-Z7*/	"reset-button","ps0-pgood","ps1-pgood","","","","","";
615
616	ocp-aux-pwren-hog {
617		gpio-hog;
618		gpios = <ASPEED_GPIO(W, 0) GPIO_ACTIVE_HIGH>;
619		output-high;
620		line-name = "ocp-aux-pwren";
621	};
622};
623
624&gpio1 {
625	gpio-line-names =
626	/*18A0-18A7*/	"","","","","","","","",
627	/*18B0-18B7*/	"","","","","","","s0-soc-pgood","",
628	/*18C0-18C7*/	"uart1-mode0","uart1-mode1","uart2-mode0","uart2-mode1",
629			"uart3-mode0","uart3-mode1","uart4-mode0","uart4-mode1",
630	/*18D0-18D7*/	"","","","","","","","",
631	/*18E0-18E3*/	"","","","";
632};
633