build/patch/kernel/archive/rockchip64-4.4/check/0062-Add-switch-to-enable-Raspberry-Pi-offical-LCD-or-dis.patch

94 lines
2.6 KiB
Diff

From 24a1bbfaf70146ad7aca43e9b30cab0671ae303c Mon Sep 17 00:00:00 2001
From: zhu <a05965575163@163.com>
Date: Mon, 22 Jul 2019 17:07:19 +0800
Subject: [PATCH 62/97] Add switch to enable Raspberry Pi offical LCD or
disable it
---
.../dts/rockchip/overlays-rockpi4/Makefile | 3 +-
.../rockchip/overlays-rockpi4/hw_intfc.conf | 3 ++
.../raspberrypi-7-inch-lcd-overlay.dts | 45 +++++++++++++++++++
.../boot/dts/rockchip/rockpi-4b-linux.dts | 9 ++--
4 files changed, 56 insertions(+), 4 deletions(-)
create mode 100644 arch/arm64/boot/dts/rockchip/overlays-rockpi4/raspberrypi-7-inch-lcd-overlay.dts
diff --git a/arch/arm64/boot/dts/rockchip/overlays-rockpi4/Makefile b/arch/arm64/boot/dts/rockchip/overlays-rockpi4/Makefile
index 98ac32ab75ad..22495d5ce18e 100644
--- a/arch/arm64/boot/dts/rockchip/overlays-rockpi4/Makefile
+++ b/arch/arm64/boot/dts/rockchip/overlays-rockpi4/Makefile
@@ -12,7 +12,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
spi1-waveshare35b-v2.dtbo \
spi1-flash.dtbo \
hifiberry-dac.dtbo \
- hifiberry-dacplus.dtbo
+ hifiberry-dacplus.dtbo \
+ raspberrypi-7-inch-lcd.dtbo
targets += dtbs dtbs_install
targets += $(dtbo-y)
diff --git a/arch/arm64/boot/dts/rockchip/overlays-rockpi4/hw_intfc.conf b/arch/arm64/boot/dts/rockchip/overlays-rockpi4/hw_intfc.conf
index 184e094caa6e..1e2f41d1b605 100644
--- a/arch/arm64/boot/dts/rockchip/overlays-rockpi4/hw_intfc.conf
+++ b/arch/arm64/boot/dts/rockchip/overlays-rockpi4/hw_intfc.conf
@@ -52,3 +52,6 @@ intfc:dtoverlay=console-on-ttyS2
#hifiberry-dacplus on I2C7. Need set: intfc:i2c7=on
#intfc:dtoverlay=hifiberry-dacplus
+
+#enable raspberry pi official 7 inch LCD support
+#intfc:dtoverlay=raspberrypi-7-inch-lcd
diff --git a/arch/arm64/boot/dts/rockchip/overlays-rockpi4/raspberrypi-7-inch-lcd-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays-rockpi4/raspberrypi-7-inch-lcd-overlay.dts
new file mode 100644
index 000000000000..a0f475bd8e8b
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlays-rockpi4/raspberrypi-7-inch-lcd-overlay.dts
@@ -0,0 +1,45 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ model = "ROCK PI 4B";
+ compatible = "rockchip,rockpi","rockchip,rk3399";
+
+ fragment@0 {
+ target = <&dsi>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&dsi1>;
+
+ __overlay__ {
+ rockchip,dual-channel = <&dsi>;
+ status = "okay";
+
+ panel: panel@0 {
+ compatible ="rockpi,tc358762";
+ reg = <0>;
+ status = "okay";
+
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&i2c1>;
+
+ __overlay__ {
+ rockpi_mcu: rockpi_mcu@45 {
+ status = "okay";
+ };
+
+ rockpi_ft5406: rockpi_ft5406@38 {
+ status = "okay";
+ };
+ };
+ };
+};
--
2.25.1