1724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0+
2724ba675SRob Herring/dts-v1/;
3724ba675SRob Herring
4724ba675SRob Herring#include "aspeed-g5.dtsi"
5724ba675SRob Herring#include <dt-bindings/gpio/aspeed-gpio.h>
6724ba675SRob Herring#include <dt-bindings/i2c/i2c.h>
7724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
8724ba675SRob Herring
9724ba675SRob Herring/{
10724ba675SRob Herring	model = "ASRock E3C246D4I BMC";
11724ba675SRob Herring	compatible = "asrock,e3c246d4i-bmc", "aspeed,ast2500";
12724ba675SRob Herring
13724ba675SRob Herring	aliases {
14724ba675SRob Herring		serial4 = &uart5;
15724ba675SRob Herring	};
16724ba675SRob Herring
17724ba675SRob Herring	chosen {
18724ba675SRob Herring		stdout-path = &uart5;
19724ba675SRob Herring		bootargs = "console=tty0 console=ttyS4,115200 earlycon";
20724ba675SRob Herring	};
21724ba675SRob Herring
22724ba675SRob Herring	memory@80000000 {
23724ba675SRob Herring		reg = <0x80000000 0x20000000>;
24724ba675SRob Herring	};
25724ba675SRob Herring
26724ba675SRob Herring	leds {
27724ba675SRob Herring		compatible = "gpio-leds";
28724ba675SRob Herring
29724ba675SRob Herring		heartbeat {
30724ba675SRob Herring			/* BMC_HB_LED_N */
31724ba675SRob Herring			gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
32724ba675SRob Herring			linux,default-trigger = "timer";
33724ba675SRob Herring		};
34724ba675SRob Herring
35724ba675SRob Herring		system-fault {
36724ba675SRob Herring			/* SYSTEM_FAULT_LED_N */
37724ba675SRob Herring			gpios = <&gpio ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
38724ba675SRob Herring			panic-indicator;
39724ba675SRob Herring		};
40724ba675SRob Herring	};
41724ba675SRob Herring
42724ba675SRob Herring	gpio-keys {
43724ba675SRob Herring		compatible = "gpio-keys";
44724ba675SRob Herring
45724ba675SRob Herring		uid-button {
46724ba675SRob Herring			label = "uid-button";
47724ba675SRob Herring			gpios = <&gpio ASPEED_GPIO(F, 1) GPIO_ACTIVE_LOW>;
48724ba675SRob Herring			linux,code = <ASPEED_GPIO(F, 1)>;
49724ba675SRob Herring		};
50724ba675SRob Herring	};
51724ba675SRob Herring
52724ba675SRob Herring	iio-hwmon {
53724ba675SRob Herring		compatible = "iio-hwmon";
54724ba675SRob Herring		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>,
55724ba675SRob Herring			<&adc 5>, <&adc 6>, <&adc 7>, <&adc 8>, <&adc 9>,
56724ba675SRob Herring			<&adc 10>, <&adc 11>, <&adc 12>;
57724ba675SRob Herring	};
58724ba675SRob Herring};
59724ba675SRob Herring
60724ba675SRob Herring&fmc {
61724ba675SRob Herring	status = "okay";
62724ba675SRob Herring	flash@0 {
63724ba675SRob Herring		status = "okay";
64724ba675SRob Herring		m25p,fast-read;
65724ba675SRob Herring		label = "bmc";
66724ba675SRob Herring		spi-max-frequency = <50000000>; /* 50 MHz */
67724ba675SRob Herring#include "openbmc-flash-layout.dtsi"
68724ba675SRob Herring	};
69724ba675SRob Herring};
70724ba675SRob Herring
71cdeefb40SZev Weiss&spi1 {
72cdeefb40SZev Weiss	status = "okay";
73cdeefb40SZev Weiss	pinctrl-names = "default";
74cdeefb40SZev Weiss	pinctrl-0 = <&pinctrl_spi1_default>;
75cdeefb40SZev Weiss	flash@0 {
76cdeefb40SZev Weiss		status = "okay";
77cdeefb40SZev Weiss		label = "bios";
78cdeefb40SZev Weiss		m25p,fast-read;
79cdeefb40SZev Weiss		spi-max-frequency = <25000000>; /* 25 MHz */
80cdeefb40SZev Weiss	};
81cdeefb40SZev Weiss};
82cdeefb40SZev Weiss
83724ba675SRob Herring&uart5 {
84724ba675SRob Herring	status = "okay";
85724ba675SRob Herring};
86724ba675SRob Herring
87724ba675SRob Herring&vuart {
88724ba675SRob Herring	status = "okay";
89724ba675SRob Herring	aspeed,lpc-io-reg = <0x2f8>;
90724ba675SRob Herring	aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
91724ba675SRob Herring};
92724ba675SRob Herring
93724ba675SRob Herring&mac0 {
94724ba675SRob Herring	status = "okay";
95724ba675SRob Herring
96724ba675SRob Herring	pinctrl-names = "default";
97724ba675SRob Herring	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
98fde0cde4SZev Weiss
99fde0cde4SZev Weiss	nvmem-cells = <&eth0_macaddress>;
100fde0cde4SZev Weiss	nvmem-cell-names = "mac-address";
101724ba675SRob Herring};
102724ba675SRob Herring
103724ba675SRob Herring&i2c1 {
104724ba675SRob Herring	status = "okay";
105724ba675SRob Herring
106724ba675SRob Herring	/* thermal sensor, one diode run to a disconnected header */
107724ba675SRob Herring	w83773g@4c {
108724ba675SRob Herring		compatible = "nuvoton,w83773g";
109724ba675SRob Herring		reg = <0x4c>;
110724ba675SRob Herring	};
111724ba675SRob Herring};
112724ba675SRob Herring
113724ba675SRob Herring&i2c3 {
114724ba675SRob Herring	status = "okay";
115724ba675SRob Herring
116724ba675SRob Herring	/* FRU EEPROM */
117724ba675SRob Herring	eeprom@57 {
118724ba675SRob Herring		compatible = "st,24c128", "atmel,24c128";
119724ba675SRob Herring		reg = <0x57>;
120724ba675SRob Herring		pagesize = <16>;
121fde0cde4SZev Weiss		#address-cells = <1>;
122fde0cde4SZev Weiss		#size-cells = <1>;
123fde0cde4SZev Weiss
124fde0cde4SZev Weiss		eth0_macaddress: macaddress@3f80 {
125fde0cde4SZev Weiss			reg = <0x3f80 6>;
126fde0cde4SZev Weiss		};
127724ba675SRob Herring	};
128724ba675SRob Herring};
129724ba675SRob Herring
130724ba675SRob Herring&video {
131724ba675SRob Herring	status = "okay";
132724ba675SRob Herring};
133724ba675SRob Herring
134724ba675SRob Herring&vhub {
135724ba675SRob Herring	status = "okay";
136724ba675SRob Herring};
137724ba675SRob Herring
138724ba675SRob Herring&lpc_ctrl {
139724ba675SRob Herring	status = "okay";
140724ba675SRob Herring};
141724ba675SRob Herring
142724ba675SRob Herring&lpc_snoop {
143724ba675SRob Herring	status = "okay";
144724ba675SRob Herring	snoop-ports = <0x80>;
145724ba675SRob Herring};
146724ba675SRob Herring
147724ba675SRob Herring&gpio {
148724ba675SRob Herring	status = "okay";
149724ba675SRob Herring	gpio-line-names =
150724ba675SRob Herring		/*  A */ "BMC_MAC1_INTB", "BMC_MAC2_INTB", "NMI_BTN_N", "BMC_NMI",
151724ba675SRob Herring			"", "", "", "",
152724ba675SRob Herring		/*  B */ "", "", "", "", "", "IRQ_BMC_PCH_SMI_LPC_N", "", "",
153724ba675SRob Herring		/*  C */ "", "", "", "", "", "", "", "",
154724ba675SRob Herring		/*  D */ "BMC_PSIN", "BMC_PSOUT", "BMC_RESETCON", "RESETCON",
155724ba675SRob Herring			"", "", "", "",
156724ba675SRob Herring		/*  E */ "", "", "", "", "", "", "", "",
157724ba675SRob Herring		/*  F */ "LOCATORLED_STATUS_N", "LOCATORBTN", "", "",
158724ba675SRob Herring			"", "", "BMC_PCH_SCI_LPC", "BMC_NCSI_MUX_CTL",
159724ba675SRob Herring		/*  G */ "HWM_BAT_EN", "CHASSIS_ID0", "CHASSIS_ID1", "CHASSIS_ID2",
160724ba675SRob Herring			"BMC_ALERT1_N_R", "BMC_ALERT2_N_R", "BMC_ALERT3_N", "SML0ALERT",
161724ba675SRob Herring		/*  H */ "FM_ME_RCVR_N", "O_PWROK", "SKL_CNL_R", "D4_DIMM_EVENT_3V_N",
162724ba675SRob Herring			"MFG_MODE_N", "BMC_RTCRST", "BMC_HB_LED_N", "BMC_CASEOPEN",
163724ba675SRob Herring		/*  I */ "", "", "", "", "", "", "", "",
164724ba675SRob Herring		/*  J */ "BMC_READY", "BMC_PCH_BIOS_CS_N", "BMC_SMI", "",
165724ba675SRob Herring			"", "", "", "",
166724ba675SRob Herring		/*  K */ "", "", "", "", "", "", "", "",
167724ba675SRob Herring		/*  L */ "BMC_CTS1", "BMC_DCD1", "BMC_DSR1", "BMC_RI1",
168724ba675SRob Herring			"BMC_DTR1", "BMC_RTS1", "BMC_TXD1", "BMC_RXD1",
169724ba675SRob Herring		/*  M */ "BMC_LAN0_DIS_N", "BMC_LAN1_DIS_N", "", "",
170724ba675SRob Herring			"", "", "", "",
171724ba675SRob Herring		/*  N */ "", "", "", "", "", "", "", "",
172724ba675SRob Herring		/*  O */ "", "", "", "", "", "", "", "",
173724ba675SRob Herring		/*  P */ "", "", "", "", "", "", "", "",
174724ba675SRob Herring		/*  Q */ "", "", "", "",
175724ba675SRob Herring			"BMC_SBM_PRESENT_1_N", "BMC_SBM_PRESENT_2_N",
176724ba675SRob Herring			"BMC_SBM_PRESENT_3_N", "BMC_PCIE_WAKE_N",
177724ba675SRob Herring		/*  R */ "", "", "", "", "", "", "", "",
178724ba675SRob Herring		/*  S */ "PCHHOT_BMC_N", "", "RSMRST",
179724ba675SRob Herring			"", "", "", "", "",
180724ba675SRob Herring		/*  T */ "", "", "", "", "", "", "", "",
181724ba675SRob Herring		/*  U */ "", "", "", "", "", "", "", "",
182724ba675SRob Herring		/*  V */ "", "", "", "", "", "", "", "",
183724ba675SRob Herring		/*  W */ "PS_PWROK", /* dummy always-high signal */
184724ba675SRob Herring			"", "", "", "", "", "", "",
185724ba675SRob Herring		/*  X */ "", "", "", "", "", "", "", "",
186724ba675SRob Herring		/*  Y */ "SLP_S3", "SLP_S5", "", "", "", "", "", "",
187724ba675SRob Herring		/*  Z */ "CPU_CATERR_BMC_PCH_N", "", "SYSTEM_FAULT_LED_N", "BMC_THROTTLE_N",
188724ba675SRob Herring			"", "", "", "",
189724ba675SRob Herring		/* AA */ "CPU1_THERMTRIP_LATCH_N", "", "CPU1_PROCHOT_N", "",
190724ba675SRob Herring			"", "", "IRQ_SMI_ACTIVE_N", "FM_BIOS_POST_CMPLT_N",
191724ba675SRob Herring		/* AB */ "", "", "ME_OVERRIDE", "BMC_DMI_MODIFY",
192724ba675SRob Herring			"", "", "", "",
193724ba675SRob Herring		/* AC */ "LAD0", "LAD1", "LAD2", "LAD3",
194724ba675SRob Herring			"CK_33M_BMC", "LFRAME", "SERIRQ", "S_PLTRST";
195724ba675SRob Herring
196724ba675SRob Herring	/* Assert BMC_READY so BIOS doesn't sit around waiting for it */
197724ba675SRob Herring	bmc-ready {
198724ba675SRob Herring		gpio-hog;
199724ba675SRob Herring		gpios = <ASPEED_GPIO(J, 0) GPIO_ACTIVE_LOW>;
200724ba675SRob Herring		output-high;
201724ba675SRob Herring	};
202724ba675SRob Herring};
203724ba675SRob Herring
204724ba675SRob Herring&adc {
205724ba675SRob Herring	status = "okay";
206724ba675SRob Herring	pinctrl-names = "default";
207724ba675SRob Herring	pinctrl-0 = <&pinctrl_adc0_default
208724ba675SRob Herring			&pinctrl_adc1_default
209724ba675SRob Herring			&pinctrl_adc2_default
210724ba675SRob Herring			&pinctrl_adc3_default
211724ba675SRob Herring			&pinctrl_adc4_default
212724ba675SRob Herring			&pinctrl_adc5_default
213724ba675SRob Herring			&pinctrl_adc6_default
214724ba675SRob Herring			&pinctrl_adc7_default
215724ba675SRob Herring			&pinctrl_adc8_default
216724ba675SRob Herring			&pinctrl_adc9_default
217724ba675SRob Herring			&pinctrl_adc10_default
218724ba675SRob Herring			&pinctrl_adc11_default
219724ba675SRob Herring			&pinctrl_adc12_default>;
220724ba675SRob Herring};
221724ba675SRob Herring
222724ba675SRob Herring&kcs3 {
223724ba675SRob Herring	status = "okay";
224724ba675SRob Herring	aspeed,lpc-io-reg = <0xca2>;
225724ba675SRob Herring};
226724ba675SRob Herring
227724ba675SRob Herring&peci0 {
228724ba675SRob Herring	status = "okay";
229724ba675SRob Herring};
230