1// SPDX-License-Identifier: GPL-2.0-or-later
2// Copyright 2023 Facebook Inc.
3
4/dts-v1/;
5#include "aspeed-g6.dtsi"
6#include <dt-bindings/gpio/aspeed-gpio.h>
7#include <dt-bindings/i2c/i2c.h>
8
9/ {
10	model = "Facebook Harma";
11	compatible = "facebook,harma-bmc", "aspeed,ast2600";
12
13	aliases {
14		serial0 = &uart1;
15		serial1 = &uart2;
16		serial2 = &uart4;
17		serial4 = &uart5;
18
19		i2c20 = &imux20;
20		i2c21 = &imux21;
21		i2c22 = &imux22;
22		i2c23 = &imux23;
23		i2c24 = &imux24;
24		i2c25 = &imux25;
25		i2c26 = &imux26;
26		i2c27 = &imux27;
27		i2c28 = &imux28;
28		i2c29 = &imux29;
29		i2c30 = &imux30;
30		i2c31 = &imux31;
31
32		spi1 = &spi_gpio;
33	};
34
35	chosen {
36		stdout-path = &uart5;
37	};
38
39	memory@80000000 {
40		device_type = "memory";
41		reg = <0x80000000 0x80000000>;
42	};
43
44	iio-hwmon {
45		compatible = "iio-hwmon";
46		io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>,
47			      <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>,
48			      <&adc1 2>;
49	};
50
51	leds {
52		compatible = "gpio-leds";
53
54		led-0 {
55			label = "bmc_heartbeat_amber";
56			gpios = <&gpio0 ASPEED_GPIO(P, 7) GPIO_ACTIVE_LOW>;
57			linux,default-trigger = "heartbeat";
58		};
59
60		led-1 {
61			label = "fp_id_amber";
62			default-state = "off";
63			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
64		};
65
66		led-2 {
67			label = "power_blue";
68			default-state = "off";
69			gpios = <&gpio0 124 GPIO_ACTIVE_HIGH>;
70		};
71	};
72
73	spi_gpio: spi-gpio {
74		status = "okay";
75		compatible = "spi-gpio";
76		#address-cells = <1>;
77		#size-cells = <0>;
78
79		gpio-sck = <&gpio0 ASPEED_GPIO(Z, 3) GPIO_ACTIVE_HIGH>;
80		gpio-mosi = <&gpio0 ASPEED_GPIO(Z, 4) GPIO_ACTIVE_HIGH>;
81		gpio-miso = <&gpio0 ASPEED_GPIO(Z, 5) GPIO_ACTIVE_HIGH>;
82		num-chipselects = <1>;
83		cs-gpios = <&gpio0 ASPEED_GPIO(Z, 0) GPIO_ACTIVE_LOW>;
84
85		tpmdev@0 {
86			compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
87			spi-max-frequency = <33000000>;
88			reg = <0>;
89		};
90	};
91};
92
93// HOST BIOS Debug
94&uart1 {
95	status = "okay";
96};
97
98// SOL Host Console
99&uart2 {
100	status = "okay";
101	pinctrl-0 = <>;
102};
103
104// SOL BMC Console
105&uart4 {
106	status = "okay";
107	pinctrl-0 = <>;
108};
109
110// BMC Debug Console
111&uart5 {
112	status = "okay";
113};
114
115// MTIA
116&uart6 {
117	status = "okay";
118};
119
120&uart_routing {
121	status = "okay";
122};
123
124&wdt1 {
125	status = "okay";
126	pinctrl-names = "default";
127	pinctrl-0 = <&pinctrl_wdtrst1_default>;
128	aspeed,reset-type = "soc";
129	aspeed,external-signal;
130	aspeed,ext-push-pull;
131	aspeed,ext-active-high;
132	aspeed,ext-pulse-duration = <256>;
133};
134
135&mac3 {
136	status = "okay";
137	pinctrl-names = "default";
138	pinctrl-0 = <&pinctrl_rmii4_default>;
139	use-ncsi;
140	mellanox,multi-host;
141};
142
143&rtc {
144	status = "okay";
145};
146
147&fmc {
148	status = "okay";
149
150	flash@0 {
151		status = "okay";
152		m25p,fast-read;
153		label = "bmc";
154		spi-max-frequency = <50000000>;
155#include "openbmc-flash-layout-128.dtsi"
156	};
157
158	flash@1 {
159		status = "okay";
160		m25p,fast-read;
161		label = "alt-bmc";
162		spi-max-frequency = <50000000>;
163	};
164};
165
166// BIOS Flash
167&spi2 {
168	status = "okay";
169	pinctrl-names = "default";
170	pinctrl-0 = <&pinctrl_spi2_default>;
171
172	flash@0 {
173		status = "okay";
174		m25p,fast-read;
175		label = "pnor";
176		spi-max-frequency = <12000000>;
177		spi-tx-bus-width = <2>;
178		spi-rx-bus-width = <2>;
179	};
180};
181
182&kcs2 {
183	status = "okay";
184	aspeed,lpc-io-reg = <0xca8>;
185};
186
187&kcs3 {
188	status = "okay";
189	aspeed,lpc-io-reg = <0xca2>;
190};
191
192&i2c0 {
193	status = "okay";
194
195	max31790@5e{
196		compatible = "max31790";
197		reg = <0x5e>;
198		#address-cells = <1>;
199		#size-cells = <0>;
200	};
201};
202
203&i2c1 {
204	status = "okay";
205
206	tmp75@4b {
207		compatible = "ti,tmp75";
208		reg = <0x4b>;
209	};
210
211	// MB NIC FRU
212	eeprom@50 {
213		compatible = "atmel,24c64";
214		reg = <0x50>;
215	};
216};
217
218&i2c2 {
219	status = "okay";
220
221	max31790@5e{
222		compatible = "max31790";
223		reg = <0x5e>;
224		#address-cells = <1>;
225		#size-cells = <0>;
226	};
227};
228
229&i2c3 {
230	status = "okay";
231
232	i2c-mux@70 {
233		compatible = "nxp,pca9543";
234		reg = <0x70>;
235		#address-cells = <1>;
236		#size-cells = <0>;
237
238		imux20: i2c@0 {
239			#address-cells = <1>;
240			#size-cells = <0>;
241			reg = <0>;
242			//Retimer Flash
243			eeprom@50 {
244				compatible = "atmel,24c2048";
245				reg = <0x50>;
246				pagesize = <128>;
247			};
248		};
249		imux21: i2c@1 {
250			#address-cells = <1>;
251			#size-cells = <0>;
252			reg = <1>;
253		};
254	};
255};
256
257&i2c4 {
258	status = "okay";
259	// PDB FRU
260	eeprom@52 {
261		compatible = "atmel,24c64";
262		reg = <0x52>;
263	};
264
265	delta_brick@69 {
266		compatible = "pmbus";
267		reg = <0x69>;
268	};
269
270	tmp75@49 {
271		compatible = "ti,tmp75";
272		reg = <0x49>;
273	};
274
275	power-monitor@22 {
276		compatible = "lltc,ltc4286";
277		reg = <0x22>;
278		adi,vrange-low-enable;
279		shunt-resistor-micro-ohms = <500>;
280	};
281};
282
283&i2c5 {
284	status = "okay";
285};
286
287&i2c6 {
288	status = "okay";
289
290	i2c-mux@70 {
291		compatible = "nxp,pca9543";
292		reg = <0x70>;
293		#address-cells = <1>;
294		#size-cells = <0>;
295
296		imux22: i2c@0 {
297			#address-cells = <1>;
298			#size-cells = <0>;
299			reg = <0>;
300		};
301		imux23: i2c@1 {
302			#address-cells = <1>;
303			#size-cells = <0>;
304			reg = <1>;
305		};
306	};
307};
308
309&i2c7 {
310	status = "okay";
311};
312
313&i2c8 {
314	status = "okay";
315};
316
317&i2c9 {
318	status = "okay";
319
320	gpio@30 {
321		compatible = "nxp,pca9555";
322		reg = <0x30>;
323		gpio-controller;
324		#gpio-cells = <2>;
325	};
326	gpio@31 {
327		compatible = "nxp,pca9555";
328		reg = <0x31>;
329		gpio-controller;
330		#gpio-cells = <2>;
331	};
332
333	i2c-mux@71 {
334		compatible = "nxp,pca9546";
335		reg = <0x71>;
336		#address-cells = <1>;
337		#size-cells = <0>;
338
339		imux24: i2c@0 {
340			#address-cells = <1>;
341			#size-cells = <0>;
342			reg = <0>;
343		};
344		imux25: i2c@1 {
345			#address-cells = <1>;
346			#size-cells = <0>;
347			reg = <1>;
348		};
349		imux26: i2c@2 {
350			#address-cells = <1>;
351			#size-cells = <0>;
352			reg = <2>;
353		};
354		imux27: i2c@3 {
355			#address-cells = <1>;
356			#size-cells = <0>;
357			reg = <3>;
358		};
359	};
360	// PTTV FRU
361	eeprom@52 {
362		compatible = "atmel,24c64";
363		reg = <0x52>;
364	};
365};
366
367&i2c11 {
368	status = "okay";
369};
370
371&i2c12 {
372	status = "okay";
373};
374
375&i2c13 {
376	status = "okay";
377
378	i2c-mux@70 {
379		compatible = "nxp,pca9545";
380		reg = <0x70>;
381		#address-cells = <1>;
382		#size-cells = <0>;
383
384		imux28: i2c@0 {
385			#address-cells = <1>;
386			#size-cells = <0>;
387			reg = <0>;
388		};
389		imux29: i2c@1 {
390			#address-cells = <1>;
391			#size-cells = <0>;
392			reg = <1>;
393			//MB FRU
394			eeprom@54 {
395				compatible = "atmel,24c64";
396				reg = <0x54>;
397			};
398		};
399		imux30: i2c@2 {
400			#address-cells = <1>;
401			#size-cells = <0>;
402			reg = <2>;
403		};
404		imux31: i2c@3 {
405			#address-cells = <1>;
406			#size-cells = <0>;
407			reg = <3>;
408		};
409	};
410};
411
412// To Debug card
413&i2c14 {
414	status = "okay";
415	multi-master;
416
417	ipmb@10 {
418		compatible = "ipmb-dev";
419		reg = <(0x10 | I2C_OWN_SLAVE_ADDRESS)>;
420		i2c-protocol;
421	};
422};
423
424&i2c15 {
425	status = "okay";
426
427	// SCM FRU
428	eeprom@50 {
429		compatible = "atmel,24c64";
430		reg = <0x50>;
431	};
432
433	// BSM FRU
434	eeprom@56 {
435		compatible = "atmel,24c64";
436		reg = <0x56>;
437	};
438};
439
440&adc0 {
441	aspeed,int-vref-microvolt = <2500000>;
442	status = "okay";
443	pinctrl-0 = <&pinctrl_adc0_default &pinctrl_adc1_default
444		&pinctrl_adc2_default &pinctrl_adc3_default
445		&pinctrl_adc4_default &pinctrl_adc5_default
446		&pinctrl_adc6_default &pinctrl_adc7_default>;
447};
448
449&adc1 {
450	aspeed,int-vref-microvolt = <2500000>;
451	status = "okay";
452	pinctrl-names = "default";
453	pinctrl-0 = <&pinctrl_adc10_default>;
454};
455
456&ehci0 {
457	status = "okay";
458};
459
460&gpio0 {
461	pinctrl-names = "default";
462	gpio-line-names =
463	/*A0-A7*/	"","","","","","","","",
464	/*B0-B7*/	"","","","",
465			"bmc-spi-mux-select-0","led-identify","","",
466	/*C0-C7*/	"","","","","","","","",
467	/*D0-D7*/	"","","sol-uart-select","","","","","",
468	/*E0-E7*/	"","","","","","","","",
469	/*F0-F7*/	"","","","","","","","",
470	/*G0-G7*/	"","","","","","","","",
471	/*H0-H7*/	"","","","","","","","",
472	/*I0-I7*/	"","","","","","","","",
473	/*J0-J7*/	"","","","","","","","",
474	/*K0-K7*/	"","","","","","","","",
475	/*L0-L7*/	"","","","","","","","",
476	/*M0-M7*/	"","","","","","","","",
477	/*N0-N7*/	"led-postcode-0","led-postcode-1",
478			"led-postcode-2","led-postcode-3",
479			"led-postcode-4","led-postcode-5",
480			"led-postcode-6","led-postcode-7",
481	/*O0-O7*/	"","","","","","","","",
482	/*P0-P7*/	"power-button","power-host-control",
483			"reset-button","","led-power","","","",
484	/*Q0-Q7*/	"","","","","","","","",
485	/*R0-R7*/	"","","","","","","","",
486	/*S0-S7*/	"","","","","","","","",
487	/*T0-T7*/	"","","","","","","","",
488	/*U0-U7*/	"","","","","","","led-identify-gate","",
489	/*V0-V7*/	"","","","",
490			"rtc-battery-voltage-read-enable","","","",
491	/*W0-W7*/	"","","","","","","","",
492	/*X0-X7*/	"","","","","","","","",
493	/*Y0-Y7*/	"","","","","","","","",
494	/*Z0-Z7*/	"","","","","","","","";
495};
496
497&sgpiom0 {
498	status = "okay";
499	max-ngpios = <128>;
500	ngpios = <128>;
501	bus-frequency = <2000000>;
502	gpio-line-names =
503	/*in - out - in - out */
504	/*A0-A3 line 0-7*/
505	"presence-scm-cable","power-config-disable-e1s-0",
506	"","",
507	"","power-config-disable-e1s-1",
508	"","",
509	/*A4-A7 line 8-15*/
510	"","power-config-asic-module-enable",
511	"","power-config-asic-power-good",
512	"","power-config-pdb-power-good",
513	"presence-cpu","smi-control-n",
514	/*B0-B3 line 16-23*/
515	"","nmi-control-n",
516	"","nmi-control-sync-flood-n",
517	"","",
518	"","",
519	/*B4-B7 line 24-31*/
520	"","FM_CPU_SP5R1",
521	"reset-cause-rsmrst","FM_CPU_SP5R2",
522	"","FM_CPU_SP5R3",
523	"","FM_CPU_SP5R4",
524	/*C0-C3 line 32-39*/
525	"","FM_CPU0_SA0",
526	"","FM_CPU0_SA1",
527	"","rt-cpu0-p0-enable",
528	"","rt-cpu0-p1-enable",
529	/*C4-C7 line 40-47*/
530	"","smb-rt-rom-p0-select",
531	"","smb-rt-rom-p1-select",
532	"","i3c-cpu-mux0-oe-n",
533	"","i3c-cpu-mux0-select",
534	/*D0-D3 line 48-55*/
535	"","i3c-cpu-mux1-oe-n",
536	"","i3c-cpu-mux1-select",
537	"","reset-control-bmc",
538	"","reset-control-cpu0-p0-mux",
539	/*D4-D7 line 56-63*/
540	"","reset-control-cpu0-p1-mux",
541	"","reset-control-e1s-mux",
542	"power-host-good","reset-control-mb-mux",
543	"power-cpu-good","reset-control-smb-e1s-0",
544	/*E0-E3 line 64-71*/
545	"","reset-control-smb-e1s-1",
546	"host-ready-n","reset-control-srst",
547	"presence-e1s-0","reset-control-usb-hub",
548	"","reset-control",
549	/*E4-E7 line 72-79*/
550	"presence-e1s-1","reset-control-cpu-kbrst",
551	"","reset-control-platrst",
552	"","bmc-jtag-mux-select-0",
553	"","bmc-jtag-mux-select-1",
554	/*F0-F3 line 80-87*/
555	"","bmc-jtag-select",
556	"","bmc-ready-n",
557	"","bmc-ready-sgpio",
558	"","rt-cpu0-p0-force-enable",
559	/*F4-F7 line 88-95*/
560	"presence-asic-modules-0","rt-cpu0-p1-force-enable",
561	"presence-asic-modules-1","bios-debug-msg-disable",
562	"","uart-control-buffer-select",
563	"","ac-control-n",
564	/*G0-G3 line 96-103*/
565	"FM_CPU_CORETYPE2","",
566	"FM_CPU_CORETYPE1","",
567	"FM_CPU_CORETYPE0","",
568	"FM_BOARD_REV_ID5","",
569	/*G4-G7 line 104-111*/
570	"FM_BOARD_REV_ID4","",
571	"FM_BOARD_REV_ID3","",
572	"FM_BOARD_REV_ID2","",
573	"FM_BOARD_REV_ID1","",
574	/*H0-H3 line 112-119*/
575	"FM_BOARD_REV_ID0","",
576	"","","","","","",
577	/*H4-H7 line 120-127*/
578	"","",
579	"reset-control-pcie-expansion-3","",
580	"reset-control-pcie-expansion-2","",
581	"reset-control-pcie-expansion-1","",
582	/*I0-I3 line 128-135*/
583	"reset-control-pcie-expansion-0","",
584	"FM_EXP_SLOT_ID1","",
585	"FM_EXP_SLOT_ID0","",
586	"","",
587	/*I4-I7 line 136-143*/
588	"","","","","","","","",
589	/*J0-J3 line 144-151*/
590	"","","","","","","","",
591	/*J4-J7 line 152-159*/
592	"SLOT_ID_BCB_0","",
593	"SLOT_ID_BCB_1","",
594	"SLOT_ID_BCB_2","",
595	"SLOT_ID_BCB_3","",
596	/*K0-K3 line 160-167*/
597	"","","","","","","","",
598	/*K4-K7 line 168-175*/
599	"","","","","","","","",
600	/*L0-L3 line 176-183*/
601	"","","","","","","","",
602	/*L4-L7 line 184-191*/
603	"","","","","","","","",
604	/*M0-M3 line 192-199*/
605	"","","","","","","","",
606	/*M4-M7 line 200-207*/
607	"","","","","","","","",
608	/*N0-N3 line 208-215*/
609	"","","","","","","","",
610	/*N4-N7 line 216-223*/
611	"","","","","","","","",
612	/*O0-O3 line 224-231*/
613	"","","","","","","","",
614	/*O4-O7 line 232-239*/
615	"","","","","","","","",
616	/*P0-P3 line 240-247*/
617	"","","","","","","","",
618	/*P4-P7 line 248-255*/
619	"","","","","","","","";
620};
621