This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5708: AM5708 + RGB -> MIPI DSI Bridge TC358778

Part Number: AM5708

Hi All,

In our custom board (based on the AM5718-IDK schematic ) we are using  the RGB to MIPI DSI bridge TC358778 . Can we utilize  MIPI DSI panel 720x1280 based on Raydium:RM68200 driver in such case?    

Where we can see example of similar DTS file with a binding of  chain:  DSS->TC358778->MIPI DSI panel ?

Below is fragment of out DTS file:

 

  lcd: display {
      compatible = "raydium,rm68200";
      backlight = <&lcd_bl>;

      label = "lcd";
      status = "okay";
      
      port {
        lcd_in: endpoint {
          remote-endpoint = <&dsi_out>;
          lanes = <0 1 2 3 4 5>;
        };
      };      
  }      
  ...
  dsi_bridge: tc358778@0e {
    compatible = "toshiba,tc358778", "toshiba,tc358768";
    reg = <0x0e>;
    status = "okay";

      clocks = <&src_clk_x1>;
      clock-names = "refclk";

    dsi_bridge_ports: ports {
      #address-cells = <1>;
      #size-cells = <0>;

      port@0 {
        reg = <0>;
        rgb_in: endpoint {
          remote-endpoint = <&dpi_out>;
          data-lines = <24>;
        };
      };

      port@1 {
				reg = <1>;
			    dsi_out: endpoint {
                    remote-endpoint = <&lcd_in>;
                    lanes = <0 1 2 3 4 5>;
				};
			};
    };
  };
  ...
  &dss {
	status = "okay";
  vdda_video-supply = <&v1_8d>;
	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		port@0 {
			reg = <2>;
			dpi_out: endpoint {
				remote-endpoint = <&rgb_in>;
				data-lines = <24>;
			};
		};
	};
};

Below is a part of kernel boot log 

root@am57xx-evm:~# dmesg | grep tc35
[    1.533196] tc358768 0-000e: GPIO lookup for consumer reset
[    1.533204] tc358768 0-000e: using device tree for GPIO lookup
[    1.533220] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@48070000/tc358778@0e[0]'
[    1.533234] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@48070000/tc358778@0e[0]'
[    1.533243] tc358768 0-000e: using lookup tables for GPIO lookup
[    1.533250] tc358768 0-000e: No GPIO consumer reset found
root@am57xx-evm:~# 
 

The   TI SDK version is   06.03.106

HDMI display  without the second LCD works well. 

