Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Interfacing (DSI, CSI, I2C, etc.) • Re: CM4: DSI1 init. commands rarely fail

$
0
0
Thank you for this driver edit Iv'e been stuck with
"*ERROR* DSI transfer failed whilst in HS mode"
For a long time, but now all my commands appear to send, I however still have had no luck with my 720x720 ST7703 based panel.

As you can see I've been dumping a lot of messages to test this.

Code:

[    0.046562] /soc/cprman@7e101000: Fixed dependency cycle(s) with /soc/dsi@7e700000[    0.046932] /soc/dsi@7e700000: Fixed dependency cycle(s) with /soc/dsi@7e700000/panel_720@0[    0.046979] /soc/dsi@7e700000: Fixed dependency cycle(s) with /soc/cprman@7e101000[    0.047022] /soc/dsi@7e700000/panel_720@0: Fixed dependency cycle(s) with /soc/dsi@7e700000[    0.047558] /soc/cprman@7e101000: Fixed dependency cycle(s) with /soc/dsi@7e700000[    0.049700] /soc/cprman@7e101000: Fixed dependency cycle(s) with /soc/dsi@7e700000[    0.049800] /soc/dsi@7e700000: Fixed dependency cycle(s) with /soc/dsi@7e700000/panel_720@0[    0.049847] /soc/dsi@7e700000: Fixed dependency cycle(s) with /soc/cprman@7e101000[    0.049936] /soc/dsi@7e700000/panel_720@0: Fixed dependency cycle(s) with /soc/dsi@7e700000[    2.317453] /soc/dsi@7e700000: Fixed dependency cycle(s) with /soc/dsi@7e700000/panel_720@0[    2.317533] /soc/dsi@7e700000/panel_720@0: Fixed dependency cycle(s) with /soc/dsi@7e700000[    4.241753] panel-sitronix-st7703 fe700000.dsi.0: supply vcc not found, using dummy regulator[    4.256005] panel-sitronix-st7703 fe700000.dsi.0: supply iovcc not found, using dummy regulator[    4.370604] vc4-drm gpu: bound fe700000.dsi (ops vc4_dsi_ops [vc4])[    4.451921] dsi: start init[    4.451946] dsi: _INIT: ST7703_CMD_SETEXTC [    4.451986] dsi: INIT: ST7703_CMD_SETMIPI [    4.451993] dsi: INIT: ST7703_CMD_SETPOWER_EXT [    4.452008] dsi: INIT: ST7703_CMD_UNKNOWN_BF [    4.452026] dsi: INIT: ST7703_CMD_SETRGBIF [    4.452040] dsi: INIT: ST7703_CMD_SETSCR [    4.452049] dsi: INIT: ST7703_CMD_SETVDC [    4.452056] dsi: INIT: ST7703_CMD_SETPANEL [    4.452060] dsi: INIT: ST7703_CMD_SETCYC [    4.452066] dsi: INIT: ST7703_CMD_SETDISP [    4.452093] dsi: INIT: ST7703_CMD_SETEQ [    4.452111] dsi: INIT: ST7703_CMD_SETPOWER [    4.452122] dsi: INIT: ST7703_CMD_SETBGP [    4.452131] dsi: written init[    4.452279] dsi: written GOP[    4.452325] dsi: written Gamma[    4.784090] panel-sitronix-st7703 fe700000.dsi.0: 720x720@60 24bpp dsi 2dl - ready
I'm almost certain I have everything in place for this panel to work, but still nothing but a black screen.

I noticed If I unplug my panel It still logs that all the init commands are sent, but I get an extra "Is host ready?"

Code:

[    2.275435] /soc/dsi@7e209000/panel_720@0: Fixed dependency cycle(s) with /soc/dsi@7e209000[    4.228825] panel-sitronix-st7703 fe209000.dsi.0: supply vcc not found, using dummy regulator[    4.229030] panel-sitronix-st7703 fe209000.dsi.0: supply iovcc not found, using dummy regulator[    4.232305] panel-sitronix-st7703 fe209000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?[    4.236250] panel-sitronix-st7703 fe209000.dsi.0: supply vcc not found, using dummy regulator[    4.247590] panel-sitronix-st7703 fe209000.dsi.0: supply iovcc not found, using dummy regulator[    4.360073] panel-sitronix-st7703 fe209000.dsi.0: mipi_dsi_attach failed (-517). Is host ready?[    4.360309] panel-sitronix-st7703 fe209000.dsi.0: supply vcc not found, using dummy regulator[    4.360398] panel-sitronix-st7703 fe209000.dsi.0: supply iovcc not found, using dummy regulator[    4.383434] vc4-drm gpu: bound fe209000.dsi (ops vc4_dsi_ops [vc4])
I have my VCI connected to the 3.3v from the DSI port on the CM4IO
and my IOVCC connected to a division of this (1.8v).


I'm running raspberry pi OS lite on a CM4:
Linux raspberrypi 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux

I have my reset gpio hooked up to gpio17 (pin 11 of the 40pin breakout).

And are trying to drive this panel 2-lane mode.

DTS

Code:

