armbian_build/patch/kernel/archive/meson64-6.2/board-odroidn2-add-spi-flash-enabled-dts.patch
Ricardo Pardini 58f46aa5ed
meson64: edge: 6.2: fixes & rebase & naming convention, after #4941 (#4942)
* meson64: edge: drop upstreamed patches (odroidhc4 cooling map + radxa zero otg fix)

* meson64: edge: v6.2.y: adapt Neil's new BPI-CM4 patches to Armbian naming non-convention (for ordering)

* meson64: edge: v6.2.y: fix patches sensitive to patching order (amlogic.yaml, DT Makefile)

* meson64: edge: rebase against v6.2.5, no actual changes
2023-03-13 23:21:20 +01:00

86 lines
3.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <ricardo@pardini.net>
Date: Thu, 2 Sep 2021 20:44:19 +0200
Subject: ODROID N2(+): SPI-NOR enable via extra DTBs
Kernel DTS patch to add SPI-flash-enabled DTBs (slower eMMC), produces -spi .dtbs for n2 and n2-plus
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
---
arch/arm64/boot/dts/amlogic/Makefile | 2 ++
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-enable-spi.dtsi | 13 ++++++++++
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus-spi.dts | 11 ++++++++
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-spi.dts | 11 ++++++++
4 files changed, 37 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index d94e3f3530d9..1431d6a8be04 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -16,7 +16,9 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-go-ultra.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus-spi.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-spi.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-radxa-zero2.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-enable-spi.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-enable-spi.dtsi
new file mode 100644
index 000000000000..a6f11e8cdfbe
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-enable-spi.dtsi
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/*
+ * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0, and change bus-width to 4 then spifc can be enabled.
+ */
+&sd_emmc_c {
+ pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_4b_pins>, <&emmc_ds_pins>;
+ bus-width = <4>;
+};
+
+&spifc {
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus-spi.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus-spi.dts
new file mode 100644
index 000000000000..f50f6f39a941
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus-spi.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "meson-g12b-odroid-n2-plus.dts"
+
+/ {
+ model = "Hardkernel ODROID-N2Plus with SPI";
+};
+
+#include "meson-g12b-odroid-n2-enable-spi.dtsi"
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-spi.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-spi.dts
new file mode 100644
index 000000000000..3d85c25d5fc4
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-spi.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "meson-g12b-odroid-n2.dts"
+
+/ {
+ model = "Hardkernel ODROID-N2 with SPI";
+};
+
+#include "meson-g12b-odroid-n2-enable-spi.dtsi"
--
Armbian