Thanks in advance

  • Hi,

    I am sorry i could not get your question, Do you mean if DSS can be configured to output RGB data to interface with TC358778?

    Yes, DSS outputs generic RGB signals and can be configured to output almost any timing. 

    So i would suggest to get timing information required for this DSI panel and configure DSS accordingly. 

    Regards,

    Brijesh

  • Hi,

    We are tryuing to connect that MIPI DSI Display module (please see  attached datasheet)

    .TVT0600A2-CP.pdf

    It has  a  MIPI 4Lane  interface.  In accordance of datasheet this module  is a  fully compatible with bridge TC358778. This bridge  consists a command interface for communictaion with TFT over MIPI interface.

    I checked  kernel sources and found driver is supported the  Raydium: RM68200. Also, I investigated the source of TC358778 driver and found that it supports command protocol to interact with TFT panel over MIPI DSI  ("Support DSI Video Mode data transfer DCSSM Command for panel register" ).

    How to add RM68200  tree binding to the device tree file? 

    Below is a our connection schematic

  • The small update. I updated the dts fiile 

      dsi_bridge: tc358778@0e {
        compatible = "toshiba,tc358778", "toshiba,tc358768";
        reg = <0x0e>;
        status = "okay";
    
          clocks = <&src_clk_x1>;
          clock-names = "refclk";
    
        dsi_bridge_ports: ports {
          #address-cells = <1>;
          #size-cells = <0>;
    
          port@0 {
            reg = <0>;
            rgb_in: endpoint {
              remote-endpoint = <&dpi_out>;
              data-lines = <24>;
            };
          };
    
          port@1 {
    				reg = <1>;
    				   dsi358658_out: endpoint {
                 remote-endpoint = <&dsi_in>;
                 lanes = <0 1 2 3 4>;
    				};
    			};
    
    
        };
    
        panel@0 {
          compatible = "raydium,rm68200";
          reg = <0>;
          power-supply = <&v1_8d>;
          backlight = <&lcd_bl>;
    
          port@0 {
            reg = <0>;
            dsi_in: endpoint {
              remote-endpoint = <&dsi358658_out>;
              lanes = <0 1 2 3 4>;
            };
          };
    
        };
    
      };

    And got in kernel boot log 

    [    3.969079] tc358768 0-000e: Maximum 8 byte MIPI tx is supported
    [    3.975125] [drm:rm68200_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -524
    [    3.985041] tc358768 0-000e: Maximum 8 byte MIPI tx is supported
    [    3.991095] [drm:rm68200_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -524
    [    4.003919] tc358768 0-000e: Maximum 8 byte MIPI tx is supported
    [    4.009975] [drm:rm68200_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -524
    [    4.017942] tc358768 0-000e: Maximum 8 byte MIPI tx is supported
    [    4.023979] [drm:rm68200_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -524
    [    4.033741] tc358768 0-000e: Maximum 8 byte MIPI tx is supported
    [    4.039795] [drm:rm68200_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -524
    [    4.049491] tc358768 0-000e: Maximum 8 byte MIPI tx is supported
    [    4.055529] [drm:rm68200_dcs_write_buf] *ERROR* MIPI DSI DCS write buffer failed: -524
    

    The modetest utility founds this panel but nothing on the screen.

    oot@am57xx-evm:~# /etc/init.d/weston stop
    Stopping Weston
    root@am57xx-evm:~# kmscube 
    ### Display [0]: CRTC = 58, Connector = 54, format = 0x34325258
            Mode chosen [720x1280] : Clock => 52582, Vertical refresh => 50, Type => 72
            Horizontal => 720, 758, 766, 804, 0
            Vertical => 1280, 1292, 1296, 1308, 0
    ### Display [1]: CRTC = 57, Connector = 56, format = 0x34325258
            Mode chosen [1920x1200] : Clock => 154000, Vertical refresh => 60, Type => 64
            Horizontal => 1920, 1968, 2000, 2080, 0
            Vertical => 1200, 1203, 1209, 1235, 0
    ### Primary display => ConnectorId = 54, Resolution = 720x1280
    Using display 0x39d08 with EGL version 1.5
    EGL Version "1.5"
    EGL Vendor "Mesa Project"
    EGL Extensions "EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_IMG_cl_image EGL_KHR_"
    
    

  • Hi,

    I am not sure what is the command interface support by TC358778 and also if this interface is supported in the Linux kernel. If it is not there, you would require to first add support for it.

    From the error log also, it seems code is not able to communicate to DSI over command interface. Could you please check on these lines?

    Regards,

    Brijesh

  • Hi,

    I reviewed bridge driver code and commented 15'th line for finishing panel initialization

    static ssize_t tc358768_dsi_host_transfer(struct mipi_dsi_host *host,
    					  const struct mipi_dsi_msg *msg)
    {
    	struct tc358768_priv *priv = dsi_host_to_tc358768(host);
    	struct mipi_dsi_packet packet;
    	int ret;
    
    	if (msg->rx_len) {
    		dev_warn(priv->dev, "MIPI rx is not supported\n");
    		return -ENOTSUPP;
    	}
    
    	if (msg->tx_len > 8) {
    		dev_warn(priv->dev, "Maximum 8 byte MIPI tx is supported\n");
    //		return -ENOTSUPP;
    	}
    

    Please, confirm is this a correct configuration for VOUT3 

    &dss {
      status = "okay";
    	ports {
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		port@0 {
    			reg = <2>;
          status = "okay";
    			dpi_out: endpoint {
    				remote-endpoint = <&rgb_in>;
    				data-lines = <24>;
    			};
    		};
    	};
    };

    I've  added omapdrm.displays=0,1  to kernel boot string

    I've  changed pinmuх settings in  uboot

    	{GPMC_AD0, (M3 | PIN_INPUT)},	/* gpmc_ad0.vout3_d0 */
    	{GPMC_AD1, (M3 | PIN_INPUT)},	/* gpmc_ad1.vout3_d1 */
    	{GPMC_AD2, (M3 | PIN_INPUT)},	/* gpmc_ad2.vout3_d2 */
    	{GPMC_AD3, (M3 | PIN_INPUT)},	/* gpmc_ad3.vout3_d3 */
    	{GPMC_AD4, (M3 | PIN_INPUT)},	/* gpmc_ad4.vout3_d4 */
    	{GPMC_AD5, (M3 | PIN_INPUT)},	/* gpmc_ad5.vout3_d5 */
    	{GPMC_AD6, (M3 | PIN_INPUT)},	/* gpmc_ad6.vout3_d6 */
    	{GPMC_AD7, (M3 | PIN_INPUT)},	/* gpmc_ad7.vout3_d7 */
    	{GPMC_AD8, (M3 | PIN_INPUT)},	/* gpmc_ad8.vout3_d8 */
    	{GPMC_AD9, (M3 | PIN_INPUT)},	/* gpmc_ad9.vout3_d9 */
    	{GPMC_AD10, (M3 | PIN_INPUT)},	/* gpmc_ad10.vout3_d10 */
    	{GPMC_AD11, (M3 | PIN_INPUT)},	/* gpmc_ad11.vout3_d11 */
    	{GPMC_AD12, (M3 | PIN_INPUT)},	/* gpmc_ad12.vout3_d12 */
    	{GPMC_AD13, (M3 | PIN_INPUT)},	/* gpmc_ad13.vout3_d13 */
    	{GPMC_AD14, (M3 | PIN_INPUT)},	/* gpmc_ad14.vout3_d14 */
    	{GPMC_AD15, (M3 | PIN_INPUT)},	/* gpmc_ad15.vout3_d15 */
    	{GPMC_A0, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a0.vout3_d16 */
    	{GPMC_A1, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a1.vout3_d17 */
    	{GPMC_A2, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a2.vout3_d18 */
    	{GPMC_A3, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a3.vout3_d19 */
    	{GPMC_A4, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a4.vout3_d20 */
    	{GPMC_A5, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a5.vout3_d21 */
    	{GPMC_A6, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a6.vout3_d22 */
    	{GPMC_A7, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a7.vout3_d23 */
    	{GPMC_A8, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a8.vout3_hsync */
    	{GPMC_A9, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a9.vout3_vsync */
    	{GPMC_A10, (M3 | PIN_INPUT_PULLDOWN)},	/* gpmc_a10.vout3_de */
    	{GPMC_CS3, (M3 | PIN_INPUT_PULLUP)},	/* gpmc_cs3.vout3_clk */
    	

    Below is my boot log

    [    0.000000] Kernel command line: omapdss.debug=y omapdrm.displays=0,1 console=ttyS2,115200n8 mem=1024M cma=128M@0xB00000f
    [    2.325763] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    2.332407] [drm] No driver support for vblank timestamp query.
    [    2.352247] [drm] Enabling DMM ywrap scrolling
    [    2.371237] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    2.379225] [drm] Initialized omapdrm 1.0.0 20110917 for omapdrm.0 on minor 0
    [   17.041905] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.gpu on minor 1
    [    3.463696] DPI: dpi_set_timings
    [    1.494401] omapdss_dss 58000000.dss: 58000000.dss supply vdda_video not found, using dummy regulator
    [    1.511317] omapdss_dss 58000000.dss: Linked as a consumer to regulator.0
    [    1.518309] omapdss_dss 58000000.dss: Dropping the link to regulator.0
    [    2.204491] omapdss_dss 58000000.dss: 58000000.dss supply vdda_video not found, using dummy regulator
    [    2.214157] omapdss_dss 58000000.dss: Linked as a consumer to regulator.0
    [    2.221385] DSS: dss_runtime_get
    [    2.221507] DSS: dss_restore_context
    [    2.224930] DSS: dss_runtime_put
    [    2.224938] DSS: dss_save_context
    [    2.226507] DSS: dss_restore_context
    [    2.233031] omapdss_hdmi5 58040000.encoder: Linked as a consumer to regulator.2
    [    2.240584] omapdss_hdmi5 58040000.encoder: Dropping the link to regulator.2
    [    2.249258] omapdss_hdmi5 58040000.encoder: Linked as a consumer to regulator.2
    [    2.268824] omapdss_dispc 58001000.dispc: OMAP DISPC rev 5.1
    [    2.268963] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    2.283661] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
    [    2.299526] omapdss_dss 58000000.dss: connect(NULL, 58000000.dss)
    [    2.299538] DSS: dss_runtime_get
    [    2.325103] DSS: dss_runtime_put
    [    2.325118] omapdss_dss 58000000.dss: connect(58000000.dss, NULL)
    [    2.325129] omapdss_dss 58000000.dss: connect(NULL, 58040000.encoder)
    [    2.325136] omapdss_dss 58000000.dss: connect(58040000.encoder, encoder@1)

    Unfortunately , I don't see any activity on VOUT3 bus Below is fragment of my DTS file 

  • Hi,

    Unlocking this thread.

    Not sure about Linux driver, DSS will toggle line only if pinmux is setup, vout is enabled and pixel clock setup correctly. Can you please sure these things are taken care? You could check DSS register to see for all of them?

    Regards,

    Brijesh