Lcd_probe 无法检测成功是有做什么限制吗

lcd{
compatible = “amlogic, lcd-sm1”;
dev_name = “lcd”;
mode = “tablet”;
status = “okay”;
clk_path = <1>;
key_valid = <0>;
clocks = <&clkc CLKID_MIPI_DSI_HOST
&clkc CLKID_MIPI_DSI_PHY
&clkc CLKID_DSI_MEAS_COMP
&clkc CLKID_VCLK2_ENCL
&clkc CLKID_VCLK2_VENCL
&clkc CLKID_GP0_PLL>;
clock-names = “dsi_host_gate”,
“dsi_phy_gate”,
“dsi_meas”,
“encl_top_gate”,
“encl_int_gate”,
“gp0_pll”;
reg = <0xffd07000 0x400 /* dsi_host /
0xff644000 0x200>; /
dsi_phy /
interrupts = <0 3 1
0 56 1>;
interrupt-names = “vsync”,“vsync2”;
pinctrl_version = <2>; /
for uboot */

	/* power type:
	 *    (0=cpu_gpio, 1=pmu_gpio, 2=signal,3=extern, 0xff=ending)
	 * power index:
	 *    (point gpios_index, or extern_index,0xff=invalid)
	 * power value:(0=output low, 1=output high, 2=input)
	 * power delay:(unit in ms)
	 */
	 /*
	lcd_cpu-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH
			&gpio GPIOH_7 GPIO_ACTIVE_HIGH>;
	lcd_cpu_gpio_names = "GPIOH_4","GPIOH_7";
	*/
	lcd_expander_gpio_names = "LCD_RESET","LCD_EN";

static int __init lcd_init(void)
{
printk("%s:enter\n",func);
if (platform_driver_register(&lcd_platform_driver)) {
printk("%s:pt1\n",func);
LCDERR(“failed to register lcd driver module\n”);
return -ENODEV;
}
printk("%s:pt2\n",func);
return 0;
}

lcd 设备树compatible = “amlogic, lcd-sm1”;

static struct platform_driver lcd_platform_driver = {
.probe = lcd_probe,
.remove = lcd_remove,
.suspend = lcd_suspend,
.resume = lcd_resume,
.shutdown = lcd_shutdown,
.driver = {
.name = “mesonlcd”,
.owner = THIS_MODULE,
#ifdef CONFIG_OF
.of_match_table = of_match_ptr(lcd_dt_match_table),
#endif
},
};

static const struct of_device_id lcd_dt_match_table[] = {
{
.compatible = “amlogic, lcd-gxl”,
.data = &lcd_data_gxl,
},
{
.compatible = “amlogic, lcd-gxm”,
.data = &lcd_data_gxm,
},
{
.compatible = “amlogic, lcd-txl”,
.data = &lcd_data_txl,
},
{
.compatible = “amlogic, lcd-txlx”,
.data = &lcd_data_txlx,
},
{
.compatible = “amlogic, lcd-axg”,
.data = &lcd_data_axg,
},
{
.compatible = “amlogic, lcd-g12a”,
.data = &lcd_data_g12a,
},
{
.compatible = “amlogic, lcd-g12b”,
.data = &lcd_data_g12b,
},
{
.compatible = “amlogic, lcd-tl1”,
.data = &lcd_data_tl1,
},
{
.compatible = “amlogic, lcd-sm1”,
.data = &lcd_data_sm1,
},
{},
};

对应driver和设备都有了probe 无法检测成功。

log 如下 lcd_init跑了,但是probe一直异常。
[ 1.282569@3] hdmitx: hw: P_HHI_HDMI_CLK_CNTL :0x100
[ 1.287548@3] hdmitx: hw: P_HHI_HDMI_PLL_CNTL :0x20000000
[ 1.293201@3] hdmitx: hw: avmute set to 1
[ 1.296998@3] hdmitx: system: fmt_attr 444,8bit
[ 1.301634@3] hdmitx: system: amhdmitx_probe end
[ 1.306376@3] lcd_init:enter
[ 1.309612@3] lcd_init:pt2
[ 1.311971@3] vout: create vout attribute OK
[ 1.316257@3] vout: vout_fops_create OK
[ 1.319910@3] vout: vout1: register server: nulldisp_vout_server
[ 1.326088@3] vout: tvout monitor interval:500(ms), timeout cnt:20
[ 1.332190@3] vout: error: no matched vout_init mode panel, force to invalid
[ 1.339275@3] vout: init mode invalid set ok
[ 1.343549@3] vout: aml_tvout_mode_monitor
[ 1.347675@3] vout: error: refresh_tvout_mode: no matched cur_mode: panel, force to invalid
[ 1.356064@3] vout: aml_vout_probe OK

Hello,

目前代码VIM3L是已经支持我们的屏了的。你如果要调试新的屏,你可以参考目前的代码。

如何上传完整的log,目前定位到uboot源码会影响内核关于液晶驱动probe函数注册。

麻烦确认下VIM3L_Pie_V191011 源码和最新源码有什么区别呢,我用下载下来的uboot源码导致内核液晶驱动无法注册,VIM3L_Pie_V191011用这里面的uboot则是正常的。

目前Android最新的release是V200103, github 代码也是与这个同步的,屏都是可以用的。

"if test ${lcd_exist} = 0; then "
“fdt set /lcd status disable;”
“fdt set /backlight status disable;”
“fi;”
这个有什么作用呢,为什么会影响内核关于fb驱动的注册呢?

这个是如果屏不存在就关闭DTS里面的LCD和backlight节点。当然会影响到屏的注册了。

要如何关闭这个功能呢?只能把这个代码去掉吗 lcd_exist=1也没有用。

uboot和kernel显示logo正常

但是系统启动后显示花屏了可能是哪里设置不对能分辨率是1024x600

what display are you use?

开机完,系统启动正常的系统启动桌面 :grinning::grinning::grinning::grinning:

mipi液晶屏,外接的液晶屏。:grinning::grinning::grinning::grinning:

所以现在你们自己的LCD显示屏显示正常了是吗?

有问提啊,桌面显示花屏,kernel logo是正常的

那要看你kernel里面dts配置的屏的时序和分辨率对不对。

uboot lcd_exist = 1可以正常显示,但是显示是旋转90度的

console:/ # getprop|grep lcd
[ro.sf.lcd_density]: [280]
[sys.lcd.exist]: [0]
console

:confused: #
这个sys.lcd.exist 这个属性是哪里设置的呢?
sys.lcd.exist = 1 显示正常,但是旋转90度,sys.lcd.exist = 0 这显示花屏。

如何让屏不花屏又能正常呢?

sys.lcd.exist 这个参数会根据uboot lcd_exist = 1改变,上层sys.lcd.exist关于设置在哪里呢?