build/patch/kernel/archive/rockchip64-4.4/check/0045-arm64-overlays-Add-PCIE-gen2-mode-overlay.patch

56 lines
1.6 KiB
Diff

From c29fea58eb71593602445c7558443d8a6420d08f Mon Sep 17 00:00:00 2001
From: Jack Ma <jack@vamrs.com>
Date: Tue, 26 Mar 2019 20:09:42 +0800
Subject: [PATCH 45/97] arm64: overlays: Add PCIE gen2 mode overlay
Enable it by adding the following line in /boot/hw_intfc.conf:
intfc:dtoverlay=pcie-gen2
Signed-off-by: Jack Ma <jack@vamrs.com>
---
arch/arm64/boot/dts/rockchip/overlays/Makefile | 3 ++-
.../dts/rockchip/overlays/pcie-gen2-overlay.dts | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/rockchip/overlays/pcie-gen2-overlay.dts
diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile
index f6e8bae445e1..bb410648950b 100644
--- a/arch/arm64/boot/dts/rockchip/overlays/Makefile
+++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile
@@ -6,7 +6,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
two-color-led.dtbo \
at24c02.dtbo \
devspi1.dtbo \
- devspi2.dtbo
+ devspi2.dtbo \
+ pcie-gen2.dtbo
targets += dtbs dtbs_install
targets += $(dtbo-y)
diff --git a/arch/arm64/boot/dts/rockchip/overlays/pcie-gen2-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays/pcie-gen2-overlay.dts
new file mode 100644
index 000000000000..86c7e9e83121
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlays/pcie-gen2-overlay.dts
@@ -0,0 +1,16 @@
+// Enable pcie gen2 mode
+/dts-v1/;
+/plugin/;
+
+/ {
+ model = "ROCK PI 4B";
+ compatible = "rockchip,rockpi","rockchip,rk3399";
+
+ fragment@0 {
+ target = <&pcie0>;
+
+ __overlay__ {
+ max-link-speed = <2>;
+ };
+ };
+};
--
2.25.1