xref: /linux/arch/arm/boot/dts/rockchip/rv1126-alientek-dlrv1126.dts (revision cbe8aadf1551f3f4a853f24b3b96d9f0eea49c53)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2026 Yanan He <grumpycat921013@gmail.com>
4 */
5
6/dts-v1/;
7#include <dt-bindings/input/input.h>
8#include "rv1126-alientek-clrv1126f.dtsi"
9
10/ {
11	model = "Alientek ATK-DLRV1126";
12	compatible = "alientek,dlrv1126", "alientek,clrv1126f", "rockchip,rv1126";
13
14	aliases {
15		ethernet0 = &gmac;
16		mmc1 = &sdio;
17		mmc2 = &sdmmc;
18	};
19
20	chosen {
21		stdout-path = "serial2:1500000n8";
22	};
23
24	adc-keys {
25		compatible = "adc-keys";
26		io-channels = <&saradc 0>;
27		io-channel-names = "buttons";
28		keyup-threshold-microvolt = <1800000>;
29		poll-interval = <100>;
30
31		button-esc {
32			label = "esc";
33			linux,code = <KEY_ESC>;
34			press-threshold-microvolt = <0>;
35		};
36
37		button-left {
38			label = "left";
39			linux,code = <KEY_LEFT>;
40			press-threshold-microvolt = <801562>;
41		};
42
43		button-menu {
44			label = "menu";
45			linux,code = <KEY_MENU>;
46			press-threshold-microvolt = <1198828>;
47		};
48
49		button-right {
50			label = "right";
51			linux,code = <KEY_RIGHT>;
52			press-threshold-microvolt = <400781>;
53		};
54	};
55
56	leds {
57		compatible = "gpio-leds";
58
59		led-0 {
60			label = "sys-led";
61			gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
62			linux,default-trigger = "heartbeat";
63			default-state = "on";
64		};
65
66		led-1 {
67			label = "user-led";
68			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
69			linux,default-trigger = "none";
70			default-state = "on";
71		};
72	};
73
74	sound {
75		compatible = "simple-audio-card";
76		simple-audio-card,format = "i2s";
77		simple-audio-card,name = "Analog RK809";
78		simple-audio-card,mclk-fs = <256>;
79		simple-audio-card,widgets =
80			"Speaker", "Speaker",
81			"Headphone", "Headphones",
82			"Microphone", "Mic Jack";
83		simple-audio-card,routing =
84			"Speaker", "SPKO",
85			"Headphones", "HPOL",
86			"Headphones", "HPOR",
87			"MICL", "Mic Jack";
88
89		simple-audio-card,cpu {
90			sound-dai = <&i2s0>;
91		};
92
93		simple-audio-card,codec {
94			sound-dai = <&rk809>;
95		};
96	};
97
98	vcc5v0_sys: regulator-vcc5v0-sys {
99		compatible = "regulator-fixed";
100		regulator-name = "vcc5v0_sys";
101		regulator-always-on;
102		regulator-boot-on;
103		regulator-min-microvolt = <5000000>;
104		regulator-max-microvolt = <5000000>;
105	};
106
107	sdio_pwrseq: pwrseq-sdio {
108		compatible = "mmc-pwrseq-simple";
109		pinctrl-names = "default";
110		pinctrl-0 = <&wifi_enable_h>;
111		reset-gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
112		post-power-on-delay-ms = <200>;
113		power-off-delay-us = <20000>;
114	};
115};
116
117&gmac {
118	assigned-clocks = <&cru CLK_GMAC_SRC>, <&cru CLK_GMAC_TX_RX>,
119			  <&cru CLK_GMAC_ETHERNET_OUT>;
120	assigned-clock-parents = <&cru CLK_GMAC_SRC_M1>,
121				 <&cru RGMII_MODE_CLK>;
122	assigned-clock-rates = <125000000>, <0>, <25000000>;
123	clock_in_out = "input";
124	phy-handle = <&phy>;
125	phy-mode = "rgmii-id";
126	pinctrl-names = "default";
127	pinctrl-0 = <&rgmiim1_miim &rgmiim1_bus2 &rgmiim1_bus4
128		     &clk_out_ethernetm1_pins>;
129	status = "okay";
130};
131
132&i2c5 {
133	status = "okay";
134	clock-frequency = <400000>;
135
136	pcf8563: rtc@51 {
137		compatible = "nxp,pcf8563";
138		reg = <0x51>;
139		#clock-cells = <0>;
140		clock-output-names = "xin32k";
141		interrupt-parent = <&gpio1>;
142		interrupts = <RK_PD0 IRQ_TYPE_LEVEL_LOW>;
143	};
144};
145
146&i2s0 {
147	pinctrl-names = "default";
148	pinctrl-0 = <&i2s0m0_sclk_tx>,
149		    <&i2s0m0_mclk>,
150		    <&i2s0m0_lrck_tx>,
151		    <&i2s0m0_sdo0>,
152		    <&i2s0m0_sdo1_sdi3>;
153	rockchip,trcm-sync-tx-only;
154	rockchip,i2s-rx-route = <3 1 2 0>;
155	rockchip,i2s-tx-route = <0 1 2 3>;
156	status = "okay";
157};
158
159&mdio {
160	phy: ethernet-phy@1 {
161		compatible = "ethernet-phy-ieee802.3-c22";
162		reg = <0x1>;
163		clocks = <&cru CLK_GMAC_ETHERNET_OUT>;
164		pinctrl-names = "default";
165		pinctrl-0 = <&eth_phy_rst>;
166		reset-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_LOW>;
167		reset-assert-us = <20000>;
168		reset-deassert-us = <100000>;
169	};
170};
171
172&pinctrl {
173	bt {
174		bt_enable: bt-enable {
175			rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
176		};
177
178		bt_wake_dev: bt-wake-dev {
179			rockchip,pins = <1 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
180		};
181
182		bt_wake_host: bt-wake-host {
183			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
184		};
185	};
186
187	ethernet {
188		eth_phy_rst: eth-phy-rst {
189			rockchip,pins = <3 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
190		};
191	};
192
193	wifi {
194		wifi_enable_h: wifi-enable-h {
195			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
196		};
197	};
198};
199
200&sdio {
201	bus-width = <4>;
202	cap-sdio-irq;
203	keep-power-in-suspend;
204	max-frequency = <25000000>;
205	mmc-pwrseq = <&sdio_pwrseq>;
206	non-removable;
207	pinctrl-names = "default";
208	pinctrl-0 = <&sdmmc1_clk &sdmmc1_cmd &sdmmc1_bus4>;
209	rockchip,default-sample-phase = <90>;
210	vmmc-supply = <&vcc3v3_sd>;
211	vqmmc-supply = <&vcc_1v8>;
212	status = "okay";
213};
214
215&sdmmc {
216	bus-width = <4>;
217	cap-mmc-highspeed;
218	cap-sd-highspeed;
219	card-detect-delay = <200>;
220	pinctrl-names = "default";
221	pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_bus4 &sdmmc0_det>;
222	rockchip,default-sample-phase = <90>;
223	sd-uhs-sdr12;
224	sd-uhs-sdr25;
225	sd-uhs-sdr104;
226	vmmc-supply = <&vcc3v3_sd>;
227	vqmmc-supply = <&vccio_sd>;
228	status = "okay";
229};
230
231&uart0 {
232	pinctrl-names = "default";
233	pinctrl-0 = <&uart0_xfer &uart0_ctsn &uart0_rtsn>;
234	uart-has-rtscts;
235	status = "okay";
236
237	bluetooth {
238		compatible = "brcm,bcm43430a1-bt";
239		clocks = <&rk809 1>;
240		clock-names = "lpo";
241		device-wakeup-gpios = <&gpio1 RK_PD1 GPIO_ACTIVE_HIGH>;
242		interrupt-parent = <&gpio0>;
243		interrupts = <RK_PA5 IRQ_TYPE_EDGE_RISING>;
244		interrupt-names = "host-wakeup";
245		max-speed = <115200>;
246		pinctrl-names = "default";
247		pinctrl-0 = <&bt_enable>, <&bt_wake_dev>, <&bt_wake_host>;
248		shutdown-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>;
249		vbat-supply = <&vcc_3v3>;
250		vddio-supply = <&vcc_1v8>;
251	};
252};
253
254&uart2 {
255	status = "okay";
256};
257