/dts-v1/;/plugin/;#include <dt-bindings/gpio/gpio.h>/ {compatible = "brcm,bcm2835";dsi_frag:fragment@0 {target = <&dsi1>;__overlay__ {status = "okay";            #address-cells = <1>;#size-cells = <0>;            port {dsi_out:endpoint {remote-endpoint = <&panel_in>;};};            panel_720:panel_720@0 {reg = <0>;compatible = "fascontek,fs04hd032";//status = "okay";reset-gpios = <&gpio 17 1>;port {panel_in:endpoint {remote-endpoint = <&dsi_out>;};};};};};__overrides__ {dsi0 = <&dsi_frag>, "target:0=",<&dsi0>;};};

Drive adapted for panel init code:

Code:

static int fs04hd032_init_sequence(struct st7703 *ctx){struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);// mipi_dsi_dcs_exit_sleep_mode(dsi);// msleep(250);printk(KERN_INFO "dsi: start init\n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETEXTC,0xF1, 0x12, 0x83);printk(KERN_INFO "dsi: _INIT: ST7703_CMD_SETEXTC \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETMIPI,0x31,0x81,0x05,0xF9,0x0E,0x0E,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x25,0x00,0x91,0x0A,0x00,0x00,0x02,0x4F,0xD1,0x00,0x00,0x37);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETMIPI \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x24,0x22,0x20,0x03);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETPOWER_EXT \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_UNKNOWN_BF, 0x02,0x11,0x00);printk(KERN_INFO "dsi: INIT: ST7703_CMD_UNKNOWN_BF \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETRGBIF, 0x10, 0x10,0x0A,0x50,0x03,0xFF,0x00,0x00,0x00,0x00);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETRGBIF \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETSCR, 0x73,0x73,0x50,0x50,0x00,0x00,0x08,0x70,0x00);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETSCR \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETVDC, 0x46);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETVDC \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETPANEL \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETCYC \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETDISP, 0x3C,0x12,0x30);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETDISP \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETEQ, 0x07, 0x07,0x0B,0x0B,0x03,0x0B,0x00,0x00,0x00,0x00,0xFF,0x00,0x40,0x10);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETEQ \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETPOWER,0x65,0x00,0x32,0x32,0x77,0xF1,0xCC,0xCC,0x77,0x77,0x33,0x33);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETPOWER \n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETBGP, 0x0A,0x0A);printk(KERN_INFO "dsi: INIT: ST7703_CMD_SETBGP \n");// msleep(20);mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETVCOM, 0xBD,0xBD);printk(KERN_INFO "dsi: written init\n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP1,0x88,0x10,0x0A,0x10,0x0F,0xA1,0x80,0x12,0x31,0x23,0x47,0x86,0xA1,0x80,0x47,0x08,0x04,0x44,0x00,0x00,0x00,0x00,0x04,0x44,0x00,0x00,0x00,0x00,0x75,0x31,0x88,0x88,0x88,0x1F,0x88,0x38,0xFF,0x58,0x88,0x64,0x20,0x88,0x88,0x88,0x0F,0x88,0x28,0xFF,0x48,0x88,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00);mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETGIP2,0x00,0x1A,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x02,0x46,0x88,0x88,0x88,0x28,0x8F,0x08,0xFF,0x48,0x88,0x13,0x57,0x88,0x88,0x88,0x38,0x8F,0x18,0xFF,0x58,0x88,0x23,0x10,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xA1,0x80,0x00,0x00,0x00,0x00);printk(KERN_INFO "dsi: written GOP\n");mipi_dsi_generic_write_seq(dsi, ST7703_CMD_SETGAMMA,0x00,0x03,0x06,0x2D,0x3E,0x3F,0x34,0x32,0x08,0x0C,0x0D,0x10,0x12,0x11,0x12,0x10,0x15,0x00,0x03,0x06,0x2D,0x3E,0x3F,0x34,0x32,0x08,0x0C,0x0D,0x10,0x12,0x11,0x12,0x10,0x15);printk(KERN_INFO "dsi: written Gamma\n");msleep(20);return 0;}static const struct drm_display_mode fs04hd032_mode = {    .hdisplay    = 720,                           // Active width    .hsync_start = 720 + 40,                      // H Display + H Back Porch    .hsync_end   = 720 + 40 + 4,                  // H Sync Start + H Sync Width    .htotal      = 720 + 40 + 4 + 10,             // H Sync End + H Front Porch        .vdisplay    = 720,                           // Active height    .vsync_start = 720 + 20,                      // V Display + V Back Porch    .vsync_end   = 720 + 20 + 4,                  // V Sync Start + V Sync Width    .vtotal      = 720 + 20 + 4 + 8,              // V Sync End + V Front Porch        .clock       = 35000,                         // Pixel clock (RGB_CLOCK in kHz)    .flags       = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,        .width_mm    = 74,                            // Physical width in mm    .height_mm   = 74,  };//Added MIPI_DSI_MODE_LPM remove if no workstatic const struct st7703_panel_desc fs04hd032_desc = {.mode = &fs04hd032_mode,.lanes = 2,.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_NO_EOT_PACKET | MIPI_DSI_MODE_LPM,.format = MIPI_DSI_FMT_RGB888,.init_sequence = fs04hd032_init_sequence,};

My question is, did you find you get any visual feedback what so ever on your ST7703 panels when testing out your driver, or were you stuck like me with a blank panel, until you found the magic solution? (After over a week now I'm starting to loose hope)

Thanks in advance!
William

Statistics: Posted by DHWill — Mon Feb 03, 2025 6:36 pm



Viewing all articles
Browse latest Browse all 8621

Trending Articles