From 0d8657dd3056063fb115946b10157477b5c70451 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 20 Nov 2023 09:09:45 +0000
Subject: [PATCH] enable lvds 1280x800

---
 kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi |   41 ++++++++++++++++++++++++-----------------
 1 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
index a11d844..40d47dd 100755
--- a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
+++ b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
@@ -191,24 +191,18 @@
 			panel: panel {
 				compatible = "simple-panel";
 				backlight = <&backlight>;
-				power-supply = <&vcc3v3_lcd0_n>;
-				enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4
-				reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>; //7511_RST_GPIO3_D1
-				edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;  //LCD0_BKLT_EN_3V3
+				power-supply = <&vcc3v3_lcd1_n>;
+				enable-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; //LCD0_VDD_H_GPIO2_D4				
+				edp-bl-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;  //LCD0_PWBLK_H_GPIO0_B7
 				edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
 				bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
 				bpc = <8>;
 				prepare-delay-ms = <200>;
 				enable-delay-ms = <20>;
-				lvds-gpio0 = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>; //7511_GPIO0-GPIO3_D2 
-				lvds-gpio1 = <&gpio3 RK_PD3 GPIO_ACTIVE_HIGH>; //7511_GPIO1-GPIO3_D3 
-				lvds-gpio2 = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; //7511_GPIO2-GPIO3_D4 
-				lvds-gpio3 = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>; //7511_GPIO3-GPIO3_D5
-				nodka-lvds = <15>;
 
 				display-timings {
-                native-mode = <&timing0>;
-                timing0: timing0 {
+                native-mode = <&timing>;
+                timing: timing {
 					clock-frequency = <72500000>;
 					hactive = <1280>;
 					vactive = <800>;
@@ -225,8 +219,8 @@
 					};
 				};
 				ports {
-					panel_in: endpoint {
-					remote-endpoint = <&edp_out>;
+					panel_in_lvds: endpoint {
+					remote-endpoint = <&lvds_out>;
 						};
 					};   
 				};
@@ -331,16 +325,29 @@
 &edp {
 	//hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;	
     force-hpd;
+    status = "disabled";
+};
+
+&lvds {
     status = "okay";
     ports {
         port@1 {
             reg = <1>;
-            edp_out: endpoint {
-                remote-endpoint = <&panel_in>;
+            lvds_out: endpoint {
+                remote-endpoint = <&panel_in_lvds>;
             };
         };
    
 	};
+};
+
+&route_lvds{
+	 status = "okay";
+	 connect = <&vp2_out_lvds>;
+};
+
+&lvds_in_vp2 {
+	status = "okay";
 };
 
 &edp_phy {
@@ -516,7 +523,7 @@
 };
 
 &video_phy0 {
-	status = "disabled";
+	status = "okay";
 };
 
 &video_phy1 {
@@ -614,7 +621,7 @@
 
 
 &route_edp {
-	status = "okay";
+	status = "disabled";
 	connect = <&vp1_out_edp>;
 };
 

--
Gitblit v1.6.2