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

Commit f236f5aa authored by Arnaud Ebalard's avatar Arnaud Ebalard Committed by Jason Cooper
Browse files

ARM: kirkwood: Add support for NETGEAR ReadyNAS Duo v2 using DT

Add support for NETGEAR ReadyNAS Duo v2 (Hardware specs available
here: http://natisbad.org/NAS/

). Almost everything is supported via
provided .dts. A board-readynas.c file is nonetheless required for
device not only converted to DT (Gbit controller).

Signed-off-by: default avatarArnaud Ebalard <arno@natisbad.org>
Tested-By: default avatarArnaud Ebalard <arno@natisbad.org>
Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 8bb96604
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
	kirkwood-lschlv2.dtb \
	kirkwood-lsxhl.dtb \
	kirkwood-mplcec4.dtb \
	kirkwood-netgear_readynas_duo_v2.dtb \
	kirkwood-ns2.dtb \
	kirkwood-ns2lite.dtb \
	kirkwood-ns2max.dtb \
+180 −0
Original line number Diff line number Diff line
/dts-v1/;

/include/ "kirkwood.dtsi"
/include/ "kirkwood-6282.dtsi"

/ {
	model = "NETGEAR ReadyNAS Duo v2";
	compatible = "netgear,readynas-duo-v2", "netgear,readynas", "marvell,kirkwood-88f6282", "marvell,kirkwood";

	memory { /* 256 MB */
		device_type = "memory";
		reg = <0x00000000 0x10000000>;
	};

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

	ocp@f1000000 {
		pinctrl: pinctrl@10000 {

			pinctrl-0 = < &pmx_uart0
				      &pmx_button_power
				      &pmx_button_backup
				      &pmx_button_reset
				      &pmx_led_blue_power
				      &pmx_led_blue_activity
				      &pmx_led_blue_disk1
				      &pmx_led_blue_disk2
				      &pmx_led_blue_backup >;
			pinctrl-names = "default";

			pmx_button_power: pmx-button-power {
				marvell,pins = "mpp47";
				marvell,function = "gpio";
			};
			pmx_button_backup: pmx-button-backup {
				marvell,pins = "mpp45";
				marvell,function = "gpio";
			};
			pmx_button_reset: pmx-button-reset {
				marvell,pins = "mpp13";
				marvell,function = "gpio";
			};
			pmx_led_blue_power: pmx-led-blue-power {
				marvell,pins = "mpp31";
				marvell,function = "gpio";
			};
			pmx_led_blue_activity: pmx-led-blue-activity {
				marvell,pins = "mpp38";
				marvell,function = "gpio";
			};
			pmx_led_blue_disk1: pmx-led-blue-disk1 {
				marvell,pins = "mpp23";
				marvell,function = "gpio";
			};
			pmx_led_blue_disk2: pmx-led-blue-disk2 {
				marvell,pins = "mpp22";
				marvell,function = "gpio";
			};
			pmx_led_blue_backup: pmx-led-blue-backup {
				marvell,pins = "mpp29";
				marvell,function = "gpio";
			};
		};

		i2c@11000 {
			status = "okay";

			rs5c372a: rs5c372a@32 {
				compatible = "ricoh,rs5c372a";
				reg = <0x32>;
			};
		};

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

		nand@3000000 {
			status = "okay";

			partition@0 {
				label = "u-boot";
				reg = <0x0000000 0x180000>;
				read-only;
			};

			partition@180000 {
				label = "u-boot-env";
				reg = <0x180000 0x20000>;
			};

			partition@200000 {
				label = "uImage";
				reg = <0x0200000 0x600000>;
			};

			partition@800000 {
				label = "minirootfs";
				reg = <0x0800000 0x1000000>;
			};

			partition@1800000 {
				label = "jffs2";
				reg = <0x1800000 0x6800000>;
			};
		};

		sata@80000 {
			status = "okay";
			nr-ports = <2>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		power_led {
			label = "status:blue:power_led";
			gpios = <&gpio0 31 1>;   /* GPIO 31 Active Low */
			linux,default-trigger = "default-on";
		};
		activity_led {
			label = "status:blue:activity_led";
			gpios = <&gpio1 6 1>;    /* GPIO 38 Active Low */
		};
		disk1_led {
			label = "status:blue:disk1_led";
			gpios = <&gpio0 23 1>;   /* GPIO 23 Active Low */
		};
		disk2_led {
			label = "status:blue:disk2_led";
			gpios = <&gpio0 22 1>;   /* GPIO 22 Active Low */
		};
		backup_led {
			label = "status:blue:backup_led";
			gpios = <&gpio0 29 1>;   /* GPIO 29 Active Low*/
		};
	};

	gpio_keys {
		compatible = "gpio-keys";
		#address-cells = <1>;
		#size-cells = <0>;
		button@1 {
			label = "Power Button";
			linux,code = <116>;     /* KEY_POWER */
			gpios = <&gpio1 15 1>;
		};
		button@2 {
			label = "Reset Button";
			linux,code = <0x198>;   /* KEY_RESTART */
			gpios = <&gpio0 13 1>;
		};
		button@3 {
			label = "Backup Button";
			linux,code = <133>;     /* KEY_COPY */
			gpios = <&gpio1 13 1>;
		};
	};

        regulators {
                compatible = "simple-bus";
                #address-cells = <1>;
                #size-cells = <0>;

                usb_power: regulator@1 {
                        compatible = "regulator-fixed";
                        reg = <1>;
                        regulator-name = "USB 3.0 Power";
                        regulator-min-microvolt = <5000000>;
                        regulator-max-microvolt = <5000000>;
                        enable-active-high;
                        regulator-always-on;
                        regulator-boot-on;
                        gpio = <&gpio1 14 0>;
                };
        };
};
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ CONFIG_MACH_NETSPACE_MAX_V2_DT=y
CONFIG_MACH_NETSPACE_LITE_V2_DT=y
CONFIG_MACH_NETSPACE_MINI_V2_DT=y
CONFIG_MACH_OPENBLOCKS_A6_DT=y
CONFIG_MACH_READYNAS_DT=y
CONFIG_MACH_TOPKICK_DT=y
CONFIG_MACH_TS219=y
CONFIG_MACH_TS41X=y
+9 −0
Original line number Diff line number Diff line
@@ -194,6 +194,15 @@ config MACH_OPENBLOCKS_A6_DT
	  Say 'Y' here if you want your kernel to support the
	  Plat'Home OpenBlocks A6 (Flattened Device Tree).

config MACH_READYNAS_DT
	bool "NETGEAR ReadyNAS Duo v2 (Flattened Device Tree)"
	select ARCH_KIRKWOOD_DT
	select ARM_APPENDED_DTB
	select ARM_ATAG_DTB_COMPAT
	help
	  Say 'Y' here if you want your kernel to support the
	  NETGEAR ReadyNAS Duo v2 using Fattened Device Tree.

config MACH_TOPKICK_DT
	bool "USI Topkick (Flattened Device Tree)"
	select ARCH_KIRKWOOD_DT
+1 −0
Original line number Diff line number Diff line
@@ -39,4 +39,5 @@ obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT)	+= board-ns2.o
obj-$(CONFIG_MACH_NSA310_DT)		+= board-nsa310.o
obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)	+= board-openblocks_a6.o
obj-$(CONFIG_MACH_READYNAS_DT)		+= board-readynas.o
obj-$(CONFIG_MACH_TOPKICK_DT)		+= board-usi_topkick.o
Loading