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

Commit 9652e8bd authored by Stefan Roese's avatar Stefan Roese Committed by Arnd Bergmann
Browse files

ARM: SPEAr600: Add device-tree support to SPEAr600 boards



This patch adds a generic target for SPEAr600 board that can be
configured via the device-tree. Currently the following devices
are supported via the devicetree:

- VIC interrupts
- PL011 UART
- PL061 GPIO
- Synopsys DW I2C
- Synopsys DW ethernet

Other peripheral devices (e.g. SMI flash, FSMC NAND flash etc) will
follow in later patches.

Only the spear600-evb is currently supported. Other SPEAr600
based boards will follow later.

Since the current mainline SPEAr600 code only supports the SPEAr600
evaluation board, with nearly zero peripheral devices (only UART
and GPIO), it makes sense to switch over to DT based configuration
completely now. So this patch also removes all non-DT stuff, mainly
platform device data. The files spear600.c and spear600_evb.c are
removed completely.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Acked-by: default avatarViresh Kumar <viresh.kumar@st.com>
Acked-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent fde7d904
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
ST SPEAr Platforms Device Tree Bindings
---------------------------------------

Boards with the ST SPEAr600 SoC shall have the following properties:

Required root node property:

compatible = "st,spear600";
+47 −0
Original line number Diff line number Diff line
/*
 * Copyright 2012 Stefan Roese <sr@denx.de>
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/dts-v1/;
/include/ "spear600.dtsi"

/ {
	model = "ST SPEAr600 Evaluation Board";
	compatible = "st,spear600-evb", "st,spear600";
	#address-cells = <1>;
	#size-cells = <1>;

	memory {
		device_type = "memory";
		reg = <0 0x10000000>;
	};

	ahb {
		gmac: ethernet@e0800000 {
			phy-mode = "gmii";
			status = "okay";
		};

		apb {
			serial@d0000000 {
				status = "okay";
			};

			serial@d0080000 {
				status = "okay";
			};

			i2c@d0200000 {
				clock-frequency = <400000>;
				status = "okay";
			};
		};
	};
};
+174 −0
Original line number Diff line number Diff line
/*
 * Copyright 2012 Stefan Roese <sr@denx.de>
 *
 * The code contained herein is licensed under the GNU General Public
 * License. You may obtain a copy of the GNU General Public License
 * Version 2 or later at the following locations:
 *
 * http://www.opensource.org/licenses/gpl-license.html
 * http://www.gnu.org/copyleft/gpl.html
 */

/include/ "skeleton.dtsi"

