• Recent
  • Wiki
  • Github
  • 百度网盘
  • Onedrive
  • Official
  • Shop
  • Register
  • Login
  • Register
  • Login
  • Search
  • Recent
  • Wiki
  • Github
  • 百度网盘
  • Onedrive
  • Official
  • Shop

How to drive a TTL (RGB) interface LCD

Hardware
2
3
1.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    george last edited by george Jan 29, 2023, 2:38 AM Jan 28, 2023, 1:44 PM

    Cool Pi does not have a TTL interface. If you want to drive a TTL interface screen, you need to use a bridge chip. At present, the MIPI to TTL interface chip supports ICN6211 by default. The following details how to use ICN6211 to drive a TTL interface LCD module.

    • Specification
      ICN6211_mipi2rgb.brd
      MIPI_RGB_162.DSN
      ICN6211_MIPI_RGB_specification_V04.pdf

    • Block diagram
      75c6d71e-2ba0-4bc2-a121-22d6f3d09c90-image.png

    • DTS configuration
      Enable the following nodes,mipi_dcphy0 dsi0 dsi0_in_vp3 backlight pwm13 .

    &mipi_dcphy0 {
    	status = "okay";
    };
    
    &dsi0 {
    	status = "okay";
    	dsi0_panel: panel@0 {
    		status = "okay";
    		compatible = "simple-panel-dsi";
    		reg = <0>;
    		backlight = <&backlight>;
    		reset-delay-ms = <60>;
    		enable-delay-ms = <60>;
    		prepare-delay-ms = <60>;
    		unprepare-delay-ms = <60>;
    		disable-delay-ms = <60>;
    		dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
    			MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
    		dsi,format = <MIPI_DSI_FMT_RGB888>;
    		dsi,lanes  = <2>;
    		panel-init-sequence = [
    	    23 00 02 7A C1
    	    23 00 02 20 20
    	    23 00 02 21 E0
    	    23 00 02 22 13
                23 00 02 23 08
                23 00 02 24 04
                23 00 02 25 08
                23 00 02 26 00
                23 00 02 27 08
                23 00 02 28 04
                23 00 02 29 08
                23 00 02 34 80
                23 00 02 86 29
                23 00 02 B5 A0
                23 00 02 5C FF
                23 00 02 2A 01
                23 00 02 56 92
                23 00 02 6B 71
                23 00 02 69 15
                23 00 02 10 40
                23 00 02 11 88
                23 00 02 B6 20
                23 00 02 51 20
                23 00 02 09 10
    	    05 78 01 11
    	    05 1E 01 29
    		];
    
    		panel-exit-sequence = [
    			05 00 01 28
    			05 00 01 10
    		];
    
    		disp_timings0: display-timings {
    			native-mode = <&dsi0_timing0>;
    			dsi0_timing0: timing0 {
    				clock-frequency = <25000000>;
    				hactive = <800>;
    				vactive = <480>;
    				hfront-porch = <8>;
    				hsync-len = <4>;
    				hback-porch = <8>;
    				vfront-porch = <8>;
    				vsync-len = <4>;
    				vback-porch = <8>;
    				hsync-active = <0>;
    				vsync-active = <0>;
    				de-active = <0>;
    				pixelclk-active = <0>;
    			};
    		};
    
    		ports {
    			#address-cells = <1>;
    			#size-cells = <0>;
    
    			port@0 {
    				reg = <0>;
    				panel_in_dsi: endpoint {
    					remote-endpoint = <&dsi_out_panel>;
    				};
    			};
    		};
    	};
    
    	ports {
    		#address-cells = <1>;
    		#size-cells = <0>;
    
    		port@1 {
    			reg = <1>;
    			dsi_out_panel: endpoint {
    				remote-endpoint = <&panel_in_dsi>;
    			};
    		};
    	};
    
    };
    
    &dsi0_in_vp3 {
    	status = "okay";
    };
    
    &backlight {
    	pwms = <&pwm13 0 25000 0>;
    	status = "okay";
    };
    
    &pwm13 {
    	status = "okay";
    	pinctrl-names = "active";
    	pinctrl-0 = <&pwm13m2_pins>;
    };
    
    • Configure lcdc parameters according to LCD specifications.
      LCD specification 5inch DSI LCD (B).pdf
      adbaa55e-ce50-4a5f-9d53-f499057c54ff-image.png
    		disp_timings0: display-timings {
    			native-mode = <&dsi0_timing0>;
    			dsi0_timing0: timing0 {
    				clock-frequency = <25000000>;
    				hactive = <800>;
    				vactive = <480>;
    				hfront-porch = <8>;
    				hsync-len = <4>;
    				hback-porch = <8>;
    				vfront-porch = <8>;
    				vsync-len = <4>;
    				vback-porch = <8>;
    				hsync-active = <0>;
    				vsync-active = <0>;
    				de-active = <0>;
    				pixelclk-active = <0>;
    			};
    		};
    
    • Generate the initialization sequence of ICN6211 according to the LCD specification.
      ICN6211 initialization tool ICN6211 Config.rar

    c11bfbc5-e02c-4823-be27-ef4fb1e390e7-image.png
    Copy the initialization sequence to DTS according to the command format of rockchip.
    Command format description:
    23 00 02 7A C1
    [Command word] [Delay] [Packet length] [Register] [Value]
    Note that the last 11 29 command is reserved. This is the DSI standard command to open the display.

    panel-init-sequence = [
    	    23 00 02 7A C1
    	    23 00 02 20 20
    	    23 00 02 21 E0
    	    23 00 02 22 13
                23 00 02 23 08
                23 00 02 24 04
                23 00 02 25 08
                23 00 02 26 00
                23 00 02 27 08
                23 00 02 28 04
                23 00 02 29 08
                23 00 02 34 80
                23 00 02 86 29
                23 00 02 B5 A0
                23 00 02 5C FF
                23 00 02 2A 01
                23 00 02 56 92
                23 00 02 6B 71
                23 00 02 69 15
                23 00 02 10 40
                23 00 02 11 88
                23 00 02 B6 20
                23 00 02 51 20
                23 00 02 09 10
    	    05 78 01 11
    	    05 1E 01 29
    		];
    
    • The TTL signal can be output normally by recompiling and replacing the kernel.
      d57ec46e-ecd1-42a1-8275-15155403e0e8-image.png
    R 1 Reply Last reply Jan 28, 2023, 9:36 PM Reply Quote 0
    • R
      retroman @george last edited by Jan 28, 2023, 9:36 PM

      @george how?

      G 1 Reply Last reply Jan 29, 2023, 2:17 AM Reply Quote 0
      • G
        george @retroman last edited by Jan 29, 2023, 2:17 AM

        @retroman Has been updated, please check.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        2 out of 3
        • First post
          2/3
          Last post