Firefly-RK3288 开发板 Android5.1 支持7.85寸液晶屏模组的修改方法

本帖最后由 wico 于 2016-12-1 14:41 编辑

一.硬件条件需要对应的硬件支持:
1.Firefly-RK3288 开发板;
2.Firefly-RK3288开发板对应的7.85寸液晶屏模组:

二.软件配置:
1.首先下载更新RK3288 Android5.1 SDK,最新提交:

commit:3e3038c
Message:Android->framework:fix btn default color

2.软件修改配置:
1)打开kernel/arch/arm/boot/dts/firefly-rk3288.dts,修改如下:
包含lcd的dtsi:

-#include "lcd-box.dtsi"
+#include "lcd-LP079Qx1.dtsi"

关闭vga:

      vga_ddc@50 {
                compatible = "firefly,vga_ddc";
                reg = <0x50>;
                gpio-pwn = <&gpio0 GPIO_C1 GPIO_ACTIVE_HIGH>;
                rockchip,source = <0>; //0: LCDC0; 1: LCDC1
                rockchip,prop = <PRMRY>;//<EXTEND>
-                status = "okay";
+                status = "disabled";
        };

使能tp

        mt@40 {
-                status = "disabled";
+                status = "okay";
                       compatible = "firefly,gsl3680";
                      reg = <0x40>;
                       touch-gpio = <&gpio5 GPIO_B0 IRQ_TYPE_EDGE_RISING>;
                       reset-gpio = <&gpio7 GPIO_B1 GPIO_ACTIVE_LOW>;
                       max-y = <2048>;
                       max-x = <1536>;
                flip-x = <1>;
                flip-y = <1>;
                swap-xy = <0>;
        };

使能mpu6050

         mpu6050:mpu@68{
-            status = "disabled";
+            status = "okay";
             compatible = "mpu6050";
             reg = <0x68>;
             mpu-int_config = <0x10>;

修改timing配置和添加屏使能脚:

&disp_timings {
-        native-mode = <&timing1>;
+        native-mode = <&timing0>;
};

&rk_screen {
@@ -611,6 +611,29 @@
         status = "okay";
         rockchip,iommu-enabled = <1>;
         rockchip,prop = <PRMRY>;
+        power_ctr: power_ctr {
+        rockchip,debug = <1>;
+
+        lcd_en:lcd_en {
+                rockchip,power_type = <GPIO>;
+                gpios = <&gpio0 GPIO_B5 GPIO_ACTIVE_HIGH>;
+                rockchip,delay = <10>;
+        };
+
+               /*
+        lcd_cs:lcd_cs {
+                rockchip,power_type = <GPIO>;
+                gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
+                rockchip,delay = <10>;
+        };
+        lcd_rst:lcd_rst {
+                rockchip,power_type = <GPIO>;
+                gpios = <&gpio5 GPIO_C1 GPIO_ACTIVE_LOW>;
+                rockchip,delay = <0>;
+        };
+              */
+};
+
};

使能背光pwm:

&pwm1 {
-        status = "disabled";
+        status = "okay";
};

2)打开kernel/arch/arm/boot/dts/rk3288.dtsi,修改如下:
关闭CTR_GTCLKS:

            rockchip,ctrbits = <
                         (0
                          |RKPM_CTR_PWR_DMNS
-                         |RKPM_CTR_GTCLKS
+                //         |RKPM_CTR_GTCLKS

3)打开kernel/arch/arm/configs/firefly-rk3288_defconfig,修改如下:
修改触摸defconfig配置:

-CONFIG_TOUCHSCREEN_GSLX680=y
+CONFIG_TOUCHSCREEN_GSLX680_MT70817V2=y

4)打开device/rockchip/rk3288/rk3288_box/system.prop,修改如下: (此修改需要重新编译上层)
修改图标大小

-ro.sf.lcd_density=160
+ro.sf.lcd_density=320

5)打开frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java,修改如下:(此修改需要重新编译上层)
添加屏幕旋转,此修改可以根据自己需求添加

            loadSetting(stmt, Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY,
-                     "1");
+                     "0");

三.编译烧写:
1)编译烧写内核:

tvbox-51/kernel$ make firefly-rk3288_defconfig
tvbox-51/kernel$ make firefly-rk3288.img -j4

烧写kernel.img和resouce.img
2)编译烧写Android:

tvbox-51$ . build.sh
tvbox-51$ make installclean
tvbox-51$ make -j8

烧写system.img和misc.img

对应的补丁和固件wiki地址:
http://wiki.t-firefly.com/index. … F.E6.A8.A1.E7.BB.84

附:如使用自己编译的u-boot,请make rk3288_config 再make

原来的firefly-rk3288.dts中关于rk_screen的代码如下:
&rk_screen {
display-timings = <&disp_timings>;
};
跟上面贴出来的不一致,请问要怎么样修改?

lzh 发表于 2016-5-16 23:19
原来的firefly-rk3288.dts中关于rk_screen的代码如下:
&rk_screen {
display-timings = ;

原来理解错了。应该是这样修改。
&lcdc0 {
status = “okay”;
rockchip,iommu-enabled = <1>;
rockchip,prop = ;
power_ctr: power_ctr {
rockchip,debug = <1>;

        lcd_en:lcd_en {
            rockchip,power_type = <GPIO>;
            gpios = <&gpio0 GPIO_B5 GPIO_ACTIVE_HIGH>;
            rockchip,delay = <10>;
        };

        /*
        lcd_cs:lcd_cs {
            rockchip,power_type = <GPIO>;
            gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
            rockchip,delay = <10>;
        };

        lcd_rst:lcd_rst {
            rockchip,power_type = <GPIO>;
            gpios = <&gpio5 GPIO_C1 GPIO_ACTIVE_LOW>;
            rockchip,delay = <0>;
        };
        */
    };

};

you write wrong upstair is right

求问 Ubuntu 16.04 环境下怎么配置这块儿屏幕啊

楼主 我按照官方patch里的配置手动修改我的Reload版,开机的时候反复重启,请问这是什么问题呢?我已经通过git pull把sdk更新到最新了

有用

dts代码格式在哪看?