1/dts-v1/;
2
3#include <dt-bindings/input/input.h>
4#include "tegra124.dtsi"
5
6/ {
7	model = "Acer Chromebook 13 CB5-311";
8	compatible = "google,nyan-big", "nvidia,tegra124";
9
10	aliases {
11		console = &uarta;
12		i2c0 = "/i2c@7000d000";
13		i2c1 = "/i2c@7000c000";
14		i2c2 = "/i2c@7000c400";
15		i2c3 = "/i2c@7000c500";
16		i2c4 = "/i2c@7000c700";
17		i2c5 = "/i2c@7000d100";
18		rtc0 = "/i2c@0,7000d000/pmic@40";
19		rtc1 = "/rtc@0,7000e000";
20		sdhci0 = "/sdhci@700b0600";
21		sdhci1 = "/sdhci@700b0400";
22		spi0 = "/spi@7000d400";
23		spi1 = "/spi@7000da00";
24		usb0 = "/usb@7d000000";
25		usb1 = "/usb@7d008000";
26	};
27
28	memory {
29		reg = <0x80000000 0x80000000>;
30	};
31
32	serial@70006000 {
33		/* Debug connector on the bottom of the board near SD card. */
34		status = "okay";
35	};
36
37	pwm@7000a000 {
38		status = "okay";
39	};
40
41	i2c@7000c000 {
42		status = "okay";
43		clock-frequency = <100000>;
44
45		acodec: audio-codec@10 {
46			compatible = "maxim,max98090";
47			reg = <0x10>;
48			interrupt-parent = <&gpio>;
49			interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
50		};
51
52		temperature-sensor@4c {
53			compatible = "ti,tmp451";
54			reg = <0x4c>;
55			interrupt-parent = <&gpio>;
56			interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
57
58			#thermal-sensor-cells = <1>;
59		};
60	};
61
62	i2c@7000c400 {
63		status = "okay";
64		clock-frequency = <100000>;
65	};
66
67	i2c@7000c500 {
68		status = "okay";
69		clock-frequency = <400000>;
70
71		tpm@20 {
72			compatible = "infineon,slb9645tt";
73			reg = <0x20>;
74		};
75	};
76
77	hdmi_ddc: i2c@7000c700 {
78		status = "okay";
79		clock-frequency = <100000>;
80	};
81
82	i2c@7000d000 {
83		status = "okay";
84		clock-frequency = <400000>;
85
86		pmic: pmic@40 {
87			compatible = "ams,as3722";
88			reg = <0x40>;
89			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
90
91			ams,system-power-controller;
92
93			#interrupt-cells = <2>;
94			interrupt-controller;
95
96			gpio-controller;
97			#gpio-cells = <2>;
98
99			pinctrl-names = "default";
100			pinctrl-0 = <&as3722_default>;
101
102			as3722_default: pinmux {
103				gpio0 {
104					pins = "gpio0";
105					function = "gpio";
106					bias-pull-down;
107				};
108
109				gpio1 {
110					pins = "gpio1";
111					function = "gpio";
112					bias-pull-up;
113				};
114
115				gpio2_4_7 {
116					pins = "gpio2", "gpio4", "gpio7";
117					function = "gpio";
118					bias-pull-up;
119				};
120
121				gpio3_6 {
122					pins = "gpio3", "gpio6";
123					bias-high-impedance;
124				};
125
126				gpio5 {
127					pins = "gpio5";
128					function = "clk32k-out";
129					bias-pull-down;
130				};
131			};
132		};
133	};
134
135	spi@7000d400 {
136		status = "okay";
137
138		cros_ec: cros-ec@0 {
139			compatible = "google,cros-ec-spi";
140			spi-max-frequency = <3000000>;
141			interrupt-parent = <&gpio>;
142			interrupts = <TEGRA_GPIO(C, 7) IRQ_TYPE_LEVEL_LOW>;
143			reg = <0>;
144
145			google,cros-ec-spi-msg-delay = <2000>;
146
147			i2c-tunnel {
148				compatible = "google,cros-ec-i2c-tunnel";
149				#address-cells = <1>;
150				#size-cells = <0>;
151
152				google,remote-bus = <0>;
153
154				charger: bq24735@9 {
155					compatible = "ti,bq24735";
156					reg = <0x9>;
157					interrupt-parent = <&gpio>;
158					interrupts = <TEGRA_GPIO(J, 0)
159							GPIO_ACTIVE_HIGH>;
160					ti,ac-detect-gpios = <&gpio
161							TEGRA_GPIO(J, 0)
162							GPIO_ACTIVE_HIGH>;
163				};
164
165				battery: sbs-battery@b {
166					compatible = "sbs,sbs-battery";
167					reg = <0xb>;
168					sbs,i2c-retry-count = <2>;
169					sbs,poll-retry-count = <10>;
170					power-supplies = <&charger>;
171				};
172			};
173		};
174	};
175
176	spi@7000da00 {
177		status = "okay";
178		spi-max-frequency = <25000000>;
179
180		flash@0 {
181			compatible = "winbond,w25q32dw";
182			reg = <0>;
183		};
184	};
185
186	pmc@7000e400 {
187		nvidia,invert-interrupt;
188		nvidia,suspend-mode = <0>;
189		nvidia,cpu-pwr-good-time = <500>;
190		nvidia,cpu-pwr-off-time = <300>;
191		nvidia,core-pwr-good-time = <641 3845>;
192		nvidia,core-pwr-off-time = <61036>;
193		nvidia,core-power-req-active-high;
194		nvidia,sys-clock-req-active-high;
195	};
196
197	hda@70030000 {
198		status = "okay";
199	};
200
201	sdhci@700b0000 { /* WiFi/BT on this bus */
202		status = "okay";
203		power-gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_HIGH>;
204		bus-width = <4>;
205		no-1-8-v;
206		non-removable;
207	};
208
209	sdhci@700b0400 { /* SD Card on this bus */
210		status = "okay";
211		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
212		power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
213		wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
214		bus-width = <4>;
215		no-1-8-v;
216	};
217
218	sdhci@700b0600 { /* eMMC on this bus */
219		status = "okay";
220		bus-width = <8>;
221		no-1-8-v;
222		non-removable;
223	};
224
225	ahub@70300000 {
226		i2s@70301100 {
227			status = "okay";
228		};
229	};
230
231	usb@7d000000 { /* Rear external USB port. */
232		status = "okay";
233	};
234
235	usb-phy@7d000000 {
236		status = "okay";
237	};
238
239	usb@7d004000 { /* Internal webcam. */
240		status = "okay";
241	};
242
243	usb-phy@7d004000 {
244		status = "okay";
245	};
246
247	usb@7d008000 { /* Left external USB port. */
248		status = "okay";
249	};
250
251	usb-phy@7d008000 {
252		status = "okay";
253	};
254
255	backlight: backlight {
256		compatible = "pwm-backlight";
257
258		enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
259		pwms = <&pwm 1 1000000>;
260
261		default-brightness-level = <224>;
262		brightness-levels =
263			<  0   1   2   3   4   5   6   7
264			   8   9  10  11  12  13  14  15
265			  16  17  18  19  20  21  22  23
266			  24  25  26  27  28  29  30  31
267			  32  33  34  35  36  37  38  39
268			  40  41  42  43  44  45  46  47
269			  48  49  50  51  52  53  54  55
270			  56  57  58  59  60  61  62  63
271			  64  65  66  67  68  69  70  71
272			  72  73  74  75  76  77  78  79
273			  80  81  82  83  84  85  86  87
274			  88  89  90  91  92  93  94  95
275			  96  97  98  99 100 101 102 103
276			 104 105 106 107 108 109 110 111
277			 112 113 114 115 116 117 118 119
278			 120 121 122 123 124 125 126 127
279			 128 129 130 131 132 133 134 135
280			 136 137 138 139 140 141 142 143
281			 144 145 146 147 148 149 150 151
282			 152 153 154 155 156 157 158 159
283			 160 161 162 163 164 165 166 167
284			 168 169 170 171 172 173 174 175
285			 176 177 178 179 180 181 182 183
286			 184 185 186 187 188 189 190 191
287			 192 193 194 195 196 197 198 199
288			 200 201 202 203 204 205 206 207
289			 208 209 210 211 212 213 214 215
290			 216 217 218 219 220 221 222 223
291			 224 225 226 227 228 229 230 231
292			 232 233 234 235 236 237 238 239
293			 240 241 242 243 244 245 246 247
294			 248 249 250 251 252 253 254 255
295			 256>;
296	};
297
298	clocks {
299		compatible = "simple-bus";
300		#address-cells = <1>;
301		#size-cells = <0>;
302
303		clk32k_in: clock@0 {
304			compatible = "fixed-clock";
305			reg = <0>;
306			#clock-cells = <0>;
307			clock-frequency = <32768>;
308		};
309	};
310
311	gpio-keys {
312		compatible = "gpio-keys";
313
314		lid {
315			label = "Lid";
316			gpios = <&gpio TEGRA_GPIO(R, 4) GPIO_ACTIVE_LOW>;
317			linux,input-type = <5>;
318			linux,code = <KEY_RESERVED>;
319			debounce-interval = <1>;
320			gpio-key,wakeup;
321		};
322
323		power {
324			label = "Power";
325			gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
326			linux,code = <KEY_POWER>;
327			debounce-interval = <30>;
328			gpio-key,wakeup;
329		};
330	};
331
332	panel: panel {
333		compatible = "auo,b133xtn01";
334
335		backlight = <&backlight>;
336	};
337
338	sound {
339		compatible = "nvidia,tegra-audio-max98090-nyan-big",
340			     "nvidia,tegra-audio-max98090";
341		nvidia,model = "Acer Chromebook 13";
342
343		nvidia,audio-routing =
344			"Headphones", "HPR",
345			"Headphones", "HPL",
346			"Speakers", "SPKR",
347			"Speakers", "SPKL",
348			"Mic Jack", "MICBIAS",
349			"DMICL", "Int Mic",
350			"DMICR", "Int Mic",
351			"IN34", "Mic Jack";
352
353		nvidia,i2s-controller = <&tegra_i2s1>;
354		nvidia,audio-codec = <&acodec>;
355
356		clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
357			 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
358			 <&tegra_car TEGRA124_CLK_EXTERN1>;
359		clock-names = "pll_a", "pll_a_out0", "mclk";
360
361		nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
362	};
363};
364
365#include "cros-ec-keyboard.dtsi"
366