Part Number:AM3358
I have a custom board based on am3358, and I got a LCD screen connected to it.
I tried linux kernel with version 4.4.93, and the LCD screen works fine, but while I am using kernel v5.9, the LCD screen doesn't work.
My dts configure in linux v5.9 is as below:
&lcdc {status = "okay";blue-and-red-wiring = "legacy";port {lcdc_0: endpoint@0 {remote-endpoint = <&panel_0>;};}; }; panel {compatible = "ti,tilcdc,panel";pinctrl-names = "default";pinctrl-0 = <&lcd_pins_default>;backlight = <&lcd_bl>;enable-gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;panel-info {ac-bias= <255>;ac-bias-intrpt= <0>;dma-burst-sz= <16>;bpp= <24>;fdd= <0x80>;sync-edge= <0>;sync-ctrl= <1>;raster-order= <0>;fifo-th= <0>;};display-timings {native-mode = <&timing0>;timing0: 1360x768 {hactive= <1360>;vactive= <768>;hback-porch= <86>;hfront-porch= <86>;hsync-len= <22>;vback-porch= <24>;vfront-porch= <24>;vsync-len= <50>;clock-frequency = <75000000>;hsync-active= <0>;vsync-active= <0>;de-active = <1>;pixelclk-active = <1>;};};port {panel_0: endpoint@0 {remote-endpoint = <&lcdc_0>;};}; }; lcd_pins_default: lcd_pins_default {pinctrl-single,pins = <0x20 (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad8.lcd_data23 */0x24 (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad9.lcd_data22 */0x28 (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad10.lcd_data21 */0x2c (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad11.lcd_data20 */0x30 (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad12.lcd_data19 */0x34 (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad13.lcd_data18 */0x38 (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad14.lcd_data17 */0x3c (PIN_OUTPUT | MUX_MODE1)/* gpmc_ad15.lcd_data16 */0xa0 (PIN_OUTPUT | MUX_MODE0)/* lcd_data0.lcd_data0 */0xa4 (PIN_OUTPUT | MUX_MODE0)/* lcd_data1.lcd_data1 */0xa8 (PIN_OUTPUT | MUX_MODE0)/* lcd_data2.lcd_data2 */0xac (PIN_OUTPUT | MUX_MODE0)/* lcd_data3.lcd_data3 */0xb0 (PIN_OUTPUT | MUX_MODE0)/* lcd_data4.lcd_data4 */0xb4 (PIN_OUTPUT | MUX_MODE0)/* lcd_data5.lcd_data5 */0xb8 (PIN_OUTPUT | MUX_MODE0)/* lcd_data6.lcd_data6 */0xbc (PIN_OUTPUT | MUX_MODE0)/* lcd_data7.lcd_data7 */0xc0 (PIN_OUTPUT | MUX_MODE0)/* lcd_data8.lcd_data8 */0xc4 (PIN_OUTPUT | MUX_MODE0)/* lcd_data9.lcd_data9 */0xc8 (PIN_OUTPUT | MUX_MODE0)/* lcd_data10.lcd_data10 */0xcc (PIN_OUTPUT | MUX_MODE0)/* lcd_data11.lcd_data11 */0xd0 (PIN_OUTPUT | MUX_MODE0)/* lcd_data12.lcd_data12 */0xd4 (PIN_OUTPUT | MUX_MODE0)/* lcd_data13.lcd_data13 */0xd8 (PIN_OUTPUT | MUX_MODE0)/* lcd_data14.lcd_data14 */0xdc (PIN_OUTPUT | MUX_MODE0)/* lcd_data15.lcd_data15 */0xe0 (PIN_OUTPUT | MUX_MODE0)/* lcd_vsync.lcd_vsync */0xe4 (PIN_OUTPUT | MUX_MODE0)/* lcd_hsync.lcd_hsync */0xe8 (PIN_OUTPUT | MUX_MODE0)/* lcd_pclk.lcd_pclk */0xec (PIN_OUTPUT | MUX_MODE0)/* lcd_ac_bias_en.lcd_ac_bias_en */>; };
In kernel 4.4.93, the dts is almost the same as above, except for the port node in lcdc and panel.
In kernel v5.9, there's even no pixelclk output.
the dmesg is as below:
# dmesg | grep lcdc [2.158118] tilcdc-panel panel: GPIO lookup for consumer enable [2.158127] tilcdc-panel panel: using device tree for GPIO lookup [2.158191] tilcdc-panel panel: found enable GPIO # dmesg | grep panel [2.158118] tilcdc-panel panel: GPIO lookup for consumer enable [2.158127] tilcdc-panel panel: using device tree for GPIO lookup [2.158160] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/panel[0]' - status (0) [2.158191] tilcdc-panel panel: found enable GPIO
By the way, my kernel is cloned from git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git
Any help or advice is appreciated!
Shine:
我看了一下release note, 官方的目前只支持的kernel 5.4,请用5.4的尝试一下。https://software-dl.ti.com/processor-sdk-linux/esd/docs/07_03_00_005/devices/AM335X/linux/Release_Specific_Release_Notes.html
,
alex alex:
非常感谢您的回复!我昨天还尝试了下,使用了panel-simple的驱动,在对应的c文件里定义了一个新的屏幕类型和对应参数。把panel节点的compatible改称对应panel-simple里面的字段,现在lcd可以正常工作了。稍后我也再尝试一下5.4的内核。谢谢!
,
Shine:
感谢分享解决办法。