Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    【分享】D1S新增一款MIPI屏[480*480] ST7701S

    MR Series
    4
    14
    7509
    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.
    • J
      JerryChen LV 4 last edited by

      第一次玩MIPI屏,还算比较顺利,有需要的可以参考:

      分辨率:480x480
      驱动IC:ST7701S
      接--口:MIPI 2Lane
      规格书:1960496392HX40007ACT 规格书.pdf

      c440fee2-7335-4978-ac71-3ed943ce72e8-image.png

      18dad006-8306-4887-9733-e8b8efa4c182-image.png

      &lcd0 {
      	lcd_used            = <1>;
      
              lcd_driver_name     = "st7701s";
      	lcd_backlight       = <100>;
      	lcd_if              = <4>;
      
              lcd_pwm_used        = <1>;
      	lcd_pwm_ch          = <7>;
      	lcd_pwm_freq        = <1000>;
      	lcd_pwm_pol         = <0>;
      	lcd_pwm_max_limit   = <255>;
      
      
              // 480*480
      	lcd_x               = <480>;
      	lcd_y               = <480>;
      	lcd_width           = <72>;
      	lcd_height          = <72>;
      	lcd_dclk_freq       = <16>;     // lcd_ht * lcd_vt * 60
              lcd_dsi_lane        = <2>;
              pinctrl-0           = <&dsi2lane_pins_a>;
      	pinctrl-1           = <&dsi2lane_pins_b>;
      
              lcd_hbp             = <30>;     // hsync back porch(pixel) + hsync plus width(pixel);
      	lcd_ht              = <525>;    // hsync total cycle(pixel)
      	lcd_hspw            = <25>;     // hsync plus width(pixel)
      	lcd_vbp             = <20>;     // vsync back porch(line) + vysnc plus width(line)
      	lcd_vt              = <525>;    // vysnc total cycle(line)
      	lcd_vspw            = <8>;      // vysnc plus width(pixel)
      
              lcd_dsi_if          = <0>;
      	lcd_lvds_if         = <0>;
      	lcd_lvds_colordepth = <0>;
      	lcd_lvds_mode       = <0>;
      	lcd_frm             = <0>;
      	lcd_hv_clk_phase    = <0>;
      	lcd_hv_sync_polarity= <0>;
      	lcd_io_phase        = <0x0000>;
      	lcd_gamma_en        = <0>;
      	lcd_bright_curve_en = <0>;
      	lcd_cmap_en         = <0>;
      	lcd_fsync_en        = <0>;
      	lcd_fsync_act_time  = <1000>;
      	lcd_fsync_dis_time  = <1000>;
      	lcd_fsync_pol       = <0>;
      
      	deu_mode            = <0>;
      	lcdgamma4iep        = <22>;
      	smart_color         = <90>;
      
      	lcd_gpio_0 =  <&pio PB 2 GPIO_ACTIVE_HIGH>;
      	
      };
      

      初始化代码:

      static struct LCM_setting_table lcm_initialization_setting[] = {
      	// {0x11, 1, {0x00} },
      	{REGFLAG_DELAY, 60, {} },
      
      	{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x10} },
      	{0xc0, 2, {0x3b, 0x00} },
      	{0xc1, 2, {0x0d, 0x02} },
      	{0xc2, 2, {0x31, 0x05} },
      	{0xcd, 1, {0x08} },
      
      	{0xb0, 16, {0x00, 0x11, 0x18, 0x0e, 0x11, 0x06, 0x07, 0x08, 0x07, 0x22,
      		   0x04, 0x12, 0x0f, 0xaa, 0x31, 0x18} },
      
      	{0xb1, 16, {0x00, 0x11, 0x19, 0x0e, 0x12, 0x07, 0x08, 0x08, 0x08, 0x22,
      		    0x04, 0x11, 0x11, 0xa9, 0x32, 0x18} },
      
      	{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x11} },
      
      	{0xb0, 1, {0x60} },
      	{0xb1, 1, {0x32} },
      	{0xb2, 1, {0x07} },
      	{0xb3, 1, {0x80} },
      	{0xb5, 1, {0x49} },
      	{0xb7, 1, {0x85} },
      	{0xb8, 1, {0x21} },
      	// {0xb9, 1, {0x10} },
      	{0xc1, 1, {0x78} },
      	{0xc2, 1, {0x78} },
      	{REGFLAG_DELAY, 50, {} },
      
              {0x21, 1, {0x00} },
      
      	// {0xd0, 1, {0x88} },
      	{0xe0, 3, {0x00, 0x1b, 0x02} },
      	{0xe1, 11, {0x08, 0xa0, 0x00, 0x00, 0x07, 0xa0, 0x00, 0x00, 0x00, 0x44,
      		    0x44} },
      	{0xe2, 12, {0x11, 0x11, 0x44, 0x44, 0xed, 0xa0, 0x00, 0x00, 0xec, 0xa0,
      		    0x00, 0x00} },
      	{0xe3, 4, {0x00, 0x00, 0x11, 0x11} },
      	{0xe4, 2, {0x44, 0x44} },
      	{0xe5, 16, {0x0a, 0xe9, 0xd8, 0xa0, 0x0c, 0xeb, 0xd8, 0xa0, 0x0e, 0xed,
      		    0xd8, 0xa0, 0x10, 0xef, 0xd8, 0xa0} },
      
      	{0xe6, 4, {0x00, 0x00, 0x11, 0x11} },
      	{0xe7, 2, {0x44, 0x44} },
      	{0xe8, 16, {0x09, 0xe8, 0xd8, 0xa0, 0x0b, 0xea, 0xd8, 0xa0, 0x0d, 0xec,
      		    0xd8, 0xa0, 0x0f, 0xee, 0xd8, 0xa0} },
      	{0xeb, 7, {0x02, 0x00, 0xe4, 0xe4, 0x88, 0x00, 0x40} },
      
      	{0xec, 2, {0x3c, 0x00} },
      	{0xed, 16, {0xab, 0x89, 0x76, 0x54, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff,
      		    0xff, 0x20, 0x45, 0x67, 0x98, 0xba} },
      
              {0x36, 1, {0x00} },
      	{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x13} },
              {0xe5, 1, {0xe4} },
              {0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x00} },
              {0x3a, 2, {0x66, 0x21} },
      	{REGFLAG_DELAY, 50, {} },
      
              {0x11, 1, {0x00} },
      	{REGFLAG_DELAY, 120, {} },
      
      	{0x29, 1, {0x00} },
      	{REGFLAG_END_OF_TABLE, 0x00, {} }
      };
      

      还有一款720 x 720的4Lane MIPI屏还没调通😞

      S 1 Reply Last reply Reply Quote Share 2
      • S
        soso90 LV 7 @JerryChen last edited by

        @jerrychen 这个屏厂家给的原始初始化代码方便发一下不~我看看和我差异多大~~

        WhycanService J 2 Replies Last reply Reply Quote Share 0
        • WhycanService
          WhycanService LV 8 @soso90 last edited by

          @soso90

          static struct LCM_setting_table lcm_initialization_setting[] = {
          	// {0x11, 1, {0x00} },
          	{REGFLAG_DELAY, 60, {} },
          
          	{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x10} },
          	{0xc0, 2, {0x3b, 0x00} },
          	{0xc1, 2, {0x0d, 0x02} },
          	{0xc2, 2, {0x31, 0x05} },
          	{0xcd, 1, {0x08} },
          
          	{0xb0, 16, {0x00, 0x11, 0x18, 0x0e, 0x11, 0x06, 0x07, 0x08, 0x07, 0x22,
          		   0x04, 0x12, 0x0f, 0xaa, 0x31, 0x18} },
          
          	{0xb1, 16, {0x00, 0x11, 0x19, 0x0e, 0x12, 0x07, 0x08, 0x08, 0x08, 0x22,
          		    0x04, 0x11, 0x11, 0xa9, 0x32, 0x18} },
          
          	{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x11} },
          
          	{0xb0, 1, {0x60} },
          	{0xb1, 1, {0x32} },
          	{0xb2, 1, {0x07} },
          	{0xb3, 1, {0x80} },
          	{0xb5, 1, {0x49} },
          	{0xb7, 1, {0x85} },
          	{0xb8, 1, {0x21} },
          	// {0xb9, 1, {0x10} },
          	{0xc1, 1, {0x78} },
          	{0xc2, 1, {0x78} },
          	{REGFLAG_DELAY, 50, {} },
          
                  {0x21, 1, {0x00} },
          
          	// {0xd0, 1, {0x88} },
          	{0xe0, 3, {0x00, 0x1b, 0x02} },
          	{0xe1, 11, {0x08, 0xa0, 0x00, 0x00, 0x07, 0xa0, 0x00, 0x00, 0x00, 0x44,
          		    0x44} },
          	{0xe2, 12, {0x11, 0x11, 0x44, 0x44, 0xed, 0xa0, 0x00, 0x00, 0xec, 0xa0,
          		    0x00, 0x00} },
          	{0xe3, 4, {0x00, 0x00, 0x11, 0x11} },
          	{0xe4, 2, {0x44, 0x44} },
          	{0xe5, 16, {0x0a, 0xe9, 0xd8, 0xa0, 0x0c, 0xeb, 0xd8, 0xa0, 0x0e, 0xed,
          		    0xd8, 0xa0, 0x10, 0xef, 0xd8, 0xa0} },
          
          	{0xe6, 4, {0x00, 0x00, 0x11, 0x11} },
          	{0xe7, 2, {0x44, 0x44} },
          	{0xe8, 16, {0x09, 0xe8, 0xd8, 0xa0, 0x0b, 0xea, 0xd8, 0xa0, 0x0d, 0xec,
          		    0xd8, 0xa0, 0x0f, 0xee, 0xd8, 0xa0} },
          	{0xeb, 7, {0x02, 0x00, 0xe4, 0xe4, 0x88, 0x00, 0x40} },
          
          	{0xec, 2, {0x3c, 0x00} },
          	{0xed, 16, {0xab, 0x89, 0x76, 0x54, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff,
          		    0xff, 0x20, 0x45, 0x67, 0x98, 0xba} },
          
                  {0x36, 1, {0x00} },
          	{0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x13} },
                  {0xe5, 1, {0xe4} },
                  {0xff, 5, {0x77, 0x01, 0x00, 0x00, 0x00} },
                  {0x3a, 2, {0x66, 0x21} },
          	{REGFLAG_DELAY, 50, {} },
          
                  {0x11, 1, {0x00} },
          	{REGFLAG_DELAY, 120, {} },
          
          	{0x29, 1, {0x00} },
          	{REGFLAG_END_OF_TABLE, 0x00, {} }
          };
          
          1 Reply Last reply Reply Quote Share 0
          • S
            soso90 LV 7 last edited by

            @whycanservice 看到了~~ @jerrychen 打算画转接板不~~ 我有类似的屏,还没点亮~也是按照厂家的配,连背光都不亮~要是画转接板,记得@一下我。啊哈哈。

            J 1 Reply Last reply Reply Quote Share 0
            • J
              JerryChen LV 4 @soso90 last edited by

              @soso90 就1楼的代码片段2就是卖家给的,我只是把他转换为这个平台的格式了

              1 Reply Last reply Reply Quote Share 0
              • J
                JerryChen LV 4 @soso90 last edited by

                @soso90 应该不画,也不会画(都忘记怎么画板了),就一块这个屏,买来玩玩的

                S 2 Replies Last reply Reply Quote Share 0
                • S
                  soso90 LV 7 @JerryChen last edited by

                  @jerrychen 方便加个qq不,我断断续续也在调mipi的屏,也是7701s~ qq:491532763

                  1 Reply Last reply Reply Quote Share 0
                  • S
                    soso90 LV 7 last edited by

                    @jerrychen 有没有测试镜像,方便发我测试一下~~屏已经买了。怕硬件没飞好线~

                    J 1 Reply Last reply Reply Quote Share 0
                    • S
                      soso90 LV 7 @JerryChen last edited by xiaowenge

                      @jerrychen
                      果不其然,按照你修改的。没有点亮。驱动是加载了。但是只亮背光。有可能是转接板有问题。看到贴子的话,方便帮我试试我的镜像?或是分享你的镜像给我。谢谢
                      tina_f133-mq_r_uart0_mipi_2.img

                      1 Reply Last reply Reply Quote Share 0
                      • J
                        JerryChen LV 4 @soso90 last edited by

                        @soso90 在 【分享】D1S新增一款MIPI屏[480*480] ST7701S 中说:

                        线

                        已邮件发给你了~~~不好意思,有段时间没上来了

                        1 Reply Last reply Reply Quote Share 0
                        • J
                          JerryChen LV 4 last edited by

                          测试固件,上传备份下~~~

                          启动后,执行下面命令可亮屏:

                          lv_examples 0
                          

                          tina_d1s-nezha_uart3.img

                          1 Reply Last reply Reply Quote Share 0
                          • S
                            soso90 LV 7 last edited by

                            @jerrychen 非常感谢大佬百忙之中传上固件。实际测试后还是不行。应该是我的硬件有问题。万分感谢。后续我有进展,继续跟进~~

                            1 Reply Last reply Reply Quote Share 0
                            • S
                              soso90 LV 7 last edited by

                              @soso90 在 【分享】D1S新增一款MIPI屏[480*480] ST7701S 中说:

                              @jerrychen
                              果不其然,按照你修改的。没有点亮。驱动是加载了。但是只亮背光。有可能是转接板有问题。看到贴子的话,方便帮我试试我的镜像?或是分享你的镜像给我。谢谢
                              tina_f133-mq_r_uart0_mipi_2.img

                              重新手动飞线,能亮了。这个镜像也可以。。。兜兜转转,才搞定硬件。谢谢楼主,完楼~~

                              1 Reply Last reply Reply Quote Share 0
                              • F
                                fy123 LV 2 last edited by

                                @jerrychen 在 【分享】D1S新增一款MIPI屏[480*480] ST7701S 中说:

                                4Lane

                                请问下,我现在用A133 驱动st7701s[480x480],dts配置如下,我配置了2lane ,奇怪的是lane2 lane3都有数据,不知道哪里没配置对,谢谢指点
                                lcd0: lcd0@01c0c000 {

                                                    lcd_used            = <1>;
                                                    lcd_driver_name     = "st7701s";
                                                    lcd_backlight       = <100>;
                                                    lcd_if              = <4>;
                                
                                                    lcd_x               = <480>;
                                                    lcd_y               = <480>;
                                                    lcd_width           = <72>;
                                                    lcd_height          = <72>;
                                                    lcd_dclk_freq       = <16>;
                                                    lcd_pwm_used        = <1>;
                                                    lcd_pwm_ch          = <3>;
                                                    lcd_pwm_freq        = <1000>;
                                                    lcd_pwm_pol         = <0>;
                                                    lcd_pwm_max_limit   = <255>;
                                
                                                    lcd_hbp             = <30>;
                                                    lcd_ht              = <525>;
                                                    lcd_hspw            = <25>;
                                
                                                    lcd_vbp             = <20>;
                                                    lcd_vt              = <525>;
                                                    lcd_vspw            = <8>;
                                
                                                    lcd_frm             = <0>;
                                                    lcd_gamma_en        = <0>;
                                                    lcd_bright_curve_en = <0>;
                                                    lcd_cmap_en         = <0>;
                                
                                                    deu_mode            = <0>;
                                                    lcdgamma4iep        = <22>;
                                                    smart_color         = <90>;
                                
                                                    lcd_dsi_if          = <0>;
                                                    lcd_dsi_lane        = <2>;
                                                    lcd_dsi_format      = <0>;
                                                    lcd_dsi_te          = <0>;
                                                    lcd_dsi_eotp        = <0>;
                                
                                                    lcd_pin_power = "dcdc1";
                                                    lcd_pin_power1 = "eldo3";
                                
                                                    lcd_power = "dc1sw";
                                                    lcd_gpio_0 = <&r_pio PL 11 1 0 3 1>;
                                                    pinctrl-0 = <&dsi2lane_pins_a>;
                                                    pinctrl-1 = <&dsi2lane_pins_b>;
                                            }
                                
                                1 Reply Last reply Reply Quote Share 0
                                • 1 / 1
                                • First post
                                  Last post

                                Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                                行为准则 | 用户协议 | 隐私权政策