uboot-sunxi: add spi flash support
[openwrt/staging/hauke.git] / package / boot / uboot-sunxi / patches / 408-sunxi-dts-enable-SPI0-controller-for-A20-OLinuXino-L.patch
diff --git a/package/boot/uboot-sunxi/patches/408-sunxi-dts-enable-SPI0-controller-for-A20-OLinuXino-L.patch b/package/boot/uboot-sunxi/patches/408-sunxi-dts-enable-SPI0-controller-for-A20-OLinuXino-L.patch
new file mode 100644 (file)
index 0000000..a375b06
--- /dev/null
@@ -0,0 +1,39 @@
+From 835dd2f28d3f5c88d226622fef283e6ca48f8818 Mon Sep 17 00:00:00 2001
+From: "S.J.R. van Schaik" <stephan@synkhronix.com>
+Date: Thu, 9 Feb 2017 21:42:16 +0000
+Subject: sunxi: dts: enable SPI0 controller for A20 OLinuXino LIME 2
+
+---
+ arch/arm/dts/sun7i-a20-olinuxino-lime2.dts | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
++++ b/arch/arm/dts/sun7i-a20-olinuxino-lime2.dts
+@@ -54,6 +54,7 @@
+       aliases {
+               serial0 = &uart0;
++              spi0 = &spi0;
+       };
+       chosen {
+@@ -81,6 +82,19 @@
+       };
+ };
++&pio {
++      spi0_pins: pinctrl {
++              pins = "PC0", "PC1", "PC2", "PC23";
++              drive-strength = <10>;
++              bias-disable;
++      };
++};
++
++&spi0 {
++      pinctrl-0 = <&spi0_pins>;
++      status = "okay";
++};
++
+ &ahci {
+       target-supply = <&reg_ahci_5v>;
+       status = "okay";