xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3229-at-3nod-func.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT).
5 */
6
7/dts-v1/;
8
9#include "rk3229-at-som.dtsi"
10#include <dt-bindings/input/input.h>
11
12/ {
13	model = "RK3229 ANDROID THINGS Full Function Board";
14	compatible = "rockchip,rk3229-at-3nod-func", "rockchip,rk3229";
15
16	gpio_keys {
17		compatible = "gpio-keys";
18		#address-cells = <1>;
19		#size-cells = <0>;
20		autorepeat;
21
22		pinctrl-names = "default";
23		pinctrl-0 = <&pwr_key>;
24
25		power_key {
26			label = "GPIO Key Power";
27			gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
28			linux,code = <116>;
29			debounce-interval = <100>;
30			wakeup-source;
31		};
32	};
33
34	sdio_pwrseq: sdio-pwrseq {
35		compatible = "mmc-pwrseq-simple";
36		clocks = <&rk805 1>;
37		clock-names = "ext_clock";
38		pinctrl-names = "default";
39		pinctrl-0 = <&wifi_enable_h>;
40
41		/*
42		 * On the module itself this is one of these (depending
43		 * on the actual card populated):
44		 * - SDIO_RESET_L_WL_REG_ON
45		 * - PDN (power down when low)
46		 */
47		reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* GPIO3_B7 */
48	};
49
50	vcc_sd: vcc-sd {
51		compatible = "regulator-fixed";
52		gpio = <&gpio1 14 GPIO_ACTIVE_LOW>;
53		pinctrl-names = "default";
54		pinctrl-0 = <&vcc_sd_h>;
55		regulator-name = "vcc_sd";
56		regulator-min-microvolt = <3300000>;
57		regulator-max-microvolt = <3300000>;
58	};
59
60	wireless-bluetooth {
61		compatible = "bluetooth-platdata";
62		clocks = <&rk805 1>;
63		clock-names = "ext_clock";
64		uart_rts_gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
65		pinctrl-names = "default", "rts_gpio";
66		pinctrl-0 = <&uart11_rts>;
67		pinctrl-1 = <&uart11_rts_gpio>;
68		BT,reset_gpio    = <&gpio2 29 GPIO_ACTIVE_HIGH>;
69		BT,wake_gpio     = <&gpio3 27 GPIO_ACTIVE_HIGH>;
70		BT,wake_host_irq = <&gpio3 26 GPIO_ACTIVE_HIGH>;
71		status = "okay";
72	};
73
74	wireless-wlan {
75		compatible = "wlan-platdata";
76		rockchip,grf = <&grf>;
77		wifi_chip_type = "ap6255";
78		WIFI,host_wake_irq = <&gpio0 28 GPIO_ACTIVE_HIGH>;
79		status = "okay";
80	};
81};
82
83&emmc {
84	/*
85	 * enable emmc ddr mode, choose the
86	 * according parameter base on the emmc
87	 * io voltage.
88	 */
89	mmc-ddr-1_8v;
90	status = "okay";
91};
92
93&gpu {
94	status = "okay";
95};
96
97&nandc {
98	status = "disabled";
99};
100
101&pinctrl {
102	pinctrl-names = "default";
103	pinctrl-0 = <&fixed_gpio>;
104
105	keys {
106		pwr_key: pwr-key {
107			rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_down>;
108		};
109	};
110
111	sdio-pwrseq {
112		wifi_enable_h: wifi-enable-h {
113			rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
114		};
115	};
116
117	vcc-sd {
118		vcc_sd_h: vcc-sd-h {
119			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
120		};
121	};
122
123	sdmmc {
124		sdmmc_cd: sdmmc-cd {
125			rockchip,pins =
126				<1 RK_PC1 1 &pcfg_pull_none_drv_12ma>;
127		};
128	};
129};
130
131&pwm0 {
132	status = "okay";
133};
134
135&pwm2 {
136	status = "okay";
137};
138
139&pwm3 {
140	status = "okay";
141	interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
142	compatible = "rockchip,remotectl-pwm";
143	remote_pwm_id = <3>;
144	handle_cpu_id = <1>;
145	remote_support_psci = <1>;
146
147	ir_key1 {
148		rockchip,usercode = <0x4040>;
149		rockchip,key_table =
150		<0xf2   KEY_REPLY>,
151		<0xba   KEY_BACK>,
152		<0xf4   KEY_UP>,
153		<0xf1   KEY_DOWN>,
154		<0xef   KEY_LEFT>,
155		<0xee   KEY_RIGHT>,
156		<0xbd   KEY_HOME>,
157		<0xea   KEY_VOLUMEUP>,
158		<0xe3   KEY_VOLUMEDOWN>,
159		<0xe2   KEY_SEARCH>,
160		<0xb2   KEY_POWER>,
161		<0xbc   KEY_MUTE>,
162		<0xec   KEY_MENU>,
163		<0xbf   0x190>,
164		<0xe0   0x191>,
165		<0xe1   0x192>,
166		<0xe9   183>,
167		<0xe6   248>,
168		<0xe8   185>,
169		<0xe7   186>,
170		<0xf0   388>,
171		<0xbe   0x175>;
172	};
173};
174
175&reboot_mode {
176	/delete-property/ mode-bootloader;
177};
178
179&sdio {
180	max-frequency = <150000000>;
181	mmc-pwrseq = <&sdio_pwrseq>;
182	num-slots = <1>;
183	sd-uhs-sdr104;
184	status = "okay";
185};
186
187&sdmmc {
188	bus-width = <4>;
189	cap-mmc-highspeed;
190	cap-sd-highspeed;
191	card-detect-delay = <200>;
192	disable-wp;
193	max-frequency = <50000000>;
194	num-slots = <1>;
195	no-sdio;
196	no-mmc;
197	vmmc-supply = <&vcc_sd>;
198	pinctrl-names = "default";
199	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4 &sdmmc_cd>;
200	status = "okay";
201};
202
203&vop {
204	assigned-clocks = <&cru DCLK_VOP>;
205	assigned-clock-parents = <&cru HDMIPHY>;
206	status = "okay";
207};
208
209&vop_mmu {
210	status = "okay";
211};
212