summaryrefslogtreecommitdiff
path: root/zephyr/projects/trogdor/boards/arm/trogdor/trogdor.dts
blob: 39ae06d7e699bbb838c333481b9217334d988f63 (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/* Copyright 2021 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/dts-v1/;

#include <cros/nuvoton/npcx.dtsi>
#include <dt-bindings/adc/adc.h>
#include <dt-bindings/gpio_defines.h>
#include <nuvoton/npcx7m6fc.dtsi>

/ {
	model = "Google Trogdor Baseboard";

	aliases {
		i2c-0 = &i2c0_0;
		i2c-1 = &i2c1_0;
		i2c-2 = &i2c2_0;
		i2c-3 = &i2c3_0;
		i2c-5 = &i2c5_0;
		i2c-7 = &i2c7_0;
	};

	chosen {
		zephyr,sram = &sram0;
		zephyr,console = &uart1;
		zephyr,shell-uart = &uart1;
		zephyr,flash = &flash0;
		cros,rtc = &mtc;
	};

	named-i2c-ports {
		compatible = "named-i2c-ports";

		power {
			i2c-port = <&i2c0_0>;
			enum-name = "I2C_PORT_POWER";
			label = "POWER";
		};
		battery {
			i2c-port = <&i2c0_0>;
			enum-name = "I2C_PORT_BATTERY";
			label = "BATTERY";
		};
		virtual {
			i2c-port = <&i2c0_0>;
			enum-name = "I2C_PORT_VIRTUAL";
			label = "VIRTUAL";
		};
		charger {
			i2c-port = <&i2c0_0>;
			enum-name = "I2C_PORT_CHARGER";
			label = "CHARGER";
		};
		tcpc0 {
			i2c-port = <&i2c1_0>;
			enum-name = "I2C_PORT_TCPC0";
			label = "TCPC0";
		};
		tcpc1 {
			i2c-port = <&i2c2_0>;
			enum-name = "I2C_PORT_TCPC1";
			label = "TCPC1";
		};
		wlc {
			i2c-port = <&i2c3_0>;
			enum-name = "I2C_PORT_WLC";
			label = "WLC";
		};
		eeprom {
			i2c-port = <&i2c5_0>;
			enum-name = "I2C_PORT_EEPROM";
			label = "EEPROM";
		};
		i2c_sensor: sensor {
			i2c-port = <&i2c7_0>;
			enum-name = "I2C_PORT_SENSOR";
			label = "SENSOR";
			config {
				frequency = <400>;
				scl {
					enum-name = "GPIO_EC_I2C_SENSOR_SCL";
				};
				sda {
					enum-name = "GPIO_EC_I2C_SENSOR_SDA";
				};
			};
		};
		accel {
			i2c-port = <&i2c7_0>;
			enum-name = "I2C_PORT_ACCEL";
			label = "ACCEL";
		};
	};

	named-pwms {
		compatible = "named-pwms";

		kblight {
			pwms = <&pwm3 0 0>;
			label = "KBLIGHT";
			frequency = <10000>;
		};
		displight {
			pwms = <&pwm5 0 0>;
			label = "DISPLIGHT";
			frequency = <4800>;
		};
	};

	named-adc-channels {
		compatible = "named-adc-channels";

		vbus {
			label = "ADC_VBUS";
			enum-name = "ADC_VBUS";
			channel = <1>;
			/* Measure VBUS through a 1/10 voltage divider */
			mul = <10>;
		};
		amon_bmon {
			label = "ADC_AMON_BMON";
			enum-name = "ADC_AMON_BMON";
			channel = <2>;
			/*
			 * Adapter current output or battery charging/
			 * discharging current (uV) 18x amplification on
			 * charger side.
			 */
			mul = <1000>;
			div = <18>;
		};
		psys {
			label = "ADC_PSYS";
			enum-name = "ADC_PSYS";
			channel = <3>;
			/*
			 * ISL9238 PSYS output is 1.44 uA/W over 5.6K resistor,
			 * to read 0.8V @ 99 W, i.e. 124000 uW/mV.
			 */
			mul = <124000>;
		};
	};

	def-lvol-io-list {
		compatible = "nuvoton,npcx-lvolctrl-def";

		/* I2C_SDA0 & SCL0 */
		lvol-io-pads = <&lvol_iob4 &lvol_iob5>;
	};

	soc {
		cros_kb_raw: cros-kb-raw@400a3000 {
			compatible = "nuvoton,npcx-cros-kb-raw";
			reg = <0x400a3000 0x2000>;
			label = "CROS_KB_RAW_0";
			interrupts = <49 4>;
			clocks = <&pcc NPCX_CLOCK_BUS_APB1 NPCX_PWDWN_CTL1 0>;
			/* No KSO2 (it's inverted and implemented by GPIO) */
			pinctrl-0 = <&alt7_no_ksi0_sl /* KSI0 PIN31 */
				     &alt7_no_ksi1_sl /* KSI1 PIN30 */
				     &alt7_no_ksi2_sl /* KSI2 PIN27 */
				     &alt7_no_ksi3_sl /* KSI3 PIN26 */
				     &alt7_no_ksi4_sl /* KSI4 PIN25 */
				     &alt7_no_ksi5_sl /* KSI5 PIN24 */
				     &alt7_no_ksi6_sl /* KSI6 PIN23 */
				     &alt7_no_ksi7_sl /* KSI7 PIN22 */
				     &alt8_no_kso00_sl /* KSO00 PIN21 */
				     &alt8_no_kso01_sl /* KSO01 PIN20 */
				     &alt8_no_kso03_sl /* KSO03 PIN16 */
				     &alt8_no_kso04_sl /* KSO04 PIN15 */
				     &alt8_no_kso05_sl /* KSO05 PIN14 */
				     &alt8_no_kso06_sl /* KSO06 PIN13 */
				     &alt8_no_kso07_sl /* KSO07 PIN12 */
				     &alt9_no_kso08_sl /* KSO08 PIN11 */
				     &alt9_no_kso09_sl /* KSO09 PIN10 */
				     &alt9_no_kso10_sl /* KSO10 PIN07 */
				     &alt9_no_kso11_sl /* KSO11 PIN06 */
				     &alt9_no_kso12_sl /* KSO12 PIN05 */
				     &alt9_no_kso13_sl /* KSO13 PIN04 */
				     &alt9_no_kso14_sl /* KSO14 PIN82 */
				     >;
			wui_maps = <&wui_io31 &wui_io30 &wui_io27 &wui_io26
				    &wui_io25 &wui_io24 &wui_io23 &wui_io22>;
			status = "disabled";
		};

		fiu0: cros-flash@40020000 {
			compatible = "nuvoton,npcx-cros-flash";
			reg = <0x40020000 0x2000>;
			clocks = <&pcc NPCX_CLOCK_BUS_APB3 NPCX_PWDWN_CTL1 2>;
			size = <0x80000>;
			label = "FLASH_INTERFACE_UNIT0";
			pinctrl-0 = <>;
		};
	};

	/* Update flash size to 512KB from 196KB since we are using C variant */
	/delete-node/ flash@10090000;
	flash0: flash@10070000 {
		reg = <0x10070000 0x40000>;
	};
};

&uart1 {
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&altc_uart1_sl2>; /* Use UART1_SL2 ie. PIN64.65 */
};

&i2c0_0 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_STANDARD>;

	isl9238: isl9238@9 {
		compatible = "intersil,isl9238";
		reg = <0x09>;
		label = "ISL9238_CHARGER";
	};
};

&i2c1_0 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST_PLUS>;
};

&i2c2_0 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST_PLUS>;
};

&i2c3_0 {
	/* Not used as no WLC connected */
	clock-frequency = <I2C_BITRATE_FAST>;
};

&i2c5_0 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;
};

&i2c7_0 {
	status = "okay";
	clock-frequency = <I2C_BITRATE_FAST>;
};

/* Keyboard backlight */
&pwm3 {
	status = "okay";
};

/* Display backlight */
&pwm5 {
	status = "okay";
};

&adc0 {
	status = "okay";
};