Skip to content

Commit

Permalink
Test overlay h5 spidev
Browse files Browse the repository at this point in the history
  • Loading branch information
The-going committed May 12, 2022
1 parent 2e14ae2 commit e745da2
Showing 1 changed file with 148 additions and 0 deletions.
148 changes: 148 additions & 0 deletions patch/kernel/archive/sunxi-5.15/0001-Test-overlay-h5-spidev.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
From 79cdc1fc99836e33661a644b3b311e92fe15adf4 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Thu, 12 May 2022 13:14:53 +0300
Subject: [PATCH] Test overlay h5 spidev

---
.../arm64/boot/dts/allwinner/overlay/Makefile | 3 ++
.../allwinner/overlay/sun50i-h5-spi-dev-1.dts | 28 +++++++++++++
.../overlay/sun50i-h5-spi-dev-11.dts | 28 +++++++++++++
.../allwinner/overlay/sun50i-h5-spi-devd.dts | 42 +++++++++++++++++++
4 files changed, 101 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-1.dts
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-11.dts
create mode 100644 arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-devd.dts

diff --git a/arch/arm64/boot/dts/allwinner/overlay/Makefile b/arch/arm64/boot/dts/allwinner/overlay/Makefile
index 7cabe8f42..c7dee7c20 100644
--- a/arch/arm64/boot/dts/allwinner/overlay/Makefile
+++ b/arch/arm64/boot/dts/allwinner/overlay/Makefile
@@ -27,6 +27,9 @@ dtbo-$(CONFIG_ARCH_SUNXI) += \
sun50i-h5-spi-add-cs1.dtbo \
sun50i-h5-spi-jedec-nor.dtbo \
sun50i-h5-spi-spidev.dtbo \
+ sun50i-h5-spi-dev-1.dtbo \
+ sun50i-h5-spi-dev-11.dtbo \
+ sun50i-h5-spi-devd.dtbo \
sun50i-h5-uart1.dtbo \
sun50i-h5-uart2.dtbo \
sun50i-h5-uart3.dtbo \
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-1.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-1.dts
new file mode 100644
index 000000000..4bf44dee6
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-1.dts
@@ -0,0 +1,28 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "allwinner,sun50i-h5";
+
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ spi1 = "/soc/spi@1c69000";
+ };
+ };
+
+ fragment@1 {
+ target = <&spi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ spidev@0 {
+ compatible = "armbian,spi-dev";
+ status = "okay";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+};
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-11.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-11.dts
new file mode 100644
index 000000000..a9a2bec7e
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-dev-11.dts
@@ -0,0 +1,28 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "allwinner,sun50i-h5";
+
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ spi1 = "/soc/spi@1c69000";
+ };
+ };
+
+ fragment@1 {
+ target = <&spi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ spidev@0 {
+ compatible = "armbian,spi-dev";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+};
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-devd.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-devd.dts
new file mode 100644
index 000000000..9b5b0f200
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-spi-devd.dts
@@ -0,0 +1,42 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "allwinner,sun50i-h5";
+
+ fragment@0 {
+ target-path = "/aliases";
+ __overlay__ {
+ spi0 = "/soc/spi@1c68000";
+ spi1 = "/soc/spi@1c69000";
+ };
+ };
+
+ fragment@1 {
+ target = <&spi0>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ spidev@0 {
+ compatible = "spidev";
+ status = "disabled";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&spi1>;
+ __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ spidev@0 {
+ compatible = "spidev";
+ status = "disabled";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ };
+ };
+ };
+};
--
2.35.3

0 comments on commit e745da2

Please sign in to comment.