rk312x : add resource to BOX rk88.
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3128-box-rk88.dts
1 #include "rk312x-sdk.dtsi"
2 #include "lcd-box.dtsi"
3
4 / {
5          compatible = "rockchip,rk3128";
6         wireless-wlan {
7                 compatible = "wlan-platdata";
8
9                 wifi_chip_type = "esp8089";
10                 sdio_vref = <0>; //1800mv or 3300mv
11
12                 //power_ctrl_by_pmu;
13                 //power_pmu_regulator = "act_ldo3";
14                 //power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
15
16                 //vref_ctrl_enable;
17                 //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
18                 //vref_pmu_regulator = "act_ldo3";
19                 //vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
20
21                 WIFI,poweren_gpio = <&gpio0 GPIO_D6 GPIO_ACTIVE_HIGH>;
22                 WIFI,host_wake_irq = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
23                 //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
24
25                 status = "okay";
26         };
27
28                 wireless-bluetooth {
29                 compatible = "bluetooth-platdata";
30
31                 //wifi-bt-power-toggle;
32
33                 uart_rts_gpios = <&gpio1 GPIO_B3 GPIO_ACTIVE_LOW>;
34                 pinctrl-names = "default","rts_gpio";
35                 pinctrl-0 = <&uart1_rts>;
36                 pinctrl-1 = <&uart1_rts_gpio>;
37
38                 //BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
39                 BT,reset_gpio = <&gpio3 GPIO_C5 GPIO_ACTIVE_HIGH>;
40                 BT,wake_gpio = <&gpio1 GPIO_B4 GPIO_ACTIVE_HIGH>;
41                 BT,wake_host_irq = <&gpio0 GPIO_C6 GPIO_ACTIVE_LOW>;
42
43         status = "okay";
44     };
45         rockchip-spdif-card {
46                 compatible = "rockchip-spdif-card";
47                 dais {
48                         dai0 {
49                                 audio-codec = <&codec_hdmi_spdif>;
50                                 i2s-controller = <&spdif>;
51                         };
52                 };
53         };
54         usb_control {
55                 compatible = "rockchip,rk3126-usb-control";
56                 host_drv_gpio = <&gpio3 GPIO_C4 GPIO_ACTIVE_LOW>;
57                 otg_drv_gpio = <&gpio3 GPIO_C1 GPIO_ACTIVE_LOW>;
58
59                 rockchip,remote_wakeup;
60                 rockchip,usb_irq_wakeup;
61         };
62                 usb0: usb@10180000 {
63                 /*0 - Normal, 1 - Force Host, 2 - Force Device*/
64                 rockchip,usb-mode = <1>;
65         };
66          rockchip_suspend {
67                 rockchip,ctrbits = <
68                         (0
69                         |RKPM_CTR_PWR_DMNS
70                         |RKPM_CTR_GTCLKS
71                         |RKPM_CTR_PLLS
72                         |RKPM_CTR_IDLESRAM_MD
73                         |RKPM_CTR_DDR
74                         |RKPM_CTR_VOLTS
75                         |RKPM_CTR_VOL_PWM1
76                         |RKPM_CTR_VOL_PWM2
77                         )
78                 >;
79         };
80
81 };
82
83
84         &clk_core_dvfs_table {
85                 operating-points = <
86                         /* KHz    uV */
87                         /*408000 1250000
88                         600000 1250000
89                         696000 1250000
90                         */
91                         816000 1100000
92                         1008000 1200000
93                         1200000 1325000
94                         >;
95                         virt-temp-limit-1-cpu-busy = <
96                         /* target-temp  limit-freq */
97                                 75      1008000
98                                 85      1200000
99                                 95      1200000
100                                 100     1200000
101                                 >;
102                         virt-temp-limit-2-cpu-busy = <
103                         /* target-temp  limit-freq */
104                                 75      912000
105                                 85      1008000
106                                 95      1104000
107                                 100     1200000
108                                 >;
109                         virt-temp-limit-3-cpu-busy = <
110                         /* target-temp  limit-freq */
111                                 75      816000
112                                 85      912000
113                                 95      100800
114                                 100     110400
115                                 >;
116                         virt-temp-limit-4-cpu-busy = <
117                         /* target-temp  limit-freq */
118                                 75      696000
119                                 85      816000
120                                 95      912000
121                                 100     100800
122                                 >;
123                         temp-limit-enable = <1>;
124                         target-temp = <85>;
125                 status="okay";
126         };
127
128         &clk_gpu_dvfs_table {
129                 operating-points = <
130                         /* KHz    uV */
131                         200000 950000
132                         300000 975000
133                         400000 1075000
134                         >;
135                 status="okay";
136         };
137
138         &clk_ddr_dvfs_table {
139                 operating-points = <
140                         /* KHz    uV */
141                         200000 950000
142                         300000 950000
143                         400000 1000000
144                         533000 1200000
145                         >;
146
147                 freq-table = <
148                         /*status                freq(KHz)*/
149                         SYS_STATUS_NORMAL       533000
150                         SYS_STATUS_SUSPEND      200000
151                         /*
152                         SYS_STATUS_VIDEO_1080P  240000
153                         SYS_STATUS_VIDEO_4K     400000
154                         SYS_STATUS_PERFORMANCE  528000
155                         SYS_STATUS_DUALVIEW     400000
156                         SYS_STATUS_BOOST        324000
157                         SYS_STATUS_ISP          533000
158                         */
159                         >;
160                 auto-freq-table = <
161                         240000
162                         324000
163                         396000
164                         528000
165                         >;
166                 auto-freq=<0>;
167                 status="okay";
168         };
169
170         &pwm_regulator1 {
171                 status = "okay";
172         };
173
174         &pwm_regulator2 {
175                 status = "okay";
176         };
177
178         &pwm1 {
179                 status = "okay";
180         };
181
182         &uart1{
183                 status = "okay";
184                 dma-names = "!tx", "!rx";
185         pinctrl-0 = <&uart1_xfer &uart1_cts>;
186 };
187
188 &pwm2 {
189         status = "okay";
190 };
191
192 &disp_timings {
193         native-mode = <&timing1>;
194 };
195
196 &rk_screen {
197         display-timings = <&disp_timings>;
198 };
199
200 &fb {
201         rockchip,disp-mode = <NO_DUAL>;
202         rockchip,uboot-logo-on = <0>;
203 };
204
205 &lcdc {
206         status = "okay";
207         rockchip,fb-win-map = <FB0_WIN1_FB1_WIN0_FB2_WIN2>;
208 };
209
210 &hdmi {
211         status = "okay";
212 };
213
214 &tve {
215         status = "okay";
216         test_mode = <0>;
217 };
218
219 &i2c2 {
220         status = "disabled";
221 };
222
223 &spi0 {
224         status = "disabled";
225         max-freq = <48000000>;  
226         /*
227         spi_test@00 {
228                 compatible = "rockchip,spi_test_bus0_cs0";
229                 reg = <0>;
230                 spi-max-frequency = <24000000>;
231                 //spi-cpha;
232                 //spi-cpol;
233                 poll_mode = <0>;
234                 type = <0>;
235                 enable_dma = <0>;
236
237         };
238         
239         spi_test@01 {
240                 compatible = "rockchip,spi_test_bus0_cs1";
241                 reg = <1>;
242                 spi-max-frequency = <24000000>;
243                 spi-cpha;
244                 spi-cpol;
245                 poll_mode = <0>;
246                 type = <0>;
247                 enable_dma = <0>;               
248         };
249         */
250 };
251
252 &gmac_clkin {
253         clock-frequency = <50000000>;
254 };
255 &gmac {
256         //pmu_regulator = "act_ldo5";
257         //pmu_enable_level = <1>; //1->HIGH, 0->LOW
258         //power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>;
259         reset-gpio = <&gpio2 GPIO_D0 GPIO_ACTIVE_LOW>;
260         phy-mode = "rmii";
261         clock_in_out = "output";
262         tx_delay = <0x30>;
263         rx_delay = <0x10>;
264 };
265
266 &codec {
267         spk_ctl_io = <&gpio1 GPIO_A3 GPIO_ACTIVE_HIGH>;
268         spk-mute-delay = <200>;
269         hp-mute-delay = <100>;
270         rk312x_for_mid = <0>;
271         is_rk3128 = <0>;
272         spk_volume = <25>;
273         hp_volume = <25>;
274         capture_volume = <26>;
275         gpio_debug = <1>;
276         codec_hp_det = <0>;
277 };
278
279 &dwc_control_usb {
280         usb_uart {
281                 status = "disabled";
282         };
283 };
284
285 &sdmmc {
286         status = "okay";
287         cd-gpios = <&gpio1 GPIO_C1 GPIO_ACTIVE_HIGH>;/*CD GPIO*/
288 };
289