From f70575805708cabdedea7498aaa3f710fde4d920 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 31 Jan 2024 03:29:01 +0000
Subject: [PATCH] add lvds1024*800

---
 kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi |  129 +++++++++++++++++++++----------------------
 1 files changed, 63 insertions(+), 66 deletions(-)

diff --git a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
index 58ba3dc..6fa4b51 100755
--- a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
+++ b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
@@ -34,15 +34,6 @@
 		vin-supply = <&vcc3v3_sys>;
 	};
 
-	vcc3v3_vga: vcc3v3-vga {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3_vga";
-		regulator-always-on;
-		regulator-boot-on;
-		gpio = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-		vin-supply = <&vcc3v3_sys>;
-	};
 
 	pcie30_avdd0v9: pcie30-avdd0v9 {
 		compatible = "regulator-fixed";
@@ -69,7 +60,9 @@
 		regulator-name = "vcc3v3_pcie";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
 		enable-active-high;
+		regulator-boot-on;
 		gpio = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
 		startup-delay-us = <5000>;
 		vin-supply = <&dc_12v>;
@@ -144,21 +137,14 @@
 			};
 			
 			hp_en {
-				gpio_num = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;//HP_EN_GPIO3_A6_3V3
+				gpio_num = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;//HP_EN_GPIO3_A6_3V3
 				gpio_function = <0>;
 			};
 			
-			usb_ogt {
-				gpio_num = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; //OTG_EN_OC_GPIO0_C2
+			wifi_power_en {
+				gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>; //WIFI_PWREN_GPIO3_C6_1V8
 				gpio_function = <0>;
 			};
-			
-			m2_wifi_pwr {
-				gpio_num = <&gpio3 RK_PC6 GPIO_ACTIVE_HIGH>;//WIFI_PWREN_GPIO3_C6_1V8
-				gpio_function = <0>;
-			};
-			
-			 
 	#if 0		
 			do1 {
 				gpio_num = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>; 
@@ -225,8 +211,9 @@
 				compatible = "simple-panel";
 				backlight = <&backlight>;
 				power-supply = <&vcc3v3_lcd0_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
+				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
 				edp-bl-en = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>; //LCD0_BKLT_EN_3V3
 				bus-format = <MEDIA_BUS_FMT_RGB888_1X24>;
 				bpc = <8>;
@@ -256,7 +243,7 @@
 					pixelclk-active = <0>;			
 					};
 				};
-				port {
+				ports {
 					panel_in_lvds: endpoint {
 					remote-endpoint = <&lvds_out>;
 						};
@@ -325,7 +312,7 @@
  * when dsi0 is enabled
  */
 &video_phy0 {
-	status = "disabled";
+	status = "okay";
 };
 
 &dsi0 {
@@ -348,6 +335,10 @@
  * video_phy1 needs to be enabled
  * when dsi1 is enabled
  */
+ 
+&video_phy1 {
+	status = "disabled";
+}; 
 &dsi1 {
 	status = "disabled";
 };
@@ -361,39 +352,31 @@
 };
 
 &dsi1_panel {
-	power-supply = <&vcc3v3_lcd1_n>;
+//	power-supply = <&vcc3v3_lcd1_n>;   //MIPI_3V3EN_GPIO3_A3_d_3V3
+    vddio-mipi = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; //MIPI_EN_1V8_GPIO3_A4_d_3V3
+    reset-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>; //MIPI_RST_L_GPIO3_C7
+    vcc-5v-gpio = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; //VCC5_IO_EN_GPIO1_A4_3V3
+    pinctrl-names = "default";
+    pinctrl-0 = <&lcd1_rst_gpio>;
 };
+
+&route_dsi1 {
+	status = "disabled";
+	connect = <&vp1_out_dsi1>;
+};
+
+
+/*
+*  edp_start
+*/
 
 &edp {
-	//hpd-gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;	
     force-hpd;
-    status = "okay";
-};
-
-&lvds {
-    status = "disabled";
-    ports {
-        port@1 {
-            reg = <1>;
-            lvds_out: endpoint {
-                remote-endpoint = <&panel_in_lvds>;
-            };
-        };
-   
-	};
-};
-
-&route_lvds{
-	 status = "disabled";
-	 connect = <&vp2_out_lvds>;
-};
-
-&lvds_in_vp2 {
 	status = "disabled";
 };
 
 &edp_phy {
-	status = "okay";
+	status = "disabled";
 };
 
 &edp_in_vp0 {
@@ -401,15 +384,39 @@
 };
 
 &edp_in_vp1 {
-    status = "okay";
+    status = "disabled";
 
 };
 
 &route_edp {
-    status = "okay";
+    status = "disabled";
     connect = <&vp1_out_edp>;
 };
 
+&route_edp {
+	status = "disabled";
+};
+
+&lvds {
+	status = "okay";
+	ports {
+		port@1 {
+			reg = <1>;
+			lvds_out:endpoint {
+				remote-endpoint = <&panel_in_lvds>;
+			};
+		};
+	};
+};
+
+&route_lvds{
+	status = "okay";
+	connect = <&vp1_out_lvds>;
+};
+
+&lvds_in_vp1 {
+	status = "okay";
+};
 
 /*
 *  edp_end
@@ -625,20 +632,14 @@
 	};
 };
 
-&video_phy0 {
-	status = "okay";
-};
 
-&video_phy1 {
-	status = "disabled";
-};
 
 &pcie30phy {
 	status = "okay";
 };
 
-&pcie3x2 {
-	reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
+&pcie2x1 {
+	reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
 	vpcie3v3-supply = <&vcc3v3_pcie>;
 	status = "okay";
 };
@@ -694,10 +695,6 @@
 							<3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>,
 							<3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,
 							<3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
-							<0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>,  //12
-							<0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,  //13
-							<0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,  //16
-							<0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,  //17
 							<2 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>,//93 SPI2_CS0_M1_3V3
 							<2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>,//94 SPI2_MOSI_M1_3V3
 							<2 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>,//95 SPI2_MISO_M1_3V3
@@ -799,13 +796,13 @@
 };
 
 &uart0 {
-	status = "disabled";
+	status = "okay";
 };
 
 &uart1 {	
 	pinctrl-names = "default";	
 	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;	
-	status = "disabled";		
+	status = "okay";		
 };
 
 &uart3 {
@@ -824,11 +821,11 @@
 };
 
 &uart7 {
-	status = "disabled";
+	status = "okay";
 	pinctrl-0 = <&uart7m1_xfer>;
 };
 
 &uart9 {
-	status = "disabled";
+	status = "okay";
 	pinctrl-0 = <&uart9m1_xfer>;
 };

--
Gitblit v1.6.2