Created
September 6, 2022 21:09
-
-
Save macromorgan/caff01bfe4df6995d5f74cef701ede6d to your computer and use it in GitHub Desktop.
Panel Patches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b21f15950a02b882d2301d7cc13964178ccdbc53 Mon Sep 17 00:00:00 2001 | |
From: Chris Morgan <macromorgan@hotmail.com> | |
Date: Tue, 6 Sep 2022 16:05:58 -0500 | |
Subject: [PATCH] NOT (YET) FOR UPSTREAM | |
Add panels to RG353P and RG503. | |
Signed-off-by: Chris Morgan <macromorgan@hotmail.com> | |
--- | |
.../dts/rockchip/rk3566-anbernic-rg353p.dts | 58 +++++++++++++++++ | |
.../dts/rockchip/rk3566-anbernic-rg503.dts | 62 +++++++++++++++++++ | |
2 files changed, 120 insertions(+) | |
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts | |
index 7a20e2d6876a..676ec78de958 100644 | |
--- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts | |
+++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353p.dts | |
@@ -25,6 +25,44 @@ backlight: backlight { | |
}; | |
}; | |
+&dsi0 { | |
+ status = "okay"; | |
+ #address-cells = <1>; | |
+ #size-cells = <0>; | |
+ | |
+ ports { | |
+ dsi0_in: port@0 { | |
+ reg = <0>; | |
+ dsi0_in_vp0: endpoint { | |
+ remote-endpoint = <&vp0_out_dsi0>; | |
+ }; | |
+ }; | |
+ | |
+ dsi0_out: port@1 { | |
+ reg = <1>; | |
+ mipi_out_panel: endpoint { | |
+ remote-endpoint = <&mipi_in_panel>; | |
+ }; | |
+ }; | |
+ }; | |
+ | |
+ panel@0 { | |
+ compatible = "anbernic,rg353p-panel"; | |
+ reg = <0>; | |
+ backlight = <&backlight>; | |
+ pinctrl-names = "default"; | |
+ pinctrl-0 = <&lcd_rst>; | |
+ reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>; | |
+ vdd-supply = <&vcc3v3_lcd0_n>; | |
+ | |
+ port { | |
+ mipi_in_panel: endpoint { | |
+ remote-endpoint = <&mipi_out_panel>; | |
+ }; | |
+ }; | |
+ }; | |
+}; | |
+ | |
&gpio_keys_control { | |
button-a { | |
gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>; | |
@@ -78,6 +116,19 @@ &i2c2 { | |
status = "okay"; | |
}; | |
+&mipi_dphy0 { | |
+ status = "okay"; | |
+}; | |
+ | |
+&pinctrl { | |
+ gpio-lcd { | |
+ lcd_rst: lcd-rst { | |
+ rockchip,pins = | |
+ <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; | |
+ }; | |
+ }; | |
+}; | |
+ | |
&pwm4 { | |
status = "okay"; | |
}; | |
@@ -92,3 +143,10 @@ &sdhci { | |
vqmmc-supply = <&vcc_1v8>; | |
status = "okay"; | |
}; | |
+ | |
+&vp0 { | |
+ vp0_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 { | |
+ reg = <ROCKCHIP_VOP2_EP_MIPI0>; | |
+ remote-endpoint = <&dsi0_in_vp0>; | |
+ }; | |
+}; | |
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg503.dts b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg503.dts | |
index 3dc01549a5b4..d754e49fc690 100644 | |
--- a/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg503.dts | |
+++ b/arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg503.dts | |
@@ -28,6 +28,45 @@ gpio_spi: spi { | |
mosi-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; | |
cs-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; | |
num-chipselects = <0>; | |
+ | |
+ panel@0 { | |
+ compatible = "samsung,ams495qa01"; | |
+ reg = <0>; | |
+ elvdd-supply = <&vcc_sys>; | |
+ enable-gpios = <&gpio4 RK_PB7 GPIO_ACTIVE_HIGH>; | |
+ pinctrl-names = "default"; | |
+ pinctrl-0 = <&lcd_enable>, <&lcd_reset>; | |
+ reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>; | |
+ vdd-supply = <&vcc3v3_lcd0_n>; | |
+ | |
+ port { | |
+ mipi_in_panel: endpoint { | |
+ remote-endpoint = <&mipi_out_panel>; | |
+ }; | |
+ }; | |
+ }; | |
+ }; | |
+}; | |
+ | |
+&dsi0 { | |
+ status = "okay"; | |
+ | |
+ ports { | |
+ dsi0_in: port@0 { | |
+ reg = <0>; | |
+ | |
+ dsi0_in_vp0: endpoint { | |
+ remote-endpoint = <&vp0_out_dsi0>; | |
+ }; | |
+ }; | |
+ | |
+ dsi0_out: port@1 { | |
+ reg = <1>; | |
+ | |
+ mipi_out_panel: endpoint { | |
+ remote-endpoint = <&mipi_in_panel>; | |
+ }; | |
+ }; | |
}; | |
}; | |
@@ -75,6 +114,10 @@ button-y { | |
}; | |
}; | |
+&mipi_dphy0 { | |
+ status = "okay"; | |
+}; | |
+ | |
&pinctrl { | |
gpio-spi { | |
spi_pins: spi-pins { | |
@@ -84,4 +127,23 @@ spi_pins: spi-pins { | |
<4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; | |
}; | |
}; | |
+ | |
+ gpio-lcd { | |
+ lcd_enable: lcd-enable { | |
+ rockchip,pins = | |
+ <4 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; | |
+ }; | |
+ | |
+ lcd_reset: lcd-reset { | |
+ rockchip,pins = | |
+ <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; | |
+ }; | |
+ }; | |
+}; | |
+ | |
+&vp0 { | |
+ vp0_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 { | |
+ reg = <ROCKCHIP_VOP2_EP_MIPI0>; | |
+ remote-endpoint = <&dsi0_in_vp0>; | |
+ }; | |
}; | |
-- | |
2.25.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment