Jump to content

RK3399 lvds over dsi.


mhel

Recommended Posts

Hello,

 

I'm attempting to port an unknown rk3399 board to Linux from Android with kernerl 4.4.

I managed to extract  the devicetree and it's slowly coming along with poking
arround and mixing and matching and comparing devicetrees (it's not easy but I got time ;-) )

The board uses a tc358775 converter for the lvds display since the rk3399 doesn't have
one built in.  With patch from here: https://forum.armbian.com/topic/16747-orange-pi-4-kernel-510y-mipi-dsi-panel-sucessful/

it started to show some signs of life. The screen is lighting up seems to have activities but it's just showing bars.

I'm not sure if it's a timing issues, but I used the exact values from extracted dtb, another I'm not sure
are the dsi/panel properties from old dtb if useable on my reconstructed devicetree.

I'm testing this on mainline 5.14, I tried on 5.10.y but I can't get it to show activities only flashing RGB colours.

Now, there's actually a driver for the converter, but I can't figure out how to use it yet, so I'm sticking with
the simple panel. If anyone could point me in the right direction that would be great.

Here's my dsi tree:

&mipi_dsi {
  status = "okay";
  
  ports {
    #address-cells = <1>;
    #size-cells = <0>;

    mipi_out: port@1 {
      reg = <1>;
      mipi_out_panel: endpoint {
        remote-endpoint = <&panel_in_mipi>;
      };
    };
   };
  
  lcd_panel: panel@0 {
    compatible = "panel-dsi-simple";
    reg = <0>;
    backlight = <&backlight>;
    power-supply = <&vcc_lcd>;
    enable-delay-ms = <100>;
    enable-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>;
    reset-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;     
    /*
    prepare-delay-ms = <100>;
    reset-delay-ms = <20>;
    */
    dsi,flags = <0xa03>;
    dsi,format = <0>;
    dsi,lanes = <4>; 
    rockchip,lane-rate = <890>;
    
    panel-init-sequence = [
      29 02 06 14 01 07 00 00 00
      29 02 06 3c 01 0b 00 08 00
      29 02 06 64 01 0e 00 00 00
      29 02 06 68 01 0e 00 00 00
      29 02 06 6c 01 0e 00 00 00
      29 02 06 70 01 0e 00 00 00
      29 02 06 34 01 1f 00 00 00
      29 02 06 10 02 1f 00 00 00
      29 02 06 04 01 01 00 00 00
      29 02 06 04 02 01 00 00 00
      29 02 06 50 04 30 01 f0 03
      
      29 02 06 54 04 14 00 50 00 // hsync-len, hback-porch
            // 04 54 00 50 00 14 
      29 02 06 58 04 80 07 c8 00 // hfront-porch, hactive
            // 04 58 00 c8 07 80
      29 02 06 5c 04 02 00 08 00
            // 04 5c 00 08 00 02 // vback-porch, vsync-len
      29 02 06 60 04 38 04 28 00
            // 04 60 00 28 04 38 // vfront-porch, vactive
      29 02 06 64 04 01 00 00 00
      29 02 06 a0 04 06 80 44 00
      
      29 02 06 a0 04 06 80 04 00
      29 02 06 04 05 04 00 00 00
      29 02 06 80 04 00 02 02 03
      29 02 06 84 04 04 07 05 08
      29 02 06 88 04 09 0a 0e 0f
      29 02 06 8c 04 0b 0c 0d 10
      29 02 06 90 04 16 17 11 12
      29 02 06 94 04 13 14 15 1b
      29 02 06 98 04 18 19 1a 06
      29 78 06 9c 04 33 04 00 00
    ];
    
    panel-exit-sequence = [05 05 01 28 05 78 01 10];
    
    display-timings {
      
      native-mode = <&timing3>;
      
      timing3: timing3 {
        clock-frequency = <148000000>;
        hactive = <1920>;
        vactive = <1080>;        
        hback-porch = <80>;
        hsync-len = <20>;
        hfront-porch = <200>;        
        vback-porch = <8>;
        vfront-porch = <40>;
        vsync-len = <2>;
        hsync-active = <0>;
        vsync-active = <0>;
        de-active = <0>;
        pixelclk-active = <0>;
      };
      
    };
    
    port {
      panel_in_mipi: endpoint {
        remote-endpoint = <&mipi_out_panel>;
      };
    };
    
  };

};

and here's what I get poking some register, that seem to look correct :

 

screen.jpg

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines