build/patch/kernel/mvebu64-default/espressobin_enable_SPI_flash.patch
2017-10-27 16:14:21 +03:00

64 lines
1.7 KiB
Diff

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-community.dts b/arch/arm64/boot/dts/marvell/armada-3720-community.dts
index 992c4c9..899b7b1
--- a/arch/arm64/boot/dts/marvell/armada-3720-community.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-community.dts
@@ -1,6 +1,7 @@
/*
* Device Tree file for Marvell Armada 3720 community board
* Copyright (C) 2016 Marvell
+ * Copyright (C) 2017 Armbian
*
* This file is dual-licensed: you can use it either under the terms
* of the GPL or the X11 license, at your option. Note that this dual
@@ -64,6 +65,35 @@
status = "okay";
};
+ spi0: spi@10600 {
+ status = "okay";
+
+ spi-flash@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "jedec,spi-nor";
+ reg = <0>; /* Chip select 0 */
+ spi-max-frequency = <104000000>;
+ m25,fast-read;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi0_pins &spi_quad_pins>;
+
+ partition@0 {
+ label = "Bootloader";
+ reg = <0 0x200000>;
+ };
+ partition@200000 {
+ label = "U-boot Env";
+ reg = <0x200000 0x10000>;
+ };
+ partition@210000 {
+ label = "Linux";
+ reg = <0x210000 0xDF0000>;
+ };
+ };
+ };
+
i2c0: i2c@11000 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index e6f170a..6894d61
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -278,6 +278,11 @@
#clock-cells = <0>;
};
+ spi0_pins: spi-pins-0 {
+ marvell,pins = "mpp36";
+ marvell,function = "spi";
+ };
+
spi_quad_pins: spi-quad-pins {
groups = "spi_quad";
function = "spi";