Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0160a4b6 authored by Stefan Roese's avatar Stefan Roese Committed by Gregory CLEMENT
Browse files

ARM: dts: mvebu: A37x/XP/38x/39x: Move SPI controller nodes into 'soc' node



This patch moves all Armada 370/XP/38x/39x SPI controller nodes from the
'internal-regs' node down into the 'soc' node. This is in preparation
to enable the usage of the SPI direct access mode. A follow-up patch
will add the static MBus mappings for the SPI devices into the 'reg'
property of the SPI controller DT node.

By moving these SPI controller nodes, this patch also makes use of
the labels rather than keeping the tree structure.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Mark Brown <broonie@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
parent 1113603e
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -155,20 +155,6 @@
				status = "okay";
			};

			spi0: spi@10600 {
				pinctrl-0 = <&spi0_pins2>;
				pinctrl-names = "default";
				status = "okay";

				spi-flash@0 {
					#address-cells = <1>;
					#size-cells = <1>;
					compatible = "mx25l25635e", "jedec,spi-nor";
					reg = <0>; /* Chip select 0 */
					spi-max-frequency = <50000000>;
				};
			};

			nand@d0000 {
				status = "okay";
				num-cs = <1>;
@@ -274,3 +260,18 @@
		compatible = "linux,spdif-dir";
	};
};

&spi0 {
	pinctrl-0 = <&spi0_pins2>;
	pinctrl-names = "default";
	status = "okay";

	spi-flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "mx25l25635e", "jedec,spi-nor";
		reg = <0>; /* Chip select 0 */
		spi-max-frequency = <50000000>;
	};
};
+20 −20
Original line number Diff line number Diff line
@@ -68,26 +68,6 @@
				phy-mode = "rgmii-id";
			};

			spi@10600 {
				status = "okay";
				pinctrl-0 = <&spi0_pins2>;
				pinctrl-names = "default";

				spi-flash@0 {
					#address-cells = <1>;
					#size-cells = <1>;
					/* MX25L8006E */
					compatible = "mxicy,mx25l8005", "jedec,spi-nor";
					reg = <0>; /* Chip select 0 */
					spi-max-frequency = <50000000>;

					partition@0 {
						label = "u-boot";
						reg = <0x0 0x100000>;
					};
				};
			};

			usb@50000 {
				status = "okay";
			};
@@ -176,3 +156,23 @@
		marvell,function = "gpio";
	};
};

&spi0 {
	status = "okay";
	pinctrl-0 = <&spi0_pins2>;
	pinctrl-names = "default";

	spi-flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		/* MX25L8006E */
		compatible = "mxicy,mx25l8005", "jedec,spi-nor";
		reg = <0>; /* Chip select 0 */
		spi-max-frequency = <50000000>;

		partition@0 {
			label = "u-boot";
			reg = <0x0 0x100000>;
		};
	};
};
+56 −56
Original line number Diff line number Diff line
@@ -87,62 +87,6 @@
				status = "disabled";
			};

			spi0: spi@10600 {
				status = "okay";

				spi-flash@0 {
					#address-cells = <1>;
					#size-cells = <1>;
					compatible = "micron,n25q064", "jedec,spi-nor";
					reg = <0>; /* Chip select 0 */
					spi-max-frequency = <20000000>;

					/*
					 * Warning!
					 *
					 * Synology u-boot uses its compiled-in environment
					 * and it seems Synology did not care to change u-boot
					 * default configuration in order to allow saving a
					 * modified environment at a sensible location. So,
					 * if you do a 'saveenv' under u-boot, your modified
					 * environment will be saved at 1MB after the start
					 * of the flash, i.e. in the middle of the uImage.
					 * For that reason, it is strongly advised not to
					 * change the default environment, unless you know
					 * what you are doing.
					 */
					partition@00000000 { /* u-boot */
						label = "RedBoot";
						reg = <0x00000000 0x000c0000>; /* 768KB */
					};

					partition@000c0000 { /* uImage */
						label = "zImage";
						reg = <0x000c0000 0x002d0000>; /* 2880KB */
					};

					partition@00390000 { /* uInitramfs */
						label = "rd.gz";
						reg = <0x00390000 0x00440000>; /* 4250KB */
					};

					partition@007d0000 { /* MAC address and serial number */
						label = "vendor";
						reg = <0x007d0000 0x00010000>; /* 64KB */
					};

					partition@007e0000 {
						label = "RedBoot config";
						reg = <0x007e0000 0x00010000>; /* 64KB */
					};

					partition@007f0000 {
						label = "FIS directory";
						reg = <0x007f0000 0x00010000>; /* 64KB */
					};
				};
			};

			i2c@11000 {
				compatible = "marvell,mv64xxx-i2c";
				pinctrl-0 = <&i2c0_pins>;
@@ -347,3 +291,59 @@
		marvell,function = "gpio";
	};
};

