Hello everyone,
I am trying to get a Raspberry PI 7" display (dsi display with internal tc358762 dsi to dpi converter and microcontroller for initialization and backlight control) to work on a custom board with a DART-MX8M-PLUS (i.MX 8M Plus) on it, however I cannot get it to work. The device tree is based on the imx8mp-var-dart-dt8mcustomboard.dts file from https://github.com/varigit/linux-imx/. Below are the relevant changes made to this file to try and get the display to work (the full file is bigger):
// More stuff here
/ {
// More stuff here
panel@1 {
reg = <1>;
compatible = "qiaodian,qd43003c0-40";
//compatible = "raspberrypi,7inch-dsi";
power-supply = <&attiny>;
backlight = <&attiny>;
port {
panel_in: endpoint {
remote-endpoint = <&bridge_out>;
};
};
};
};
&lcdif1 {
status = "okay";
};
&mipi_dsi {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
bridge@0 {
compatible = "toshiba,tc358762";
reg = <0>;
vddc-supply = <&attiny>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
bridge_in: endpoint {
remote-endpoint = <&dsi_out>;
};
};
port@1 {
reg = <1>;
bridge_out: endpoint {
remote-endpoint = <&panel_in>;
};
};
};
};
port@1 {
reg = <1>;
dsi_out: endpoint {
data-lanes = <1>;
remote-endpoint = <&bridge_in>;
};
};
};
&i2c6 {
clock-frequency = <400000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c6>;
//pinctrl-1 = <&pinctrl_i2c6_gpio>;
scl-gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;
sda-gpios = <&gpio3 29 GPIO_ACTIVE_HIGH>;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
attiny: regulator@45 {
compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
reg = <0x45>;
};
};
// More stuff here
Without these changes the board boots fine. With these changes I receive the following internal error during boot (only relevant part of boot log shown):
[ 2.079254] gpio-144 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[ 2.089639] OF: graph: no port node found in /soc@0/bus@30800000/i2c@30a30000/ov5640_mipi@3c
[ 2.098111] ov5640 1-003c: endpoint node not found
[ 2.102914] ov5640: probe of 1-003c failed with error -22
[ 2.108373] i2c i2c-1: IMX I2C adapter registered
[ 2.113625] gpio-92 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[ 2.123483] imx_sec_dsim_drv 32e60000.mipi_dsi: Failed to create device link (0x180) with 5-0045
[ 2.187563] imx_sec_dsim_drv 32e60000.mipi_dsi: Failed to create device link (0x180) with 5-0045
[ 2.196609] i2c i2c-5: IMX I2C adapter registered
[ 2.201763] imx8mq-usb-phy 381f0040.usb-phy: supply vbus not found, using dummy regulator
[ 2.210407] imx8mq-usb-phy 382f0040.usb-phy: supply vbus not found, using dummy regulator
[ 2.244025] panel-simple 100000003.panel: Specify missing connector_type
[ 2.268172] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[ 2.276236] imx_sec_dsim_drv 32e60000.mipi_dsi: version number is 0x1060200
[ 2.283650] imx_sec_dsim_drv 32e60000.mipi_dsi: [drm] *ERROR* modalias failure on /soc@0/bus@32c00000/mipi_dsi@32e60000/port@1
[ 2.295091] imx-drm display-subsystem: bound 32e60000.mipi_dsi (ops imx_sec_dsim_ops)
[ 2.303817] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[ 2.347202] Unable to handle kernel paging request at virtual address fffffffffffffe0b
[ 2.355125] Mem abort info:
[ 2.357918] ESR = 0x0000000096000004
[ 2.361675] EC = 0x25: DABT (current EL), IL = 32 bits
[ 2.366991] SET = 0, FnV = 0
[ 2.370053] EA = 0, S1PTW = 0
[ 2.373203] FSC = 0x04: level 0 translation fault
[ 2.378090] Data abort info:
[ 2.380976] ISV = 0, ISS = 0x00000004
[ 2.384815] CM = 0, WnR = 0
[ 2.387790] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000042097000
[ 2.394498] [fffffffffffffe0b] pgd=0000000000000000, p4d=0000000000000000
[ 2.401301] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[ 2.407569] Modules linked in:
[ 2.410627] CPU: 2 PID: 9 Comm: kworker/u8:0 Not tainted 6.1.36-imx8mp+g7248bd964cd9 #1
[ 2.418633] Hardware name: Variscite DART-MX8M-PLUS on custom board (DT)
[ 2.425335] Workqueue: events_unbound deferred_probe_work_func
[ 2.431177] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 2.438146] pc : drm_panel_get_modes+0x44/0xb0
[ 2.442595] lr : drm_panel_get_modes+0x44/0xb0
[ 2.447041] sp : ffff80000a1fb6a0
[ 2.450356] x29: ffff80000a1fb6a0 x28: ffff0000c1566200 x27: 0000000000001000
[ 2.457500] x26: 0000000000000023 x25: ffff800009fa64e0 x24: ffff0000c1286000
[ 2.464644] x23: 00000000fffffffd x22: ffff0000c1287420 x21: 0000000000000000
[ 2.471786] x20: ffff0000c12870a0 x19: fffffffffffffdfb x18: 0000000000000006
[ 2.478930] x17: 6f206d6574737973 x16: 6275732d79616c70 x15: ffff80000a1fb1e0
[ 2.486077] x14: 0000000000000000 x13: ffff800009ed2198 x12: 00000000000004bf
[ 2.493219] x11: 0000000000000195 x10: ffff800009f2a198 x9 : ffff800009ed2198
[ 2.500361] x8 : 00000000ffffefff x7 : ffff800009f2a198 x6 : 80000000fffff000
[ 2.507505] x5 : 000000000000bff4 x4 : 0000000000000000 x3 : 0000000000000000
[ 2.514648] x2 : 0000000000000000 x1 : ffff0000c00c0000 x0 : 0000000000000021
[ 2.521794] Call trace:
[ 2.524241] drm_panel_get_modes+0x44/0xb0
[ 2.528344] sec_mipi_dsim_connector_get_modes+0x58/0x74
[ 2.533663] drm_helper_probe_single_connector_modes+0x1c4/0x510
[ 2.539673] drm_client_modeset_probe+0x204/0x1190
[ 2.544472] __drm_fb_helper_initial_config_and_unlock+0x44/0x540
[ 2.550572] drm_fbdev_client_hotplug+0x150/0x210
[ 2.555282] drm_fbdev_generic_setup+0xb4/0x194
[ 2.559818] imx_drm_bind+0x260/0x2e0
[ 2.563484] try_to_bring_up_aggregate_device+0x1dc/0x2d0
[ 2.568891] __component_add+0xa4/0x190
[ 2.572735] component_add+0x14/0x20
[ 2.576315] lcdifv3_crtc_probe+0x50/0xb0
[ 2.580333] platform_probe+0x68/0xc0
[ 2.584000] really_probe+0xc0/0x3dc
[ 2.587583] __driver_probe_device+0x7c/0x160
[ 2.591947] driver_probe_device+0x3c/0x110
[ 2.596137] __device_attach_driver+0xbc/0x160
[ 2.600588] bus_for_each_drv+0x7c/0xd4
[ 2.604431] __device_attach+0x9c/0x1c0
[ 2.608274] device_initial_probe+0x14/0x20
[ 2.612464] bus_probe_device+0x9c/0xa4
[ 2.616307] deferred_probe_work_func+0x94/0xe4
[ 2.620841] process_one_work+0x1d4/0x330
[ 2.624857] worker_thread+0x220/0x430
[ 2.628613] kthread+0x108/0x10c
[ 2.631844] ret_from_fork+0x10/0x20
[ 2.635428] Code: aa1303e1 f0002d80 91338000 97ffd87b (f9400a61)
[ 2.641524] ---[ end trace 0000000000000000 ]---
[ 3.711705] Hot alarm is canceled. GPU3D clock will return to 64/64
The display initialization works and the backlight comes on when I remove the panel and dsi parts from the device tree and leave only the attiny bit in the i2c port. Additionally I can see from the warning in the log that the panel driver loads.
I suspect this error could be a bug in the IMX DRM driver.
I have tried both linux kernel version 6.6.52 and 6.1.36. Both kernels come from the previously linked imx-linux github.
Does anyone have any clue what could be wrong?
Thanks!