xref: /openbmc/u-boot/arch/x86/dts/dfi-bt700.dtsi (revision b37b7b20)
183d290c5STom Rini// SPDX-License-Identifier: GPL-2.0+
2b1ad6c69SStefan Roese/*
3b1ad6c69SStefan Roese * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
4b1ad6c69SStefan Roese * Copyright (C) 2016 Stefan Roese <sr@denx.de>
5b1ad6c69SStefan Roese */
6b1ad6c69SStefan Roese
75e74e5a6SBin Meng#include <asm/arch-baytrail/fsp/fsp_configs.h>
8b1ad6c69SStefan Roese#include <dt-bindings/gpio/x86-gpio.h>
9b1ad6c69SStefan Roese#include <dt-bindings/interrupt-router/intel-irq.h>
10b1ad6c69SStefan Roese
11b1ad6c69SStefan Roese#include "skeleton.dtsi"
12*b37b7b20SBin Meng#include "reset.dtsi"
13b1ad6c69SStefan Roese#include "rtc.dtsi"
14b1ad6c69SStefan Roese#include "tsc_timer.dtsi"
15b1ad6c69SStefan Roese
16b1ad6c69SStefan Roese/ {
17b1ad6c69SStefan Roese	config {
18b1ad6c69SStefan Roese		silent_console = <0>;
19b1ad6c69SStefan Roese	};
20b1ad6c69SStefan Roese
21b1ad6c69SStefan Roese	pch_pinctrl {
22b1ad6c69SStefan Roese		compatible = "intel,x86-pinctrl";
23b1ad6c69SStefan Roese		reg = <0 0>;
24b1ad6c69SStefan Roese
25b1ad6c69SStefan Roese		/* Add UART1 PAD configuration (SIO HS-UART) */
26b1ad6c69SStefan Roese		uart1_txd@0 {
27b1ad6c69SStefan Roese			pad-offset = <0x10>;
28b1ad6c69SStefan Roese			mode-func = <1>;
29b1ad6c69SStefan Roese		};
30b1ad6c69SStefan Roese
31b1ad6c69SStefan Roese		uart1_rxd@0 {
32b1ad6c69SStefan Roese			pad-offset = <0x20>;
33b1ad6c69SStefan Roese			mode-func = <1>;
34b1ad6c69SStefan Roese		};
35b1ad6c69SStefan Roese
36b1ad6c69SStefan Roese		/*
37b1ad6c69SStefan Roese		 * As of today, the latest version FSP (gold4) for BayTrail
38b1ad6c69SStefan Roese		 * misses the PAD configuration of the SD controller's Card
39b1ad6c69SStefan Roese		 * Detect signal. The default PAD value for the CD pin sets
40b1ad6c69SStefan Roese		 * the pin to work in GPIO mode, which causes card detect
41b1ad6c69SStefan Roese		 * status cannot be reflected by the Present State register
42b1ad6c69SStefan Roese		 * in the SD controller (bit 16 & bit 18 are always zero).
43b1ad6c69SStefan Roese		 *
44b1ad6c69SStefan Roese		 * Configure this pin to function 1 (SD controller).
45b1ad6c69SStefan Roese		 */
46b1ad6c69SStefan Roese		sdmmc3_cd@0 {
47b1ad6c69SStefan Roese			pad-offset = <0x3a0>;
48b1ad6c69SStefan Roese			mode-func = <1>;
49b1ad6c69SStefan Roese		};
501f4e2578SStefan Roese
511f4e2578SStefan Roese		xhci_hub_reset: usb_ulpi_stp@0 {
521f4e2578SStefan Roese			gpio-offset = <0xa0 10>;
531f4e2578SStefan Roese			pad-offset = <0x23b0>;
541f4e2578SStefan Roese			mode-func = <0>;
551f4e2578SStefan Roese			mode-gpio;
561f4e2578SStefan Roese			output-value = <1>;
571f4e2578SStefan Roese			direction = <PIN_OUTPUT>;
581f4e2578SStefan Roese		};
59b1ad6c69SStefan Roese	};
60b1ad6c69SStefan Roese
61b1ad6c69SStefan Roese	chosen {
62b1ad6c69SStefan Roese		stdout-path = "/serial";
63b1ad6c69SStefan Roese	};
64b1ad6c69SStefan Roese
65b1ad6c69SStefan Roese	cpus {
66b1ad6c69SStefan Roese		#address-cells = <1>;
67b1ad6c69SStefan Roese		#size-cells = <0>;
68b1ad6c69SStefan Roese
69b1ad6c69SStefan Roese		cpu@0 {
70b1ad6c69SStefan Roese			device_type = "cpu";
71b1ad6c69SStefan Roese			compatible = "intel,baytrail-cpu";
72b1ad6c69SStefan Roese			reg = <0>;
73b1ad6c69SStefan Roese			intel,apic-id = <0>;
74b1ad6c69SStefan Roese		};
75b1ad6c69SStefan Roese
76b1ad6c69SStefan Roese		cpu@1 {
77b1ad6c69SStefan Roese			device_type = "cpu";
78b1ad6c69SStefan Roese			compatible = "intel,baytrail-cpu";
79b1ad6c69SStefan Roese			reg = <1>;
80b1ad6c69SStefan Roese			intel,apic-id = <2>;
81b1ad6c69SStefan Roese		};
82b1ad6c69SStefan Roese
83b1ad6c69SStefan Roese		cpu@2 {
84b1ad6c69SStefan Roese			device_type = "cpu";
85b1ad6c69SStefan Roese			compatible = "intel,baytrail-cpu";
86b1ad6c69SStefan Roese			reg = <2>;
87b1ad6c69SStefan Roese			intel,apic-id = <4>;
88b1ad6c69SStefan Roese		};
89b1ad6c69SStefan Roese
90b1ad6c69SStefan Roese		cpu@3 {
91b1ad6c69SStefan Roese			device_type = "cpu";
92b1ad6c69SStefan Roese			compatible = "intel,baytrail-cpu";
93b1ad6c69SStefan Roese			reg = <3>;
94b1ad6c69SStefan Roese			intel,apic-id = <6>;
95b1ad6c69SStefan Roese		};
96b1ad6c69SStefan Roese	};
97b1ad6c69SStefan Roese
98b1ad6c69SStefan Roese	pci {
99b1ad6c69SStefan Roese		compatible = "intel,pci-baytrail", "pci-x86";
100b1ad6c69SStefan Roese		#address-cells = <3>;
101b1ad6c69SStefan Roese		#size-cells = <2>;
102b1ad6c69SStefan Roese		u-boot,dm-pre-reloc;
103b1ad6c69SStefan Roese		ranges = <0x02000000 0x0 0x80000000 0x80000000 0 0x40000000
104b1ad6c69SStefan Roese			  0x42000000 0x0 0xc0000000 0xc0000000 0 0x20000000
105b1ad6c69SStefan Roese			  0x01000000 0x0 0x2000 0x2000 0 0xe000>;
106b1ad6c69SStefan Roese
107b1ad6c69SStefan Roese		pciuart0: uart@1e,3 {
108b1ad6c69SStefan Roese			compatible = "pci8086,0f0a.00",
109b1ad6c69SStefan Roese					"pci8086,0f0a",
110b1ad6c69SStefan Roese					"pciclass,070002",
111b1ad6c69SStefan Roese					"pciclass,0700",
112b1ad6c69SStefan Roese					"ns16550";
113b1ad6c69SStefan Roese			u-boot,dm-pre-reloc;
114b1ad6c69SStefan Roese			reg = <0x0200f310 0x0 0x0 0x0 0x0>;
115b1ad6c69SStefan Roese			reg-shift = <2>;
116b1ad6c69SStefan Roese			clock-frequency = <58982400>;
117b1ad6c69SStefan Roese			current-speed = <115200>;
118b1ad6c69SStefan Roese		};
119b1ad6c69SStefan Roese
120b1ad6c69SStefan Roese		pch@1f,0 {
121b1ad6c69SStefan Roese			reg = <0x0000f800 0 0 0 0>;
122b1ad6c69SStefan Roese			compatible = "pci8086,0f1c", "intel,pch9";
123b1ad6c69SStefan Roese			#address-cells = <1>;
124b1ad6c69SStefan Roese			#size-cells = <1>;
125b1ad6c69SStefan Roese
126b1ad6c69SStefan Roese			irq-router {
127b1ad6c69SStefan Roese				compatible = "intel,irq-router";
128b1ad6c69SStefan Roese				intel,pirq-config = "ibase";
129b1ad6c69SStefan Roese				intel,ibase-offset = <0x50>;
130b1ad6c69SStefan Roese				intel,actl-addr = <0>;
131b1ad6c69SStefan Roese				intel,pirq-link = <8 8>;
132b1ad6c69SStefan Roese				intel,pirq-mask = <0xdee0>;
133b1ad6c69SStefan Roese				intel,pirq-routing = <
134b1ad6c69SStefan Roese					/* BayTrail PCI devices */
135b1ad6c69SStefan Roese					PCI_BDF(0, 2, 0) INTA PIRQA
136b1ad6c69SStefan Roese					PCI_BDF(0, 3, 0) INTA PIRQA
137b1ad6c69SStefan Roese					PCI_BDF(0, 16, 0) INTA PIRQA
138b1ad6c69SStefan Roese					PCI_BDF(0, 17, 0) INTA PIRQA
139b1ad6c69SStefan Roese					PCI_BDF(0, 18, 0) INTA PIRQA
140b1ad6c69SStefan Roese					PCI_BDF(0, 19, 0) INTA PIRQA
141b1ad6c69SStefan Roese					PCI_BDF(0, 20, 0) INTA PIRQA
142b1ad6c69SStefan Roese					PCI_BDF(0, 21, 0) INTA PIRQA
143b1ad6c69SStefan Roese					PCI_BDF(0, 22, 0) INTA PIRQA
144b1ad6c69SStefan Roese					PCI_BDF(0, 23, 0) INTA PIRQA
145b1ad6c69SStefan Roese					PCI_BDF(0, 24, 0) INTA PIRQA
146b1ad6c69SStefan Roese					PCI_BDF(0, 24, 1) INTC PIRQC
147b1ad6c69SStefan Roese					PCI_BDF(0, 24, 2) INTD PIRQD
148b1ad6c69SStefan Roese					PCI_BDF(0, 24, 3) INTB PIRQB
149b1ad6c69SStefan Roese					PCI_BDF(0, 24, 4) INTA PIRQA
150b1ad6c69SStefan Roese					PCI_BDF(0, 24, 5) INTC PIRQC
151b1ad6c69SStefan Roese					PCI_BDF(0, 24, 6) INTD PIRQD
152b1ad6c69SStefan Roese					PCI_BDF(0, 24, 7) INTB PIRQB
153b1ad6c69SStefan Roese					PCI_BDF(0, 26, 0) INTA PIRQA
154b1ad6c69SStefan Roese					PCI_BDF(0, 27, 0) INTA PIRQA
155b1ad6c69SStefan Roese					PCI_BDF(0, 28, 0) INTA PIRQA
156b1ad6c69SStefan Roese					PCI_BDF(0, 28, 1) INTB PIRQB
157b1ad6c69SStefan Roese					PCI_BDF(0, 28, 2) INTC PIRQC
158b1ad6c69SStefan Roese					PCI_BDF(0, 28, 3) INTD PIRQD
159b1ad6c69SStefan Roese					PCI_BDF(0, 29, 0) INTA PIRQA
160b1ad6c69SStefan Roese					PCI_BDF(0, 30, 0) INTA PIRQA
161b1ad6c69SStefan Roese					PCI_BDF(0, 30, 1) INTD PIRQD
162b1ad6c69SStefan Roese					PCI_BDF(0, 30, 2) INTB PIRQB
163b1ad6c69SStefan Roese					PCI_BDF(0, 30, 3) INTC PIRQC
164b1ad6c69SStefan Roese					PCI_BDF(0, 30, 4) INTD PIRQD
165b1ad6c69SStefan Roese					PCI_BDF(0, 30, 5) INTB PIRQB
166b1ad6c69SStefan Roese					PCI_BDF(0, 31, 3) INTB PIRQB
167b1ad6c69SStefan Roese
168b1ad6c69SStefan Roese					/*
169b1ad6c69SStefan Roese					 * PCIe root ports downstream
170b1ad6c69SStefan Roese					 * interrupts
171b1ad6c69SStefan Roese					 */
172b1ad6c69SStefan Roese					PCI_BDF(1, 0, 0) INTA PIRQA
173b1ad6c69SStefan Roese					PCI_BDF(1, 0, 0) INTB PIRQB
174b1ad6c69SStefan Roese					PCI_BDF(1, 0, 0) INTC PIRQC
175b1ad6c69SStefan Roese					PCI_BDF(1, 0, 0) INTD PIRQD
176b1ad6c69SStefan Roese					PCI_BDF(2, 0, 0) INTA PIRQB
177b1ad6c69SStefan Roese					PCI_BDF(2, 0, 0) INTB PIRQC
178b1ad6c69SStefan Roese					PCI_BDF(2, 0, 0) INTC PIRQD
179b1ad6c69SStefan Roese					PCI_BDF(2, 0, 0) INTD PIRQA
180b1ad6c69SStefan Roese					PCI_BDF(3, 0, 0) INTA PIRQC
181b1ad6c69SStefan Roese					PCI_BDF(3, 0, 0) INTB PIRQD
182b1ad6c69SStefan Roese					PCI_BDF(3, 0, 0) INTC PIRQA
183b1ad6c69SStefan Roese					PCI_BDF(3, 0, 0) INTD PIRQB
184b1ad6c69SStefan Roese					PCI_BDF(4, 0, 0) INTA PIRQD
185b1ad6c69SStefan Roese					PCI_BDF(4, 0, 0) INTB PIRQA
186b1ad6c69SStefan Roese					PCI_BDF(4, 0, 0) INTC PIRQB
187b1ad6c69SStefan Roese					PCI_BDF(4, 0, 0) INTD PIRQC
188b1ad6c69SStefan Roese				>;
189b1ad6c69SStefan Roese			};
190b1ad6c69SStefan Roese
191b1ad6c69SStefan Roese			spi: spi {
192b1ad6c69SStefan Roese				#address-cells = <1>;
193b1ad6c69SStefan Roese				#size-cells = <0>;
194b1ad6c69SStefan Roese				compatible = "intel,ich9-spi";
195b1ad6c69SStefan Roese				spi-flash@0 {
196b1ad6c69SStefan Roese					#address-cells = <1>;
197b1ad6c69SStefan Roese					#size-cells = <1>;
198b1ad6c69SStefan Roese					reg = <0>;
199b1ad6c69SStefan Roese					compatible = "stmicro,n25q064a",
200b1ad6c69SStefan Roese						"spi-flash";
201b1ad6c69SStefan Roese					memory-map = <0xff800000 0x00800000>;
202b1ad6c69SStefan Roese					rw-mrc-cache {
203b1ad6c69SStefan Roese						label = "rw-mrc-cache";
204b1ad6c69SStefan Roese						reg = <0x006f0000 0x00010000>;
205b1ad6c69SStefan Roese					};
206b1ad6c69SStefan Roese				};
207b1ad6c69SStefan Roese			};
208b1ad6c69SStefan Roese
209b1ad6c69SStefan Roese			gpioa {
210b1ad6c69SStefan Roese				compatible = "intel,ich6-gpio";
211b1ad6c69SStefan Roese				u-boot,dm-pre-reloc;
212b1ad6c69SStefan Roese				reg = <0 0x20>;
213b1ad6c69SStefan Roese				bank-name = "A";
214770ee017SBin Meng				use-lvl-write-cache;
215b1ad6c69SStefan Roese			};
216b1ad6c69SStefan Roese
217b1ad6c69SStefan Roese			gpiob {
218b1ad6c69SStefan Roese				compatible = "intel,ich6-gpio";
219b1ad6c69SStefan Roese				u-boot,dm-pre-reloc;
220b1ad6c69SStefan Roese				reg = <0x20 0x20>;
221b1ad6c69SStefan Roese				bank-name = "B";
222770ee017SBin Meng				use-lvl-write-cache;
223b1ad6c69SStefan Roese			};
224b1ad6c69SStefan Roese
225b1ad6c69SStefan Roese			gpioc {
226b1ad6c69SStefan Roese				compatible = "intel,ich6-gpio";
227b1ad6c69SStefan Roese				u-boot,dm-pre-reloc;
228b1ad6c69SStefan Roese				reg = <0x40 0x20>;
229b1ad6c69SStefan Roese				bank-name = "C";
230770ee017SBin Meng				use-lvl-write-cache;
231b1ad6c69SStefan Roese			};
232b1ad6c69SStefan Roese
233b1ad6c69SStefan Roese			gpiod {
234b1ad6c69SStefan Roese				compatible = "intel,ich6-gpio";
235b1ad6c69SStefan Roese				u-boot,dm-pre-reloc;
236b1ad6c69SStefan Roese				reg = <0x60 0x20>;
237b1ad6c69SStefan Roese				bank-name = "D";
238770ee017SBin Meng				use-lvl-write-cache;
239b1ad6c69SStefan Roese			};
240b1ad6c69SStefan Roese
241b1ad6c69SStefan Roese			gpioe {
242b1ad6c69SStefan Roese				compatible = "intel,ich6-gpio";
243b1ad6c69SStefan Roese				u-boot,dm-pre-reloc;
244b1ad6c69SStefan Roese				reg = <0x80 0x20>;
245b1ad6c69SStefan Roese				bank-name = "E";
246770ee017SBin Meng				use-lvl-write-cache;
247b1ad6c69SStefan Roese			};
248b1ad6c69SStefan Roese
249b1ad6c69SStefan Roese			gpiof {
250b1ad6c69SStefan Roese				compatible = "intel,ich6-gpio";
251b1ad6c69SStefan Roese				u-boot,dm-pre-reloc;
252b1ad6c69SStefan Roese				reg = <0xA0 0x20>;
253b1ad6c69SStefan Roese				bank-name = "F";
254770ee017SBin Meng				use-lvl-write-cache;
255b1ad6c69SStefan Roese			};
256b1ad6c69SStefan Roese		};
257b1ad6c69SStefan Roese	};
258b1ad6c69SStefan Roese
259b1ad6c69SStefan Roese	fsp {
260b1ad6c69SStefan Roese		compatible = "intel,baytrail-fsp";
2615e74e5a6SBin Meng		fsp,mrc-init-tseg-size = <MRC_INIT_TSEG_SIZE_1MB>;
2625e74e5a6SBin Meng		fsp,mrc-init-mmio-size = <MRC_INIT_MMIO_SIZE_2048MB>;
263b1ad6c69SStefan Roese		fsp,mrc-init-spd-addr1 = <0xa0>;
264b1ad6c69SStefan Roese		fsp,mrc-init-spd-addr2 = <0xa2>;
2655e74e5a6SBin Meng		fsp,emmc-boot-mode = <EMMC_BOOT_MODE_AUTO>;
266b1ad6c69SStefan Roese		fsp,enable-sdio;
267b1ad6c69SStefan Roese		fsp,enable-sdcard;
268b1ad6c69SStefan Roese		fsp,enable-hsuart0;
269b1ad6c69SStefan Roese		fsp,enable-hsuart1;
270b1ad6c69SStefan Roese		fsp,enable-spi;
271b1ad6c69SStefan Roese		fsp,enable-sata;
2725e74e5a6SBin Meng		fsp,sata-mode = <SATA_MODE_AHCI>;
2731f4e2578SStefan Roese#ifdef CONFIG_USB_XHCI_HCD
2741f4e2578SStefan Roese		fsp,enable-xhci;
2751f4e2578SStefan Roese#endif
276f8f291b0SBin Meng		fsp,lpe-mode = <LPE_MODE_PCI>;
277f8f291b0SBin Meng		fsp,lpss-sio-mode = <LPSS_SIO_MODE_PCI>;
278b1ad6c69SStefan Roese		fsp,enable-dma0;
279b1ad6c69SStefan Roese		fsp,enable-dma1;
280b1ad6c69SStefan Roese		fsp,enable-i2c0;
281b1ad6c69SStefan Roese		fsp,enable-i2c1;
282b1ad6c69SStefan Roese		fsp,enable-i2c2;
283b1ad6c69SStefan Roese		fsp,enable-i2c3;
284b1ad6c69SStefan Roese		fsp,enable-i2c4;
285b1ad6c69SStefan Roese		fsp,enable-i2c5;
286b1ad6c69SStefan Roese		fsp,enable-i2c6;
287b1ad6c69SStefan Roese		fsp,enable-pwm0;
288b1ad6c69SStefan Roese		fsp,enable-pwm1;
2895e74e5a6SBin Meng		fsp,igd-dvmt50-pre-alloc = <IGD_DVMT50_PRE_ALLOC_64MB>;
2905e74e5a6SBin Meng		fsp,aperture-size = <APERTURE_SIZE_256MB>;
2915e74e5a6SBin Meng		fsp,gtt-size = <GTT_SIZE_2MB>;
292f8f291b0SBin Meng		fsp,scc-mode = <SCC_MODE_PCI>;
2935e74e5a6SBin Meng		fsp,os-selection = <OS_SELECTION_LINUX>;
294b1ad6c69SStefan Roese		fsp,emmc45-ddr50-enabled;
295b1ad6c69SStefan Roese		fsp,emmc45-retune-timer-value = <8>;
296b1ad6c69SStefan Roese		fsp,enable-igd;
297b1ad6c69SStefan Roese		fsp,enable-memory-down;
298b1ad6c69SStefan Roese		fsp,memory-down-params {
299b1ad6c69SStefan Roese			compatible = "intel,baytrail-fsp-mdp";
3005e74e5a6SBin Meng			fsp,dram-speed = <DRAM_SPEED_1333MTS>;
3015e74e5a6SBin Meng			fsp,dram-type = <DRAM_TYPE_DDR3L>;
302b1ad6c69SStefan Roese			fsp,dimm-0-enable;
3035e74e5a6SBin Meng			fsp,dimm-width = <DIMM_WIDTH_X16>;
3045e74e5a6SBin Meng			fsp,dimm-density = <DIMM_DENSITY_8GBIT>;
3055e74e5a6SBin Meng			fsp,dimm-bus-width = <DIMM_BUS_WIDTH_64BITS>;
3065e74e5a6SBin Meng			fsp,dimm-sides = <DIMM_SIDES_1RANKS>;
307b1ad6c69SStefan Roese
308b1ad6c69SStefan Roese			/* These following values might need a re-visit */
309b1ad6c69SStefan Roese			fsp,dimm-tcl = <8>;
310b1ad6c69SStefan Roese			fsp,dimm-trpt-rcd = <8>;
311b1ad6c69SStefan Roese			fsp,dimm-twr = <8>;
312b1ad6c69SStefan Roese			fsp,dimm-twtr = <4>;
313b1ad6c69SStefan Roese			fsp,dimm-trrd = <6>;
314b1ad6c69SStefan Roese			fsp,dimm-trtp = <4>;
315b1ad6c69SStefan Roese			fsp,dimm-tfaw = <22>;
316b1ad6c69SStefan Roese		};
317b1ad6c69SStefan Roese	};
318b1ad6c69SStefan Roese
319b1ad6c69SStefan Roese	microcode {
320b1ad6c69SStefan Roese		update@0 {
321b1ad6c69SStefan Roese#include "microcode/m0130673325.dtsi"
322b1ad6c69SStefan Roese		};
323b1ad6c69SStefan Roese		update@1 {
324b1ad6c69SStefan Roese#include "microcode/m0130679907.dtsi"
325b1ad6c69SStefan Roese		};
326b1ad6c69SStefan Roese	};
327b1ad6c69SStefan Roese};
328