1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0+
2*724ba675SRob Herring/dts-v1/;
3*724ba675SRob Herring
4*724ba675SRob Herring#include "aspeed-g5.dtsi"
5*724ba675SRob Herring#include <dt-bindings/gpio/aspeed-gpio.h>
6*724ba675SRob Herring#include <dt-bindings/i2c/i2c.h>
7*724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
8*724ba675SRob Herring
9*724ba675SRob Herring/{
10*724ba675SRob Herring	model = "ASRock E3C246D4I BMC";
11*724ba675SRob Herring	compatible = "asrock,e3c246d4i-bmc", "aspeed,ast2500";
12*724ba675SRob Herring
13*724ba675SRob Herring	aliases {
14*724ba675SRob Herring		serial4 = &uart5;
15*724ba675SRob Herring	};
16*724ba675SRob Herring
17*724ba675SRob Herring	chosen {
18*724ba675SRob Herring		stdout-path = &uart5;
19*724ba675SRob Herring		bootargs = "console=tty0 console=ttyS4,115200 earlycon";
20*724ba675SRob Herring	};
21*724ba675SRob Herring
22*724ba675SRob Herring	memory@80000000 {
23*724ba675SRob Herring		reg = <0x80000000 0x20000000>;
24*724ba675SRob Herring	};
25*724ba675SRob Herring
26*724ba675SRob Herring	leds {
27*724ba675SRob Herring		compatible = "gpio-leds";
28*724ba675SRob Herring
29*724ba675SRob Herring		heartbeat {
30*724ba675SRob Herring			/* BMC_HB_LED_N */
31*724ba675SRob Herring			gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>;
32*724ba675SRob Herring			linux,default-trigger = "timer";
33*724ba675SRob Herring		};
34*724ba675SRob Herring
35*724ba675SRob Herring		system-fault {
36*724ba675SRob Herring			/* SYSTEM_FAULT_LED_N */
37*724ba675SRob Herring			gpios = <&gpio ASPEED_GPIO(Z, 2) GPIO_ACTIVE_LOW>;
38*724ba675SRob Herring			panic-indicator;
39*724ba675SRob Herring		};
40*724ba675SRob Herring	};
41*724ba675SRob Herring
42*724ba675SRob Herring	gpio-keys {
43*724ba675SRob Herring		compatible = "gpio-keys";
44*724ba675SRob Herring
45*724ba675SRob Herring		uid-button {
46*724ba675SRob Herring			label = "uid-button";
47*724ba675SRob Herring			gpios = <&gpio ASPEED_GPIO(F, 1) GPIO_ACTIVE_LOW>;
48*724ba675SRob Herring			linux,code = <ASPEED_GPIO(F, 1)>;
49*724ba675SRob Herring		};
50*724ba675SRob Herring	};
51*724ba675SRob Herring
52*724ba675SRob Herring	iio-hwmon {
53*724ba675SRob Herring		compatible = "iio-hwmon";
54*724ba675SRob Herring		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, <&adc 4>,
55*724ba675SRob Herring			<&adc 5>, <&adc 6>, <&adc 7>, <&adc 8>, <&adc 9>,
56*724ba675SRob Herring			<&adc 10>, <&adc 11>, <&adc 12>;
57*724ba675SRob Herring	};
58*724ba675SRob Herring};
59*724ba675SRob Herring
60*724ba675SRob Herring&fmc {
61*724ba675SRob Herring	status = "okay";
62*724ba675SRob Herring	flash@0 {
63*724ba675SRob Herring		status = "okay";
64*724ba675SRob Herring		m25p,fast-read;
65*724ba675SRob Herring		label = "bmc";
66*724ba675SRob Herring		spi-max-frequency = <50000000>; /* 50 MHz */
67*724ba675SRob Herring#include "openbmc-flash-layout.dtsi"
68*724ba675SRob Herring	};
69*724ba675SRob Herring};
70*724ba675SRob Herring
71*724ba675SRob Herring&uart5 {
72*724ba675SRob Herring	status = "okay";
73*724ba675SRob Herring};
74*724ba675SRob Herring
75*724ba675SRob Herring&vuart {
76*724ba675SRob Herring	status = "okay";
77*724ba675SRob Herring	aspeed,lpc-io-reg = <0x2f8>;
78*724ba675SRob Herring	aspeed,lpc-interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
79*724ba675SRob Herring};
80*724ba675SRob Herring
81*724ba675SRob Herring&mac0 {
82*724ba675SRob Herring	status = "okay";
83*724ba675SRob Herring
84*724ba675SRob Herring	pinctrl-names = "default";
85*724ba675SRob Herring	pinctrl-0 = <&pinctrl_rgmii1_default &pinctrl_mdio1_default>;
86*724ba675SRob Herring};
87*724ba675SRob Herring
88*724ba675SRob Herring&i2c1 {
89*724ba675SRob Herring	status = "okay";
90*724ba675SRob Herring
91*724ba675SRob Herring	/* thermal sensor, one diode run to a disconnected header */
92*724ba675SRob Herring	w83773g@4c {
93*724ba675SRob Herring		compatible = "nuvoton,w83773g";
94*724ba675SRob Herring		reg = <0x4c>;
95*724ba675SRob Herring	};
96*724ba675SRob Herring};
97*724ba675SRob Herring
98*724ba675SRob Herring&i2c3 {
99*724ba675SRob Herring	status = "okay";
100*724ba675SRob Herring
101*724ba675SRob Herring	/* FRU EEPROM */
102*724ba675SRob Herring	eeprom@57 {
103*724ba675SRob Herring		compatible = "st,24c128", "atmel,24c128";
104*724ba675SRob Herring		reg = <0x57>;
105*724ba675SRob Herring		pagesize = <16>;
106*724ba675SRob Herring	};
107*724ba675SRob Herring};
108*724ba675SRob Herring
109*724ba675SRob Herring&video {
110*724ba675SRob Herring	status = "okay";
111*724ba675SRob Herring};
112*724ba675SRob Herring
113*724ba675SRob Herring&vhub {
114*724ba675SRob Herring	status = "okay";
115*724ba675SRob Herring};
116*724ba675SRob Herring
117*724ba675SRob Herring&lpc_ctrl {
118*724ba675SRob Herring	status = "okay";
119*724ba675SRob Herring};
120*724ba675SRob Herring
121*724ba675SRob Herring&lpc_snoop {
122*724ba675SRob Herring	status = "okay";
123*724ba675SRob Herring	snoop-ports = <0x80>;
124*724ba675SRob Herring};
125*724ba675SRob Herring
126*724ba675SRob Herring&gpio {
127*724ba675SRob Herring	status = "okay";
128*724ba675SRob Herring	gpio-line-names =
129*724ba675SRob Herring		/*  A */ "BMC_MAC1_INTB", "BMC_MAC2_INTB", "NMI_BTN_N", "BMC_NMI",
130*724ba675SRob Herring			"", "", "", "",
131*724ba675SRob Herring		/*  B */ "", "", "", "", "", "IRQ_BMC_PCH_SMI_LPC_N", "", "",
132*724ba675SRob Herring		/*  C */ "", "", "", "", "", "", "", "",
133*724ba675SRob Herring		/*  D */ "BMC_PSIN", "BMC_PSOUT", "BMC_RESETCON", "RESETCON",
134*724ba675SRob Herring			"", "", "", "",
135*724ba675SRob Herring		/*  E */ "", "", "", "", "", "", "", "",
136*724ba675SRob Herring		/*  F */ "LOCATORLED_STATUS_N", "LOCATORBTN", "", "",
137*724ba675SRob Herring			"", "", "BMC_PCH_SCI_LPC", "BMC_NCSI_MUX_CTL",
138*724ba675SRob Herring		/*  G */ "HWM_BAT_EN", "CHASSIS_ID0", "CHASSIS_ID1", "CHASSIS_ID2",
139*724ba675SRob Herring			"BMC_ALERT1_N_R", "BMC_ALERT2_N_R", "BMC_ALERT3_N", "SML0ALERT",
140*724ba675SRob Herring		/*  H */ "FM_ME_RCVR_N", "O_PWROK", "SKL_CNL_R", "D4_DIMM_EVENT_3V_N",
141*724ba675SRob Herring			"MFG_MODE_N", "BMC_RTCRST", "BMC_HB_LED_N", "BMC_CASEOPEN",
142*724ba675SRob Herring		/*  I */ "", "", "", "", "", "", "", "",
143*724ba675SRob Herring		/*  J */ "BMC_READY", "BMC_PCH_BIOS_CS_N", "BMC_SMI", "",
144*724ba675SRob Herring			"", "", "", "",
145*724ba675SRob Herring		/*  K */ "", "", "", "", "", "", "", "",
146*724ba675SRob Herring		/*  L */ "BMC_CTS1", "BMC_DCD1", "BMC_DSR1", "BMC_RI1",
147*724ba675SRob Herring			"BMC_DTR1", "BMC_RTS1", "BMC_TXD1", "BMC_RXD1",
148*724ba675SRob Herring		/*  M */ "BMC_LAN0_DIS_N", "BMC_LAN1_DIS_N", "", "",
149*724ba675SRob Herring			"", "", "", "",
150*724ba675SRob Herring		/*  N */ "", "", "", "", "", "", "", "",
151*724ba675SRob Herring		/*  O */ "", "", "", "", "", "", "", "",
152*724ba675SRob Herring		/*  P */ "", "", "", "", "", "", "", "",
153*724ba675SRob Herring		/*  Q */ "", "", "", "",
154*724ba675SRob Herring			"BMC_SBM_PRESENT_1_N", "BMC_SBM_PRESENT_2_N",
155*724ba675SRob Herring			"BMC_SBM_PRESENT_3_N", "BMC_PCIE_WAKE_N",
156*724ba675SRob Herring		/*  R */ "", "", "", "", "", "", "", "",
157*724ba675SRob Herring		/*  S */ "PCHHOT_BMC_N", "", "RSMRST",
158*724ba675SRob Herring			"", "", "", "", "",
159*724ba675SRob Herring		/*  T */ "", "", "", "", "", "", "", "",
160*724ba675SRob Herring		/*  U */ "", "", "", "", "", "", "", "",
161*724ba675SRob Herring		/*  V */ "", "", "", "", "", "", "", "",
162*724ba675SRob Herring		/*  W */ "PS_PWROK", /* dummy always-high signal */
163*724ba675SRob Herring			"", "", "", "", "", "", "",
164*724ba675SRob Herring		/*  X */ "", "", "", "", "", "", "", "",
165*724ba675SRob Herring		/*  Y */ "SLP_S3", "SLP_S5", "", "", "", "", "", "",
166*724ba675SRob Herring		/*  Z */ "CPU_CATERR_BMC_PCH_N", "", "SYSTEM_FAULT_LED_N", "BMC_THROTTLE_N",
167*724ba675SRob Herring			"", "", "", "",
168*724ba675SRob Herring		/* AA */ "CPU1_THERMTRIP_LATCH_N", "", "CPU1_PROCHOT_N", "",
169*724ba675SRob Herring			"", "", "IRQ_SMI_ACTIVE_N", "FM_BIOS_POST_CMPLT_N",
170*724ba675SRob Herring		/* AB */ "", "", "ME_OVERRIDE", "BMC_DMI_MODIFY",
171*724ba675SRob Herring			"", "", "", "",
172*724ba675SRob Herring		/* AC */ "LAD0", "LAD1", "LAD2", "LAD3",
173*724ba675SRob Herring			"CK_33M_BMC", "LFRAME", "SERIRQ", "S_PLTRST";
174*724ba675SRob Herring
175*724ba675SRob Herring	/* Assert BMC_READY so BIOS doesn't sit around waiting for it */
176*724ba675SRob Herring	bmc-ready {
177*724ba675SRob Herring		gpio-hog;
178*724ba675SRob Herring		gpios = <ASPEED_GPIO(J, 0) GPIO_ACTIVE_LOW>;
179*724ba675SRob Herring		output-high;
180*724ba675SRob Herring	};
181*724ba675SRob Herring};
182*724ba675SRob Herring
183*724ba675SRob Herring&adc {
184*724ba675SRob Herring	status = "okay";
185*724ba675SRob Herring	pinctrl-names = "default";
186*724ba675SRob Herring	pinctrl-0 = <&pinctrl_adc0_default
187*724ba675SRob Herring			&pinctrl_adc1_default
188*724ba675SRob Herring			&pinctrl_adc2_default
189*724ba675SRob Herring			&pinctrl_adc3_default
190*724ba675SRob Herring			&pinctrl_adc4_default
191*724ba675SRob Herring			&pinctrl_adc5_default
192*724ba675SRob Herring			&pinctrl_adc6_default
193*724ba675SRob Herring			&pinctrl_adc7_default
194*724ba675SRob Herring			&pinctrl_adc8_default
195*724ba675SRob Herring			&pinctrl_adc9_default
196*724ba675SRob Herring			&pinctrl_adc10_default
197*724ba675SRob Herring			&pinctrl_adc11_default
198*724ba675SRob Herring			&pinctrl_adc12_default>;
199*724ba675SRob Herring};
200*724ba675SRob Herring
201*724ba675SRob Herring&kcs3 {
202*724ba675SRob Herring	status = "okay";
203*724ba675SRob Herring	aspeed,lpc-io-reg = <0xca2>;
204*724ba675SRob Herring};
205*724ba675SRob Herring
206*724ba675SRob Herring&peci0 {
207*724ba675SRob Herring	status = "okay";
208*724ba675SRob Herring};
209