
#include "rp-lcd-hdmi.dtsi"
//#define RP_MIPI1_USED

#define RP_SINGLE_LCD
#define RP_MIPI1_USED


&rpdzkj {
        compatible = "rp_config";
        user_version = "rpdzkj";
        system_rotate = "0";
                csi_camera_rotate = "0"; //all csi camera rotation //0 90 180 270 //no effect
                csi_camera_facing = "0"; //0:auto  1:all front   2:all back //no effect
                usb_camera_rotate = "0"; //all usb camera rotation //0 90 180 270 
                usb_camera_facing = "0"; //0:auto  1:all front   2:all back
        lcd_density = "240";
        language = "zh-CN";   //zh-CN //en-US
        time_zone = "Asia/Shanghai"; //Asia/Shanghai = +8   //Europe/London  = +1       //Africa/Casablanca     = +0;
        not_navigation_bar = "false";
        not_status_bar = "false";
        default_launcher = "true";
        has_root = "true";
        usb_not_permission = "true";
        gps_use = "false";
        gps_serial_port = "/dev/ttyS4";
        primary_device = "DSI";
        extend_device = "HDMI-A";
        extend_rotate = "0";
        rotation_efull = "false";
        home_apk = "null";
        status = "okay";
};


&dsi1 {
    status = "okay";
    //rockchip,lane-rate = <480>;
    dsi1_panel: panel@0 {
        status = "okay";
        compatible = "lontium,lt8912","rpdzkj-bridge";
//        compatible = "simple-panel-dsi";
        
        reset-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
        power-gpios = <&gpio3 22 GPIO_ACTIVE_HIGH>;
        
        i2c-bus = <&i2c4>;
        
        reg = <0>;
        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  = <4>;
        
        panel-init-sequence = [
            05 78 01 11
            05 78 01 29
        ];
        
        panel-exit-sequence = [
            05 00 01 28
            05 78 01 10
        ];

        disp_timings1: display-timings {
            native-mode = <&dsi1_timing0>;
            dsi1_timing0: timing0 {
                            clock-frequency = <148500000>;
                            hactive = <1920>;
                            vactive = <1080>;
                            hfront-porch = <88>;
                            hsync-len = <44>;
                            hback-porch = <148>;
                            vfront-porch = <4>;
                            vsync-len = <5>;
                            vback-porch = <36>;
                            hsync-active = <0>;
                            vsync-active = <0>;
                            de-active = <0>;
                            pixelclk-active = <1>;
            };
        };

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

            port@0 {
                reg = <0>;
                panel_in_dsi1: endpoint {
                    remote-endpoint = <&dsi1_out_panel>;
                };
            };
        };
    };

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

        port@1 {
            reg = <1>;
            dsi1_out_panel: endpoint {
                remote-endpoint = <&panel_in_dsi1>;
            };
        };
    };
};



&dsi1_in_vp0 {
    status = "disabled";
};

&dsi1_in_vp1 {
    status = "okay";
};



&video_phy1 {
    status = "okay";
};

&route_dsi1 {
    status = "disabled";
    connect = <&vp1_out_dsi1>;
};







            
