xref: /OK3568_Linux_fs/u-boot/arch/arm/dts/rk3288-rock2-som.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
5 * whole.
6 *
7 *  a) This file is free software; you can redistribute it and/or
8 *     modify it under the terms of the GNU General Public License as
9 *     published by the Free Software Foundation; either version 2 of the
10 *     License, or (at your option) any later version.
11 *
12 *     This file is distributed in the hope that it will be useful,
13 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *     GNU General Public License for more details.
16 *
17 * Or, alternatively,
18 *
19 *  b) Permission is hereby granted, free of charge, to any person
20 *     obtaining a copy of this software and associated documentation
21 *     files (the "Software"), to deal in the Software without
22 *     restriction, including without limitation the rights to use,
23 *     copy, modify, merge, publish, distribute, sublicense, and/or
24 *     sell copies of the Software, and to permit persons to whom the
25 *     Software is furnished to do so, subject to the following
26 *     conditions:
27 *
28 *     The above copyright notice and this permission notice shall be
29 *     included in all copies or substantial portions of the Software.
30 *
31 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 *     OTHER DEALINGS IN THE SOFTWARE.
39 */
40
41#include <dt-bindings/pwm/pwm.h>
42#include "rk3288.dtsi"
43#include "rk3288-u-boot.dtsi"
44
45/ {
46	memory {
47		reg = <0x0 0x80000000>;
48		device_type = "memory";
49	};
50
51	emmc_pwrseq: emmc-pwrseq {
52		compatible = "mmc-pwrseq-emmc";
53		pinctrl-0 = <&emmc_reset>;
54		pinctrl-names = "default";
55		reset-gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
56	};
57
58	ext_gmac: external-gmac-clock {
59		compatible = "fixed-clock";
60		#clock-cells = <0>;
61		clock-frequency = <125000000>;
62		clock-output-names = "ext_gmac";
63	};
64
65	vcc_sys: vsys-regulator {
66		compatible = "regulator-fixed";
67		regulator-name = "vcc_sys";
68		regulator-min-microvolt = <5000000>;
69		regulator-max-microvolt = <5000000>;
70		regulator-always-on;
71		regulator-boot-on;
72	};
73};
74
75&cpu0 {
76	cpu0-supply = <&vdd_cpu>;
77};
78
79&emmc {
80	bus-width = <8>;
81	cap-mmc-highspeed;
82	disable-wp;
83	non-removable;
84	num-slots = <1>;
85	mmc-pwrseq = <&emmc_pwrseq>;
86	pinctrl-names = "default";
87	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
88	vmmc-supply = <&vcc_io>;
89	status = "okay";
90};
91
92&gmac {
93	assigned-clocks = <&cru SCLK_MAC>;
94	assigned-clock-parents = <&ext_gmac>;
95	clock_in_out = "input";
96	phy-mode = "rgmii";
97	phy-supply = <&vccio_pmu>;
98	pinctrl-names = "default";
99	pinctrl-0 = <&rgmii_pins &phy_rst>;
100	snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
101	snps,reset-active-low;
102	snps,reset-delays-us = <0 10000 30000>;
103	rx_delay = <0x10>;
104	tx_delay = <0x30>;
105};
106
107&i2c0 {
108	status = "okay";
109
110	act8846: act8846@5a {
111		compatible = "active-semi,act8846";
112		reg = <0x5a>;
113		system-power-controller;
114		inl1-supply = <&vcc_io>;
115		inl2-supply = <&vcc_sys>;
116		inl3-supply = <&vcc_20>;
117		vp1-supply = <&vcc_sys>;
118		vp2-supply = <&vcc_sys>;
119		vp3-supply = <&vcc_sys>;
120		vp4-supply = <&vcc_sys>;
121
122		regulators {
123			vcc_ddr: REG1 {
124				regulator-name = "VCC_DDR";
125				regulator-min-microvolt = <1200000>;
126				regulator-max-microvolt = <1200000>;
127				regulator-always-on;
128			};
129
130			vcc_io: REG2 {
131				regulator-name = "VCC_IO";
132				regulator-min-microvolt = <3300000>;
133				regulator-max-microvolt = <3300000>;
134				regulator-always-on;
135			};
136
137			vdd_log: REG3 {
138				regulator-name = "VDD_LOG";
139				regulator-min-microvolt = <1000000>;
140				regulator-max-microvolt = <1000000>;
141				regulator-always-on;
142			};
143
144			vcc_20: REG4 {
145				regulator-name = "VCC_20";
146				regulator-min-microvolt = <2000000>;
147				regulator-max-microvolt = <2000000>;
148				regulator-always-on;
149			};
150
151			vccio_sd: REG5 {
152				regulator-name = "VCCIO_SD";
153				regulator-min-microvolt = <3300000>;
154				regulator-max-microvolt = <3300000>;
155				regulator-always-on;
156			};
157
158			vdd10_lcd: REG6 {
159				regulator-name = "VDD10_LCD";
160				regulator-min-microvolt = <1000000>;
161				regulator-max-microvolt = <1000000>;
162				regulator-always-on;
163			};
164
165			vcca_codec: REG7 {
166				regulator-name = "VCCA_CODEC";
167				regulator-min-microvolt = <3300000>;
168				regulator-max-microvolt = <3300000>;
169				regulator-always-on;
170			};
171
172			vcca_tp: REG8 {
173				regulator-name = "VCCA_TP";
174				regulator-min-microvolt = <3300000>;
175				regulator-max-microvolt = <3300000>;
176				regulator-always-on;
177			};
178
179			vccio_pmu: REG9 {
180				regulator-name = "VCCIO_PMU";
181				regulator-min-microvolt = <3300000>;
182				regulator-max-microvolt = <3300000>;
183				regulator-always-on;
184			};
185
186			vdd_10: REG10 {
187				regulator-name = "VDD_10";
188				regulator-min-microvolt = <1000000>;
189				regulator-max-microvolt = <1000000>;
190				regulator-always-on;
191			};
192
193			vcc_18: REG11 {
194				regulator-name = "VCC_18";
195				regulator-min-microvolt = <1800000>;
196				regulator-max-microvolt = <1800000>;
197				regulator-always-on;
198			};
199
200			vcc18_lcd: REG12 {
201				regulator-name = "VCC18_LCD";
202				regulator-min-microvolt = <1800000>;
203				regulator-max-microvolt = <1800000>;
204				regulator-always-on;
205			};
206		};
207	};
208
209	vdd_cpu: syr827@40 {
210		compatible = "silergy,syr827";
211		reg = <0x40>;
212		fcs,suspend-voltage-selector = <1>;
213		regulator-always-on;
214		regulator-boot-on;
215		regulator-enable-ramp-delay = <300>;
216		regulator-name = "vdd_cpu";
217		regulator-min-microvolt = <850000>;
218		regulator-max-microvolt = <1350000>;
219		regulator-ramp-delay = <8000>;
220		vin-supply = <&vcc_sys>;
221	};
222
223	vdd_gpu: syr828@41 {
224		compatible = "silergy,syr828";
225		reg = <0x41>;
226		fcs,suspend-voltage-selector = <1>;
227		regulator-always-on;
228		regulator-enable-ramp-delay = <300>;
229		regulator-min-microvolt = <850000>;
230		regulator-max-microvolt = <1350000>;
231		regulator-name = "vdd_gpu";
232		regulator-ramp-delay = <8000>;
233		vin-supply = <&vcc_sys>;
234	};
235};
236
237&pinctrl {
238	pcfg_output_high: pcfg-output-high {
239		output-high;
240	};
241
242	emmc {
243			emmc_reset: emmc-reset {
244				rockchip,pins = <3 9 RK_FUNC_GPIO &pcfg_pull_none>;
245			};
246	};
247
248	gmac {
249		phy_rst: phy-rst {
250			rockchip,pins = <4 8 RK_FUNC_GPIO  &pcfg_output_high>;
251		};
252	};
253};
254
255&tsadc {
256	rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
257	rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
258	status = "okay";
259};
260
261&vopb {
262	status = "okay";
263};
264
265&vopb_mmu {
266	status = "okay";
267};
268
269&vopl {
270	status = "okay";
271};
272
273&vopl_mmu {
274	status = "okay";
275};
276
277&wdt {
278	status = "okay";
279};
280