summaryrefslogtreecommitdiff
path: root/zephyr/include/cros/ite/it8xxx2.dtsi
blob: 05c81b68963e5d80a2a04bf3bd61d5acbe7442fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* Copyright 2021 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <cros/binman.dtsi>

/ {
	chosen {
		cros-ec,bbram = &bbram;
		cros-ec,espi = &espi0;
		cros-ec,flash = &flash0;
		cros-ec,flash-controller = &fiu0;
		cros-ec,raw-kb = &cros_kb_raw;
		cros-ec,watchdog = &twd0;
	};

	named-bbram-regions {
		compatible = "named-bbram-regions";

		scratchpad {
			offset = <0x08>;
			size = <0x04>;
		};
		saved-reset-flags {
			offset = <0x00>;
			size = <0x04>;
		};
		wake {
			offset = <0x08>;
			size = <0x04>;
		};
		pd0 {
			offset = <0x04>;
			size = <0x01>;
		};
		pd1 {
			offset = <0x05>;
			size = <0x01>;
		};
		try_slot {
			offset = <0x0e>;
			size = <0x01>;
		};
		pd2 {
			offset = <0x06>;
			size = <0x01>;
		};
	};

	soc {
		/* TODO(b/265198571): Migrate Zephyr EC builds to upstream SHI
		 * drivers.
		 */
		/delete-node/ shi@f03a00;
		shi: shi@f03a00 {
			compatible = "ite,it8xxx2-cros-shi";
			reg = <0x00f03a00 0x30>;
			interrupts = <171 0>;
			interrupt-parent = <&intc>;
			status = "disabled";
		};

		fiu0: cros-flash@80000000 {
			compatible = "ite,it8xxx2-cros-flash";
			reg = <0x80000000 0x100000>;
		};

		cros_kb_raw: cros-kb-raw@f01d00 {
			compatible = "ite,it8xxx2-cros-kb-raw";
			reg = <0x00f01d00 0x29>;
			interrupt-parent = <&intc>;
			interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
			wucctrl = <&wuc_wu30   /* KSI[0] */
				   &wuc_wu31   /* KSI[1] */
				   &wuc_wu32   /* KSI[2] */
				   &wuc_wu33   /* KSI[3] */
				   &wuc_wu34   /* KSI[4] */
				   &wuc_wu35   /* KSI[5] */
				   &wuc_wu36   /* KSI[6] */
				   &wuc_wu37>; /* KSI[7] */
			status = "disabled";
		};
	};

	/* it8xxx2 has 1MB of flash. currently, we use 768KB from flash. */
	binman {
		wp-ro {
			offset = <0x0>;
			size = <0x60000>;
		};
		ec-rw {
			offset = <0x60000>;
			size = <0x60000>;
			rw-fw {
				rw-fwid {
					/* Fix the lcoation of the FWID to the
					 * last 32 bytes of the flash. This
					 * ensures the RW entries in the FMAP
					 * stored in the RO section of flash
					 * are always correct.
					 */
					offset = <(0x60000 - 32)>;
				};
			};
		};
		pad-byte = <0xff>;
		pad-after = <0x40000>;
	};
};