1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+
2*f126890aSEmmanuel Vadot// Copyright (c) 2018 Inventec Corporation
3*f126890aSEmmanuel Vadot/dts-v1/;
4*f126890aSEmmanuel Vadot
5*f126890aSEmmanuel Vadot#include "aspeed-g5.dtsi"
6*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/aspeed-gpio.h>
7*f126890aSEmmanuel Vadot
8*f126890aSEmmanuel Vadot/ {
9*f126890aSEmmanuel Vadot	model = "Lanyang BMC";
10*f126890aSEmmanuel Vadot	compatible = "inventec,lanyang-bmc", "aspeed,ast2500";
11*f126890aSEmmanuel Vadot
12*f126890aSEmmanuel Vadot	chosen {
13*f126890aSEmmanuel Vadot		stdout-path = &uart5;
14*f126890aSEmmanuel Vadot		bootargs = "console=ttyS4,115200 earlycon";
15*f126890aSEmmanuel Vadot	};
16*f126890aSEmmanuel Vadot
17*f126890aSEmmanuel Vadot	memory@80000000 {
18*f126890aSEmmanuel Vadot		reg = <0x80000000 0x40000000>;
19*f126890aSEmmanuel Vadot	};
20*f126890aSEmmanuel Vadot
21*f126890aSEmmanuel Vadot	reserved-memory {
22*f126890aSEmmanuel Vadot		#address-cells = <1>;
23*f126890aSEmmanuel Vadot		#size-cells = <1>;
24*f126890aSEmmanuel Vadot		ranges;
25*f126890aSEmmanuel Vadot
26*f126890aSEmmanuel Vadot		flash_memory: region@98000000 {
27*f126890aSEmmanuel Vadot			no-map;
28*f126890aSEmmanuel Vadot			reg = <0x98000000 0x04000000>; /* 64M */
29*f126890aSEmmanuel Vadot		};
30*f126890aSEmmanuel Vadot	};
31*f126890aSEmmanuel Vadot
32*f126890aSEmmanuel Vadot	leds {
33*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
34*f126890aSEmmanuel Vadot
35*f126890aSEmmanuel Vadot		sys_boot_status {
36*f126890aSEmmanuel Vadot			label = "System_boot_status";
37*f126890aSEmmanuel Vadot			gpios = <&gpio ASPEED_GPIO(B, 6) GPIO_ACTIVE_LOW>;
38*f126890aSEmmanuel Vadot		};
39*f126890aSEmmanuel Vadot
40*f126890aSEmmanuel Vadot		attention {
41*f126890aSEmmanuel Vadot			label = "Attention_locator";
42*f126890aSEmmanuel Vadot			gpios = <&gpio ASPEED_GPIO(B, 7) GPIO_ACTIVE_HIGH>;
43*f126890aSEmmanuel Vadot		};
44*f126890aSEmmanuel Vadot
45*f126890aSEmmanuel Vadot		plt_fault {
46*f126890aSEmmanuel Vadot			label = "Platform_fault";
47*f126890aSEmmanuel Vadot			gpios = <&gpio ASPEED_GPIO(B, 1) GPIO_ACTIVE_HIGH>;
48*f126890aSEmmanuel Vadot		};
49*f126890aSEmmanuel Vadot
50*f126890aSEmmanuel Vadot		hdd_fault {
51*f126890aSEmmanuel Vadot			label = "Onboard_drive_fault";
52*f126890aSEmmanuel Vadot			gpios = <&gpio ASPEED_GPIO(B, 3) GPIO_ACTIVE_HIGH>;
53*f126890aSEmmanuel Vadot		};
54*f126890aSEmmanuel Vadot		bmc_err {
55*f126890aSEmmanuel Vadot			lable = "BMC_fault";
56*f126890aSEmmanuel Vadot			gpios = <&gpio ASPEED_GPIO(H, 6) GPIO_ACTIVE_HIGH>;
57*f126890aSEmmanuel Vadot		};
58*f126890aSEmmanuel Vadot
59*f126890aSEmmanuel Vadot		sys_err {
60*f126890aSEmmanuel Vadot			lable = "Sys_fault";
61*f126890aSEmmanuel Vadot			gpios = <&gpio ASPEED_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
62*f126890aSEmmanuel Vadot		};
63*f126890aSEmmanuel Vadot	};
64*f126890aSEmmanuel Vadot
65*f126890aSEmmanuel Vadot	fsi: gpio-fsi {
66*f126890aSEmmanuel Vadot		compatible = "fsi-master-gpio", "fsi-master";
67*f126890aSEmmanuel Vadot		#address-cells = <2>;
68*f126890aSEmmanuel Vadot		#size-cells = <0>;
69*f126890aSEmmanuel Vadot
70*f126890aSEmmanuel Vadot		clock-gpios = <&gpio ASPEED_GPIO(J, 0) GPIO_ACTIVE_HIGH>;
71*f126890aSEmmanuel Vadot		data-gpios = <&gpio ASPEED_GPIO(J, 1) GPIO_ACTIVE_HIGH>;
72*f126890aSEmmanuel Vadot		trans-gpios = <&gpio ASPEED_GPIO(D, 5) GPIO_ACTIVE_HIGH>;
73*f126890aSEmmanuel Vadot		enable-gpios = <&gpio ASPEED_GPIO(D, 0) GPIO_ACTIVE_HIGH>;
74*f126890aSEmmanuel Vadot		mux-gpios = <&gpio ASPEED_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
75*f126890aSEmmanuel Vadot	};
76*f126890aSEmmanuel Vadot
77*f126890aSEmmanuel Vadot	iio-hwmon {
78*f126890aSEmmanuel Vadot		compatible = "iio-hwmon";
79*f126890aSEmmanuel Vadot		io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>,
80*f126890aSEmmanuel Vadot			<&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>,
81*f126890aSEmmanuel Vadot			<&adc 8>, <&adc 9>, <&adc 10>, <&adc 11>,
82*f126890aSEmmanuel Vadot			<&adc 13>, <&adc 14>, <&adc 15>;
83*f126890aSEmmanuel Vadot	};
84*f126890aSEmmanuel Vadot
85*f126890aSEmmanuel Vadot	iio-hwmon-battery {
86*f126890aSEmmanuel Vadot		compatible = "iio-hwmon";
87*f126890aSEmmanuel Vadot		io-channels = <&adc 12>;
88*f126890aSEmmanuel Vadot	};
89*f126890aSEmmanuel Vadot};
90*f126890aSEmmanuel Vadot
91*f126890aSEmmanuel Vadot&pwm_tacho {
92*f126890aSEmmanuel Vadot	status = "okay";
93*f126890aSEmmanuel Vadot	pinctrl-names = "default";
94*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_pwm0_default &pinctrl_pwm1_default
95*f126890aSEmmanuel Vadot		&pinctrl_pwm2_default &pinctrl_pwm3_default>;
96*f126890aSEmmanuel Vadot
97*f126890aSEmmanuel Vadot	fan@0 {
98*f126890aSEmmanuel Vadot		reg = <0x00>;
99*f126890aSEmmanuel Vadot		aspeed,fan-tach-ch = /bits/ 8 <0x00>;
100*f126890aSEmmanuel Vadot	};
101*f126890aSEmmanuel Vadot
102*f126890aSEmmanuel Vadot	fan@1 {
103*f126890aSEmmanuel Vadot		reg = <0x01>;
104*f126890aSEmmanuel Vadot		aspeed,fan-tach-ch = /bits/ 8 <0x01>;
105*f126890aSEmmanuel Vadot	};
106*f126890aSEmmanuel Vadot
107*f126890aSEmmanuel Vadot	fan@2 {
108*f126890aSEmmanuel Vadot		reg = <0x02>;
109*f126890aSEmmanuel Vadot		aspeed,fan-tach-ch = /bits/ 8 <0x02>;
110*f126890aSEmmanuel Vadot	};
111*f126890aSEmmanuel Vadot
112*f126890aSEmmanuel Vadot	fan@3 {
113*f126890aSEmmanuel Vadot		reg = <0x03>;
114*f126890aSEmmanuel Vadot		aspeed,fan-tach-ch = /bits/ 8 <0x03>;
115*f126890aSEmmanuel Vadot	};
116*f126890aSEmmanuel Vadot};
117*f126890aSEmmanuel Vadot
118*f126890aSEmmanuel Vadot&fmc {
119*f126890aSEmmanuel Vadot	status = "okay";
120*f126890aSEmmanuel Vadot	flash@0 {
121*f126890aSEmmanuel Vadot		status = "okay";
122*f126890aSEmmanuel Vadot		m25p,fast-read;
123*f126890aSEmmanuel Vadot		label = "bmc";
124*f126890aSEmmanuel Vadot#include "openbmc-flash-layout.dtsi"
125*f126890aSEmmanuel Vadot	};
126*f126890aSEmmanuel Vadot};
127*f126890aSEmmanuel Vadot
128*f126890aSEmmanuel Vadot&spi1 {
129*f126890aSEmmanuel Vadot	status = "okay";
130*f126890aSEmmanuel Vadot	pinctrl-names = "default";
131*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_spi1_default>;
132*f126890aSEmmanuel Vadot
133*f126890aSEmmanuel Vadot	flash@0 {
134*f126890aSEmmanuel Vadot		status = "okay";
135*f126890aSEmmanuel Vadot		label = "pnor";
136*f126890aSEmmanuel Vadot		m25p,fast-read;
137*f126890aSEmmanuel Vadot	};
138*f126890aSEmmanuel Vadot};
139*f126890aSEmmanuel Vadot
140*f126890aSEmmanuel Vadot&spi2 {
141*f126890aSEmmanuel Vadot	status = "okay";
142*f126890aSEmmanuel Vadot	pinctrl-names = "default";
143*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_spi2ck_default
144*f126890aSEmmanuel Vadot		     &pinctrl_spi2cs0_default
145*f126890aSEmmanuel Vadot		     &pinctrl_spi2cs1_default
146*f126890aSEmmanuel Vadot		     &pinctrl_spi2miso_default
147*f126890aSEmmanuel Vadot		     &pinctrl_spi2mosi_default>;
148*f126890aSEmmanuel Vadot
149*f126890aSEmmanuel Vadot	flash@0 {
150*f126890aSEmmanuel Vadot		status = "okay";
151*f126890aSEmmanuel Vadot	};
152*f126890aSEmmanuel Vadot};
153*f126890aSEmmanuel Vadot
154*f126890aSEmmanuel Vadot&uart1 {
155*f126890aSEmmanuel Vadot	status = "okay";
156*f126890aSEmmanuel Vadot	pinctrl-names = "default";
157*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_txd1_default
158*f126890aSEmmanuel Vadot		     &pinctrl_rxd1_default>;
159*f126890aSEmmanuel Vadot};
160*f126890aSEmmanuel Vadot
161*f126890aSEmmanuel Vadot&lpc_ctrl {
162*f126890aSEmmanuel Vadot	status = "okay";
163*f126890aSEmmanuel Vadot	memory-region = <&flash_memory>;
164*f126890aSEmmanuel Vadot	flash = <&spi1>;
165*f126890aSEmmanuel Vadot};
166*f126890aSEmmanuel Vadot
167*f126890aSEmmanuel Vadot&lpc_snoop {
168*f126890aSEmmanuel Vadot	status = "okay";
169*f126890aSEmmanuel Vadot	snoop-ports = <0x80>;
170*f126890aSEmmanuel Vadot};
171*f126890aSEmmanuel Vadot
172*f126890aSEmmanuel Vadot&uart5 {
173*f126890aSEmmanuel Vadot	status = "okay";
174*f126890aSEmmanuel Vadot};
175*f126890aSEmmanuel Vadot
176*f126890aSEmmanuel Vadot&mac0 {
177*f126890aSEmmanuel Vadot	status = "okay";
178*f126890aSEmmanuel Vadot
179*f126890aSEmmanuel Vadot	pinctrl-names = "default";
180*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_rmii1_default>;
181*f126890aSEmmanuel Vadot	clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>,
182*f126890aSEmmanuel Vadot		 <&syscon ASPEED_CLK_MAC1RCLK>;
183*f126890aSEmmanuel Vadot	clock-names = "MACCLK", "RCLK";
184*f126890aSEmmanuel Vadot	use-ncsi;
185*f126890aSEmmanuel Vadot};
186*f126890aSEmmanuel Vadot
187*f126890aSEmmanuel Vadot&mac1 {
188*f126890aSEmmanuel Vadot	status = "okay";
189*f126890aSEmmanuel Vadot
190*f126890aSEmmanuel Vadot	pinctrl-names = "default";
191*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
192*f126890aSEmmanuel Vadot};
193*f126890aSEmmanuel Vadot
194*f126890aSEmmanuel Vadot&i2c0 {
195*f126890aSEmmanuel Vadot	status = "okay";
196*f126890aSEmmanuel Vadot
197*f126890aSEmmanuel Vadot	eeprom@55 {
198*f126890aSEmmanuel Vadot		compatible = "atmel,24c64";
199*f126890aSEmmanuel Vadot		reg = <0x55>;
200*f126890aSEmmanuel Vadot		pagesize = <32>;
201*f126890aSEmmanuel Vadot	};
202*f126890aSEmmanuel Vadot
203*f126890aSEmmanuel Vadot	rtc@68 {
204*f126890aSEmmanuel Vadot		compatible = "nxp,pcf8523";
205*f126890aSEmmanuel Vadot		reg = <0x68>;
206*f126890aSEmmanuel Vadot	};
207*f126890aSEmmanuel Vadot
208*f126890aSEmmanuel Vadot	tmp75@48 {
209*f126890aSEmmanuel Vadot		compatible = "ti,tmp75";
210*f126890aSEmmanuel Vadot		reg = <0x48>;
211*f126890aSEmmanuel Vadot	};
212*f126890aSEmmanuel Vadot};
213*f126890aSEmmanuel Vadot
214*f126890aSEmmanuel Vadot&i2c1 {
215*f126890aSEmmanuel Vadot	status = "okay";
216*f126890aSEmmanuel Vadot};
217*f126890aSEmmanuel Vadot
218*f126890aSEmmanuel Vadot&i2c2 {
219*f126890aSEmmanuel Vadot	status = "okay";
220*f126890aSEmmanuel Vadot};
221*f126890aSEmmanuel Vadot
222*f126890aSEmmanuel Vadot&i2c3 {
223*f126890aSEmmanuel Vadot	status = "okay";
224*f126890aSEmmanuel Vadot};
225*f126890aSEmmanuel Vadot
226*f126890aSEmmanuel Vadot&i2c4 {
227*f126890aSEmmanuel Vadot	status = "okay";
228*f126890aSEmmanuel Vadot};
229*f126890aSEmmanuel Vadot
230*f126890aSEmmanuel Vadot&i2c5 {
231*f126890aSEmmanuel Vadot	status = "okay";
232*f126890aSEmmanuel Vadot};
233*f126890aSEmmanuel Vadot
234*f126890aSEmmanuel Vadot&i2c6 {
235*f126890aSEmmanuel Vadot	status = "okay";
236*f126890aSEmmanuel Vadot};
237*f126890aSEmmanuel Vadot
238*f126890aSEmmanuel Vadot&i2c7 {
239*f126890aSEmmanuel Vadot	status = "okay";
240*f126890aSEmmanuel Vadot};
241*f126890aSEmmanuel Vadot
242*f126890aSEmmanuel Vadot&i2c8 {
243*f126890aSEmmanuel Vadot	status = "okay";
244*f126890aSEmmanuel Vadot};
245*f126890aSEmmanuel Vadot
246*f126890aSEmmanuel Vadot&i2c9 {
247*f126890aSEmmanuel Vadot	status = "okay";
248*f126890aSEmmanuel Vadot};
249*f126890aSEmmanuel Vadot
250*f126890aSEmmanuel Vadot&i2c10 {
251*f126890aSEmmanuel Vadot	status = "okay";
252*f126890aSEmmanuel Vadot};
253*f126890aSEmmanuel Vadot
254*f126890aSEmmanuel Vadot&i2c11 {
255*f126890aSEmmanuel Vadot	status = "okay";
256*f126890aSEmmanuel Vadot};
257*f126890aSEmmanuel Vadot
258*f126890aSEmmanuel Vadot&vuart {
259*f126890aSEmmanuel Vadot	status = "okay";
260*f126890aSEmmanuel Vadot};
261*f126890aSEmmanuel Vadot
262*f126890aSEmmanuel Vadot&gfx {
263*f126890aSEmmanuel Vadot	status = "okay";
264*f126890aSEmmanuel Vadot};
265*f126890aSEmmanuel Vadot
266*f126890aSEmmanuel Vadot&pinctrl {
267*f126890aSEmmanuel Vadot	aspeed,external-nodes = <&gfx &lhc>;
268*f126890aSEmmanuel Vadot};
269*f126890aSEmmanuel Vadot
270*f126890aSEmmanuel Vadot&gpio {
271*f126890aSEmmanuel Vadot	pin_gpio_b0 {
272*f126890aSEmmanuel Vadot		gpio-hog;
273*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(B, 0) GPIO_ACTIVE_HIGH>;
274*f126890aSEmmanuel Vadot		output-high;
275*f126890aSEmmanuel Vadot		line-name = "BMC_HDD1_PWR_EN";
276*f126890aSEmmanuel Vadot	};
277*f126890aSEmmanuel Vadot
278*f126890aSEmmanuel Vadot	pin_gpio_b5 {
279*f126890aSEmmanuel Vadot		gpio-hog;
280*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(B, 5) GPIO_ACTIVE_HIGH>;
281*f126890aSEmmanuel Vadot		input;
282*f126890aSEmmanuel Vadot		line-name = "BMC_USB1_OCI2";
283*f126890aSEmmanuel Vadot	};
284*f126890aSEmmanuel Vadot
285*f126890aSEmmanuel Vadot	pin_gpio_h5 {
286*f126890aSEmmanuel Vadot		gpio-hog;
287*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(H, 5) GPIO_ACTIVE_HIGH>;
288*f126890aSEmmanuel Vadot		output-high;
289*f126890aSEmmanuel Vadot		line-name = "BMC_CP0_PERST_ENABLE_R";
290*f126890aSEmmanuel Vadot	};
291*f126890aSEmmanuel Vadot
292*f126890aSEmmanuel Vadot	pin_gpio_z2 {
293*f126890aSEmmanuel Vadot		gpio-hog;
294*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(Z, 2) GPIO_ACTIVE_HIGH>;
295*f126890aSEmmanuel Vadot		output-high;
296*f126890aSEmmanuel Vadot		line-name = "RST_PCA9546_U177_N";
297*f126890aSEmmanuel Vadot	};
298*f126890aSEmmanuel Vadot
299*f126890aSEmmanuel Vadot	pin_gpio_aa6 {
300*f126890aSEmmanuel Vadot		gpio-hog;
301*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(AA, 6) GPIO_ACTIVE_HIGH>;
302*f126890aSEmmanuel Vadot		output-high;
303*f126890aSEmmanuel Vadot		line-name = "BMC_CP0_RESET_N";
304*f126890aSEmmanuel Vadot	};
305*f126890aSEmmanuel Vadot
306*f126890aSEmmanuel Vadot	pin_gpio_aa7 {
307*f126890aSEmmanuel Vadot		gpio-hog;
308*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(AA, 7) GPIO_ACTIVE_HIGH>;
309*f126890aSEmmanuel Vadot		output-high;
310*f126890aSEmmanuel Vadot		line-name = "BMC_TPM_RESET_N";
311*f126890aSEmmanuel Vadot	};
312*f126890aSEmmanuel Vadot
313*f126890aSEmmanuel Vadot	pin_gpio_ab0 {
314*f126890aSEmmanuel Vadot		gpio-hog;
315*f126890aSEmmanuel Vadot		gpios = <ASPEED_GPIO(AB, 0) GPIO_ACTIVE_LOW>;
316*f126890aSEmmanuel Vadot		output-high;
317*f126890aSEmmanuel Vadot		line-name = "BMC_USB_PWRON_N";
318*f126890aSEmmanuel Vadot	};
319*f126890aSEmmanuel Vadot};
320*f126890aSEmmanuel Vadot
321*f126890aSEmmanuel Vadot&ibt {
322*f126890aSEmmanuel Vadot	status = "okay";
323*f126890aSEmmanuel Vadot};
324*f126890aSEmmanuel Vadot
325*f126890aSEmmanuel Vadot&adc {
326*f126890aSEmmanuel Vadot	status = "okay";
327*f126890aSEmmanuel Vadot};
328*f126890aSEmmanuel Vadot
329*f126890aSEmmanuel Vadot#include "ibm-power9-dual.dtsi"
330