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 | 65 ++++++++++++++------------------
1 files changed, 28 insertions(+), 37 deletions(-)
diff --git a/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi b/kernel/arch/arm64/boot/dts/rockchip/NK-R36S0.dtsi
index 4672c43..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 {
@@ -359,7 +366,7 @@
phy-mode = "rgmii";
clock_in_out = "output";
- snps,reset-gpio = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
+ snps,reset-gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_LOW>;
snps,reset-active-low;
/* Reset time is 20ms, 100ms for rtl8211f */
snps,reset-delays-us = <0 20000 100000>;
@@ -379,7 +386,7 @@
rx_delay = <0x2f>;
phy-handle = <&rgmii_phy0>;
- status = "disabled";
+ status = "okay";
};
&gmac1 {
@@ -516,7 +523,7 @@
};
&video_phy0 {
- status = "disabled";
+ status = "okay";
};
&video_phy1 {
@@ -550,12 +557,6 @@
wireless-wlan {
wifi_host_wake_irq: wifi-host-wake-irq {
rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_down>;
- };
- };
-
- wireless-bluetooth {
- uart1_gpios: uart1-gpios {
- rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
@@ -620,7 +621,7 @@
&route_edp {
- status = "okay";
+ status = "disabled";
connect = <&vp1_out_edp>;
};
@@ -674,17 +675,7 @@
&wireless_bluetooth {
compatible = "bluetooth-platdata";
- clocks = <&rk809 1>;
- clock-names = "ext_clock";
- //wifi-bt-power-toggle;
- uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default", "rts_gpio";
- pinctrl-0 = <&uart1m0_rtsn>;
- pinctrl-1 = <&uart1_gpios>;
- BT,reset_gpio = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
- BT,wake_gpio = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
- BT,wake_host_irq = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
- status = "okay";
+ status = "disabled";
};
&uart0 {
@@ -694,7 +685,7 @@
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
- status = "okay";
+ status = "disabled";
};
&uart3 {
--
Gitblit v1.6.2