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

Commit 37ae08c9 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Jason Cooper
Browse files

ARM: kirkwood: convert the mv88f6281gtw_ge board to DT



This commit converts the mv88f6281gtw_ge Kirkwood board to use a
Device Tree representation, except for the Ethernet devices and the
DSA switch. Even though the mv643xx_eth driver has a DT binding,
converting this board to use it is for now left on the side because it
doesn't use a simple PHY, but a DSA switch instead.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 0230bd44
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
	kirkwood-lschlv2.dtb \
	kirkwood-lsxhl.dtb \
	kirkwood-mplcec4.dtb \
	kirkwood-mv88f6281gtw-ge.dtb \
	kirkwood-netgear_readynas_duo_v2.dtb \
	kirkwood-ns2.dtb \
	kirkwood-ns2lite.dtb \
+125 −0
Original line number Diff line number Diff line
/*
 * Marvell 88F6281 GTW GE Board
 *
 * Lennert Buytenhek <buytenh@marvell.com>
 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 *
 * This file contains the definitions that are common between the 6281
 * and 6282 variants of the Marvell Kirkwood Development Board.
 */

/dts-v1/;

/include/ "kirkwood.dtsi"
/include/ "kirkwood-6281.dtsi"

/ {
	model = "Marvell 88F6281 GTW GE Board";
	compatible = "marvell,mv88f6281gtw-ge", "marvell,kirkwood-88f6281", "marvell,kirkwood";

	memory {
		device_type = "memory";
		reg = <0x00000000 0x20000000>; /* 512 MB */
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
	};

	ocp@f1000000 {
		pinctrl@10000 {
			pmx_usb_led: pmx-usb-led {
				marvell,pins = "mpp12";
				marvell,function = "gpo";
			};

			pmx_leds: pmx-leds {
				marvell,pins = "mpp20", "mpp21";
				marvell,function = "gpio";
			};

			pmx_keys: pmx-keys {
				marvell,pins = "mpp46", "mpp47";
				marvell,function = "gpio";
			};
		};

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

			flash@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "mx25l12805d";
				reg = <0>;
				spi-max-frequency = <50000000>;
				mode = <0>;
			};
		};

		serial@12000 {
			pinctrl-0 = <&pmx_uart0>;
			pinctrl-names = "default";
			clock-frequency = <200000000>;
			status = "ok";
		};

		ehci@50000 {
			status = "okay";
		};

		pcie-controller {
			status = "okay";

			pcie@1,0 {
				status = "okay";
			};
		};
	};

	gpio-leds {
		compatible = "gpio-leds";
		pinctrl-0 = <&pmx_leds &pmx_usb_led>;
		pinctrl-names = "default";

		green-status {
			label = "gtw:green:Status";
			gpios = <&gpio0 20 0>;
		};

		red-status {
			label = "gtw:red:Status";
			gpios = <&gpio0 21 0>;
		};

		green-usb {
			label = "gtw:green:USB";
			gpios = <&gpio0 12 0>;
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		pinctrl-0 = <&pmx_keys>;
		pinctrl-names = "default";

		button@1 {
			label = "SWR Button";
			linux,code = <0x198>; /* KEY_RESTART */
			gpios = <&gpio1 15 1>;
		};
		button@2 {
			label = "WPS Button";
			linux,code = <0x211>; /* KEY_WPS_BUTTON */
			gpios = <&gpio1 14 1>;
		};
	};
};
+7 −7
Original line number Diff line number Diff line
@@ -12,13 +12,6 @@ config MACH_D2NET_V2
	  Say 'Y' here if you want your kernel to support the
	  LaCie d2 Network v2 NAS.

config MACH_MV88F6281GTW_GE
	bool "Marvell 88F6281 GTW GE Board"
	select KIRKWOOD_LEGACY
	help
	  Say 'Y' here if you want your kernel to support the
	  Marvell 88F6281 GTW GE Board.

config MACH_NET2BIG_V2
	bool "LaCie 2Big Network v2 NAS Board"
	select KIRKWOOD_LEGACY
@@ -120,6 +113,13 @@ config MACH_DLINK_KIRKWOOD_DT
	  Kirkwood-based D-Link NASes such as DNS-320 & DNS-325,
	  using Flattened Device Tree.

config MACH_MV88F6281GTW_GE_DT
	bool "Marvell 88F6281 GTW GE Board (Flattened Device Tree)"
	select ARCH_KIRKWOOD_DT
	help
	  Say 'Y' here if you want your kernel to support the
	  Marvell 88F6281 GTW GE Board (Flattened Device Tree).

endmenu

endif
+1 −1
Original line number Diff line number Diff line
obj-y				+= common.o pcie.o
obj-$(CONFIG_KIRKWOOD_LEGACY)	+= irq.o mpp.o
obj-$(CONFIG_MACH_D2NET_V2)		+= d2net_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_MV88F6281GTW_GE)	+= mv88f6281gtw_ge-setup.o
obj-$(CONFIG_MACH_NET2BIG_V2)		+= netxbig_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_NET5BIG_V2)		+= netxbig_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_OPENRD)		+= openrd-setup.o
@@ -13,3 +12,4 @@ obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o

obj-$(CONFIG_ARCH_KIRKWOOD_DT)		+= board-dt.o
obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT)	+= board-dnskw.o
obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT)	+= board-mv88f6281gtw_ge.o
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,9 @@ static void __init kirkwood_dt_init(void)
	if (of_machine_is_compatible("dlink,dns-kirkwood"))
		dnskw_init();

	if (of_machine_is_compatible("marvell,mv88f6281gtw-ge"))
		mv88f6281gtw_ge_init();

	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

Loading