build/patch/kernel/archive/rockchip64-4.4/check/0041-arm64-overlays-add-spi2-dev-for-rockpi4.patch

60 lines
1.6 KiB
Diff

From 7908251e24a54b6aa35b18e8e0c8302012fb2e38 Mon Sep 17 00:00:00 2001
From: brian <brian@vamrs.com>
Date: Thu, 21 Mar 2019 09:51:00 +0800
Subject: [PATCH 41/97] arm64: overlays: add spi2 dev for rockpi4
---
.../arm64/boot/dts/rockchip/overlays/Makefile | 3 ++-
.../dts/rockchip/overlays/devspi2-overlay.dts | 25 +++++++++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/rockchip/overlays/devspi2-overlay.dts
diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile
index 50115840f972..24c75f813ebb 100644
--- a/arch/arm64/boot/dts/rockchip/overlays/Makefile
+++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile
@@ -5,7 +5,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
console-on-ttyS2.dtbo \
two-color-led.dtbo \
at24c02.dtbo \
- devspi.dtbo
+ devspi.dtbo \
+ devspi2.dtbo
targets += dtbs dtbs_install
targets += $(dtbo-y)
diff --git a/arch/arm64/boot/dts/rockchip/overlays/devspi2-overlay.dts b/arch/arm64/boot/dts/rockchip/overlays/devspi2-overlay.dts
new file mode 100644
index 000000000000..29b00b53b5c9
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlays/devspi2-overlay.dts
@@ -0,0 +1,25 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ model = "ROCK PI 4B";
+ compatible = "rockchip,rockpi","rockchip,rk3399";
+
+ fragment@0 {
+ target = <&spi2>;
+
+ __overlay__ {
+ max-freq = <50000000>;
+ dmas = <&dmac_peri 12>, <&dmac_peri 13>;
+ dma-names = "tx","rx";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ devspi@0 {
+ status = "okay";
+ reg = <0>;
+ compatible ="rockchip,spidev";
+ spi-max-frequency = <50000000>;
+ };
+ };
+ };
+};
--
2.25.1