1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Samsung's Exynos3250 based ARTIK5 module device tree source
4 *
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6 *		http://www.samsung.com
7 *
8 * Device tree source file for Samsung's ARTIK5 module which is based on
9 * Samsung Exynos3250 SoC.
10 */
11
12#include "exynos3250.dtsi"
13#include <dt-bindings/clock/samsung,s2mps11.h>
14#include <dt-bindings/gpio/gpio.h>
15#include <dt-bindings/interrupt-controller/irq.h>
16
17/ {
18	compatible = "samsung,artik5", "samsung,exynos3250", "samsung,exynos3";
19
20	chosen {
21		stdout-path = &serial_2;
22	};
23
24	memory@40000000 {
25		device_type = "memory";
26		reg = <0x40000000 0x1ff00000>;
27	};
28
29	firmware@205f000 {
30		compatible = "samsung,secure-firmware";
31		reg = <0x0205f000 0x1000>;
32	};
33
34	thermal-zones {
35		cpu_thermal: cpu-thermal {
36			cooling-maps {
37				map0 {
38					/* Corresponds to 500MHz */
39					cooling-device = <&cpu0 5 5>,
40							 <&cpu1 5 5>;
41				};
42				map1 {
43					/* Corresponds to 200MHz */
44					cooling-device = <&cpu0 8 8>,
45							 <&cpu1 8 8>;
46				};
47			};
48		};
49	};
50};
51
52&adc {
53	vdd-supply = <&ldo7_reg>;
54	assigned-clocks = <&cmu CLK_SCLK_TSADC>;
55	assigned-clock-rates = <6000000>;
56};
57
58&cpu0 {
59	cpu0-supply = <&buck2_reg>;
60};
61
62&gpu {
63	mali-supply = <&buck3_reg>;
64	status = "okay";
65};
66
67&i2c_0 {
68	#address-cells = <1>;
69	#size-cells = <0>;
70	samsung,i2c-sda-delay = <100>;
71	samsung,i2c-slave-addr = <0x10>;
72	samsung,i2c-max-bus-freq = <100000>;
73	status = "okay";
74
75	s2mps14_pmic@66 {
76		compatible = "samsung,s2mps14-pmic";
77		interrupt-parent = <&gpx3>;
78		interrupts = <5 IRQ_TYPE_NONE>;
79		pinctrl-names = "default";
80		pinctrl-0 = <&s2mps14_irq>;
81		reg = <0x66>;
82
83		s2mps14_osc: clocks {
84			compatible = "samsung,s2mps14-clk";
85			#clock-cells = <1>;
86			clock-output-names = "s2mps14_ap", "unused",
87				"s2mps14_bt";
88		};
89
90		regulators {
91			ldo1_reg: LDO1 {
92				/* VDD_ALIVE15x */
93				regulator-name = "VLDO1_1.0V";
94				regulator-min-microvolt = <1000000>;
95				regulator-max-microvolt = <1000000>;
96				regulator-always-on;
97			};
98
99			ldo2_reg: LDO2 {
100				/* VDDQM176 ~ VDDQM185 */
101				regulator-name = "VLDO2_1.2V";
102				regulator-min-microvolt = <1200000>;
103				regulator-max-microvolt = <1200000>;
104				regulator-always-on;
105			};
106
107			ldo3_reg: LDO3 {
108				/*
109				 * VDD1_E106 ~ VDD1_E111
110				 * DVDD_RTC_AP, DVDD_MMC2_AP
111				 */
112				regulator-name = "VLDO3_1.8V";
113				regulator-min-microvolt = <1800000>;
114				regulator-max-microvolt = <1800000>;
115				regulator-always-on;
116			};
117
118			ldo4_reg: LDO4 {
119				/*  AVDD_PLL1120 ~ AVDD_PLL11201 */
120				regulator-name = "VLDO4_1.8V";
121				regulator-min-microvolt = <1800000>;
122				regulator-max-microvolt = <1800000>;
123				regulator-always-on;
124			};
125
126			ldo5_reg: LDO5 {
127				/* VDDI_PLL_ISO141 ~ VDDI_PLL_ISO142 */
128				regulator-name = "VLDO5_1.0V";
129				regulator-min-microvolt = <1000000>;
130				regulator-max-microvolt = <1000000>;
131				regulator-always-on;
132			};
133
134			ldo6_reg: LDO6 {
135				/* VDD_USB, VDD10_HSIC */
136				regulator-name = "VLDO6_1.0V";
137				regulator-min-microvolt = <1000000>;
138				regulator-max-microvolt = <1000000>;
139				regulator-always-on;
140			};
141
142			ldo7_reg: LDO7 {
143				/*
144				 * VDD18P, AVDD18_TS, AVDD18_HSIC, AVDD_PLL2,
145				 * AVDD_ADC, AVDD_ABB_0, M4S_VDD18
146				 */
147				regulator-name = "VLDO7_1.8V";
148				regulator-min-microvolt = <1800000>;
149				regulator-max-microvolt = <1800000>;
150				regulator-always-on;
151			};
152
153			ldo8_reg: LDO8 {
154				/* AVDD33_UOTG */
155				regulator-name = "VLDO8_3.0V";
156				regulator-min-microvolt = <3000000>;
157				regulator-max-microvolt = <3000000>;
158				regulator-always-on;
159			};
160
161			ldo9_reg: LDO9 {
162				/* VDDQ_E86 ~ VDDQ_E105*/
163				regulator-name = "VLDO9_1.2V";
164				regulator-min-microvolt = <1200000>;
165				regulator-max-microvolt = <1200000>;
166				regulator-always-on;
167			};
168
169			ldo10_reg: LDO10 {
170				regulator-name = "VLDO10_1.0V";
171				regulator-min-microvolt = <1000000>;
172				regulator-max-microvolt = <1000000>;
173			};
174
175			ldo11_reg: LDO11 {
176				/* VDD74 ~ VDD75 */
177				regulator-name = "VLDO11_1.8V";
178				regulator-min-microvolt = <1800000>;
179				regulator-max-microvolt = <1800000>;
180				samsung,ext-control-gpios = <&gpk0 2 GPIO_ACTIVE_HIGH>;
181			};
182
183			ldo12_reg: LDO12 {
184				/* VDD72 ~ VDD73 */
185				regulator-name = "VLDO12_2.8V";
186				regulator-min-microvolt = <2800000>;
187				regulator-max-microvolt = <2800000>;
188				samsung,ext-control-gpios = <&gpk0 2 GPIO_ACTIVE_HIGH>;
189			};
190
191			ldo13_reg: LDO13 {
192				regulator-name = "VLDO13_2.8V";
193				regulator-min-microvolt = <2800000>;
194				regulator-max-microvolt = <2800000>;
195			};
196
197			ldo14_reg: LDO14 {
198				regulator-name = "VLDO14_2.7V";
199				regulator-min-microvolt = <2700000>;
200				regulator-max-microvolt = <2700000>;
201			};
202
203			ldo15_reg: LDO15 {
204				regulator-name = "VLDO_3.3V";
205				regulator-min-microvolt = <3300000>;
206				regulator-max-microvolt = <3300000>;
207			};
208
209			ldo16_reg: LDO16 {
210				regulator-name = "VLDO16_3.3V";
211				regulator-min-microvolt = <3300000>;
212				regulator-max-microvolt = <3300000>;
213			};
214
215			ldo17_reg: LDO17 {
216				regulator-name = "VLDO17_3.0V";
217				regulator-min-microvolt = <3000000>;
218				regulator-max-microvolt = <3000000>;
219			};
220
221			ldo18_reg: LDO18 {
222				/* DVDD_MMC2_AP */
223				regulator-name = "VLDO18_2.8V";
224				regulator-min-microvolt = <2800000>;
225				regulator-max-microvolt = <2800000>;
226			};
227
228			ldo19_reg: LDO19 {
229				regulator-name = "VLDO19_1.8V";
230				regulator-min-microvolt = <1800000>;
231				regulator-max-microvolt = <1800000>;
232			};
233
234			ldo20_reg: LDO20 {
235				regulator-name = "VLDO20_1.8V";
236				regulator-min-microvolt = <1800000>;
237				regulator-max-microvolt = <1800000>;
238			};
239
240			ldo21_reg: LDO21 {
241				regulator-name = "VLDO21_1.25V";
242				regulator-min-microvolt = <1250000>;
243				regulator-max-microvolt = <1250000>;
244			};
245
246			ldo22_reg: LDO22 {
247				regulator-name = "VLDO22_1.2V";
248				regulator-min-microvolt = <1200000>;
249				regulator-max-microvolt = <1200000>;
250			};
251
252			ldo23_reg: LDO23 {
253				/* Xi2c3_SDA/SCL, Xi2c7_SDA/SCL, WLAN_SDIO */
254				regulator-name = "VLDO23_1.8V";
255				regulator-min-microvolt = <1800000>;
256				regulator-max-microvolt = <1800000>;
257				regulator-always-on;
258			};
259
260			ldo24_reg: LDO24 {
261				regulator-name = "VLDO24_3.0V";
262				regulator-min-microvolt = <3000000>;
263				regulator-max-microvolt = <3000000>;
264			};
265
266			ldo25_reg: LDO25 {
267				regulator-name = "VLDO25_3.0V";
268				regulator-min-microvolt = <3000000>;
269				regulator-max-microvolt = <3000000>;
270			};
271
272			buck1_reg: BUCK1 {
273				/* VDD_MIF */
274				regulator-name = "VBUCK1_1.0V";
275				regulator-min-microvolt = <800000>;
276				regulator-max-microvolt = <1000000>;
277				regulator-always-on;
278			};
279
280			buck2_reg: BUCK2 {
281				/* VDD_CPU */
282				regulator-name = "VBUCK2_1.2V";
283				regulator-min-microvolt = <850000>;
284				regulator-max-microvolt = <1200000>;
285				regulator-always-on;
286			};
287
288			buck3_reg: BUCK3 {
289				/* VDD_G3D */
290				regulator-name = "VBUCK3_1.0V";
291				regulator-min-microvolt = <850000>;
292				regulator-max-microvolt = <1000000>;
293				regulator-always-on;
294			};
295
296			buck4_reg: BUCK4 {
297				regulator-name = "VBUCK4_1.95V";
298				regulator-min-microvolt = <1950000>;
299				regulator-max-microvolt = <1950000>;
300				regulator-always-on;
301			};
302
303			buck5_reg: BUCK5 {
304				regulator-name = "VBUCK5_1.35V";
305				regulator-min-microvolt = <1350000>;
306				regulator-max-microvolt = <1350000>;
307				regulator-always-on;
308			};
309		};
310	};
311};
312
313&mshc_0 {
314	non-removable;
315	cap-mmc-highspeed;
316	card-detect-delay = <200>;
317	vmmc-supply = <&ldo12_reg>;
318	clock-frequency = <100000000>;
319	max-frequency = <100000000>;
320	samsung,dw-mshc-ciu-div = <1>;
321	samsung,dw-mshc-sdr-timing = <0 1>;
322	samsung,dw-mshc-ddr-timing = <1 2>;
323	pinctrl-names = "default";
324	pinctrl-0 = <&sd0_cmd &sd0_bus1 &sd0_bus4 &sd0_bus8>;
325	bus-width = <8>;
326	status = "okay";
327};
328
329&mshc_1 {
330	cap-sd-highspeed;
331	cap-sdio-irq;
332	disable-wp;
333	non-removable;
334	keep-power-in-suspend;
335	fifo-depth = <0x40>;
336	vqmmc-supply = <&ldo11_reg>;
337	/*
338	 * Voltage negotiation is broken for the SDIO periph so we
339	 * can't actually set the voltage here.
340	 * vmmc-supply = <&ldo23_reg>;
341	 */
342	card-detect-delay = <500>;
343	clock-frequency = <100000000>;
344	max-frequency = <100000000>;
345	samsung,dw-mshc-ciu-div = <3>;
346	samsung,dw-mshc-sdr-timing = <0 1>;
347	samsung,dw-mshc-ddr-timing = <1 2>;
348	pinctrl-names = "default";
349	pinctrl-0 = <&sd1_cmd &sd1_clk &sd1_bus1 &sd1_bus4 &wlanen>;
350	bus-width = <4>;
351	status = "okay";
352};
353
354&pinctrl_1 {
355	wlanen: wlanen {
356		samsung,pins = "gpx2-3";
357		samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
358		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
359		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV3>;
360		samsung,pin-val = <1>;
361	};
362
363	s2mps14_irq: s2mps14-irq {
364		samsung,pins = "gpx3-5";
365		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
366	};
367};
368
369&rtc {
370	clocks = <&cmu CLK_RTC>, <&s2mps14_osc S2MPS11_CLK_AP>;
371	clock-names = "rtc", "rtc_src";
372	status = "okay";
373};
374
375&tmu {
376	status = "okay";
377};
378
379&xusbxti {
380	clock-frequency = <24000000>;
381};
382