1// SPDX-License-Identifier: GPL-2.0-or-later
2// Copyright 2022 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 = "Bonnell";
12	compatible = "ibm,bonnell-bmc", "aspeed,ast2600";
13
14	aliases {
15		serial4 = &uart5;
16		i2c16 = &i2c11mux0chn0;
17		i2c17 = &i2c11mux0chn1;
18		i2c18 = &i2c11mux0chn2;
19		i2c19 = &i2c11mux0chn3;
20	};
21
22	chosen {
23		stdout-path = &uart5;
24		bootargs = "console=ttyS4,115200n8 earlycon";
25	};
26
27	memory@80000000 {
28		device_type = "memory";
29		reg = <0x80000000 0x40000000>;
30	};
31
32	reserved-memory {
33		#address-cells = <1>;
34		#size-cells = <1>;
35		ranges;
36
37		ramoops@b3e00000 {
38			compatible = "ramoops";
39			reg = <0xb3e00000 0x200000>; /* 16 * (4 * 0x8000) */
40			record-size = <0x8000>;
41			console-size = <0x8000>;
42			ftrace-size = <0x8000>;
43			pmsg-size = <0x8000>;
44			max-reason = <3>; /* KMSG_DUMP_EMERG */
45		};
46
47		/* LPC FW cycle bridge region requires natural alignment */
48		flash_memory: region@b4000000 {
49			no-map;
50			reg = <0xb4000000 0x04000000>; /* 64M */
51		};
52
53		/* VGA region is dictated by hardware strapping */
54		vga_memory: region@bf000000 {
55			no-map;
56			compatible = "shared-dma-pool";
57			reg = <0xbf000000 0x01000000>;  /* 16M */
58		};
59	};
60
61	leds {
62		compatible = "gpio-leds";
63
64		fan0 {
65			gpios = <&gpio0 ASPEED_GPIO(G, 0) GPIO_ACTIVE_LOW>;
66		};
67
68		fan1 {
69			gpios = <&gpio0 ASPEED_GPIO(G, 1) GPIO_ACTIVE_LOW>;
70		};
71
72		rear-enc-id0 {
73			gpios = <&gpio0 ASPEED_GPIO(H, 2) GPIO_ACTIVE_LOW>;
74		};
75
76		rear-enc-fault0 {
77			gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>;
78		};
79	};
80
81	gpio-keys-polled {
82		compatible = "gpio-keys-polled";
83		#address-cells = <1>;
84		#size-cells = <0>;
85		poll-interval = <1000>;
86
87		fan0-presence {
88			label = "fan0-presence";
89			gpios = <&gpio0 ASPEED_GPIO(F, 4) GPIO_ACTIVE_LOW>;
90			linux,code = <6>;
91		};
92
93		fan1-presence {
94			label = "fan1-presence";
95			gpios = <&gpio0 ASPEED_GPIO(F, 5) GPIO_ACTIVE_LOW>;
96			linux,code = <7>;
97		};
98	};
99
100	iio-hwmon {
101		compatible = "iio-hwmon";
102		io-channels = <&adc1 7>;
103	};
104};
105
106&adc1 {
107	status = "okay";
108	aspeed,int-vref-microvolt = <2500000>;
109	pinctrl-names = "default";
110	pinctrl-0 = <&pinctrl_adc8_default &pinctrl_adc9_default
111		&pinctrl_adc10_default &pinctrl_adc11_default
112		&pinctrl_adc12_default &pinctrl_adc13_default
113		&pinctrl_adc14_default &pinctrl_adc15_default>;
114};
115
116&ehci1 {
117	status = "okay";
118};
119
120&uhci {
121	status = "okay";
122};
123
124&gpio0 {
125	gpio-line-names =
126		/*A0-A7*/	"","","","","","","","",
127		/*B0-B7*/	"","","","","","","checkstop","",
128		/*C0-C7*/	"","","","","","","","",
129		/*D0-D7*/	"","","","","","","","",
130		/*E0-E7*/	"","","","","","","","",
131		/*F0-F7*/	"","","rtc-battery-voltage-read-enable","reset-cause-pinhole","","","","",
132		/*G0-G7*/	"fan0","fan1","","","","","","",
133		/*H0-H7*/	"","","rear-enc-id0","rear-enc-fault0","","","","",
134		/*I0-I7*/	"","","","","","","bmc-secure-boot","",
135		/*J0-J7*/	"","","","","","","","",
136		/*K0-K7*/	"","","","","","","","",
137		/*L0-L7*/	"","","","","","","","",
138		/*M0-M7*/	"","","","","","","","",
139		/*N0-N7*/	"","","","","","","","",
140		/*O0-O7*/	"","","","usb-power","","","","",
141		/*P0-P7*/	"","","","","","","","",
142		/*Q0-Q7*/	"cfam-reset","","regulator-standby-faulted","","","","","",
143		/*R0-R7*/	"bmc-tpm-reset","power-chassis-control","power-chassis-good","","","","","",
144		/*S0-S7*/	"presence-ps0","presence-ps1","","","power-ffs-sync-history","","","",
145		/*T0-T7*/	"","","","","","","","",
146		/*U0-U7*/	"","","","","","","","",
147		/*V0-V7*/	"","","","","","","","",
148		/*W0-W7*/	"","","","","","","","",
149		/*X0-X7*/	"","","","","","","","",
150		/*Y0-Y7*/	"","","","","","","","",
151		/*Z0-Z7*/	"","","","","","","","";
152
153	usb_power {
154		gpio-hog;
155		gpios = <ASPEED_GPIO(O, 3) GPIO_ACTIVE_LOW>;
156		output-high;
157	};
158};
159
160&emmc_controller {
161	status = "okay";
162};
163
164&pinctrl_emmc_default {
165	bias-disable;
166};
167
168&emmc {
169	status = "okay";
170	clk-phase-mmc-hs200 = <180>, <180>;
171};
172
173&ibt {
174	status = "okay";
175};
176
177&i2c0 {
178	status = "okay";
179
180	eeprom@51 {
181		compatible = "atmel,24c64";
182		reg = <0x51>;
183	};
184
185	tca9554@20 {
186		compatible = "ti,tca9554";
187		reg = <0x20>;
188		#address-cells = <1>;
189		#size-cells = <0>;
190
191		gpio-controller;
192		#gpio-cells = <2>;
193
194		gpio-line-names = "",
195			"RUSSEL_FW_I2C_ENABLE_N",
196			"RUSSEL_OPPANEL_PRESENCE_N",
197			"BLYTH_OPPANEL_PRESENCE_N",
198			"CPU_TPM_CARD_PRESENT_N",
199			"",
200			"",
201			"DASD_BP_PRESENT_N";
202	};
203};
204
205&i2c1 {
206	status = "okay";
207};
208
209&i2c2 {
210	status = "okay";
211
212	ucd90160@64 {
213		compatible = "ti,ucd90160";
214		reg = <0x64>;
215	};
216};
217
218&i2c3 {
219	status = "okay";
220
221	power-supply@5a {
222		compatible = "acbel,fsg032";
223		reg = <0x5a>;
224	};
225
226	power-supply@5b {
227		compatible = "acbel,fsg032";
228		reg = <0x5b>;
229	};
230};
231
232&i2c4 {
233	status = "okay";
234};
235
236&i2c5 {
237	status = "okay";
238};
239
240&i2c6 {
241	status = "okay";
242};
243
244&i2c7 {
245	multi-master;
246	status = "okay";
247
248	si7021-a20@40 {
249		compatible = "silabs,si7020";
250		reg = <0x40>;
251	};
252
253	tmp275@48 {
254		compatible = "ti,tmp275";
255		reg = <0x48>;
256	};
257
258	eeprom@50 {
259		compatible = "atmel,24c64";
260		reg = <0x50>;
261	};
262
263	eeprom@51 {
264		compatible = "atmel,24c64";
265		reg = <0x51>;
266	};
267
268	max31785@52 {
269		compatible = "maxim,max31785a";
270		reg = <0x52>;
271		#address-cells = <1>;
272		#size-cells = <0>;
273
274		fan0: fan@0 {
275			compatible = "pmbus-fan";
276			reg = <0>;
277			tach-pulses = <2>;
278		};
279
280		fan1: fan@1 {
281			compatible = "pmbus-fan";
282			reg = <1>;
283			tach-pulses = <2>;
284		};
285	};
286
287	pca9551@60 {
288		compatible = "nxp,pca9551";
289		reg = <0x60>;
290		#address-cells = <1>;
291		#size-cells = <0>;
292
293		gpio-controller;
294		#gpio-cells = <2>;
295
296		led@0 {
297			label = "front-sys-id0";
298			reg = <0>;
299			retain-state-shutdown;
300			default-state = "keep";
301			type = <PCA955X_TYPE_LED>;
302		};
303
304		led@1 {
305			label = "front-check-log0";
306			reg = <1>;
307			retain-state-shutdown;
308			default-state = "keep";
309			type = <PCA955X_TYPE_LED>;
310		};
311
312		led@2 {
313			label = "front-enc-fault1";
314			reg = <2>;
315			retain-state-shutdown;
316			default-state = "keep";
317			type = <PCA955X_TYPE_LED>;
318		};
319
320		led@3 {
321			label = "front-sys-pwron0";
322			reg = <3>;
323			retain-state-shutdown;
324			default-state = "keep";
325			type = <PCA955X_TYPE_LED>;
326		};
327	};
328
329	ibm-panel@62 {
330		compatible = "ibm,op-panel";
331		reg = <(0x62 | I2C_OWN_SLAVE_ADDRESS)>;
332	};
333
334	dps: dps310@76 {
335		compatible = "infineon,dps310";
336		reg = <0x76>;
337		#io-channel-cells = <0>;
338	};
339};
340
341&i2c8 {
342	status = "okay";
343
344	rtc@32 {
345		compatible = "epson,rx8900";
346		reg = <0x32>;
347	};
348
349	tmp275@48 {
350		compatible = "ti,tmp275";
351		reg = <0x48>;
352	};
353
354	eeprom@50 {
355		compatible = "atmel,24c128";
356		reg = <0x50>;
357	};
358
359	pca9551@60 {
360		compatible = "nxp,pca9551";
361		reg = <0x60>;
362		#address-cells = <1>;
363		#size-cells = <0>;
364
365		gpio-controller;
366		#gpio-cells = <2>;
367
368		gpio-line-names = "",
369			"APSS_RESET_N",
370			"",
371			"N_MODE_CPU_N",
372			"",
373			"",
374			"P10_DCM_PRESENT",
375			"";
376	};
377};
378
379&i2c9 {
380	status = "okay";
381
382	tmp423a@4c {
383		compatible = "ti,tmp423";
384		reg = <0x4c>;
385	};
386};
387
388&i2c10 {
389	status = "okay";
390};
391
392&i2c11 {
393	status = "okay";
394
395	tca9554@20 {
396		compatible = "ti,tca9554";
397		reg = <0x20>;
398		#address-cells = <1>;
399		#size-cells = <0>;
400
401		gpio-controller;
402		#gpio-cells = <2>;
403
404		gpio-line-names = "BOOT_RCVRY_TWI",
405			"BOOT_RCVRY_UART",
406			"",
407			"",
408			"",
409			"",
410			"",
411			"PE_SWITCH_RSTB_N";
412	};
413
414	tmp435@4c {
415		compatible = "ti,tmp435";
416		reg = <0x4c>;
417	};
418
419	pca9849@75 {
420		compatible = "nxp,pca9849";
421		reg = <0x75>;
422		#address-cells = <1>;
423		#size-cells = <0>;
424		status = "okay";
425		i2c-mux-idle-disconnect;
426
427		i2c11mux0chn0: i2c@0 {
428			#address-cells = <1>;
429			#size-cells = <0>;
430			reg = <0>;
431		};
432
433		i2c11mux0chn1: i2c@1 {
434			#address-cells = <1>;
435			#size-cells = <0>;
436			reg = <1>;
437		};
438
439		i2c11mux0chn2: i2c@2 {
440			#address-cells = <1>;
441			#size-cells = <0>;
442			reg = <2>;
443		};
444
445		i2c11mux0chn3: i2c@3 {
446			#address-cells = <1>;
447			#size-cells = <0>;
448			reg = <3>;
449		};
450	};
451};
452
453&i2c12 {
454	status = "okay";
455
456	tpm@2e {
457		compatible = "nuvoton,npct75x";
458		reg = <0x2e>;
459	};
460
461	eeprom@50 {
462		compatible = "atmel,24c64";
463		reg = <0x50>;
464	};
465};
466
467&i2c13 {
468	status = "okay";
469
470	eeprom@50 {
471		compatible = "atmel,24c64";
472		reg = <0x50>;
473	};
474
475	pca9551@60 {
476		compatible = "nxp,pca9551";
477		reg = <0x60>;
478		#address-cells = <1>;
479		#size-cells = <0>;
480
481		gpio-controller;
482		#gpio-cells = <2>;
483
484		led@0 {
485			label = "nvme0";
486			reg = <0>;
487			retain-state-shutdown;
488			default-state = "keep";
489			type = <PCA955X_TYPE_LED>;
490		};
491
492		led@1 {
493			label = "nvme1";
494			reg = <1>;
495			retain-state-shutdown;
496			default-state = "keep";
497			type = <PCA955X_TYPE_LED>;
498		};
499
500		led@2 {
501			label = "nvme2";
502			reg = <2>;
503			retain-state-shutdown;
504			default-state = "keep";
505			type = <PCA955X_TYPE_LED>;
506		};
507
508		led@3 {
509			label = "nvme3";
510			reg = <3>;
511			retain-state-shutdown;
512			default-state = "keep";
513			type = <PCA955X_TYPE_LED>;
514		};
515	};
516};
517
518&i2c14 {
519	status = "okay";
520};
521
522&i2c15 {
523	status = "okay";
524};
525
526&uart2 {
527	status = "okay";
528};
529
530&vuart1 {
531	status = "okay";
532};
533
534&vuart2 {
535	status = "okay";
536};
537
538&lpc_ctrl {
539	status = "okay";
540	memory-region = <&flash_memory>;
541};
542
543&mac2 {
544	status = "okay";
545	pinctrl-names = "default";
546	pinctrl-0 = <&pinctrl_rmii3_default>;
547	clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>,
548		 <&syscon ASPEED_CLK_MAC3RCLK>;
549	clock-names = "MACCLK", "RCLK";
550	use-ncsi;
551};
552
553&wdt1 {
554	aspeed,reset-type = "none";
555	aspeed,external-signal;
556	aspeed,ext-push-pull;
557	aspeed,ext-active-high;
558
559	pinctrl-names = "default";
560	pinctrl-0 = <&pinctrl_wdtrst1_default>;
561};
562
563&wdt2 {
564	status = "okay";
565};
566
567&xdma {
568	status = "okay";
569	memory-region = <&vga_memory>;
570};
571
572&kcs2 {
573	status = "okay";
574	aspeed,lpc-io-reg = <0xca8 0xcac>;
575};
576
577&kcs3 {
578	status = "okay";
579	aspeed,lpc-io-reg = <0xca2>;
580	aspeed,lpc-interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
581};
582
583#include "ibm-power10-dual.dtsi"
584
585&cfam0_i2c10 {
586	eeprom@50 {
587		compatible = "atmel,at30tse004a";
588		reg = <0x50>;
589	};
590};
591
592&cfam0_i2c11 {
593	eeprom@50 {
594		compatible = "atmel,at30tse004a";
595		reg = <0x50>;
596	};
597};
598
599&cfam0_i2c12 {
600	eeprom@50 {
601		compatible = "atmel,at30tse004a";
602		reg = <0x50>;
603	};
604};
605
606&cfam0_i2c13 {
607	eeprom@50 {
608		compatible = "atmel,at30tse004a";
609		reg = <0x50>;
610	};
611};
612