A20 - Olimex-LCD-7 - Buildroot

Started by alexv29, May 20, 2019, 07:54:23 PM

Previous topic - Next topic

alexv29

Hi there,

I am trying to build a system with buildroot on the A20-SOM-EVB.

Builroot version : 2019.02
Kernel version : 4.19.15
Uboot version : 2019.01

I first apply the defconfig of "olimex_a20_olinuxino_lime2_defconfig" in buildroot.

Then I updated the Uboot configuration with LCD param and the proper DTS for the target :

# CONFIG_VIDEO_HDMI is not set
CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:18,pclk_khz:33000,le:16,ri:209,up:22,lo:22,hs:30,vs:1,sync:3,vmode:0"
CONFIG_VIDEO_LCD_POWER="PH7"
CONFIG_VIDEO_LCD_BL_PWM="PB2"
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olimex-som-evb"


I also updated the DTS as follow :

&pwm {
        pinctrl-names = "default";
        pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>;
        status = "okay";
};


I also updated the cmdline (console=tty1 consoleblank=0 drm.debug=0xff) :

setenv bootargs console=ttyS0,115200 console=tty1 consoleblank=0 root=/dev/mmcblk0p2 rootwait panic=10 drm.debug=0xff ${extra}

During bootloader startup and the first beginning of the kernel startup, the panel is working properly. And after it shutdown.

Bellow the log of dmesg with a grep on 'drm' :


