Linux Audio

Check our new training course

Loading...
Note: File does not exist in v6.13.7.
  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#include "rk3288-rock2-som.dtsi"
 43
 44/ {
 45	model = "Radxa Rock 2 Square";
 46	compatible = "radxa,rock2-square", "rockchip,rk3288";
 47
 48	chosen {
 49		stdout-path = "serial2:115200n8";
 50	};
 51
 52	gpio-leds {
 53		compatible = "gpio-leds";
 54
 55		heartbeat {
 56			gpios = <&gpio7 15 GPIO_ACTIVE_LOW>;
 57			label = "rock2:green:state1";
 58			linux,default-trigger = "heartbeat";
 59		};
 60
 61		mmc {
 62			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 63			label = "rock2:blue:state2";
 64			linux,default-trigger = "mmc0";
 65		};
 66	};
 67
 68	ir: ir-receiver {
 69		compatible = "gpio-ir-receiver";
 70		gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
 71		pinctrl-names = "default";
 72		pinctrl-0 = <&ir_int>;
 73	};
 74
 75	sound {
 76		compatible = "simple-audio-card";
 77		simple-audio-card,name = "SPDIF";
 78		simple-audio-card,dai-link@1 {  /* S/PDIF - S/PDIF */
 79			cpu { sound-dai = <&spdif>; };
 80			codec { sound-dai = <&spdif_out>; };
 81		};
 82	};
 83
 84	spdif_out: spdif-out {
 85		compatible = "linux,spdif-dit";
 86		#sound-dai-cells = <0>;
 87	};
 88
 89	sdio_pwrseq: sdio-pwrseq {
 90		compatible = "mmc-pwrseq-simple";
 91		clocks = <&hym8563>;
 92		clock-names = "ext_clock";
 93		pinctrl-names = "default";
 94		pinctrl-0 = <&wifi_enable>;
 95		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
 96	};
 97
 98	vcc_usb_host: vcc-host-regulator {
 99		compatible = "regulator-fixed";
100		enable-active-high;
101		gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
102		pinctrl-names = "default";
103		pinctrl-0 = <&host_vbus_drv>;
104		/* Always on as the rockchip usb phy doesn't have a vbus-supply
105		 * property
106		 */
107		regulator-always-on;
108		regulator-name = "vcc_host";
109	};
110
111	vcc_sd: sdmmc-regulator {
112		compatible = "regulator-fixed";
113		gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
114		pinctrl-names = "default";
115		pinctrl-0 = <&sdmmc_pwr>;
116		regulator-name = "vcc_sd";
117		regulator-min-microvolt = <3300000>;
118		regulator-max-microvolt = <3300000>;
119		vin-supply = <&vcc_io>;
120	};
121};
122
123&sdio0 {
124	bus-width = <4>;
125	cap-sd-highspeed;
126	cap-sdio-irq;
127	disable-wp;
128	mmc-pwrseq = <&sdio_pwrseq>;
129	non-removable;
130	num-slots = <1>;
131	pinctrl-names = "default";
132	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
133	vmmc-supply = <&vcc_io>;
134	vqmmc-supply = <&vcc_18>;
135	status = "okay";
136};
137
138&sdmmc {
139	bus-width = <4>;
140	cap-mmc-highspeed;
141	cap-sd-highspeed;
142	card-detect-delay = <200>;
143	disable-wp;	/* wp not hooked up */
144	num-slots = <1>;
145	pinctrl-names = "default";
146	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
147	vmmc-supply = <&vcc_sd>;
148	vqmmc-supply = <&vccio_sd>;
149	status = "okay";
150};
151
152&gmac {
153	status = "ok";
154};
155
156&hdmi {
157	ddc-i2c-bus = <&i2c5>;
158	status = "okay";
159};
160
161&i2c0 {
162	hym8563: hym8563@51 {
163		compatible = "haoyu,hym8563";
164		reg = <0x51>;
165		#clock-cells = <0>;
166		clock-frequency = <32768>;
167		clock-output-names = "xin32k";
168		interrupt-parent = <&gpio0>;
169		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
170		pinctrl-names = "default";
171		pinctrl-0 = <&pmic_int>;
172
173	};
174};
175
176&i2c5 {
177	status = "okay";
178};
179
180&pinctrl {
181	ir {
182		ir_int: ir-int {
183			rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_up>;
184		};
185	};
186
187	pmic {
188		pmic_int: pmic-int {
189			rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>;
190		};
191	};
192
193	usb {
194		host_vbus_drv: host-vbus-drv {
195			rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
196		};
197	};
198
199	sdmmc {
200		sdmmc_pwr: sdmmc-pwr {
201			rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
202		};
203	};
204
205	sdio {
206		wifi_enable: wifi-enable {
207			rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
208		};
209	};
210};
211
212&spdif {
213	status = "okay";
214};
215
216&uart2 {
217	status = "okay";
218};
219
220&usbphy {
221	status = "okay";
222};
223
224&usb_host0_ehci {
225	status = "okay";
226};