1/* SPDX-License-Identifier: Apache-2.0 */
2
3/dts-v1/;
4
5#include <mem.h>
6
7#ifndef DT_DRAM_BASE
8#define DT_DRAM_BASE		0
9#endif
10#ifndef DT_DRAM_SIZE
11#define DT_DRAM_SIZE		DT_SIZE_K(4096)
12#endif
13#define DT_FLASH_SIZE		DT_SIZE_K(4096)
14
15#include <ia32.dtsi>
16
17/ {
18	model = "QEMU X86 emulator";
19	compatible = "qemu,x86_emulator";
20
21	flash0: flash@500000 {
22		compatible = "soc-nv-flash";
23		reg = <0x00500000 DT_FLASH_SIZE>;
24	};
25
26	aliases {
27		uart-0 = &uart0;
28		uart-1 = &uart1;
29		eeprom-0 = &eeprom0;
30		eeprom-1 = &eeprom1;
31	};
32
33	chosen {
34		zephyr,sram = &dram0;
35		zephyr,flash = &flash0;
36		zephyr,console = &uart0;
37		zephyr,shell-uart = &uart0;
38		zephyr,bt-uart = &uart1;
39		zephyr,uart-pipe = &uart1;
40		zephyr,bt-mon-uart = &uart1;
41		zephyr,code-partition = &slot0_partition;
42		zephyr,flash-controller = &sim_flash;
43	};
44
45	soc {
46		eth0: eth@febc0000 {
47			compatible = "intel,e1000";
48			reg = <0xfebc0000 0x100>;
49			label = "eth0";
50			interrupts = <11 IRQ_TYPE_LOWEST_EDGE_RISING 3>;
51			interrupt-parent = <&intc>;
52
53			status = "okay";
54		};
55	};
56
57	sim_flash: sim_flash {
58		compatible = "zephyr,sim-flash";
59		label = "FLASH_SIMULATOR";
60
61		#address-cells = <1>;
62		#size-cells = <1>;
63		erase-value = <0xff>;
64
65		flash_sim0: flash_sim@0 {
66			compatible = "soc-nv-flash";
67			reg = <0x00000000 DT_SIZE_K(1024)>;
68
69			erase-block-size = <1024>;
70			write-block-size = <4>;
71		};
72	};
73
74	eeprom1: eeprom1 {
75		status = "okay";
76		compatible = "zephyr,emu-eeprom";
77		label = "EEPROM_1";
78		size = <DT_SIZE_K(4)>;
79		pagesize = <DT_SIZE_K(8)>;
80		partition = <&eepromemu_partition>;
81		rambuf;
82	};
83
84	eeprom0: eeprom0 {
85		status = "okay";
86		compatible = "zephyr,sim-eeprom";
87		label = "EEPROM_0";
88		size = <DT_SIZE_K(4)>;
89	};
90
91};
92
93&uart0 {
94	status = "okay";
95	current-speed = <115200>;
96};
97
98&uart1 {
99	status = "okay";
100	current-speed = <115200>;
101};
102
103&hpet {
104	status = "okay";
105};
106
107&flash_sim0 {
108
109	partitions {
110		compatible = "fixed-partitions";
111		#address-cells = <1>;
112		#size-cells = <1>;
113
114		/*
115		 * Storage partition will be used by FCB/LittleFS/NVS
116		 * if enabled.
117		 */
118		storage_partition: partition@1000 {
119			label = "storage";
120			reg = <0x00001000 0x00010000>;
121		};
122
123		slot0_partition: partition@11000 {
124			label = "image-0";
125			reg = <0x00011000 0x00010000>;
126		};
127		slot1_partition: partition@21000 {
128			label = "image-1";
129			reg = <0x00021000 0x00010000>;
130		};
131		eepromemu_partition: partition@31000 {
132			label = "eeprom-emu";
133			reg = <0x00031000 0x00010000>;
134		};
135	};
136};
137