[    0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait panic=10 drm.debug=0x3f
[    1.028627] [drm:drm_core_init] Initialized
[    1.028849] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e60000
[    1.028901] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e40000
[    1.028945] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e60000
[    1.028983] [drm:sun4i_drv_probe] Adding component /soc@1c00000/display-backend@1e40000
[    1.029022] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    1.029064] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    1.029104] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    1.029140] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    1.029176] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    1.029212] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    1.029249] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
[    1.029285] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0d000
[    1.029329] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029372] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029411] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029450] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029490] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029531] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029571] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.029610] [drm:sun4i_drv_probe] Adding component /soc@1c00000/hdmi@1c16000
[    1.030311] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e60000
[    1.030405] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e60000
[    1.030415] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    1.031356] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e60000
[    1.031366] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    1.031374] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    1.031438] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e60000
[    1.031447] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    1.031455] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    1.031464] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/display-backend@1e60000
[    1.031473] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e40000
[    1.031481] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e40000
[    1.031490] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e40000
[    1.031498] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e60000
[    1.031506] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e60000
[    1.031515] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e60000
[    1.031523] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/display-backend@1e60000
[    1.031531] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/display-backend@1e40000
[    1.031540] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/display-backend@1e40000
[    1.031548] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/display-backend@1e40000
[    1.031556] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0c000
[    1.031565] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031573] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031582] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0c000
[    1.031590] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031599] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031607] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0c000
[    1.031615] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031624] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031632] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0c000
[    1.031640] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031649] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/lcd-controller@1c0d000
[    1.031657] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.031665] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.031673] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.031682] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.031963] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.031972] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.031980] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.031989] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.031997] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032005] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032013] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032022] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032030] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032038] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032046] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032054] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032063] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032071] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032079] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032087] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032095] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032103] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032112] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032120] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032120] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032129] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032137] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032145] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032153] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032161] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032169] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032178] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032186] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032194] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032202] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032210] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032219] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032227] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032235] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032243] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.032252] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0c000 with /soc@1c00000/hdmi@1c16000
[    1.032260] [drm:compare_of] Comparing of node /soc@1c00000/lcd-controller@1c0d000 with /soc@1c00000/hdmi@1c16000
[    1.032268] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e40000 with /soc@1c00000/hdmi@1c16000
[    1.032276] [drm:compare_of] Comparing of node /soc@1c00000/display-backend@1e60000 with /soc@1c00000/hdmi@1c16000
[    1.032285] [drm:compare_of] Comparing of node /soc@1c00000/hdmi@1c16000 with /soc@1c00000/hdmi@1c16000
[    1.049953] sun4i-drm display-engine: bound 1e60000.display-backend (ops 0xc07488e8)
[    1.078746] sun4i-drm display-engine: bound 1e40000.display-backend (ops 0xc07488e8)
[    1.090707] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    1.102443] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc0747868)
[    1.114375] sun4i-drm display-engine: No panel or bridge found... RGB output disabled
[    1.126116] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xc0747868)
[    1.138139] sun4i-drm display-engine: bound 1c16000.hdmi (ops 0xc07492f4)
[    1.148786] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.159297] [drm] No driver support for vblank timestamp query.
[    1.169157] fb: switching to sun4i-drm-fb from simple
[    1.184383] [drm:drm_mode_object_get] OBJ ID: 55 (2)
[    1.184393] [drm:drm_setup_crtcs]
[    1.184408] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:55:HDMI-A-1]
[    1.684433] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:55:HDMI-A-1] status updated from unknown to disconnected
[    1.684443] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:55:HDMI-A-1] disconnected
[    1.684457] [drm:drm_setup_crtcs] No connectors reported connected with modes
[    1.684463] [drm:drm_setup_crtcs] connector 55 enabled? no
[    1.684472] [drm:drm_setup_crtcs] picking CRTCs for 8192x8192 config
[    1.684481] [drm] Cannot find any crtc or sizes
[    1.689060] [drm:drm_atomic_state_init] Allocated atomic state (ptrval)
[    1.689074] [drm:drm_atomic_get_plane_state] Added [PLANE:28:plane-0] (ptrval) state to (ptrval)
[    1.689084] [drm:drm_atomic_get_plane_state] Added [PLANE:31:plane-1] (ptrval) state to (ptrval)
[    1.689093] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:31:plane-1] state (ptrval)
[    1.689103] [drm:drm_atomic_get_plane_state] Added [PLANE:34:plane-2] (ptrval) state to (ptrval)
[    1.689111] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:34:plane-2] state (ptrval)
[    1.689120] [drm:drm_atomic_get_plane_state] Added [PLANE:37:plane-3] (ptrval) state to (ptrval)
[    1.689128] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:37:plane-3] state (ptrval)
[    1.689136] [drm:drm_atomic_get_plane_state] Added [PLANE:41:plane-4] (ptrval) state to (ptrval)
[    1.689145] [drm:drm_atomic_get_plane_state] Added [PLANE:44:plane-5] (ptrval) state to (ptrval)
[    1.689153] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:44:plane-5] state (ptrval)
[    1.689162] [drm:drm_atomic_get_plane_state] Added [PLANE:47:plane-6] (ptrval) state to (ptrval)
[    1.689169] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:47:plane-6] state (ptrval)
[    1.689178] [drm:drm_atomic_get_plane_state] Added [PLANE:50:plane-7] (ptrval) state to (ptrval)
[    1.689186] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:50:plane-7] state (ptrval)
[    1.689199] [drm:drm_atomic_get_crtc_state] Added [CRTC:40:crtc-0] (ptrval) state to (ptrval)
[    1.689210] [drm:drm_atomic_set_mode_for_crtc] Set [NOMODE] for [CRTC:40:crtc-0] state (ptrval)
[    1.689217] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:28:plane-0] state (ptrval)
[    1.689228] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:40:crtc-0] to (ptrval)
[    1.689242] [drm:drm_atomic_get_crtc_state] Added [CRTC:53:crtc-1] (ptrval) state to (ptrval)
[    1.689250] [drm:drm_atomic_set_mode_for_crtc] Set [NOMODE] for [CRTC:53:crtc-1] state (ptrval)
[    1.689257] [drm:drm_atomic_set_fb_for_plane] Set [NOFB] for [PLANE:41:plane-4] state (ptrval)
[    1.689266] [drm:drm_atomic_add_affected_connectors] Adding all current connectors for [CRTC:53:crtc-1] to (ptrval)
[    1.689275] [drm:drm_atomic_check_only] checking (ptrval)
[    1.689304] [drm:sun4i_backend_atomic_check] Starting checking our planes
[    1.689311] [drm:sun4i_backend_atomic_check] Starting checking our planes
[    1.689319] [drm:drm_atomic_commit] committing (ptrval)
[    1.689367] [drm:drm_atomic_state_default_clear] Clearing atomic state (ptrval)
[    1.689381] [drm:__drm_atomic_state_free] Freeing atomic state (ptrval)
[    1.689404] [drm:drm_minor_register]
[    1.689410] [drm:drm_minor_register]
[    1.689929] [drm:drm_minor_register] new minor registered 0
[    1.690072] [drm:drm_sysfs_connector_add] adding "HDMI-A-1" to sysfs
[    1.690082] [drm:drm_sysfs_hotplug_event] generating hotplug event
[    1.690127] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on minor 0
[    3.228036] [drm:drm_sysfs_hotplug_event] generating hotplug event
[    3.228085] [drm:drm_setup_crtcs]
[    3.228099] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:55:HDMI-A-1]
[    3.728116] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:55:HDMI-A-1] disconnected
[    3.728128] [drm:drm_setup_crtcs] No connectors reported connected with modes
[    3.728134] [drm:drm_setup_crtcs] connector 55 enabled? no
[    3.728142] [drm:drm_setup_crtcs] picking CRTCs for 8192x8192 config
[    3.728150] [drm] Cannot find any crtc or sizes


If needed I can post the result of 'fdtdump /sys/firmware/fdt'.

When I compare to the official image (armbian), I have some node missing in the FDT like a node panel or an endpoint@0 in the lcd-controller.

If anyone has an idea to make it work or help, I would be great.


Alexandre

alexv29

Hi there,

I imported the driver in Linux. ( https://github.com/OLIMEX/LCD-DRIVER/ ) and also uptaded the .dts with the overlay provided.

Now I have the message :


Jan  1 00:00:08 a20-olinuxino kern.debug kernel: [    1.059869] [drm:sun4i_drv_probe] Adding component /soc@1c00000/lcd-controller@1c0c000
Jan  1 00:00:08 a20-olinuxino kern.debug kernel: [    1.059918] [drm:sun4i_drv_traverse_endpoints] Endpoint is our panel... skipping 
....
....
Jan  1 00:00:08 a20-olinuxino kern.err kernel: [    1.401829] lcd_olinuxino 2-0050: error reading from device at 00


My screen is : LCD-Olinuxino-7 rev B;

I am wondering if I can use this driver because it tries to read an eeprom. Also, I connected only the LCD-Connector-1 to the EVB.

If anyone has some suggetions, thank you!
Alexandre