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