1// SPDX-License-Identifier: GPL-2.0+
2/dts-v1/;
3
4#include "aspeed-g5.dtsi"
5#include <dt-bindings/gpio/aspeed-gpio.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7
8/{
9	model = "ASRock ROMED8HM3 BMC v1.00";
10	compatible = "asrock,romed8hm3-bmc", "aspeed,ast2500";
11
12	aliases {
13		serial4 = &uart5;
14	};
15
16	chosen {
17		stdout-path = &uart5;
18		bootargs = "console=tty0 console=ttyS4,115200 earlycon";
19	};
20
21	memory@80000000 {
22		reg = <0x80000000 0x20000000>;
23	};
24
25	leds {
26		compatible = "gpio-leds";
27
28		heartbeat {
29			gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
30			linux,default-trigger = "timer";
31		};
32
33		system-fault {
34			gpios = <&gpio ASPEED_GPIO(Z, 2) GPIO_ACTIVE_HIGH>;
35			panic-indicator;
36		};
37	};
38
39	iio-hwmon {
40		compatible = "iio-hwmon";
41		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
42			<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>,
43			<&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>,
44			<&adc 12>, <&adc 13>, <&adc 14>, <&adc 15>;
45	};
46};
47
48&fmc {
49	status = "okay";
50	flash@0 {
51		status = "okay";
52		m25p,fast-read;
53		label = "bmc";
54		spi-max-frequency = <50000000>; /* 50 MHz */
55#include "openbmc-flash-layout-64.dtsi"
56	};
57};
58
59&spi1 {
60	status = "okay";
61	pinctrl-names = "default";
62	pinctrl-0 = <&pinctrl_spi1_default>;
63	flash@0 {
64		status = "okay";
65		label = "bios";
66		m25p,fast-read;
67		spi-max-frequency = <33000000>; /* 33 MHz */
68	};
69};
70
71&uart5 {
72	status = "okay";
73};
74
75&vuart {
76	status = "okay";
77	aspeed,lpc-io-reg = <0x2f8>;
78	aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
79};
80
81&mac0 {
82	status = "okay";
83
84	pinctrl-names = "default";
85	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
86
87	nvmem-cells = <&eth0_macaddress>;
88	nvmem-cell-names = "mac-address";
89};
90
91&i2c0 {
92	status = "okay";
93
94	/* inlet temp sensor */
95	w83773g@4c {
96		compatible = "nuvoton,w83773g";
97		reg = <0x4c>;
98	};
99};
100
101&i2c1 {
102	status = "okay";
103};
104
105&i2c2 {
106	status = "okay";
107
108	/* IPB temp sensor */
109	w83773g@4c {
110		compatible = "nuvoton,w83773g";
111		reg = <0x4c>;
112	};
113
114	/* IPB PMIC */
115	lm25066@40 {
116		compatible = "ti,lm25066";
117		reg = <0x40>;
118		shunt-resistor-micro-ohms = <1000>;
119	};
120
121	/* 12VSB PMIC */
122	lm25066@41 {
123		compatible = "ti,lm25066";
124		reg = <0x41>;
125		shunt-resistor-micro-ohms = <10000>;
126	};
127};
128
129&i2c4 {
130	status = "okay";
131};
132
133&i2c5 {
134	status = "okay";
135};
136
137&i2c6 {
138	status = "okay";
139};
140
141&i2c7 {
142	status = "okay";
143
144	/* Baseboard FRU eeprom */
145	eeprom@50 {
146		compatible = "st,24c128", "atmel,24c128";
147		reg = <0x50>;
148		pagesize = <16>;
149		#address-cells = <1>;
150		#size-cells = <1>;
151
152		eth0_macaddress: macaddress@3f80 {
153			reg = <0x3f80 6>;
154		};
155	};
156};
157
158&i2c8 {
159	status = "okay";
160};
161
162&i2c9 {
163	status = "okay";
164};
165
166&video {
167	status = "okay";
168};
169
170&vhub {
171	status = "okay";
172};
173
174&lpc_ctrl {
175	status = "okay";
176};
177
178&lpc_snoop {
179	status = "okay";
180	snoop-ports = <0x80>;
181};
182
183&kcs3 {
184	status = "okay";
185	aspeed,lpc-io-reg = <0xca2>;
186};
187
188&pwm_tacho {
189	status = "okay";
190	pinctrl-names = "default";
191	pinctrl-0 = <&pinctrl_pwm3_default
192		&pinctrl_pwm4_default
193		&pinctrl_pwm5_default
194		&pinctrl_pwm6_default>;
195
196	fan@3 {
197		reg = <0x03>;
198		aspeed,fan-tach-ch = /bits/ 8 <0x03 0x0b>;
199	};
200
201	fan@4 {
202		reg = <0x04>;
203		aspeed,fan-tach-ch = /bits/ 8 <0x04 0x0c>;
204	};
205
206	fan@5 {
207		reg = <0x05>;
208		aspeed,fan-tach-ch = /bits/ 8 <0x05 0x0d>;
209	};
210
211	fan@6 {
212		reg = <0x06>;
213		aspeed,fan-tach-ch = /bits/ 8 <0x06 0x0e>;
214	};
215};
216
217&gpio {
218	status = "okay";
219	gpio-line-names =
220		/*  A */ "LOCATORLED_STATUS_N", "BMC_MAC2_INTB", "NMI_BTN_N", "BMC_NMI",
221			"", "", "", "",
222		/*  B */ "POST_COMPLETE_N", "", "", "", "", "", "", "",
223		/*  C */ "", "", "", "", "PCIE_HP_SEL_N", "PCIE_SATA_SEL_N", "LOCATORBTN", "",
224		/*  D */ "BMC_PSIN", "BMC_PSOUT", "BMC_RESETCON", "RESETCON",
225			"", "", "", "PSU_FAN_FAIL_N",
226		/*  E */ "", "", "", "", "", "", "", "",
227		/*  F */ "NIC_PWR_GOOD", "PRSNTB0", "PRSNTB1", "PRSNTB2",
228			"PRSNTB3", "", "3VSB_PCIE1_PG", "12V_PCIE1_PG",
229		/*  G */ "HWM_BAT_EN", "CHASSIS_ID0", "CHASSIS_ID1", "CHASSIS_ID2",
230			"BMC_ALERT1_N_R", "BMC_ALERT2_N_R", "BMC_ALERT3_N", "BMC_ALERT4_N",
231		/*  H */ "X24_C1_PRSNT", "X24_C2_PRSNT", "X24_C3_PRSNT", "FM_MEM_THERM_EVENT_BMC_R_N",
232			"FACMODE", "BMC_RTCRST", "BMC_HB_LED_N", "BMC_CASEOPEN",
233		/*  I */ "", "", "", "", "", "", "", "",
234		/*  J */ "BMC_READY", "BMC_PCH_BIOS_CS_N", "", "P0_MA_DDR_QS_CS_N",
235			"", "", "", "",
236		/*  K */ "", "", "", "", "", "", "", "",
237		/*  L */ "", "", "", "", "", "", "", "",
238		/*  M */ "", "", "MEZZ_PWRBRK_N", "OCP_HP_RST_EN",
239			"MAIN_PWR_EN_G", "BMC_MAIN_EN", "AUX_PWR_EN_G", "BMC_AUX_EN",
240		/*  N */ "", "", "", "", "", "", "", "",
241		/*  O */ "", "", "", "", "", "", "", "",
242		/*  P */ "", "", "", "", "", "", "", "",
243		/*  Q */ "", "", "", "",
244			"BMC_SMB_PRESENT_1_N", "BMC_SMB_PRESENT_2_N",
245			"BMC_SMB_PRESENT_3_N", "BMC_PCIE_WAKE_N",
246		/*  R */ "", "", "THERMALTRIP_CLEAR_N", "", "", "", "", "",
247		/*  S */ "", "", "", "", "", "", "", "",
248		/*  T */ "", "", "", "", "", "", "", "",
249		/*  U */ "", "", "", "", "", "", "", "",
250		/*  V */ "", "", "", "", "", "", "", "",
251		/*  W */ "", "", "", "", "", "", "", "",
252		/*  X */ "", "", "", "", "", "", "", "",
253		/*  Y */ "SLP_S3", "SLP_S4_S5", "NODE_ID_1", "NODE_ID_2", "", "", "", "",
254		/*  Z */ "", "", "SYSTEM_FAULT_LED_N", "FAST_THROTTLE_N",
255			"", "", "", "",
256		/* AA */ "FM_CPU0_IBMC_THERMTRIP_N", "", "PROCHOT_L_G", "",
257			"", "", "", "",
258		/* AB */ "BMC_FORCE_SELFREFRESH", "PWRGD_OUT", "", "IRQ_BMC_PCH_SMI_LPC_N",
259			"", "", "", "",
260		/* AC */ "", "", "", "", "", "", "", "";
261};
262
263&adc {
264	status = "okay";
265	pinctrl-names = "default";
266	pinctrl-0 = <&pinctrl_adc0_default
267		&pinctrl_adc1_default
268		&pinctrl_adc2_default
269		&pinctrl_adc3_default
270		&pinctrl_adc4_default
271		&pinctrl_adc5_default
272		&pinctrl_adc6_default
273		&pinctrl_adc7_default
274		&pinctrl_adc8_default
275		&pinctrl_adc9_default
276		&pinctrl_adc10_default
277		&pinctrl_adc11_default
278		&pinctrl_adc12_default
279		&pinctrl_adc13_default
280		&pinctrl_adc14_default
281		&pinctrl_adc15_default>;
282};
283