RK3288支持7.85寸eDP屏历险
引章新入手的RK3288和7.85寸屏,要修改源码解决一个竖屏摄像头方向问题。按照wiki说明更新到最新代码,完成编译,没有问题,加载固件,黑屏,用升级工具查看启动后是MSC设备,360连接几次后也能连接上,在预览视图中能看到内容,7.85寸屏没有内容,不知道原因,碰巧看到系统发布了最新固件0715固件,加载之,不行也是黑屏,发帖求解,答曰最新固件0715不支持7.85寸,有大神指点要支持7.85寸要另做修改,大神提供的是reload版本的修改贴,利用7.85关键字,找到了普通板支持7.85寸的精华帖,大喜,开始历险 本帖最后由 denggm 于 2016-9-13 20:02 编辑
大神帖可以 通过这个查找 Firefly-RK3288 开发板 Android5.1 支持7.85寸液晶屏模组
第一步就遇到问题
1.首先下载更新RK3288 Android5.1 SDK,最新提交:
commit:4258a60
Message:Kernel->Dts: add MPU6050 config for firefly-rk3288-reload
---------------没有看明白,啥意思?更新源码到最新吗?已经更新过了,下面的commit是啥意思,不懂,姑且跳过。Message 有-reload字样是拷贝过来的,与reload版本更新是一样的?还是拷贝过来的?
-----------------后面查资料确定这是git中合如变更包的命令,不过基本不会成功,打开变更说明对吧
本帖最后由 denggm 于 2016-9-13 20:18 编辑
第二步
打开kernel/arch/arm/boot/dts/firefly-rk3288.dts,修改如下:
包含lcd的dtsi:
-#include "lcd-box.dtsi"
+#include "lcd-LP079Qx1.dtsi"
-------------------------修改很简单,这么修改,编译马上就会发现 "lcd-LP079Qx1.dtsi” 文件不存在,在dts目录下查了下,有个很相近的文件lcd-LP097Qx1.dtsi,没有找到招,先用这个把改成 lcd-LP097Qx1.dtsi,先认为过了一关
-------------后面达人提供了一个补丁包,包含lcd-LP079Qx1.dts,拷贝到kernel/arch/arm/boot/dts目录下 继续,gogo
关闭vga:
firefly-rk3288.dts
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";
};
-----------------------查找 vga_ddc@50,命中,修改之,很简单,点亮在望。。。
继续,gogo
使能tp
firefly-rk3288.dts
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>;
};
-----------------------查找mt@40,什么,没有,不一样啊,先拷过来吧,似乎不太顺利。。 继续,gogo
使能mpu6050
mpu6050:mpu@68{
- status = "disabled";
+ status = "okay";
compatible = "mpu6050";
reg = <0x68>;
mpu-int_config = <0x10>;
-----------------------查找mpu6050:mpu@6,又没有,先拷过来吧,很曲折。。
继续gogo
修改timing配置和添加屏使能脚:
&disp_timings {
- native-mode = <&timing1>;
+ native-mode = <&timing0>;
};
-------------------------------太开心了,终于有找到的了,改之,放开注释,信心似乎恢复了。。。
&rk_screen {
@@ -611,6 +611,29 @@
status = "okay";
rockchip,iommu-enabled = <1>;
rockchip,prop = <PRMRY>;
-------------------------------差别很大啊,幸好看到下面回复说有不一致,不知道提问大神是否修改最终成功否,回复的修改是另外一个节点,没有说rk_screen是否要修改,先保留吧,新增之,
+ 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>;
+ };
+ */
+};
+
};
新增
&lcdc0 {
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>;
};
*/
};
}; gogo 继续
使能背光pwm:
&pwm1 {
- status = "disabled";
+ status = "okay";
};
-----------完美匹配,改之,士气大涨 gogo
打开kernel/arch/arm/boot/dts/rk3288.dtsi,修改如下:
关闭CTR_GTCLKS:
rockchip,ctrbits = <
(0
|RKPM_CTR_PWR_DMNS
- |RKPM_CTR_GTCLKS
+ // |RKPM_CTR_GTCLKS
-----------------顺利匹配,继续 gogo
打开kernel/arch/arm/configs/firefly-rk3288_defconfig,修改如下:
修改触摸defconfig配置:
-CONFIG_TOUCHSCREEN_GSLX680=y
+CONFIG_TOUCHSCREEN_GSLX680_MT70817V2=y
---------------------查找,被注释了,基本一致,改之,小场面