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

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

ARM: orion5x: convert Maxtor Shared Storage II to the Device Tree



This commit converts the Maxtor Shared Storage II Orion5x platform to
the Device Tree. The only remaining things not converted are PCI and
the special power off method.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: https://lkml.kernel.org/r/1398202002-28530-37-git-send-email-thomas.petazzoni@free-electrons.com


Cc: Sylver Bruneau <sylver.bruneau@googlemail.com>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 94b0bd36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -291,6 +291,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
	dra7-evm.dtb
dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-d2-network.dtb \
	orion5x-lacie-ethernet-disk-mini-v2.dtb \
	orion5x-maxtor-shared-storage-2.dtb \
	orion5x-rd88f5182-nas.dtb
dtb-$(CONFIG_ARCH_PRIMA2) += prima2-evb.dtb
dtb-$(CONFIG_ARCH_QCOM) += qcom-msm8660-surf.dtb \
+178 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 * Copyright (C) Sylver Bruneau <sylver.bruneau@googlemail.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.
 */

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "orion5x-mv88f5182.dtsi"

/ {
	model = "Maxtor Shared Storage II";
	compatible = "maxtor,shared-storage-2", "marvell,orion5x-88f5182", "marvell,orion5x";

	memory {
		reg = <0x00000000 0x4000000>; /* 64 MB */
	};

	chosen {
		bootargs = "console=ttyS0,115200n8 earlyprintk";
		linux,stdout-path = &uart0;
	};

	soc {
		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
			 <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
			 <MBUS_ID(0x01, 0x0f) 0 0xff800000 0x40000>;
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-0 = <&pmx_buttons>;
		pinctrl-names = "default";
		#address-cells = <1>;
		#size-cells = <0>;
		power {
			label = "Power";
			linux,code = <KEY_POWER>;
			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
		};

		reset {
			label = "Reset";
			linux,code = <KEY_RESTART>;
			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
		};
	};
};

&devbus_bootcs {
	status = "okay";

	devbus,keep-config;

	/*
	 * Currently the MTD code does not recognize the MX29LV400CBCT
	 * as a bottom-type device. This could cause risks of
	 * accidentally erasing critical flash sectors. We thus define
	 * a single, write-protected partition covering the whole
	 * flash.  TODO: once the flash part TOP/BOTTOM detection
	 * issue is sorted out in the MTD code, break this into at
	 * least three partitions: 'u-boot code', 'u-boot environment'
	 * and 'whatever is left'.
	 */
	flash@0 {
		compatible = "cfi-flash";
		reg = <0 0x40000>;
		bank-width = <1>;
                #address-cells = <1>;
		#size-cells = <1>;
	};
};

&mdio {
	status = "okay";

	ethphy: ethernet-phy {
		reg = <8>;
	};
};

&ehci0 {
	status = "okay";
};

&eth {
	status = "okay";

	ethernet-port@0 {
		phy-handle = <&ethphy>;
	};
};

&i2c {
	status = "okay";
	clock-frequency = <100000>;
	#address-cells = <1>;

	rtc@68 {
		compatible = "st,m41t81";
		reg = <0x68>;
		pinctrl-0 = <&pmx_rtc>;
		pinctrl-names = "default";
		interrupt-parent = <&gpio0>;
		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
	};
};

&pinctrl {
	pinctrl-0 = <&pmx_leds &pmx_misc>;
	pinctrl-names = "default";

	pmx_buttons: pmx-buttons {
		marvell,pins = "mpp11", "mpp12";
		marvell,function = "gpio";
	};

	/*
	 * MPP0: Power LED
	 * MPP1: Error LED
	 */
	pmx_leds: pmx-leds {
		marvell,pins = "mpp0", "mpp1";
		marvell,function = "gpio";
	};

	/*
	 * MPP4: HDD ind. (Single/Dual)
	 * MPP5: HD0 5V control
	 * MPP6: HD0 12V control
	 * MPP7: HD1 5V control
	 * MPP8: HD1 12V control
	 */
	pmx_misc: pmx-misc {
		marvell,pins = "mpp4", "mpp5", "mpp6", "mpp7", "mpp8", "mpp10";
		marvell,function = "gpio";
	};

	pmx_rtc: pmx-rtc {
		marvell,pins = "mpp3";
		marvell,function = "gpio";
	};

	pmx_sata0_led_active: pmx-sata0-led-active {
		marvell,pins = "mpp14";
		marvell,function = "sata0";
	};

	pmx_sata1_led_active: pmx-sata1-led-active {
		marvell,pins = "mpp15";
		marvell,function = "sata1";
	};

	/*
	 * Non MPP GPIOs:
	 *  GPIO 22: USB port 1 fuse (0 = Fail, 1 = Ok)
	 *  GPIO 23: Blue front LED off
	 *  GPIO 24: Inhibit board power off (0 = Disabled, 1 = Enabled)
	 */
};

&sata {
	pinctrl-0 = <&pmx_sata0_led_active
		     &pmx_sata1_led_active>;
	pinctrl-names = "default";
	status = "okay";
	nr-ports = <2>;
};

&uart0 {
	status = "okay";
};
+3 −2
Original line number Diff line number Diff line
@@ -129,8 +129,9 @@ config MACH_NET2BIG
	  Say 'Y' here if you want your kernel to support the
	  LaCie 2Big Network NAS.

config MACH_MSS2
	bool "Maxtor Shared Storage II"
config MACH_MSS2_DT
	bool "Maxtor Shared Storage II (Flattened Device Tree)"
	select ARCH_ORION5X_DT
	help
	  Say 'Y' here if you want your kernel to support the
	  Maxtor Shared Storage II platform.
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ obj-$(CONFIG_MACH_WRT350N_V2) += wrt350n-v2-setup.o
obj-$(CONFIG_MACH_TS78XX)	+= ts78xx-setup.o
obj-$(CONFIG_MACH_MV2120)	+= mv2120-setup.o
obj-$(CONFIG_MACH_NET2BIG)	+= net2big-setup.o
obj-$(CONFIG_MACH_MSS2)		+= mss2-setup.o
obj-$(CONFIG_MACH_WNR854T)	+= wnr854t-setup.o
obj-$(CONFIG_MACH_RD88F5181L_GE)	+= rd88f5181l-ge-setup.o
obj-$(CONFIG_MACH_RD88F5181L_FXO)	+= rd88f5181l-fxo-setup.o
@@ -22,4 +21,5 @@ obj-$(CONFIG_MACH_LINKSTATION_LSCHL) += ls-chl-setup.o

obj-$(CONFIG_ARCH_ORION5X_DT)		+= board-dt.o
obj-$(CONFIG_MACH_D2NET_DT)	+= board-d2net.o
obj-$(CONFIG_MACH_MSS2_DT)	+= board-mss2.o
obj-$(CONFIG_MACH_RD88F5182_DT)	+= board-rd88f5182.o
+3 −0
Original line number Diff line number Diff line
@@ -61,6 +61,9 @@ static void __init orion5x_dt_init(void)
		cpu_idle_poll_ctrl(true);
	}

	if (of_machine_is_compatible("maxtor,shared-storage-2"))
		mss2_init();

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