一、最近碰到一个奇怪的问题,tc358749x碰到的问题还挺多,之前是打开一直黑屏,最后从硬件上解决了,现在又碰到了一个问题,HDMI+LVDS双屏显示,HDMIIN打开是黑屏的,表现形式跟之前的一样,会出现CamerIcIspIrq: pic err first,g_ispFrameNum == 1错误。只有单独打开HDMI通道HDMI IN才正常,一开始是怀疑LVDS的GPIO有服用,检查了好几遍,没发现问题有服用的GPIO口,测试几路电压也是正常的,问了芯片原厂,配合读出的寄存器也是正常的,做了好多实验,提高CPU、GPU、DDR频率,还是不行,最后发现是ISP_CLK频率驱动不足的原因所致,这里也要感谢原厂和芯片厂的大力支持。
修改点:
rk3288\kernel\drivers\media\video\rk_camsys\camsys_marvin.c
if (CHIP_TYPE == 3288) {
//isp_clk = 420000000; //modiy by peng@ZY
isp_clk = 550000000;
camsys_trace(1, "%s isp_clk: 420Mhz; CHIP TYPE is %d",
dev_name(camsys_dev->miscdev.this_device),
CHIP_TYPE);
} else {
if (on == 1)
isp_clk = 210000000;
else
//isp_clk = 420000000;/modiy by peng@ZY
isp_clk = 550000000;
}
二、HDMI uboot和kernel显示logo
(1)rk3288\u-boot\include\configs\rk32plat.h
添加#define CONFIG_DRM_ROCKCHIP_DW_HDMI
(2)dtsi
route_hdmi: route-hdmi {
status = "disabled";
logo,uboot = "logo.bmp";
logo,kernel = "logo_kernel.bmp";
logo,mode = "center";
charge_logo,mode = "center";
connect = <&vopb_out_hdmi>;
};
(3)dts
&route_hdmi {
status = "okay";
};
三、调试IR
硬件是连接到PWM0,PWM0系统默认是给了EDP/LVDS的背光,这里要先屏蔽掉LVDS上的背光PWM,(LVDS的背光硬件强制供电了,但是注意会有个问题,背光无法调节亮暗)将PWM0独立出来给IR用,dts配置:(注意usercode)
&pwm0 {
compatible = "rockchip,remotectl-pwm";
interrupts = ;
remote_pwm_id = <0>;
handle_cpu_id = <1>;
status = "okay";
ir_key0 {
rockchip,usercode = <0xffee>;
rockchip,key_table =
<0xa6 KEY_POWER>,
<0xf2 KEY_HOME>,
<0xfa KEY_BACK>,
<0xba KEY_MENU>,
<0xf9 KEY_UP>,
<0xe9 KEY_DOWN>,
<0xa5 KEY_LEFT>,
<0xe4 KEY_RIGHT>,
<0xe5 KEY_ENTER>,
<0xec KEY_VOLUMEUP>,
<0xe8 KEY_VOLUMEDOWN>,
<0xe6 KEY_MUTE>,
<0xed 388>,
<0xad KEY_1>,
<0xaf KEY_2>,
<0xef KEY_3>,
<0xa9 KEY_4>,
<0xab KEY_5>,
<0xeb KEY_6>,
<0xb1 KEY_7>,
<0xb3 KEY_8>,
<0xf3 KEY_9>,
<0xf0 KEY_0>,
<0xae KEY_BACKSPACE>,
<0xde KEY_SEARCH>;
};
};
编译烧录,打开debug
echo 1 > /sys/module/rockchip_pwm_remotectl/parameters/code_print
触发遥控器按键,发现没信息出来,用示波器测量IR的PWM,按按键有波形,定位是系统没配置好。修改dits:
pwm0: pwm@ff680000 {
compatible = "rockchip,rk3288-pwm";
reg = <0x0 0xff680000 0x0 0x10>;
#pwm-cells = <3>;
pinctrl-names = "active"; //将activice改为default
pinctrl-0 = <&pwm0_pin>;
clocks = <&cru PCLK_PWM>;
clock-names = "pwm";
status = "disabled";
};
烧录查看键值正常。