build/patch/kernel/archive/rockchip64-4.4/zz-002-overlay-rpi-camera-and-screen.patch

174 lines
4.2 KiB
Diff
Raw Permalink Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: JMCC <JMCC@localhost>
Date: Sun, 27 Dec 2020 01:44:20 +0100
Subject: zz-53-add-rpi-camera-and-screen
Signed-off-by: JMCC <JMCC@localhost>
---
arch/arm64/boot/dts/rockchip/overlay/Makefile | 3 +
arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays | 16 ++++
arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-7inch-lcd.dts | 45 ++++++++++
arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-imx219.dts | 22 +++++
arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-ov5647.dts | 30 +++++++
5 files changed, 116 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile
index 9d39fce0031f..6443999d0f31 100644
--- a/arch/arm64/boot/dts/rockchip/overlay/Makefile
+++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile
@@ -5,6 +5,9 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
rockchip-pcie-gen2.dtbo \
rockchip-rk3399-oc-20.dtbo \
rockchip-rk3399-oc-22.dtbo \
+ rockchip-rpi-7inch-lcd.dtbo \
+ rockchip-rpi-cam-imx219.dtbo \
+ rockchip-rpi-cam-ov5647.dtbo \
rockchip-spi-jedec-nor.dtbo \
rockchip-spi-spidev.dtbo \
rockchip-uart4.dtbo \
diff --git a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
index efb8d23fde7b..6ae79d9422ad 100644
--- a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
+++ b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
@@ -40,6 +40,22 @@ Enables Overclocking frequencies 2.2/1.7 Ghz.
This one should also be stable in most cases, but make
sure you have very good cooling
+### rpi-7inch-lcd
+
+Enables the Raspberry Pi MIPI-DSI 7-inch LCD touch screen,
+and compatible hardware.
+
+### rpi-cam-imx219
+
+Enables the Raspberry Pi CSI camera v2 (IMX219),
+and compatible hardware
+
+### rpi-cam-ov5647
+
+Enables the Raspberry Pi CSI camera v1 (OV5647),
+and compatible hardware
+
+
### spi-jedec-nor
Activates MTD support for JEDEC compatible SPI NOR flash chips on SPI bus
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-7inch-lcd.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-7inch-lcd.dts
new file mode 100644
index 000000000000..77fe14383a93
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-7inch-lcd.dts
@@ -0,0 +1,45 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "rockchip,rockpi","rockchip,rk3399";
+
+ fragment@0 {
+ target = <&dsi>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&dsi1>;
+
+ __overlay__ {
+ rockchip,dual-channel = <&dsi>;
+ status = "okay";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ 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";
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-imx219.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-imx219.dts
new file mode 100644
index 000000000000..2cd419b6d414
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-imx219.dts
@@ -0,0 +1,22 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "rockchip,rockpi","rockchip,rk3399";
+
+ fragment@0 {
+ target = <&i2c4>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&camera1>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-ov5647.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-ov5647.dts
new file mode 100644
index 000000000000..61c8b88b7ed6
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rpi-cam-ov5647.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "rockchip,rockpi","rockchip,rk3399";
+
+ fragment@0 {
+ target = <&i2c4>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@1 {
+ target = <&camera2>;
+
+ __overlay__ {
+ status = "okay";
+ };
+ };
+
+ fragment@2 {
+ target = <&mipi_in_ucam0>;
+
+ __overlay__ {
+ remote-endpoint = <&ucam_out1>;
+ };
+ };
+};
--
Armbian