/ {
	compatible = "st,spear600";

	cpus {
		cpu@0 {
			compatible = "arm,arm926ejs";
		};
	};

	memory {
		device_type = "memory";
		reg = <0 0x40000000>;
	};

	ahb {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges = <0xd0000000 0xd0000000 0x30000000>;

		vic0: interrupt-controller@f1100000 {
			compatible = "arm,pl190-vic";
			interrupt-controller;
			reg = <0xf1100000 0x1000>;
			#interrupt-cells = <1>;
		};

		vic1: interrupt-controller@f1000000 {
			compatible = "arm,pl190-vic";
			interrupt-controller;
			reg = <0xf1000000 0x1000>;
			#interrupt-cells = <1>;
		};

		gmac: ethernet@e0800000 {
			compatible = "st,spear600-gmac";
			reg = <0xe0800000 0x8000>;
			interrupt-parent = <&vic1>;
			interrupts = <24 23>;
			interrupt-names = "macirq", "eth_wake_irq";
			status = "disabled";
		};

		fsmc: flash@d1800000 {
			compatible = "st,spear600-fsmc-nand";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0xd1800000 0x1000	/* FSMC Register */
			       0xd2000000 0x4000>;	/* NAND Base */
			reg-names = "fsmc_regs", "nand_data";
			st,ale-off = <0x20000>;
			st,cle-off = <0x10000>;
			status = "disabled";
		};

		smi: flash@fc000000 {
			compatible = "st,spear600-smi";
			#address-cells = <1>;
			#size-cells = <1>;
			reg = <0xfc000000 0x1000>;
			interrupt-parent = <&vic1>;
			interrupts = <12>;
			status = "disabled";
		};

		ehci@e1800000 {
			compatible = "st,spear600-ehci", "usb-ehci";
			reg = <0xe1800000 0x1000>;
			interrupt-parent = <&vic1>;
			interrupts = <27>;
			status = "disabled";
		};

		ehci@e2000000 {
			compatible = "st,spear600-ehci", "usb-ehci";
			reg = <0xe2000000 0x1000>;
			interrupt-parent = <&vic1>;
			interrupts = <29>;
			status = "disabled";
		};

		ohci@e1900000 {
			compatible = "st,spear600-ohci", "usb-ohci";
			reg = <0xe1900000 0x1000>;
			interrupt-parent = <&vic1>;
			interrupts = <26>;
			status = "disabled";
		};

		ohci@e2100000 {
			compatible = "st,spear600-ohci", "usb-ohci";
			reg = <0xe2100000 0x1000>;
			interrupt-parent = <&vic1>;
			interrupts = <28>;
			status = "disabled";
		};

		apb {
			#address-cells = <1>;
			#size-cells = <1>;
			compatible = "simple-bus";
			ranges = <0xd0000000 0xd0000000 0x30000000>;

			serial@d0000000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xd0000000 0x1000>;
				interrupt-parent = <&vic0>;
				interrupts = <24>;
				status = "disabled";
			};

			serial@d0080000 {
				compatible = "arm,pl011", "arm,primecell";
				reg = <0xd0080000 0x1000>;
				interrupt-parent = <&vic0>;
				interrupts = <25>;
				status = "disabled";
			};

			/* local/cpu GPIO */
			gpio0: gpio@f0100000 {
				#gpio-cells = <2>;
				compatible = "arm,pl061", "arm,primecell";
				gpio-controller;
				reg = <0xf0100000 0x1000>;
				interrupt-parent = <&vic0>;
				interrupts = <18>;
			};

			/* basic GPIO */
			gpio1: gpio@fc980000 {
				#gpio-cells = <2>;
				compatible = "arm,pl061", "arm,primecell";
				gpio-controller;
				reg = <0xfc980000 0x1000>;
				interrupt-parent = <&vic1>;
				interrupts = <19>;
			};

			/* appl GPIO */
			gpio2: gpio@d8100000 {
				#gpio-cells = <2>;
				compatible = "arm,pl061", "arm,primecell";
				gpio-controller;
				reg = <0xd8100000 0x1000>;
				interrupt-parent = <&vic1>;
				interrupts = <4>;
			};

			i2c@d0200000 {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "snps,designware-i2c";
				reg = <0xd0200000 0x1000>;
				interrupt-parent = <&vic0>;
				interrupts = <28>;
				status = "disabled";
			};
		};
	};
};
+4 −3
Original line number Diff line number Diff line
@@ -5,11 +5,12 @@
if ARCH_SPEAR6XX

menu "SPEAr6xx Implementations"
config BOARD_SPEAR600_EVB
	bool "SPEAr600 Evaluation Board"
config BOARD_SPEAR600_DT
	bool "SPEAr600 generic board configured via device-tree"
	select MACH_SPEAR600
	select USE_OF
	help
	  Supports ST SPEAr600 Evaluation Board
	  Supports ST SPEAr600 boards configured via the device-tree

endmenu

+0 −6
Original line number Diff line number Diff line
@@ -4,9 +4,3 @@

# common files
obj-y	+= clock.o spear6xx.o

# spear600 specific files
obj-$(CONFIG_MACH_SPEAR600) += spear600.o

# spear600 boards files
obj-$(CONFIG_BOARD_SPEAR600_EVB) += spear600_evb.o
Loading