&spi0 {
	status = "okay";

	spi-flash@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "micron,n25q064", "jedec,spi-nor";
		reg = <0>; /* Chip select 0 */
		spi-max-frequency = <20000000>;

		/*
		 * Warning!
		 *
		 * Synology u-boot uses its compiled-in environment
		 * and it seems Synology did not care to change u-boot
		 * default configuration in order to allow saving a
		 * modified environment at a sensible location. So,
		 * if you do a 'saveenv' under u-boot, your modified
		 * environment will be saved at 1MB after the start
		 * of the flash, i.e. in the middle of the uImage.
		 * For that reason, it is strongly advised not to
		 * change the default environment, unless you know
		 * what you are doing.
		 */
		partition@00000000 { /* u-boot */
			label = "RedBoot";
			reg = <0x00000000 0x000c0000>; /* 768KB */
		};

		partition@000c0000 { /* uImage */
			label = "zImage";
			reg = <0x000c0000 0x002d0000>; /* 2880KB */
		};

		partition@00390000 { /* uInitramfs */
			label = "rd.gz";
			reg = <0x00390000 0x00440000>; /* 4250KB */
		};

		partition@007d0000 { /* MAC address and serial number */
			label = "vendor";
			reg = <0x007d0000 0x00010000>; /* 64KB */
		};

		partition@007e0000 {
			label = "RedBoot config";
			reg = <0x007e0000 0x00010000>; /* 64KB */
		};

		partition@007f0000 {
			label = "FIS directory";
			reg = <0x007f0000 0x00010000>; /* 64KB */
		};
	};
};
+20 −20
Original line number Diff line number Diff line
@@ -148,26 +148,6 @@
				interrupts = <50>;
			};

			spi0: spi@10600 {
				reg = <0x10600 0x28>;
				#address-cells = <1>;
				#size-cells = <0>;
				cell-index = <0>;
				interrupts = <30>;
				clocks = <&coreclk 0>;
				status = "disabled";
			};

			spi1: spi@10680 {
				reg = <0x10680 0x28>;
				#address-cells = <1>;
				#size-cells = <0>;
				cell-index = <1>;
				interrupts = <92>;
				clocks = <&coreclk 0>;
				status = "disabled";
			};

			i2c0: i2c@11000 {
				compatible = "marvell,mv64xxx-i2c";
				#address-cells = <1>;
@@ -320,6 +300,26 @@
				status = "disabled";
			};
		};

		spi0: spi@10600 {
			reg = <MBUS_ID(0xf0, 0x01) 0x10600 0x28>;
			#address-cells = <1>;
			#size-cells = <0>;
			cell-index = <0>;
			interrupts = <30>;
			clocks = <&coreclk 0>;
			status = "disabled";
		};

		spi1: spi@10680 {
			reg = <MBUS_ID(0xf0, 0x01) 0x10680 0x28>;
			#address-cells = <1>;
			#size-cells = <0>;
			cell-index = <1>;
			interrupts = <92>;
			clocks = <&coreclk 0>;
			status = "disabled";
		};
	};

	clocks {
+16 −18
Original line number Diff line number Diff line
@@ -134,24 +134,6 @@
				wt-override;
			};

			/*
			 * Default SPI pinctrl setting, can be overwritten on
			 * board level if a different configuration is used.
			 */
			spi0: spi@10600 {
				compatible = "marvell,armada-370-spi",
						"marvell,orion-spi";
				pinctrl-0 = <&spi0_pins1>;
				pinctrl-names = "default";
			};

			spi1: spi@10680 {
				compatible = "marvell,armada-370-spi",
						"marvell,orion-spi";
				pinctrl-0 = <&spi1_pins>;
				pinctrl-names = "default";
			};

			i2c0: i2c@11000 {
				reg = <0x11000 0x20>;
			};
@@ -447,3 +429,19 @@
		marvell,function = "ge1";
	};
};

/*
 * Default SPI pinctrl setting, can be overwritten on
 * board level if a different configuration is used.
 */
&spi0 {
	compatible = "marvell,armada-370-spi", "marvell,orion-spi";
	pinctrl-0 = <&spi0_pins1>;
	pinctrl-names = "default";
};

&spi1 {
	compatible = "marvell,armada-370-spi", "marvell,orion-spi";
	pinctrl-0 = <&spi1_pins>;
	pinctrl-names = "default";
};
Loading