FROMLIST: ARM: dts: rockchip: add eDP/panel display device nodes for rk3288-evb
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3128-box-rk88.dts
index 9e9b4fda4d5d5e7e58622287373c40e8f8061aeb..3158daa638e49567ee989e534ea48e271ec8b23c 100755 (executable)
@@ -1,14 +1,30 @@
+/dts-v1/;
+
+#include "rk3128.dtsi"
 #include "rk312x-sdk.dtsi"
 #include "lcd-box.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
         compatible = "rockchip,rk3128";
+
+        gpio_poweroff {
+               compatible = "gpio-poweroff";
+               gpios = <&gpio1 GPIO_A2 GPIO_ACTIVE_LOW>;
+       };
        wireless-wlan {
                compatible = "wlan-platdata";
 
+               /* wifi_chip_type - wifi chip define
+               * bcmwifi ==> like ap6xxx, rk90x, ...;
+               * rtkwifi ==> like rtl8188xx, rtl8723xx, ...;
+               * esp8089 ==> esp8089;
+               * other   ==> for other wifi;
+               */
                wifi_chip_type = "esp8089";
                sdio_vref = <0>; //1800mv or 3300mv
 
+               //keep_wifi_power_on;
                //power_ctrl_by_pmu;
                //power_pmu_regulator = "act_ldo3";
                //power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
@@ -25,7 +41,7 @@
                status = "okay";
        };
 
