Linux Audio

Check our new training course

Linux BSP development engineering services

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