Loading...
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/dts-v1/;
42
43#include <dt-bindings/input/input.h>
44#include "rk3229.dtsi"
45
46/ {
47 model = "Rockchip RK3229 Evaluation board";
48 compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
49
50 memory@60000000 {
51 device_type = "memory";
52 reg = <0x60000000 0x40000000>;
53 };
54
55 dc_12v: dc-12v-regulator {
56 compatible = "regulator-fixed";
57 regulator-name = "dc_12v";
58 regulator-always-on;
59 regulator-boot-on;
60 regulator-min-microvolt = <12000000>;
61 regulator-max-microvolt = <12000000>;
62 };
63
64 ext_gmac: ext_gmac {
65 compatible = "fixed-clock";
66 clock-frequency = <125000000>;
67 clock-output-names = "ext_gmac";
68 #clock-cells = <0>;
69 };
70
71 vcc_host: vcc-host-regulator {
72 compatible = "regulator-fixed";
73 enable-active-high;
74 gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
75 pinctrl-names = "default";
76 pinctrl-0 = <&host_vbus_drv>;
77 regulator-name = "vcc_host";
78 regulator-always-on;
79 regulator-boot-on;
80 vin-supply = <&vcc_sys>;
81 };
82
83 vcc_phy: vcc-phy-regulator {
84 compatible = "regulator-fixed";
85 enable-active-high;
86 regulator-name = "vcc_phy";
87 regulator-min-microvolt = <1800000>;
88 regulator-max-microvolt = <1800000>;
89 regulator-always-on;
90 regulator-boot-on;
91 vin-supply = <&vccio_1v8>;
92 };
93
94 vcc_sys: vcc-sys-regulator {
95 compatible = "regulator-fixed";
96 regulator-name = "vcc_sys";
97 regulator-always-on;
98 regulator-boot-on;
99 regulator-min-microvolt = <5000000>;
100 regulator-max-microvolt = <5000000>;
101 vin-supply = <&dc_12v>;
102 };
103
104 vccio_1v8: vccio-1v8-regulator {
105 compatible = "regulator-fixed";
106 regulator-name = "vccio_1v8";
107 regulator-min-microvolt = <1800000>;
108 regulator-max-microvolt = <1800000>;
109 regulator-always-on;
110 vin-supply = <&vcc_sys>;
111 };
112
113 vccio_3v3: vccio-3v3-regulator {
114 compatible = "regulator-fixed";
115 regulator-name = "vccio_3v3";
116 regulator-min-microvolt = <3300000>;
117 regulator-max-microvolt = <3300000>;
118 regulator-always-on;
119 vin-supply = <&vcc_sys>;
120 };
121
122 vdd_arm: vdd-arm-regulator {
123 compatible = "pwm-regulator";
124 pwms = <&pwm1 0 25000 1>;
125 pwm-supply = <&vcc_sys>;
126 regulator-name = "vdd_arm";
127 regulator-min-microvolt = <950000>;
128 regulator-max-microvolt = <1400000>;
129 regulator-always-on;
130 regulator-boot-on;
131 };
132
133 vdd_log: vdd-log-regulator {
134 compatible = "pwm-regulator";
135 pwms = <&pwm2 0 25000 1>;
136 pwm-supply = <&vcc_sys>;
137 regulator-name = "vdd_log";
138 regulator-min-microvolt = <1000000>;
139 regulator-max-microvolt = <1300000>;
140 regulator-always-on;
141 regulator-boot-on;
142 };
143
144 gpio_keys {
145 compatible = "gpio-keys";
146 autorepeat;
147 pinctrl-names = "default";
148 pinctrl-0 = <&pwr_key>;
149
150 power_key: power-key {
151 label = "GPIO Key Power";
152 gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
153 linux,code = <KEY_POWER>;
154 debounce-interval = <100>;
155 wakeup-source;
156 };
157 };
158};
159
160&cpu0 {
161 cpu-supply = <&vdd_arm>;
162};
163
164&cpu1 {
165 cpu-supply = <&vdd_arm>;
166};
167
168&cpu2 {
169 cpu-supply = <&vdd_arm>;
170};
171
172&cpu3 {
173 cpu-supply = <&vdd_arm>;
174};
175
176&emmc {
177 cap-mmc-highspeed;
178 disable-wp;
179 non-removable;
180 status = "okay";
181};
182
183&gmac {
184 assigned-clocks = <&cru SCLK_MAC_EXTCLK>, <&cru SCLK_MAC>;
185 assigned-clock-parents = <&ext_gmac>, <&cru SCLK_MAC_EXTCLK>;
186 clock_in_out = "input";
187 phy-supply = <&vcc_phy>;
188 phy-mode = "rgmii";
189 pinctrl-names = "default";
190 pinctrl-0 = <&rgmii_pins>;
191 snps,reset-gpio = <&gpio2 RK_PD0 GPIO_ACTIVE_LOW>;
192 snps,reset-active-low;
193 snps,reset-delays-us = <0 10000 1000000>;
194 tx_delay = <0x30>;
195 rx_delay = <0x10>;
196 status = "okay";
197};
198
199&io_domains {
200 status = "okay";
201
202 vccio1-supply = <&vccio_3v3>;
203 vccio2-supply = <&vccio_1v8>;
204 vccio4-supply = <&vccio_3v3>;
205};
206
207&pinctrl {
208 keys {
209 pwr_key: pwr-key {
210 rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
211 };
212 };
213
214 usb {
215 host_vbus_drv: host-vbus-drv {
216 rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
217 };
218 };
219};
220
221&pwm1 {
222 status = "okay";
223};
224
225&pwm2 {
226 status = "okay";
227};
228
229&tsadc {
230 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
231 status = "okay";
232};
233
234&uart2 {
235 status = "okay";
236};
237
238&u2phy0 {
239 status = "okay";
240
241 u2phy0_otg: otg-port {
242 status = "okay";
243 };
244
245 u2phy0_host: host-port {
246 phy-supply = <&vcc_host>;
247 status = "okay";
248 };
249};
250
251&u2phy1 {
252 status = "okay";
253
254 u2phy1_otg: otg-port {
255 phy-supply = <&vcc_host>;
256 status = "okay";
257 };
258
259 u2phy1_host: host-port {
260 phy-supply = <&vcc_host>;
261 status = "okay";
262 };
263};
264
265&usb_host0_ehci {
266 status = "okay";
267};
268
269&usb_host0_ohci {
270 status = "okay";
271};
272
273&usb_host1_ehci {
274 status = "okay";
275};
276
277&usb_host1_ohci {
278 status = "okay";
279};
280
281&usb_host2_ehci {
282 status = "okay";
283};
284
285&usb_host2_ohci {
286 status = "okay";
287};
288
289&usb_otg {
290 status = "okay";
291};
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/input/input.h>
6#include "rk3229.dtsi"
7
8/ {
9 model = "Rockchip RK3229 Evaluation board";
10 compatible = "rockchip,rk3229-evb", "rockchip,rk3229";
11
12 memory@60000000 {
13 device_type = "memory";
14 reg = <0x60000000 0x40000000>;
15 };
16
17 dc_12v: dc-12v-regulator {
18 compatible = "regulator-fixed";
19 regulator-name = "dc_12v";
20 regulator-always-on;
21 regulator-boot-on;
22 regulator-min-microvolt = <12000000>;
23 regulator-max-microvolt = <12000000>;
24 };
25
26 ext_gmac: ext_gmac {
27 compatible = "fixed-clock";
28 clock-frequency = <125000000>;
29 clock-output-names = "ext_gmac";
30 #clock-cells = <0>;
31 };
32
33 vcc_host: vcc-host-regulator {
34 compatible = "regulator-fixed";
35 enable-active-high;
36 gpio = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
37 pinctrl-names = "default";
38 pinctrl-0 = <&host_vbus_drv>;
39 regulator-name = "vcc_host";
40 regulator-always-on;
41 regulator-boot-on;
42 vin-supply = <&vcc_sys>;
43 };
44
45 vcc_phy: vcc-phy-regulator {
46 compatible = "regulator-fixed";
47 enable-active-high;
48 regulator-name = "vcc_phy";
49 regulator-min-microvolt = <1800000>;
50 regulator-max-microvolt = <1800000>;
51 regulator-always-on;
52 regulator-boot-on;
53 vin-supply = <&vccio_1v8>;
54 };
55
56 vcc_sys: vcc-sys-regulator {
57 compatible = "regulator-fixed";
58 regulator-name = "vcc_sys";
59 regulator-always-on;
60 regulator-boot-on;
61 regulator-min-microvolt = <5000000>;
62 regulator-max-microvolt = <5000000>;
63 vin-supply = <&dc_12v>;
64 };
65
66 vccio_1v8: vccio-1v8-regulator {
67 compatible = "regulator-fixed";
68 regulator-name = "vccio_1v8";
69 regulator-min-microvolt = <1800000>;
70 regulator-max-microvolt = <1800000>;
71 regulator-always-on;
72 vin-supply = <&vcc_sys>;
73 };
74
75 vccio_3v3: vccio-3v3-regulator {
76 compatible = "regulator-fixed";
77 regulator-name = "vccio_3v3";
78 regulator-min-microvolt = <3300000>;
79 regulator-max-microvolt = <3300000>;
80 regulator-always-on;
81 vin-supply = <&vcc_sys>;
82 };
83
84 vdd_arm: vdd-arm-regulator {
85 compatible = "pwm-regulator";
86 pwms = <&pwm1 0 25000 1>;
87 pwm-supply = <&vcc_sys>;
88 regulator-name = "vdd_arm";
89 regulator-min-microvolt = <950000>;
90 regulator-max-microvolt = <1400000>;
91 regulator-always-on;
92 regulator-boot-on;
93 };
94
95 vdd_log: vdd-log-regulator {
96 compatible = "pwm-regulator";
97 pwms = <&pwm2 0 25000 1>;
98 pwm-supply = <&vcc_sys>;
99 regulator-name = "vdd_log";
100 regulator-min-microvolt = <1000000>;
101 regulator-max-microvolt = <1300000>;
102 regulator-always-on;
103 regulator-boot-on;
104 };
105
106 gpio_keys {
107 compatible = "gpio-keys";
108 autorepeat;
109 pinctrl-names = "default";
110 pinctrl-0 = <&pwr_key>;
111
112 power_key: power-key {
113 label = "GPIO Key Power";
114 gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
115 linux,code = <KEY_POWER>;
116 debounce-interval = <100>;
117 wakeup-source;
118 };
119 };
120};
121
122&cpu0 {
123 cpu-supply = <&vdd_arm>;
124};
125
126&cpu1 {
127 cpu-supply = <&vdd_arm>;
128};
129
130&cpu2 {
131 cpu-supply = <&vdd_arm>;
132};
133
134&cpu3 {
135 cpu-supply = <&vdd_arm>;
136};
137
138&emmc {
139 cap-mmc-highspeed;
140 non-removable;
141 status = "okay";
142};
143
144&gmac {
145 assigned-clocks = <&cru SCLK_MAC_EXTCLK>, <&cru SCLK_MAC>;
146 assigned-clock-parents = <&ext_gmac>, <&cru SCLK_MAC_EXTCLK>;
147 clock_in_out = "input";
148 phy-supply = <&vcc_phy>;
149 phy-mode = "rgmii";
150 pinctrl-names = "default";
151 pinctrl-0 = <&rgmii_pins>;
152 snps,reset-gpio = <&gpio2 RK_PD0 GPIO_ACTIVE_LOW>;
153 snps,reset-active-low;
154 snps,reset-delays-us = <0 10000 1000000>;
155 tx_delay = <0x30>;
156 rx_delay = <0x10>;
157 status = "okay";
158};
159
160&io_domains {
161 status = "okay";
162
163 vccio1-supply = <&vccio_3v3>;
164 vccio2-supply = <&vccio_1v8>;
165 vccio4-supply = <&vccio_3v3>;
166};
167
168&pinctrl {
169 keys {
170 pwr_key: pwr-key {
171 rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
172 };
173 };
174
175 usb {
176 host_vbus_drv: host-vbus-drv {
177 rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
178 };
179 };
180};
181
182&pwm1 {
183 status = "okay";
184};
185
186&pwm2 {
187 status = "okay";
188};
189
190&tsadc {
191 rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
192 status = "okay";
193};
194
195&uart2 {
196 status = "okay";
197};
198
199&u2phy0 {
200 status = "okay";
201
202 u2phy0_otg: otg-port {
203 status = "okay";
204 };
205
206 u2phy0_host: host-port {
207 phy-supply = <&vcc_host>;
208 status = "okay";
209 };
210};
211
212&u2phy1 {
213 status = "okay";
214
215 u2phy1_otg: otg-port {
216 phy-supply = <&vcc_host>;
217 status = "okay";
218 };
219
220 u2phy1_host: host-port {
221 phy-supply = <&vcc_host>;
222 status = "okay";
223 };
224};
225
226&usb_host0_ehci {
227 status = "okay";
228};
229
230&usb_host0_ohci {
231 status = "okay";
232};
233
234&usb_host1_ehci {
235 status = "okay";
236};
237
238&usb_host1_ohci {
239 status = "okay";
240};
241
242&usb_host2_ehci {
243 status = "okay";
244};
245
246&usb_host2_ohci {
247 status = "okay";
248};
249
250&usb_otg {
251 status = "okay";
252};