-               wireless-bluetooth {
+       wireless-bluetooth {
                compatible = "bluetooth-platdata";
 
                //wifi-bt-power-toggle;
                BT,wake_gpio = <&gpio1 GPIO_B4 GPIO_ACTIVE_HIGH>;
                BT,wake_host_irq = <&gpio0 GPIO_C6 GPIO_ACTIVE_LOW>;
 
-        status = "okay";
-    };
+               status = "disabled";
+       };
+
+       power-led {
+               compatible = "gpio-leds";
+               power {
+                       gpios = <&gpio0 GPIO_B0 GPIO_ACTIVE_LOW>;
+                       default-state = "on";
+               };
+               work {
+                       gpios = <&gpio0 GPIO_D2 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
        rockchip-spdif-card {
                compatible = "rockchip-spdif-card";
                dais {
                        dai0 {
                                audio-codec = <&codec_hdmi_spdif>;
-                               i2s-controller = <&spdif>;
+                               audio-controller = <&spdif>;
                        };
                };
        };
+
        usb_control {
                compatible = "rockchip,rk3126-usb-control";
                host_drv_gpio = <&gpio3 GPIO_C4 GPIO_ACTIVE_LOW>;
                /*0 - Normal, 1 - Force Host, 2 - Force Device*/
                rockchip,usb-mode = <1>;
        };
-        rockchip_suspend {
+
+       rockchip_suspend: rockchip_suspend {
                 rockchip,ctrbits = <
                         (0
                         |RKPM_CTR_PWR_DMNS
                         |RKPM_CTR_GTCLKS
                         |RKPM_CTR_PLLS
+                        //|RKPM_CTR_ARMOFF_LPMD
+                        |RKPM_CTR_DDR
                         |RKPM_CTR_IDLESRAM_MD
                         |RKPM_CTR_DDR
-                        |RKPM_CTR_VOLTS
-                        |RKPM_CTR_VOL_PWM1
-                        |RKPM_CTR_VOL_PWM2
+                        //|RKPM_CTR_BUS_IDLE
+                       //|RKPM_CTR_VOLTS
+                       //|RKPM_CTR_VOL_PWM1
+                       //|RKPM_CTR_VOL_PWM2
                         )
                 >;
+               rockchip,pmic-suspend_gpios = <
+                       0
+                        >;
         };
 
 };
 
 &fb {
        rockchip,disp-mode = <NO_DUAL>;
-       rockchip,uboot-logo-on = <0>;
+       rockchip,disp-policy = <DISPLAY_POLICY_BOX>;
+       rockchip,uboot-logo-on = <1>;
 };
 
 &lcdc {
 
 &spi0 {
        status = "disabled";
-       max-freq = <48000000>;  
+       max-freq = <48000000>;
        /*
        spi_test@00 {
-               compatible = "rockchip,spi_test_bus0_cs0";
-               reg = <0>;
-               spi-max-frequency = <24000000>;
-               //spi-cpha;
+               compatible = "rockchip,spi_test_bus0_cs0";
+               reg = <0>;
+               spi-max-frequency = <24000000>;
+               //spi-cpha;
                //spi-cpol;
                poll_mode = <0>;
                type = <0>;
                enable_dma = <0>;
 
        };
-       
+
        spi_test@01 {
                compatible = "rockchip,spi_test_bus0_cs1";
                reg = <1>;
                spi-cpol;
                poll_mode = <0>;
                type = <0>;
-               enable_dma = <0>;               
+               enable_dma = <0>;
        };
        */
 };
        cd-gpios = <&gpio1 GPIO_C1 GPIO_ACTIVE_HIGH>;/*CD GPIO*/
 };
 
+&remotectl {
+       handle_cpu_id = <1>;
+       ir_key1{
+               rockchip,usercode = <0x4040>;
+               rockchip,key_table =
+                       <0xf2   KEY_REPLY>,
+                       <0xba   KEY_BACK>,
+                       <0xf4   KEY_UP>,
+                       <0xf1   KEY_DOWN>,
+                       <0xef   KEY_LEFT>,
+                       <0xee   KEY_RIGHT>,
+                       <0xbd   KEY_HOME>,
+                       <0xea   KEY_VOLUMEUP>,
+                       <0xe3   KEY_VOLUMEDOWN>,
+                       <0xe2   KEY_SEARCH>,
+                       <0xb2   KEY_POWER>,
+                       <0xbc   KEY_MUTE>,
+                       <0xec   KEY_MENU>,
+                       <0xbf   0x190>,
+                       <0xe0   0x191>,
+                       <0xe1   0x192>,
+                       <0xe9   183>,
+                       <0xe6   248>,
+                       <0xe8   185>,
+                       <0xe7   186>,
+                       <0xf0   388>,
+                       <0xbe   0x175>;
+       };
+       ir_key2{
+               rockchip,usercode = <0xff00>;
+               rockchip,key_table =
+                       <0xf9   KEY_HOME>,
+                       <0xbf   KEY_BACK>,
+                       <0xfb   KEY_MENU>,
+                       <0xaa   KEY_REPLY>,
+                       <0xb9   KEY_UP>,
+                       <0xe9   KEY_DOWN>,
+                       <0xb8   KEY_LEFT>,
+                       <0xea   KEY_RIGHT>,
+                       <0xeb   KEY_VOLUMEDOWN>,
+                       <0xef   KEY_VOLUMEUP>,
+                       <0xf7   KEY_MUTE>,
+                       <0xe7   KEY_POWER>,
+                       <0xfc   KEY_POWER>,
+                       <0xa9   KEY_VOLUMEDOWN>,
+                       <0xa8   KEY_VOLUMEDOWN>,
+                       <0xe0   KEY_VOLUMEDOWN>,
+                       <0xa5   KEY_VOLUMEDOWN>,
+                       <0xab   183>,
+                       <0xb7   388>,
+                       <0xf8   184>,
+                       <0xaf   185>,
+                       <0xed   KEY_VOLUMEDOWN>,
+                       <0xee   186>,
+                       <0xb3   KEY_VOLUMEDOWN>,
+                       <0xf1   KEY_VOLUMEDOWN>,
+                       <0xf2   KEY_VOLUMEDOWN>,
+                       <0xf3   KEY_SEARCH>,
+                       <0xb4   KEY_VOLUMEDOWN>,
+                       <0xbe   KEY_SEARCH>;
+       };
+       ir_key3{
+               rockchip,usercode = <0x1dcc>;
+               rockchip,key_table =
+                       <0xee   KEY_REPLY>,
+                       <0xf0   KEY_BACK>,
+                       <0xf8   KEY_UP>,
+                       <0xbb   KEY_DOWN>,
+                       <0xef   KEY_LEFT>,
+                       <0xed   KEY_RIGHT>,
+                       <0xfc   KEY_HOME>,
+                       <0xf1   KEY_VOLUMEUP>,
+                       <0xfd   KEY_VOLUMEDOWN>,
+                       <0xb7   KEY_SEARCH>,
+                       <0xff   KEY_POWER>,
+                       <0xf3   KEY_MUTE>,
+                       <0xbf   KEY_MENU>,
+                       <0xf9   0x191>,
+                       <0xf5   0x192>,
+                       <0xb3   388>,
+                       <0xbe   KEY_1>,
+                       <0xba   KEY_2>,
+                       <0xb2   KEY_3>,
+                       <0xbd   KEY_4>,
+                       <0xf9   KEY_5>,
+                       <0xb1   KEY_6>,
+                       <0xfc   KEY_7>,
+                       <0xf8   KEY_8>,
+                       <0xb0   KEY_9>,
+                       <0xb6   KEY_0>,
+                       <0xb5   KEY_BACKSPACE>;
+       };
+};