* [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT
@ 2013-08-01 8:45 Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 1/9] ARM: kirkwood: convert d2net_v2 " Thomas Petazzoni
` (9 more replies)
0 siblings, 10 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
Here is a set of patches that converts a few additional Kirkwood
boards to use the Device Tree. I intend to continue this effort with
the remaining Kirkwood boards.
Note that I don't have access to any of the platforms that are being
converted in this patch series, so this means that:
- A careful review would be useful
- Testing from owners of the boards would be appreciated. The DT
conversion of Kirkwood boards is a process that has now been
started a while ago, and we would like to finalize it. If board
owners don't react by testing the proposed patches, then the
support for those boards might be broken.
In detail:
* Patch 1 converts the d2net_v2 board to DT.
The remaining board file is needed for the Ethernet device and the
leds-ns2 device. A DT for the mv643xx_eth driver (by Sebastian
Hesselbarth) is being merged, but I wanted to avoid the dependency
on a different patch series for now. Ethernet can be moved to DT as
a followup patch.
* Patches 2, 3, 4 and 5 remove support for boards that have already
been converted to the Deice Tree, but for which the legacy board
file was not removed.
* Patch 6 converts the mv88f6281gtw_ge board to DT.
The remaining devices probed in a legacy way are the mv643xx_eth
driver (same discussion as above), and the DSA switch (note that I
have an Armada 370 platform with a DSA switch, so I'll have to look
at how to make this appear in the DT).
* Patch 7 converts the LaCie Net{2,5}Big v2 platforms to DT
The remaining devices probed in a legacy way are the Ethernet
devices, and the leds-netxbig driver. For Ethernet, see above. For
leds-netxbig, Simon Guinot is currently working on this (see the
LAKML thread "Location for a kind of GPIO bus driver").
* Patch 8 removes some common code for LaCie boards that has become
useless after the DT conversions.
* Patch 9 adjusts kirkwood_defconfig after the DT conversions.
Thomas
Thomas Petazzoni (9):
ARM: kirkwood: convert d2net_v2 to DT
ARM: kirkwood: remove support for legacy booting of Dockstar
ARM: kirkwood: remove support for legacy booting of Guruplug
ARM: kirkwood: remove support for legacy booting of Sheevaplug
ARM: kirkwood: remove LaCie boards that are supported through DT
ARM: kirkwood: convert the mv88f6281gtw_ge board to DT
ARM: kirkwood: convert LaCie Net{2,5}Big v2 platforms to DT
ARM: kirkwood: remove unused common code for LaCie platforms
ARM: kirkwood: update defconfig after DT conversions
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/kirkwood-d2net-v2.dts | 204 ++++++++++++++
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 125 +++++++++
arch/arm/boot/dts/kirkwood-net2big-v2.dts | 204 ++++++++++++++
arch/arm/boot/dts/kirkwood-net5big-v2.dts | 238 +++++++++++++++++
arch/arm/configs/kirkwood_defconfig | 15 +-
arch/arm/mach-kirkwood/Kconfig | 92 ++-----
arch/arm/mach-kirkwood/Makefile | 15 +-
arch/arm/mach-kirkwood/board-d2net_v2.c | 72 +++++
arch/arm/mach-kirkwood/board-dt.c | 7 +
arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c | 50 ++++
.../{netxbig_v2-setup.c => board-netxbig_v2.c} | 213 +--------------
arch/arm/mach-kirkwood/common.h | 12 +
arch/arm/mach-kirkwood/d2net_v2-setup.c | 231 ----------------
arch/arm/mach-kirkwood/dockstar-setup.c | 111 --------
arch/arm/mach-kirkwood/guruplug-setup.c | 133 ----------
arch/arm/mach-kirkwood/lacie_v2-common.c | 114 --------
arch/arm/mach-kirkwood/lacie_v2-common.h | 16 --
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | 172 ------------
arch/arm/mach-kirkwood/netspace_v2-setup.c | 293 ---------------------
arch/arm/mach-kirkwood/sheevaplug-setup.c | 161 -----------
21 files changed, 950 insertions(+), 1529 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-d2net-v2.dts
create mode 100644 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
create mode 100644 arch/arm/boot/dts/kirkwood-net2big-v2.dts
create mode 100644 arch/arm/boot/dts/kirkwood-net5big-v2.dts
create mode 100644 arch/arm/mach-kirkwood/board-d2net_v2.c
create mode 100644 arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
rename arch/arm/mach-kirkwood/{netxbig_v2-setup.c => board-netxbig_v2.c} (53%)
delete mode 100644 arch/arm/mach-kirkwood/d2net_v2-setup.c
delete mode 100644 arch/arm/mach-kirkwood/dockstar-setup.c
delete mode 100644 arch/arm/mach-kirkwood/guruplug-setup.c
delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.c
delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.h
delete mode 100644 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
delete mode 100644 arch/arm/mach-kirkwood/netspace_v2-setup.c
delete mode 100644 arch/arm/mach-kirkwood/sheevaplug-setup.c
--
1.8.1.2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/9] ARM: kirkwood: convert d2net_v2 to DT
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 9:07 ` Simon Guinot
2013-08-01 8:45 ` [PATCH 2/9] ARM: kirkwood: remove support for legacy booting of Dockstar Thomas Petazzoni
` (8 subsequent siblings)
9 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boot/dts/kirkwood-d2net-v2.dts | 204 ++++++++++++++++++++++++++++
arch/arm/mach-kirkwood/Kconfig | 13 +-
arch/arm/mach-kirkwood/Makefile | 2 +-
arch/arm/mach-kirkwood/board-d2net_v2.c | 72 ++++++++++
arch/arm/mach-kirkwood/board-dt.c | 3 +
arch/arm/mach-kirkwood/common.h | 6 +
arch/arm/mach-kirkwood/d2net_v2-setup.c | 231 --------------------------------
7 files changed, 293 insertions(+), 238 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-d2net-v2.dts
create mode 100644 arch/arm/mach-kirkwood/board-d2net_v2.c
delete mode 100644 arch/arm/mach-kirkwood/d2net_v2-setup.c
diff --git a/arch/arm/boot/dts/kirkwood-d2net-v2.dts b/arch/arm/boot/dts/kirkwood-d2net-v2.dts
new file mode 100644
index 0000000..f789ebd
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-d2net-v2.dts
@@ -0,0 +1,204 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
+
+/ {
+ model = "LaCie d2 Network v2";
+ compatible = "lacie,d2net_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x20000000>; // FIXME
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+ ocp at f1000000 {
+ pinctrl: pinctrl at 10000 {
+ pinctrl-0 = <&pmx_inhibit_poweroff
+ &pmx_cpld_leds
+ &pmx_sysrst>;
+
+ pmx_spi: pmx-spi {
+ marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
+ marvell,function = "spi";
+ };
+
+ pmx_i2c: pmx-i2c {
+ marvell,pins = "mpp8", "mpp9";
+ marvell,function = "twsi0";
+ };
+
+ pmx_uart: pmx-uart {
+ marvell,pins = "mpp10", "mpp11";
+ marvell,function = "uart0";
+ };
+
+ pmx_leds: pmx-leds {
+ marvell,pins = "mpp12";
+ marvell,function = "gpo";
+ };
+
+ pmx_keys: pmx-keys {
+ marvell,pins = "mpp13", "mpp15", "mpp34";
+ marvell,function = "gpio";
+ };
+
+ pmx_poweroff: pmx-poweroff {
+ marvell,pins = "mpp7";
+ marvell,function = "gpo";
+ };
+
+ pmx_sata_power: pmx-sata-power {
+ marvell,pins = "mpp16";
+ marvell,function = "gpio";
+ };
+
+ pmx_sata: pmx-sata {
+ marvell,pins = "mpp21";
+ marvell,function = "sata0";
+ };
+
+ pmx_sata: pmx-sata {
+ marvell,pins = "mpp14", "mpp24", "mpp26", "mpp28";
+ marvell,function = "gpio";
+ };
+
+ pmx_sysrst: pmx-sysrst {
+ marvell,pins = "mpp6"
+ marvell,function = "sysrst";
+ };
+
+ pmx_inhibit_poweroff: pmx-inhibit-poweroff {
+ marvell,pins = "mpp35"
+ marvell,function = "gpio";
+ };
+
+ pmx_cpld_leds: pmx-cpld-leds {
+ marvell,pins = "mpp29", "mpp30";
+ marvell,function = "gpio";
+ };
+ };
+
+ spi at 10600 {
+ status = "okay";
+ pinctrl-0 = <&pmx_spi>;
+ pinctrl-names = "default";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l4005a";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ mode = <0>;
+
+ partition at 0 {
+ reg = <0x0 0x80000>;
+ label = "u-boot";
+ };
+ };
+ };
+
+ i2c at 11000 {
+ status = "okay";
+ pinctrl-0 = <&pmx_i2c>;
+ pinctrl-names = "default";
+
+ eeprom at 50 {
+ compatible = "at,24c04";
+ pagesize = <16>;
+ reg = <0x50>;
+ };
+ };
+
+ serial at 12000 {
+ status = "ok";
+ pinctrl-0 = <&pmx_uart>;
+ pinctrl-names = "default";
+ };
+
+ sata at 80000 {
+ nr-ports = <2>;
+ status = "okay";
+ pinctrl-0 = <&pmx_sata>;
+ pinctrl-names = "default";
+ };
+
+ ehci at 50000 {
+ pinctrl-0 = <&pmx_usb>;
+ pinctrl-names = "default";
+ };
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_keys>;
+ pinctrl-names = "default";
+
+ button at 1 {
+ label = "Back power switch (on|auto)";
+ linux,code = <1>;
+ linux,input-type = <5>; /* EV_SW */
+ gpios = <&gpio0 13 0>;
+ };
+
+ button at 2 {
+ label = "Back power switch (auto|off)";
+ linux,code = <2>;
+ linux,input-type = <5>; /* EV_SW */
+ gpios = <&gpio0 15 0>;
+ };
+
+ button at 3 {
+ label = "Front Push Button";
+ linux,code = <116>; /* KEY_POWER */
+ gpios = <&gpio1 2 1>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-0 = <&pmx_led>;
+ pinctrl-names = "default";
+
+ fail {
+ label = "d2net_v2:red:fail";
+ gpios = <&gpio0 12 0>;
+ default-state = "on";
+ };
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ pinctrl-0 = <&pmx_poweroff>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 7 0>;
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ pinctrl-0 = <&pmx_sata_power>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sata0_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA0 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 16 0>;
+ };
+ };
+};
+
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index b634f96..cb0c197 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_D2NET_V2
- bool "LaCie d2 Network v2 NAS Board"
- help
- Say 'Y' here if you want your kernel to support the
- LaCie d2 Network v2 NAS.
-
config MACH_DOCKSTAR
bool "Seagate FreeAgent DockStar"
help
@@ -146,6 +140,13 @@ config MACH_CLOUDBOX_DT
Say 'Y' here if you want your kernel to support the LaCie
CloudBox NAS, using Flattened Device Tree.
+config MACH_D2NET_V2_DT
+ bool "LaCie d2 Network v2 NAS Board (Flattened Device Tree)"
+ select ARCH_KIRKWOOD_DT
+ help
+ Say 'Y' here if you want your kernel to support the
+ LaCie d2 Network v2 NAS, using Flattened Device Tree.
+
config MACH_DB88F628X_BP_DT
bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)"
help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index ac4cd75..d204380 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,6 +1,5 @@
obj-y += common.o irq.o pcie.o mpp.o
-obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
@@ -20,6 +19,7 @@ obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o
+obj-$(CONFIG_MACH_D2NET_V2_DT) += board-d2net_v2.o
obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o
obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
diff --git a/arch/arm/mach-kirkwood/board-d2net_v2.c b/arch/arm/mach-kirkwood/board-d2net_v2.c
new file mode 100644
index 0000000..8e2c52c
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-d2net_v2.c
@@ -0,0 +1,72 @@
+/*
+ * arch/arm/mach-kirkwood/d2net_v2-setup.c
+ *
+ * LaCie d2 Network Space v2 Board Setup
+ *
+ * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/mv643xx_eth.h>
+#include <asm/mach/arch.h>
+#include <mach/kirkwood.h>
+#include <linux/platform_data/leds-kirkwood-ns2.h>
+#include "common.h"
+
+/*****************************************************************************
+ * Ethernet
+ ****************************************************************************/
+
+static struct mv643xx_eth_platform_data d2net_v2_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_ADDR(8),
+};
+
+/*****************************************************************************
+ * Dual-GPIO CPLD LEDs
+ ****************************************************************************/
+
+#define D2NET_V2_GPIO_BLUE_LED_SLOW 29
+#define D2NET_V2_GPIO_BLUE_LED_CMD 30
+
+static struct ns2_led d2net_v2_led_pins[] = {
+ {
+ .name = "d2net_v2:blue:sata",
+ .cmd = D2NET_V2_GPIO_BLUE_LED_CMD,
+ .slow = D2NET_V2_GPIO_BLUE_LED_SLOW,
+ },
+};
+
+static struct ns2_led_platform_data d2net_v2_leds_data = {
+ .num_leds = ARRAY_SIZE(d2net_v2_led_pins),
+ .leds = d2net_v2_led_pins,
+};
+
+static struct platform_device d2net_v2_leds = {
+ .name = "leds-ns2",
+ .id = -1,
+ .dev = {
+ .platform_data = &d2net_v2_leds_data,
+ },
+};
+
+void __init d2net_v2_init(void)
+{
+ kirkwood_ge00_init(&d2net_v2_ge00_data);
+ platform_device_register(&d2net_v2_leds);
+}
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 6e122ed..5b410a5 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -146,6 +146,9 @@ static void __init kirkwood_dt_init(void)
of_machine_is_compatible("lacie,netspace_v2"))
ns2_init();
+ if (of_machine_is_compatible("lacie,d2net_v2"))
+ d2net_v2_init();
+
if (of_machine_is_compatible("marvell,db-88f6281-bp") ||
of_machine_is_compatible("marvell,db-88f6282-bp"))
db88f628x_init();
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index fcf3ba6..c306ca3 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -80,6 +80,12 @@ void qnap_dt_ts219_init(void);
static inline void qnap_dt_ts219_init(void) {};
#endif
+#ifdef CONFIG_MACH_D2NET_V2_DT
+void d2net_v2_init(void);
+#else
+static inline void d2net_v2_init(void) {};
+#endif
+
#ifdef CONFIG_MACH_DLINK_KIRKWOOD_DT
void dnskw_init(void);
#else
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c
deleted file mode 100644
index 4534180..0000000
--- a/arch/arm/mach-kirkwood/d2net_v2-setup.c
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/d2net_v2-setup.c
- *
- * LaCie d2 Network Space v2 Board Setup
- *
- * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/ata_platform.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/input.h>
-#include <linux/gpio.h>
-#include <linux/gpio_keys.h>
-#include <linux/leds.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <mach/kirkwood.h>
-#include <linux/platform_data/leds-kirkwood-ns2.h>
-#include "common.h"
-#include "mpp.h"
-#include "lacie_v2-common.h"
-
-/*****************************************************************************
- * Ethernet
- ****************************************************************************/
-
-static struct mv643xx_eth_platform_data d2net_v2_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(8),
-};
-
-/*****************************************************************************
- * SATA
- ****************************************************************************/
-
-static struct mv_sata_platform_data d2net_v2_sata_data = {
- .n_ports = 2,
-};
-
-/*****************************************************************************
- * GPIO keys
- ****************************************************************************/
-
-#define D2NET_V2_GPIO_PUSH_BUTTON 34
-#define D2NET_V2_GPIO_POWER_SWITCH_ON 13
-#define D2NET_V2_GPIO_POWER_SWITCH_OFF 15
-
-#define D2NET_V2_SWITCH_POWER_ON 0x1
-#define D2NET_V2_SWITCH_POWER_OFF 0x2
-
-static struct gpio_keys_button d2net_v2_buttons[] = {
- [0] = {
- .type = EV_SW,
- .code = D2NET_V2_SWITCH_POWER_ON,
- .gpio = D2NET_V2_GPIO_POWER_SWITCH_ON,
- .desc = "Back power switch (on|auto)",
- .active_low = 0,
- },
- [1] = {
- .type = EV_SW,
- .code = D2NET_V2_SWITCH_POWER_OFF,
- .gpio = D2NET_V2_GPIO_POWER_SWITCH_OFF,
- .desc = "Back power switch (auto|off)",
- .active_low = 0,
- },
- [2] = {
- .code = KEY_POWER,
- .gpio = D2NET_V2_GPIO_PUSH_BUTTON,
- .desc = "Front Push Button",
- .active_low = 1,
- },
-};
-
-static struct gpio_keys_platform_data d2net_v2_button_data = {
- .buttons = d2net_v2_buttons,
- .nbuttons = ARRAY_SIZE(d2net_v2_buttons),
-};
-
-static struct platform_device d2net_v2_gpio_buttons = {
- .name = "gpio-keys",
- .id = -1,
- .dev = {
- .platform_data = &d2net_v2_button_data,
- },
-};
-
-/*****************************************************************************
- * GPIO LEDs
- ****************************************************************************/
-
-#define D2NET_V2_GPIO_RED_LED 12
-
-static struct gpio_led d2net_v2_gpio_led_pins[] = {
- {
- .name = "d2net_v2:red:fail",
- .gpio = D2NET_V2_GPIO_RED_LED,
- },
-};
-
-static struct gpio_led_platform_data d2net_v2_gpio_leds_data = {
- .num_leds = ARRAY_SIZE(d2net_v2_gpio_led_pins),
- .leds = d2net_v2_gpio_led_pins,
-};
-
-static struct platform_device d2net_v2_gpio_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &d2net_v2_gpio_leds_data,
- },
-};
-
-/*****************************************************************************
- * Dual-GPIO CPLD LEDs
- ****************************************************************************/
-
-#define D2NET_V2_GPIO_BLUE_LED_SLOW 29
-#define D2NET_V2_GPIO_BLUE_LED_CMD 30
-
-static struct ns2_led d2net_v2_led_pins[] = {
- {
- .name = "d2net_v2:blue:sata",
- .cmd = D2NET_V2_GPIO_BLUE_LED_CMD,
- .slow = D2NET_V2_GPIO_BLUE_LED_SLOW,
- },
-};
-
-static struct ns2_led_platform_data d2net_v2_leds_data = {
- .num_leds = ARRAY_SIZE(d2net_v2_led_pins),
- .leds = d2net_v2_led_pins,
-};
-
-static struct platform_device d2net_v2_leds = {
- .name = "leds-ns2",
- .id = -1,
- .dev = {
- .platform_data = &d2net_v2_leds_data,
- },
-};
-
-/*****************************************************************************
- * General Setup
- ****************************************************************************/
-
-static unsigned int d2net_v2_mpp_config[] __initdata = {
- MPP0_SPI_SCn,
- MPP1_SPI_MOSI,
- MPP2_SPI_SCK,
- MPP3_SPI_MISO,
- MPP6_SYSRST_OUTn,
- MPP7_GPO, /* Request power-off */
- MPP8_TW0_SDA,
- MPP9_TW0_SCK,
- MPP10_UART0_TXD,
- MPP11_UART0_RXD,
- MPP12_GPO, /* Red led */
- MPP13_GPIO, /* Rear power switch (on|auto) */
- MPP14_GPIO, /* USB fuse */
- MPP15_GPIO, /* Rear power switch (auto|off) */
- MPP16_GPIO, /* SATA 0 power */
- MPP21_SATA0_ACTn,
- MPP24_GPIO, /* USB mode select */
- MPP26_GPIO, /* USB device vbus */
- MPP28_GPIO, /* USB enable host vbus */
- MPP29_GPIO, /* Blue led (slow register) */
- MPP30_GPIO, /* Blue led (command register) */
- MPP34_GPIO, /* Power button (1 = Released, 0 = Pushed) */
- MPP35_GPIO, /* Inhibit power-off */
- 0
-};
-
-#define D2NET_V2_GPIO_POWER_OFF 7
-
-static void d2net_v2_power_off(void)
-{
- gpio_set_value(D2NET_V2_GPIO_POWER_OFF, 1);
-}
-
-static void __init d2net_v2_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- kirkwood_mpp_conf(d2net_v2_mpp_config);
-
- lacie_v2_hdd_power_init(1);
-
- kirkwood_ehci_init();
- kirkwood_ge00_init(&d2net_v2_ge00_data);
- kirkwood_sata_init(&d2net_v2_sata_data);
- kirkwood_uart0_init();
- lacie_v2_register_flash();
- lacie_v2_register_i2c_devices();
-
- platform_device_register(&d2net_v2_leds);
- platform_device_register(&d2net_v2_gpio_leds);
- platform_device_register(&d2net_v2_gpio_buttons);
-
- if (gpio_request(D2NET_V2_GPIO_POWER_OFF, "power-off") == 0 &&
- gpio_direction_output(D2NET_V2_GPIO_POWER_OFF, 0) == 0)
- pm_power_off = d2net_v2_power_off;
- else
- pr_err("d2net_v2: failed to configure power-off GPIO\n");
-}
-
-MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
- .atag_offset = 0x100,
- .init_machine = d2net_v2_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/9] ARM: kirkwood: remove support for legacy booting of Dockstar
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 1/9] ARM: kirkwood: convert d2net_v2 " Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 3/9] ARM: kirkwood: remove support for legacy booting of Guruplug Thomas Petazzoni
` (7 subsequent siblings)
9 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
The Kirkwood Dockstar platform has already been converted to the
Device Tree, so we can remove the legacy booting option for this
platform.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-kirkwood/Kconfig | 6 --
arch/arm/mach-kirkwood/Makefile | 1 -
arch/arm/mach-kirkwood/dockstar-setup.c | 111 --------------------------------
3 files changed, 118 deletions(-)
delete mode 100644 arch/arm/mach-kirkwood/dockstar-setup.c
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index cb0c197..9d056cd 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_DOCKSTAR
- bool "Seagate FreeAgent DockStar"
- help
- Say 'Y' here if you want your kernel to support the
- Seagate FreeAgent DockStar.
-
config MACH_ESATA_SHEEVAPLUG
bool "Marvell eSATA SheevaPlug Reference Board"
help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index d204380..13f7ab1 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,6 +1,5 @@
obj-y += common.o irq.o pcie.o mpp.o
-obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o
diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
deleted file mode 100644
index 060ccf9..0000000
--- a/arch/arm/mach-kirkwood/dockstar-setup.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/dockstar-setup.c
- *
- * Seagate FreeAgent DockStar Setup
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/ata_platform.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/gpio.h>
-#include <linux/leds.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <mach/kirkwood.h>
-#include "common.h"
-#include "mpp.h"
-
-static struct mtd_partition dockstar_nand_parts[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = SZ_1M
- }, {
- .name = "uImage",
- .offset = MTDPART_OFS_NXTBLK,
- .size = SZ_4M
- }, {
- .name = "root",
- .offset = MTDPART_OFS_NXTBLK,
- .size = MTDPART_SIZ_FULL
- },
-};
-
-static struct mv643xx_eth_platform_data dockstar_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(0),
-};
-
-static struct gpio_led dockstar_led_pins[] = {
- {
- .name = "dockstar:green:health",
- .default_trigger = "default-on",
- .gpio = 46,
- .active_low = 1,
- },
- {
- .name = "dockstar:orange:misc",
- .default_trigger = "none",
- .gpio = 47,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data dockstar_led_data = {
- .leds = dockstar_led_pins,
- .num_leds = ARRAY_SIZE(dockstar_led_pins),
-};
-
-static struct platform_device dockstar_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &dockstar_led_data,
- }
-};
-
-static unsigned int dockstar_mpp_config[] __initdata = {
- MPP29_GPIO, /* USB Power Enable */
- MPP46_GPIO, /* LED green */
- MPP47_GPIO, /* LED orange */
- 0
-};
-
-static void __init dockstar_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
-
- /* setup gpio pin select */
- kirkwood_mpp_conf(dockstar_mpp_config);
-
- kirkwood_uart0_init();
- kirkwood_nand_init(ARRAY_AND_SIZE(dockstar_nand_parts), 25);
-
- if (gpio_request(29, "USB Power Enable") != 0 ||
- gpio_direction_output(29, 1) != 0)
- pr_err("can't set up GPIO 29 (USB Power Enable)\n");
- kirkwood_ehci_init();
-
- kirkwood_ge00_init(&dockstar_ge00_data);
-
- platform_device_register(&dockstar_leds);
-}
-
-MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
- .atag_offset = 0x100,
- .init_machine = dockstar_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/9] ARM: kirkwood: remove support for legacy booting of Guruplug
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 1/9] ARM: kirkwood: convert d2net_v2 " Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 2/9] ARM: kirkwood: remove support for legacy booting of Dockstar Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 4/9] ARM: kirkwood: remove support for legacy booting of Sheevaplug Thomas Petazzoni
` (6 subsequent siblings)
9 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
The Kirkwood Guruplug platform has already been converted to the
Device Tree, so we can remove the legacy booting option for this
platform.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-kirkwood/Kconfig | 6 --
arch/arm/mach-kirkwood/Makefile | 1 -
arch/arm/mach-kirkwood/guruplug-setup.c | 133 --------------------------------
3 files changed, 140 deletions(-)
delete mode 100644 arch/arm/mach-kirkwood/guruplug-setup.c
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 9d056cd..9aad378 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -8,12 +8,6 @@ config MACH_ESATA_SHEEVAPLUG
Say 'Y' here if you want your kernel to support the
Marvell eSATA SheevaPlug Reference Board.
-config MACH_GURUPLUG
- bool "Marvell GuruPlug Reference Board"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell GuruPlug Reference Board.
-
config MACH_INETSPACE_V2
bool "LaCie Internet Space v2 NAS Board"
help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 13f7ab1..c3ccbf7 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,7 +1,6 @@
obj-y += common.o irq.o pcie.o mpp.o
obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
-obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_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
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
deleted file mode 100644
index 08dd739..0000000
--- a/arch/arm/mach-kirkwood/guruplug-setup.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/guruplug-setup.c
- *
- * Marvell GuruPlug Reference Board Setup
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/partitions.h>
-#include <linux/ata_platform.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/gpio.h>
-#include <linux/leds.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <mach/kirkwood.h>
-#include <linux/platform_data/mmc-mvsdio.h>
-#include "common.h"
-#include "mpp.h"
-
-static struct mtd_partition guruplug_nand_parts[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = SZ_1M
- }, {
- .name = "uImage",
- .offset = MTDPART_OFS_NXTBLK,
- .size = SZ_4M
- }, {
- .name = "root",
- .offset = MTDPART_OFS_NXTBLK,
- .size = MTDPART_SIZ_FULL
- },
-};
-
-static struct mv643xx_eth_platform_data guruplug_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(0),
-};
-
-static struct mv643xx_eth_platform_data guruplug_ge01_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(1),
-};
-
-static struct mv_sata_platform_data guruplug_sata_data = {
- .n_ports = 1,
-};
-
-static struct mvsdio_platform_data guruplug_mvsdio_data = {
- /* unfortunately the CD signal has not been connected */
- .gpio_card_detect = -1,
- .gpio_write_protect = -1,
-};
-
-static struct gpio_led guruplug_led_pins[] = {
- {
- .name = "guruplug:red:health",
- .gpio = 46,
- .active_low = 1,
- },
- {
- .name = "guruplug:green:health",
- .gpio = 47,
- .active_low = 1,
- },
- {
- .name = "guruplug:red:wmode",
- .gpio = 48,
- .active_low = 1,
- },
- {
- .name = "guruplug:green:wmode",
- .gpio = 49,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data guruplug_led_data = {
- .leds = guruplug_led_pins,
- .num_leds = ARRAY_SIZE(guruplug_led_pins),
-};
-
-static struct platform_device guruplug_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &guruplug_led_data,
- }
-};
-
-static unsigned int guruplug_mpp_config[] __initdata = {
- MPP46_GPIO, /* M_RLED */
- MPP47_GPIO, /* M_GLED */
- MPP48_GPIO, /* B_RLED */
- MPP49_GPIO, /* B_GLED */
- 0
-};
-
-static void __init guruplug_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- kirkwood_mpp_conf(guruplug_mpp_config);
-
- kirkwood_uart0_init();
- kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25);
-
- kirkwood_ehci_init();
- kirkwood_ge00_init(&guruplug_ge00_data);
- kirkwood_ge01_init(&guruplug_ge01_data);
- kirkwood_sata_init(&guruplug_sata_data);
- kirkwood_sdio_init(&guruplug_mvsdio_data);
-
- platform_device_register(&guruplug_leds);
-}
-
-MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
- /* Maintainer: Siddarth Gore <gores@marvell.com> */
- .atag_offset = 0x100,
- .init_machine = guruplug_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/9] ARM: kirkwood: remove support for legacy booting of Sheevaplug
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (2 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 3/9] ARM: kirkwood: remove support for legacy booting of Guruplug Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 5/9] ARM: kirkwood: remove LaCie boards that are supported through DT Thomas Petazzoni
` (5 subsequent siblings)
9 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
The Kirkwood Sheevaplug platform has already been converted to the
Device Tree, so we can remove the legacy booting option for this
platform.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-kirkwood/Kconfig | 12 ---
arch/arm/mach-kirkwood/Makefile | 2 -
arch/arm/mach-kirkwood/sheevaplug-setup.c | 161 ------------------------------
3 files changed, 175 deletions(-)
delete mode 100644 arch/arm/mach-kirkwood/sheevaplug-setup.c
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 9aad378..4f881b8 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_ESATA_SHEEVAPLUG
- bool "Marvell eSATA SheevaPlug Reference Board"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell eSATA SheevaPlug Reference Board.
-
config MACH_INETSPACE_V2
bool "LaCie Internet Space v2 NAS Board"
help
@@ -80,12 +74,6 @@ config MACH_RD88F6281
Say 'Y' here if you want your kernel to support the
Marvell RD-88F6281 Reference Board.
-config MACH_SHEEVAPLUG
- bool "Marvell SheevaPlug Reference Board"
- help
- Say 'Y' here if you want your kernel to support the
- Marvell SheevaPlug Reference Board.
-
config MACH_T5325
bool "HP t5325 Thin Client"
help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index c3ccbf7..9b25ec3 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,6 +1,5 @@
obj-y += common.o irq.o pcie.o mpp.o
-obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_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
@@ -10,7 +9,6 @@ obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
-obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
obj-$(CONFIG_MACH_T5325) += t5325-setup.o
obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
deleted file mode 100644
index 55b68fa..0000000
--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/sheevaplug-setup.c
- *
- * Marvell SheevaPlug Reference Board Setup
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/ata_platform.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/gpio.h>
-#include <linux/leds.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <mach/kirkwood.h>
-#include <linux/platform_data/mmc-mvsdio.h>
-#include "common.h"
-#include "mpp.h"
-
-static struct mtd_partition sheevaplug_nand_parts[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = SZ_1M
- }, {
- .name = "uImage",
- .offset = MTDPART_OFS_NXTBLK,
- .size = SZ_4M
- }, {
- .name = "root",
- .offset = MTDPART_OFS_NXTBLK,
- .size = MTDPART_SIZ_FULL
- },
-};
-
-static struct mv643xx_eth_platform_data sheevaplug_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(0),
-};
-
-static struct mv_sata_platform_data sheeva_esata_sata_data = {
- .n_ports = 2,
-};
-
-static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
- /* unfortunately the CD signal has not been connected */
-};
-
-static struct mvsdio_platform_data sheeva_esata_mvsdio_data = {
- .gpio_write_protect = 44, /* MPP44 used as SD write protect */
- .gpio_card_detect = 47, /* MPP47 used as SD card detect */
-};
-
-static struct gpio_led sheevaplug_led_pins[] = {
- {
- .name = "plug:red:misc",
- .default_trigger = "none",
- .gpio = 46,
- .active_low = 1,
- },
- {
- .name = "plug:green:health",
- .default_trigger = "default-on",
- .gpio = 49,
- .active_low = 1,
- },
-};
-
-static struct gpio_led_platform_data sheevaplug_led_data = {
- .leds = sheevaplug_led_pins,
- .num_leds = ARRAY_SIZE(sheevaplug_led_pins),
-};
-
-static struct platform_device sheevaplug_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &sheevaplug_led_data,
- }
-};
-
-static unsigned int sheevaplug_mpp_config[] __initdata = {
- MPP29_GPIO, /* USB Power Enable */
- MPP46_GPIO, /* LED Red */
- MPP49_GPIO, /* LED */
- 0
-};
-
-static unsigned int sheeva_esata_mpp_config[] __initdata = {
- MPP29_GPIO, /* USB Power Enable */
- MPP44_GPIO, /* SD Write Protect */
- MPP47_GPIO, /* SD Card Detect */
- MPP49_GPIO, /* LED Green */
- 0
-};
-
-static void __init sheevaplug_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
-
- /* setup gpio pin select */
- if (machine_is_esata_sheevaplug())
- kirkwood_mpp_conf(sheeva_esata_mpp_config);
- else
- kirkwood_mpp_conf(sheevaplug_mpp_config);
-
- kirkwood_uart0_init();
- kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25);
-
- if (gpio_request(29, "USB Power Enable") != 0 ||
- gpio_direction_output(29, 1) != 0)
- pr_err("can't set up GPIO 29 (USB Power Enable)\n");
- kirkwood_ehci_init();
-
- kirkwood_ge00_init(&sheevaplug_ge00_data);
-
- /* honor lower power consumption for plugs with out eSATA */
- if (machine_is_esata_sheevaplug())
- kirkwood_sata_init(&sheeva_esata_sata_data);
-
- /* enable sd wp and sd cd on plugs with esata */
- if (machine_is_esata_sheevaplug())
- kirkwood_sdio_init(&sheeva_esata_mvsdio_data);
- else
- kirkwood_sdio_init(&sheevaplug_mvsdio_data);
-
- platform_device_register(&sheevaplug_leds);
-}
-
-#ifdef CONFIG_MACH_SHEEVAPLUG
-MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
- /* Maintainer: shadi Ammouri <shadi@marvell.com> */
- .atag_offset = 0x100,
- .init_machine = sheevaplug_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_ESATA_SHEEVAPLUG
-MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board")
- .atag_offset = 0x100,
- .init_machine = sheevaplug_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/9] ARM: kirkwood: remove LaCie boards that are supported through DT
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (3 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 4/9] ARM: kirkwood: remove support for legacy booting of Sheevaplug Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 6/9] ARM: kirkwood: convert the mv88f6281gtw_ge board to DT Thomas Petazzoni
` (4 subsequent siblings)
9 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
The "LaCie Internet Space v2 NAS Board", "LaCie Network Space Max v2
NAS Board" and "LaCie Network Space v2 NAS Board" boards are all
supported through the Device Tree.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-kirkwood/Kconfig | 18 --
arch/arm/mach-kirkwood/Makefile | 3 -
arch/arm/mach-kirkwood/netspace_v2-setup.c | 293 -----------------------------
3 files changed, 314 deletions(-)
delete mode 100644 arch/arm/mach-kirkwood/netspace_v2-setup.c
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 4f881b8..530d273 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_INETSPACE_V2
- bool "LaCie Internet Space v2 NAS Board"
- help
- Say 'Y' here if you want your kernel to support the
- LaCie Internet Space v2 NAS.
-
config MACH_MV88F6281GTW_GE
bool "Marvell 88F6281 GTW GE Board"
help
@@ -26,18 +20,6 @@ config MACH_NET5BIG_V2
Say 'Y' here if you want your kernel to support the
LaCie 5Big Network v2 NAS.
-config MACH_NETSPACE_MAX_V2
- bool "LaCie Network Space Max v2 NAS Board"
- help
- Say 'Y' here if you want your kernel to support the
- LaCie Network Space Max v2 NAS.
-
-config MACH_NETSPACE_V2
- bool "LaCie Network Space v2 NAS Board"
- help
- Say 'Y' here if you want your kernel to support the
- LaCie Network Space v2 NAS.
-
config MACH_OPENRD
bool
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 9b25ec3..6c52299 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,11 +1,8 @@
obj-y += common.o irq.o pcie.o mpp.o
-obj-$(CONFIG_MACH_INETSPACE_V2) += netspace_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_NETSPACE_MAX_V2) += netspace_v2-setup.o lacie_v2-common.o
-obj-$(CONFIG_MACH_NETSPACE_V2) += netspace_v2-setup.o lacie_v2-common.o
obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
deleted file mode 100644
index 3b70661..0000000
--- a/arch/arm/mach-kirkwood/netspace_v2-setup.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/netspace_v2-setup.c
- *
- * LaCie Network Space v2 board setup
- *
- * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
- * Copyright (C) 2009 Beno??t Canet <benoit.canet@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/ata_platform.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/input.h>
-#include <linux/gpio.h>
-#include <linux/gpio_keys.h>
-#include <linux/leds.h>
-#include <linux/gpio-fan.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <mach/kirkwood.h>
-#include <linux/platform_data/leds-kirkwood-ns2.h>
-#include "common.h"
-#include "mpp.h"
-#include "lacie_v2-common.h"
-
-/*****************************************************************************
- * Ethernet
- ****************************************************************************/
-
-static struct mv643xx_eth_platform_data netspace_v2_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(8),
-};
-
-/*****************************************************************************
- * SATA
- ****************************************************************************/
-
-static struct mv_sata_platform_data netspace_v2_sata_data = {
- .n_ports = 2,
-};
-
-/*****************************************************************************
- * GPIO keys
- ****************************************************************************/
-
-#define NETSPACE_V2_PUSH_BUTTON 32
-
-static struct gpio_keys_button netspace_v2_buttons[] = {
- [0] = {
- .code = KEY_POWER,
- .gpio = NETSPACE_V2_PUSH_BUTTON,
- .desc = "Power push button",
- .active_low = 0,
- },
-};
-
-static struct gpio_keys_platform_data netspace_v2_button_data = {
- .buttons = netspace_v2_buttons,
- .nbuttons = ARRAY_SIZE(netspace_v2_buttons),
-};
-
-static struct platform_device netspace_v2_gpio_buttons = {
- .name = "gpio-keys",
- .id = -1,
- .dev = {
- .platform_data = &netspace_v2_button_data,
- },
-};
-
-/*****************************************************************************
- * GPIO LEDs
- ****************************************************************************/
-
-#define NETSPACE_V2_GPIO_RED_LED 12
-
-static struct gpio_led netspace_v2_gpio_led_pins[] = {
- {
- .name = "ns_v2:red:fail",
- .gpio = NETSPACE_V2_GPIO_RED_LED,
- },
-};
-
-static struct gpio_led_platform_data netspace_v2_gpio_leds_data = {
- .num_leds = ARRAY_SIZE(netspace_v2_gpio_led_pins),
- .leds = netspace_v2_gpio_led_pins,
-};
-
-static struct platform_device netspace_v2_gpio_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &netspace_v2_gpio_leds_data,
- },
-};
-
-/*****************************************************************************
- * Dual-GPIO CPLD LEDs
- ****************************************************************************/
-
-#define NETSPACE_V2_GPIO_BLUE_LED_SLOW 29
-#define NETSPACE_V2_GPIO_BLUE_LED_CMD 30
-
-static struct ns2_led netspace_v2_led_pins[] = {
- {
- .name = "ns_v2:blue:sata",
- .cmd = NETSPACE_V2_GPIO_BLUE_LED_CMD,
- .slow = NETSPACE_V2_GPIO_BLUE_LED_SLOW,
- },
-};
-
-static struct ns2_led_platform_data netspace_v2_leds_data = {
- .num_leds = ARRAY_SIZE(netspace_v2_led_pins),
- .leds = netspace_v2_led_pins,
-};
-
-static struct platform_device netspace_v2_leds = {
- .name = "leds-ns2",
- .id = -1,
- .dev = {
- .platform_data = &netspace_v2_leds_data,
- },
-};
-
-/*****************************************************************************
- * GPIO fan
- ****************************************************************************/
-
-/* Designed for fan 40x40x16: ADDA AD0412LB-D50 6000rpm at 12v */
-static struct gpio_fan_speed netspace_max_v2_fan_speed[] = {
- { 0, 0 },
- { 1500, 15 },
- { 1700, 14 },
- { 1800, 13 },
- { 2100, 12 },
- { 3100, 11 },
- { 3300, 10 },
- { 4300, 9 },
- { 5500, 8 },
-};
-
-static unsigned netspace_max_v2_fan_ctrl[] = { 22, 7, 33, 23 };
-
-static struct gpio_fan_alarm netspace_max_v2_fan_alarm = {
- .gpio = 25,
- .active_low = 1,
-};
-
-static struct gpio_fan_platform_data netspace_max_v2_fan_data = {
- .num_ctrl = ARRAY_SIZE(netspace_max_v2_fan_ctrl),
- .ctrl = netspace_max_v2_fan_ctrl,
- .alarm = &netspace_max_v2_fan_alarm,
- .num_speed = ARRAY_SIZE(netspace_max_v2_fan_speed),
- .speed = netspace_max_v2_fan_speed,
-};
-
-static struct platform_device netspace_max_v2_gpio_fan = {
- .name = "gpio-fan",
- .id = -1,
- .dev = {
- .platform_data = &netspace_max_v2_fan_data,
- },
-};
-
-/*****************************************************************************
- * General Setup
- ****************************************************************************/
-
-static unsigned int netspace_v2_mpp_config[] __initdata = {
- MPP0_SPI_SCn,
- MPP1_SPI_MOSI,
- MPP2_SPI_SCK,
- MPP3_SPI_MISO,
- MPP4_NF_IO6,
- MPP5_NF_IO7,
- MPP6_SYSRST_OUTn,
- MPP7_GPO, /* Fan speed (bit 1) */
- MPP8_TW0_SDA,
- MPP9_TW0_SCK,
- MPP10_UART0_TXD,
- MPP11_UART0_RXD,
- MPP12_GPO, /* Red led */
- MPP14_GPIO, /* USB fuse */
- MPP16_GPIO, /* SATA 0 power */
- MPP17_GPIO, /* SATA 1 power */
- MPP18_NF_IO0,
- MPP19_NF_IO1,
- MPP20_SATA1_ACTn,
- MPP21_SATA0_ACTn,
- MPP22_GPIO, /* Fan speed (bit 0) */
- MPP23_GPIO, /* Fan power */
- MPP24_GPIO, /* USB mode select */
- MPP25_GPIO, /* Fan rotation fail */
- MPP26_GPIO, /* USB device vbus */
- MPP28_GPIO, /* USB enable host vbus */
- MPP29_GPIO, /* Blue led (slow register) */
- MPP30_GPIO, /* Blue led (command register) */
- MPP31_GPIO, /* Board power off */
- MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */
- MPP33_GPO, /* Fan speed (bit 2) */
- 0
-};
-
-#define NETSPACE_V2_GPIO_POWER_OFF 31
-
-static void netspace_v2_power_off(void)
-{
- gpio_set_value(NETSPACE_V2_GPIO_POWER_OFF, 1);
-}
-
-static void __init netspace_v2_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- kirkwood_mpp_conf(netspace_v2_mpp_config);
-
- if (machine_is_netspace_max_v2())
- lacie_v2_hdd_power_init(2);
- else
- lacie_v2_hdd_power_init(1);
-
- kirkwood_ehci_init();
- kirkwood_ge00_init(&netspace_v2_ge00_data);
- kirkwood_sata_init(&netspace_v2_sata_data);
- kirkwood_uart0_init();
- lacie_v2_register_flash();
- lacie_v2_register_i2c_devices();
-
- platform_device_register(&netspace_v2_leds);
- platform_device_register(&netspace_v2_gpio_leds);
- platform_device_register(&netspace_v2_gpio_buttons);
- if (machine_is_netspace_max_v2())
- platform_device_register(&netspace_max_v2_gpio_fan);
-
- if (gpio_request(NETSPACE_V2_GPIO_POWER_OFF, "power-off") == 0 &&
- gpio_direction_output(NETSPACE_V2_GPIO_POWER_OFF, 0) == 0)
- pm_power_off = netspace_v2_power_off;
- else
- pr_err("netspace_v2: failed to configure power-off GPIO\n");
-}
-
-#ifdef CONFIG_MACH_NETSPACE_V2
-MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
- .atag_offset = 0x100,
- .init_machine = netspace_v2_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_INETSPACE_V2
-MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2")
- .atag_offset = 0x100,
- .init_machine = netspace_v2_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_NETSPACE_MAX_V2
-MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2")
- .atag_offset = 0x100,
- .init_machine = netspace_v2_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/9] ARM: kirkwood: convert the mv88f6281gtw_ge board to DT
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (4 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 5/9] ARM: kirkwood: remove LaCie boards that are supported through DT Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 7/9] ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms " Thomas Petazzoni
` (3 subsequent siblings)
9 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 125 ++++++++++++++++++
arch/arm/mach-kirkwood/Kconfig | 13 +-
arch/arm/mach-kirkwood/Makefile | 2 +-
arch/arm/mach-kirkwood/board-dt.c | 4 +
arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c | 50 +++++++
arch/arm/mach-kirkwood/common.h | 6 +
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | 172 -------------------------
8 files changed, 194 insertions(+), 179 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
create mode 100644 arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
delete mode 100644 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 641b3c9..8e7fec4 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -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 \
diff --git a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
new file mode 100644
index 0000000..13e3576
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
@@ -0,0 +1,125 @@
+/*
+ * 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 at f1000000 {
+ pinctrl at 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 at 10600 {
+ pinctrl-0 = <&pmx_spi>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l12805d";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ mode = <0>;
+ };
+ };
+
+ serial at 12000 {
+ pinctrl-0 = <&pmx_uart0>;
+ pinctrl-names = "default";
+ clock-frequency = <200000000>;
+ status = "ok";
+ };
+
+ ehci at 50000 {
+ status = "okay";
+ };
+
+ pcie-controller {
+ status = "okay";
+
+ pcie at 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 at 1 {
+ label = "SWR Button";
+ linux,code = <0x198>; /* KEY_RESTART */
+ gpios = <&gpio1 15 1>;
+ };
+ button at 2 {
+ label = "WPS Button";
+ linux,code = <0x211>; /* KEY_WPS_BUTTON */
+ gpios = <&gpio1 14 1>;
+ };
+ };
+};
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 530d273..5c207a8 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_MV88F6281GTW_GE
- bool "Marvell 88F6281 GTW GE Board"
- 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"
help
@@ -199,6 +193,13 @@ config MACH_MPLCEC4_DT
Say 'Y' here if you want your kernel to support the
MPL CEC4 (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).
+
config MACH_NETSPACE_LITE_V2_DT
bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 6c52299..d0bd566 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,6 +1,5 @@
obj-y += common.o irq.o pcie.o mpp.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
@@ -26,6 +25,7 @@ obj-$(CONFIG_MACH_IOMEGA_IX2_200_DT) += board-iomega_ix2_200.o
obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
+obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o
obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 5b410a5..ea77425 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -153,6 +153,9 @@ static void __init kirkwood_dt_init(void)
of_machine_is_compatible("marvell,db-88f6282-bp"))
db88f628x_init();
+ if (of_machine_is_compatible("marvell,mv88f6281gtw-ge"))
+ mv88f6281gtw_ge_init();
+
if (of_machine_is_compatible("mpl,cec4"))
mplcec4_init();
@@ -190,6 +193,7 @@ static const char * const kirkwood_dt_board_compat[] = {
"lacie,netspace_v2",
"marvell,db-88f6281-bp",
"marvell,db-88f6282-bp",
+ "marvell,mv88f6281gtw-ge",
"mpl,cec4",
"netgear,readynas-duo-v2",
"plathome,openblocks-a6",
diff --git a/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
new file mode 100644
index 0000000..f7c952c
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c
@@ -0,0 +1,50 @@
+/*
+ * arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+ *
+ * Marvell 88F6281 GTW GE Board Setup
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/irq.h>
+#include <linux/timer.h>
+#include <linux/mv643xx_eth.h>
+#include <linux/ethtool.h>
+#include <linux/gpio.h>
+#include <net/dsa.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/pci.h>
+#include <mach/kirkwood.h>
+#include "common.h"
+
+static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = {
+ .phy_addr = MV643XX_ETH_PHY_NONE,
+ .speed = SPEED_1000,
+ .duplex = DUPLEX_FULL,
+};
+
+static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = {
+ .port_names[0] = "lan1",
+ .port_names[1] = "lan2",
+ .port_names[2] = "lan3",
+ .port_names[3] = "lan4",
+ .port_names[4] = "wan",
+ .port_names[5] = "cpu",
+};
+
+static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = {
+ .nr_chips = 1,
+ .chip = &mv88f6281gtw_ge_switch_chip_data,
+};
+
+void __init mv88f6281gtw_ge_init(void)
+{
+ kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data);
+ kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ);
+}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index c306ca3..44faaa2 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -156,6 +156,12 @@ void ns2_init(void);
static inline void ns2_init(void) {};
#endif
+#ifdef CONFIG_MACH_MV88F6281GTW_GE_DT
+void mv88f6281gtw_ge_init(void);
+#else
+static inline void mv88f6281gtw_ge_init(void) {};
+#endif
+
#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
void openblocks_a6_init(void);
#else
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
deleted file mode 100644
index ba384b9..0000000
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
- *
- * Marvell 88F6281 GTW GE Board Setup
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/pci.h>
-#include <linux/irq.h>
-#include <linux/mtd/physmap.h>
-#include <linux/timer.h>
-#include <linux/mv643xx_eth.h>
-#include <linux/ethtool.h>
-#include <linux/gpio.h>
-#include <linux/leds.h>
-#include <linux/input.h>
-#include <linux/gpio_keys.h>
-#include <linux/spi/flash.h>
-#include <linux/spi/spi.h>
-#include <net/dsa.h>
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-#include <asm/mach/pci.h>
-#include <mach/kirkwood.h>
-#include "common.h"
-#include "mpp.h"
-
-static struct mv643xx_eth_platform_data mv88f6281gtw_ge_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_NONE,
- .speed = SPEED_1000,
- .duplex = DUPLEX_FULL,
-};
-
-static struct dsa_chip_data mv88f6281gtw_ge_switch_chip_data = {
- .port_names[0] = "lan1",
- .port_names[1] = "lan2",
- .port_names[2] = "lan3",
- .port_names[3] = "lan4",
- .port_names[4] = "wan",
- .port_names[5] = "cpu",
-};
-
-static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = {
- .nr_chips = 1,
- .chip = &mv88f6281gtw_ge_switch_chip_data,
-};
-
-static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
- .type = "mx25l12805d",
-};
-
-static struct spi_board_info __initdata mv88f6281gtw_ge_spi_slave_info[] = {
- {
- .modalias = "m25p80",
- .platform_data = &mv88f6281gtw_ge_spi_slave_data,
- .irq = -1,
- .max_speed_hz = 50000000,
- .bus_num = 0,
- .chip_select = 0,
- },
-};
-
-static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = {
- {
- .code = KEY_RESTART,
- .gpio = 47,
- .desc = "SWR Button",
- .active_low = 1,
- }, {
- .code = KEY_WPS_BUTTON,
- .gpio = 46,
- .desc = "WPS Button",
- .active_low = 1,
- },
-};
-
-static struct gpio_keys_platform_data mv88f6281gtw_ge_button_data = {
- .buttons = mv88f6281gtw_ge_button_pins,
- .nbuttons = ARRAY_SIZE(mv88f6281gtw_ge_button_pins),
-};
-
-static struct platform_device mv88f6281gtw_ge_buttons = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- .dev = {
- .platform_data = &mv88f6281gtw_ge_button_data,
- },
-};
-
-static struct gpio_led mv88f6281gtw_ge_led_pins[] = {
- {
- .name = "gtw:green:Status",
- .gpio = 20,
- .active_low = 0,
- }, {
- .name = "gtw:red:Status",
- .gpio = 21,
- .active_low = 0,
- }, {
- .name = "gtw:green:USB",
- .gpio = 12,
- .active_low = 0,
- },
-};
-
-static struct gpio_led_platform_data mv88f6281gtw_ge_led_data = {
- .leds = mv88f6281gtw_ge_led_pins,
- .num_leds = ARRAY_SIZE(mv88f6281gtw_ge_led_pins),
-};
-
-static struct platform_device mv88f6281gtw_ge_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &mv88f6281gtw_ge_led_data,
- },
-};
-
-static unsigned int mv88f6281gtw_ge_mpp_config[] __initdata = {
- MPP12_GPO, /* Status#_USB pin */
- MPP20_GPIO, /* Status#_GLED pin */
- MPP21_GPIO, /* Status#_RLED pin */
- MPP46_GPIO, /* WPS_Switch pin */
- MPP47_GPIO, /* SW_Init pin */
- 0
-};
-
-static void __init mv88f6281gtw_ge_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- kirkwood_mpp_conf(mv88f6281gtw_ge_mpp_config);
-
- kirkwood_ehci_init();
- kirkwood_ge00_init(&mv88f6281gtw_ge_ge00_data);
- kirkwood_ge00_switch_init(&mv88f6281gtw_ge_switch_plat_data, NO_IRQ);
- spi_register_board_info(mv88f6281gtw_ge_spi_slave_info,
- ARRAY_SIZE(mv88f6281gtw_ge_spi_slave_info));
- kirkwood_spi_init();
- kirkwood_uart0_init();
- platform_device_register(&mv88f6281gtw_ge_leds);
- platform_device_register(&mv88f6281gtw_ge_buttons);
-}
-
-static int __init mv88f6281gtw_ge_pci_init(void)
-{
- if (machine_is_mv88f6281gtw_ge())
- kirkwood_pcie_init(KW_PCIE0);
-
- return 0;
-}
-subsys_initcall(mv88f6281gtw_ge_pci_init);
-
-MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board")
- /* Maintainer: Lennert Buytenhek <buytenh@marvell.com> */
- .atag_offset = 0x100,
- .init_machine = mv88f6281gtw_ge_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 7/9] ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms to DT
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (5 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 6/9] ARM: kirkwood: convert the mv88f6281gtw_ge board to DT Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 9:24 ` Simon Guinot
2013-08-01 8:45 ` [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms Thomas Petazzoni
` (2 subsequent siblings)
9 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boot/dts/kirkwood-net2big-v2.dts | 204 ++++++++++++++++++
arch/arm/boot/dts/kirkwood-net5big-v2.dts | 238 +++++++++++++++++++++
arch/arm/mach-kirkwood/Kconfig | 24 +--
arch/arm/mach-kirkwood/Makefile | 4 +-
.../{netxbig_v2-setup.c => board-netxbig_v2.c} | 213 +-----------------
5 files changed, 459 insertions(+), 224 deletions(-)
create mode 100644 arch/arm/boot/dts/kirkwood-net2big-v2.dts
create mode 100644 arch/arm/boot/dts/kirkwood-net5big-v2.dts
rename arch/arm/mach-kirkwood/{netxbig_v2-setup.c => board-netxbig_v2.c} (53%)
diff --git a/arch/arm/boot/dts/kirkwood-net2big-v2.dts b/arch/arm/boot/dts/kirkwood-net2big-v2.dts
new file mode 100644
index 0000000..06beca9
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-net2big-v2.dts
@@ -0,0 +1,204 @@
+/*
+ * LaCie 2Big Network v2
+ *
+ * Simon Guinot <sguinot@lacie.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.
+ */
+
+/include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
+
+/ {
+ model = "LaCie 2Big Network v2";
+ compatible = "lacie,net2big-v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x20000000>; /* 512 MB */
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+ ocp at f1000000 {
+ pinctrl at 10000 {
+ pinctrl-0 = <&pmx_misc &pmx_sysrst>;
+ pinctrl-names = "default";
+
+ pmx_keys: pmx-keys {
+ marvell,pins = "mpp13", "mpp15", "mpp34";
+ marvell,function = "gpio";
+ };
+
+ pmx_sata_power: pmx-sata-power {
+ marvell,pins = "mpp16", "mpp17";
+ marvell,function = "gpio";
+ };
+
+ pmx_sata1: pmx-sata1 {
+ marvell,pins = "mpp20";
+ marvell,function = "sata1";
+ };
+
+ pmx_sata0: pmx-sata0 {
+ marvell,pins = "mpp21";
+ marvell,function = "sata0";
+ };
+
+ pmx_poweroff: pmx-poweroff {
+ marvell,pins = "mpp7";
+ marvell,function = "gpo";
+ };
+
+ pmx_sysrst: pmx-sysrst {
+ marvell,pins = "mpp6";
+ marvell,function = "sysrst";
+ };
+
+ /*
+ * MPP14: USB fuse alarm
+ * MPP24: USB mode select
+ * MPP26: USB device vbus
+ * MPP28: USB enable host vbus
+ * MPP35: inhibit switch power-off
+ * MPP36: SATA HDD1 presence
+ * MPP37: SATA HDD2 presence
+ * MPP40: eSATA presence
+ * MPP44: GPIO extension (data 0)
+ * MPP45: GPIO extension (data 1)
+ * MPP46: GPIO extension (data 2)
+ * MPP47: GPIO extension (addr 0)
+ * MPP48: GPIO extension (addr 1)
+ * MPP49: GPIO extension (addr 2)
+ */
+ pmx_misc: pmx-misc {
+ marvell,pins = "mpp14", "mpp24", "mpp26", "mpp28", "mpp29",
+ "mpp35", "mpp36", "mpp37", "mpp40", "mpp44",
+ "mpp45", "mpp46", "mpp47", "mpp48", "mpp49";
+ marvell,function = "gpio";
+ };
+ };
+
+ spi at 10600 {
+ status = "okay";
+ pinctrl-0 = <&pmx_spi>;
+ pinctrl-names = "default";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l4005a";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ mode = <0>;
+
+ partition at 0 {
+ reg = <0x0 0x80000>;
+ label = "u-boot";
+ };
+ };
+ };
+
+ i2c at 11000 {
+ status = "okay";
+ pinctrl-0 = <&pmx_i2c>;
+ pinctrl-names = "default";
+
+ eeprom at 50 {
+ compatible = "at,24c04";
+ pagesize = <16>;
+ reg = <0x50>;
+ };
+ };
+
+ serial at 12000 {
+ pinctrl-0 = <&pmx_uart0>;
+ pinctrl-names = "default";
+ clock-frequency = <200000000>;
+ status = "ok";
+ };
+
+ ehci at 50000 {
+ status = "okay";
+ };
+
+ sata at 80000 {
+ pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
+ pinctrl-names = "default";
+ status = "okay";
+ nr-ports = <2>;
+ };
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ pinctrl-0 = <&pmx_poweroff>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 7 0>;
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_keys>;
+ pinctrl-names = "default";
+
+ button at 1 {
+ label = "Back power switch (on|auto)";
+ linux,code = <0x1>;
+ linux,input-type = <5>; /* EV_SW */
+ gpios = <&gpio0 13 1>;
+ };
+ button at 1 {
+ label = "Back power switch (auto|off)";
+ linux,code = <0x2>;
+ linux,input-type = <5>; /* EV_SW */
+ gpios = <&gpio0 15 1>;
+ };
+ button at 1 {
+ label = "Function button";
+ linux,code = <0x165>; /* KEY_OPTION */
+ gpios = <&gpio1 3 1>;
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ pinctrl-0 = <&pmx_sata_power>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sata0_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA0 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 16 0>;
+ };
+
+ sata1_power: regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA1 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 17 0>;
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/kirkwood-net5big-v2.dts b/arch/arm/boot/dts/kirkwood-net5big-v2.dts
new file mode 100644
index 0000000..61dea84
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-net5big-v2.dts
@@ -0,0 +1,238 @@
+/*
+ * LaCie 5Big Network v2
+ *
+ * Simon Guinot <sguinot@lacie.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.
+ */
+
+/include/ "kirkwood.dtsi"
+/include/ "kirkwood-6281.dtsi"
+
+/ {
+ model = "LaCie 5Big Network v2";
+ compatible = "lacie,net5big-v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x20000000>; /* 512 MB */
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ };
+
+ ocp at f1000000 {
+ pinctrl at 10000 {
+ pinctrl-0 = <&pmx_misc &pmx_sysrst>;
+ pinctrl-names = "default";
+
+ pmx_keys: pmx-keys {
+ marvell,pins = "mpp13", "mpp15", "mpp34";
+ marvell,function = "gpio";
+ };
+
+ pmx_sata_power: pmx-sata-power {
+ marvell,pins = "mpp16", "mpp17", "mpp41", "mpp42", "mpp43";
+ marvell,function = "gpio";
+ };
+
+ pmx_poweroff: pmx-poweroff {
+ marvell,pins = "mpp7";
+ marvell,function = "gpo";
+ };
+
+ pmx_sysrst: pmx-sysrst {
+ marvell,pins = "mpp6";
+ marvell,function = "sysrst";
+ };
+
+ /*
+ * MPP14: USB fuse alarm
+ * MPP28: USB enable host vbus
+ * MPP29: GPIO extension ALE
+ * MPP35: inhibit switch power-off
+ * MPP36: SATA HDD1 presence
+ * MPP37: SATA HDD2 presence
+ * MPP38: SATA HDD3 presence
+ * MPP39: SATA HDD4 presence
+ * MPP40: SATA HDD5 presence
+ * MPP44: GPIO extension (data 0)
+ * MPP45: GPIO extension (data 1)
+ * MPP46: GPIO extension (data 2)
+ * MPP47: GPIO extension (addr 0)
+ * MPP48: GPIO extension (addr 1)
+ * MPP49: GPIO extension (addr 2)
+ */
+ pmx_misc: pmx-misc {
+ marvell,pins = "mpp14", "mpp28", "mpp29", "mpp35", "mpp36",
+ "mpp37", "mpp38", "mpp39", "mpp40", "mpp44",
+ "mpp45", "mpp46", "mpp47", "mpp48", "mpp49";
+ marvell,function = "gpio";
+ };
+
+ pmx_ge1: pmx-ge1 {
+ marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23", "mpp24",
+ "mpp25", "mpp26", "mpp27", "mpp30", "mpp31",
+ "mpp32", "mpp33";
+ marvell,function = "ge1";
+ };
+ };
+
+ spi at 10600 {
+ status = "okay";
+ pinctrl-0 = <&pmx_spi>;
+ pinctrl-names = "default";
+
+ flash at 0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "mx25l4005a";
+ reg = <0>;
+ spi-max-frequency = <20000000>;
+ mode = <0>;
+
+ partition at 0 {
+ reg = <0x0 0x80000>;
+ label = "u-boot";
+ };
+ };
+ };
+
+ i2c at 11000 {
+ status = "okay";
+ pinctrl-0 = <&pmx_i2c>;
+ pinctrl-names = "default";
+
+ eeprom at 50 {
+ compatible = "at,24c04";
+ pagesize = <16>;
+ reg = <0x50>;
+ };
+ };
+
+ serial at 12000 {
+ pinctrl-0 = <&pmx_uart0>;
+ pinctrl-names = "default";
+ clock-frequency = <200000000>;
+ status = "ok";
+ };
+
+ ehci at 50000 {
+ status = "okay";
+ };
+
+ sata at 80000 {
+ pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
+ pinctrl-names = "default";
+ status = "okay";
+ nr-ports = <2>;
+ };
+ };
+
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ pinctrl-0 = <&pmx_poweroff>;
+ pinctrl-names = "default";
+ gpios = <&gpio0 7 0>;
+ };
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_keys>;
+ pinctrl-names = "default";
+
+ button at 1 {
+ label = "Back power switch (on|auto)";
+ linux,code = <0x1>;
+ linux,input-type = <5>; /* EV_SW */
+ gpios = <&gpio0 13 1>;
+ };
+ button at 1 {
+ label = "Back power switch (auto|off)";
+ linux,code = <0x2>;
+ linux,input-type = <5>; /* EV_SW */
+ gpios = <&gpio0 15 1>;
+ };
+ button at 1 {
+ label = "Function button";
+ linux,code = <0x165>; /* KEY_OPTION */
+ gpios = <&gpio1 3 1>;
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ pinctrl-0 = <&pmx_sata_power>;
+ pinctrl-names = "default";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sata0_power: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA0 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 16 0>;
+ };
+
+ sata1_power: regulator at 2 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA1 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 17 0>;
+ };
+
+ sata2_power: regulator at 3 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA2 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 9 0>;
+ };
+
+ sata3_power: regulator at 4 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA3 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 10 0>;
+ };
+
+ sata4_power: regulator at 5 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "SATA4 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ enable-active-high;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio1 11 0>;
+ };
+ };
+};
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 5c207a8..0f2cafb 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -2,18 +2,6 @@ if ARCH_KIRKWOOD
menu "Marvell Kirkwood Implementations"
-config MACH_NET2BIG_V2
- bool "LaCie 2Big Network v2 NAS Board"
- help
- Say 'Y' here if you want your kernel to support the
- LaCie 2Big Network v2 NAS.
-
-config MACH_NET5BIG_V2
- bool "LaCie 5Big Network v2 NAS Board"
- help
- Say 'Y' here if you want your kernel to support the
- LaCie 5Big Network v2 NAS.
-
config MACH_OPENRD
bool
@@ -200,6 +188,18 @@ config MACH_MV88F6281GTW_GE_DT
Say 'Y' here if you want your kernel to support the
Marvell 88F6281 GTW GE Board (Flattened Device Tree).
+config MACH_NET2BIG_V2_DT
+ bool "LaCie 2Big Network v2 NAS Board (Flattened Device Tree)"
+ help
+ Say 'Y' here if you want your kernel to support the
+ LaCie 2Big Network v2 NAS (Flattened Device Tree).
+
+config MACH_NET5BIG_V2_DT
+ bool "LaCie 5Big Network v2 NAS Board (Flattened Device Tree)"
+ help
+ Say 'Y' here if you want your kernel to support the
+ LaCie 5Big Network v2 NAS (Flattened Device Tree).
+
config MACH_NETSPACE_LITE_V2_DT
bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)"
select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index d0bd566..a2ec379 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -1,7 +1,5 @@
obj-y += common.o irq.o pcie.o mpp.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
obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
@@ -26,6 +24,8 @@ obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o
+obj-$(CONFIG_MACH_NET2BIG_V2) += board-netxbig_v2.o
+obj-$(CONFIG_MACH_NET5BIG_V2) += board-netxbig_v2.o
obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/board-netxbig_v2.c
similarity index 53%
rename from arch/arm/mach-kirkwood/netxbig_v2-setup.c
rename to arch/arm/mach-kirkwood/board-netxbig_v2.c
index 913d032..7d71981 100644
--- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
+++ b/arch/arm/mach-kirkwood/board-netxbig_v2.c
@@ -23,19 +23,14 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
-#include <linux/input.h>
#include <linux/gpio.h>
-#include <linux/gpio_keys.h>
#include <linux/leds.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <mach/kirkwood.h>
#include <linux/platform_data/leds-kirkwood-netxbig.h>
#include "common.h"
-#include "mpp.h"
-#include "lacie_v2-common.h"
/*****************************************************************************
* Ethernet
@@ -50,61 +45,6 @@ static struct mv643xx_eth_platform_data netxbig_v2_ge01_data = {
};
/*****************************************************************************
- * SATA
- ****************************************************************************/
-
-static struct mv_sata_platform_data netxbig_v2_sata_data = {
- .n_ports = 2,
-};
-
-/*****************************************************************************
- * GPIO keys
- ****************************************************************************/
-
-#define NETXBIG_V2_GPIO_SWITCH_POWER_ON 13
-#define NETXBIG_V2_GPIO_SWITCH_POWER_OFF 15
-#define NETXBIG_V2_GPIO_FUNC_BUTTON 34
-
-#define NETXBIG_V2_SWITCH_POWER_ON 0x1
-#define NETXBIG_V2_SWITCH_POWER_OFF 0x2
-
-static struct gpio_keys_button netxbig_v2_buttons[] = {
- [0] = {
- .type = EV_SW,
- .code = NETXBIG_V2_SWITCH_POWER_ON,
- .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_ON,
- .desc = "Back power switch (on|auto)",
- .active_low = 1,
- },
- [1] = {
- .type = EV_SW,
- .code = NETXBIG_V2_SWITCH_POWER_OFF,
- .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_OFF,
- .desc = "Back power switch (auto|off)",
- .active_low = 1,
- },
- [2] = {
- .code = KEY_OPTION,
- .gpio = NETXBIG_V2_GPIO_FUNC_BUTTON,
- .desc = "Function button",
- .active_low = 1,
- },
-};
-
-static struct gpio_keys_platform_data netxbig_v2_button_data = {
- .buttons = netxbig_v2_buttons,
- .nbuttons = ARRAY_SIZE(netxbig_v2_buttons),
-};
-
-static struct platform_device netxbig_v2_gpio_buttons = {
- .name = "gpio-keys",
- .id = -1,
- .dev = {
- .platform_data = &netxbig_v2_button_data,
- },
-};
-
-/*****************************************************************************
* GPIO extension LEDs
****************************************************************************/
@@ -264,159 +204,12 @@ static struct platform_device netxbig_v2_leds = {
},
};
-/*****************************************************************************
- * General Setup
- ****************************************************************************/
-
-static unsigned int net2big_v2_mpp_config[] __initdata = {
- MPP0_SPI_SCn,
- MPP1_SPI_MOSI,
- MPP2_SPI_SCK,
- MPP3_SPI_MISO,
- MPP6_SYSRST_OUTn,
- MPP7_GPO, /* Request power-off */
- MPP8_TW0_SDA,
- MPP9_TW0_SCK,
- MPP10_UART0_TXD,
- MPP11_UART0_RXD,
- MPP13_GPIO, /* Rear power switch (on|auto) */
- MPP14_GPIO, /* USB fuse alarm */
- MPP15_GPIO, /* Rear power switch (auto|off) */
- MPP16_GPIO, /* SATA HDD1 power */
- MPP17_GPIO, /* SATA HDD2 power */
- MPP20_SATA1_ACTn,
- MPP21_SATA0_ACTn,
- MPP24_GPIO, /* USB mode select */
- MPP26_GPIO, /* USB device vbus */
- MPP28_GPIO, /* USB enable host vbus */
- MPP29_GPIO, /* GPIO extension ALE */
- MPP34_GPIO, /* Rear Push button */
- MPP35_GPIO, /* Inhibit switch power-off */
- MPP36_GPIO, /* SATA HDD1 presence */
- MPP37_GPIO, /* SATA HDD2 presence */
- MPP40_GPIO, /* eSATA presence */
- MPP44_GPIO, /* GPIO extension (data 0) */
- MPP45_GPIO, /* GPIO extension (data 1) */
- MPP46_GPIO, /* GPIO extension (data 2) */
- MPP47_GPIO, /* GPIO extension (addr 0) */
- MPP48_GPIO, /* GPIO extension (addr 1) */
- MPP49_GPIO, /* GPIO extension (addr 2) */
- 0
-};
-
-static unsigned int net5big_v2_mpp_config[] __initdata = {
- MPP0_SPI_SCn,
- MPP1_SPI_MOSI,
- MPP2_SPI_SCK,
- MPP3_SPI_MISO,
- MPP6_SYSRST_OUTn,
- MPP7_GPO, /* Request power-off */
- MPP8_TW0_SDA,
- MPP9_TW0_SCK,
- MPP10_UART0_TXD,
- MPP11_UART0_RXD,
- MPP13_GPIO, /* Rear power switch (on|auto) */
- MPP14_GPIO, /* USB fuse alarm */
- MPP15_GPIO, /* Rear power switch (auto|off) */
- MPP16_GPIO, /* SATA HDD1 power */
- MPP17_GPIO, /* SATA HDD2 power */
- MPP20_GE1_TXD0,
- MPP21_GE1_TXD1,
- MPP22_GE1_TXD2,
- MPP23_GE1_TXD3,
- MPP24_GE1_RXD0,
- MPP25_GE1_RXD1,
- MPP26_GE1_RXD2,
- MPP27_GE1_RXD3,
- MPP28_GPIO, /* USB enable host vbus */
- MPP29_GPIO, /* GPIO extension ALE */
- MPP30_GE1_RXCTL,
- MPP31_GE1_RXCLK,
- MPP32_GE1_TCLKOUT,
- MPP33_GE1_TXCTL,
- MPP34_GPIO, /* Rear Push button */
- MPP35_GPIO, /* Inhibit switch power-off */
- MPP36_GPIO, /* SATA HDD1 presence */
- MPP37_GPIO, /* SATA HDD2 presence */
- MPP38_GPIO, /* SATA HDD3 presence */
- MPP39_GPIO, /* SATA HDD4 presence */
- MPP40_GPIO, /* SATA HDD5 presence */
- MPP41_GPIO, /* SATA HDD3 power */
- MPP42_GPIO, /* SATA HDD4 power */
- MPP43_GPIO, /* SATA HDD5 power */
- MPP44_GPIO, /* GPIO extension (data 0) */
- MPP45_GPIO, /* GPIO extension (data 1) */
- MPP46_GPIO, /* GPIO extension (data 2) */
- MPP47_GPIO, /* GPIO extension (addr 0) */
- MPP48_GPIO, /* GPIO extension (addr 1) */
- MPP49_GPIO, /* GPIO extension (addr 2) */
- 0
-};
-
-#define NETXBIG_V2_GPIO_POWER_OFF 7
-
-static void netxbig_v2_power_off(void)
+void __init netxbig_v2_init(void)
{
- gpio_set_value(NETXBIG_V2_GPIO_POWER_OFF, 1);
-}
-
-static void __init netxbig_v2_init(void)
-{
- /*
- * Basic setup. Needs to be called early.
- */
- kirkwood_init();
- if (machine_is_net2big_v2())
- kirkwood_mpp_conf(net2big_v2_mpp_config);
- else
- kirkwood_mpp_conf(net5big_v2_mpp_config);
-
- if (machine_is_net2big_v2())
- lacie_v2_hdd_power_init(2);
- else
- lacie_v2_hdd_power_init(5);
-
- kirkwood_ehci_init();
kirkwood_ge00_init(&netxbig_v2_ge00_data);
- if (machine_is_net5big_v2())
+ if (of_machine_is_compatible("lacie,net5big-v2")) {
kirkwood_ge01_init(&netxbig_v2_ge01_data);
- kirkwood_sata_init(&netxbig_v2_sata_data);
- kirkwood_uart0_init();
- lacie_v2_register_flash();
- lacie_v2_register_i2c_devices();
-
- if (machine_is_net5big_v2())
netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data;
+ }
platform_device_register(&netxbig_v2_leds);
- platform_device_register(&netxbig_v2_gpio_buttons);
-
- if (gpio_request(NETXBIG_V2_GPIO_POWER_OFF, "power-off") == 0 &&
- gpio_direction_output(NETXBIG_V2_GPIO_POWER_OFF, 0) == 0)
- pm_power_off = netxbig_v2_power_off;
- else
- pr_err("netxbig_v2: failed to configure power-off GPIO\n");
}
-
-#ifdef CONFIG_MACH_NET2BIG_V2
-MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
- .atag_offset = 0x100,
- .init_machine = netxbig_v2_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
-
-#ifdef CONFIG_MACH_NET5BIG_V2
-MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
- .atag_offset = 0x100,
- .init_machine = netxbig_v2_init,
- .map_io = kirkwood_map_io,
- .init_early = kirkwood_init_early,
- .init_irq = kirkwood_init_irq,
- .init_time = kirkwood_timer_init,
- .restart = kirkwood_restart,
-MACHINE_END
-#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (6 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 7/9] ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms " Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 9:17 ` Simon Guinot
2013-08-01 8:45 ` [PATCH 9/9] ARM: kirkwood: update defconfig after DT conversions Thomas Petazzoni
2013-08-01 15:48 ` [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Andrew Lunn
9 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Now that all LaCie platforms have been converted to use the Device
Tree, we can get rid of the lacie_v2-common.{c,h} files.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-kirkwood/lacie_v2-common.c | 114 -------------------------------
arch/arm/mach-kirkwood/lacie_v2-common.h | 16 -----
2 files changed, 130 deletions(-)
delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.c
delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.h
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c
deleted file mode 100644
index 4894959..0000000
--- a/arch/arm/mach-kirkwood/lacie_v2-common.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/lacie_v2-common.c
- *
- * 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.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/mtd/physmap.h>
-#include <linux/spi/flash.h>
-#include <linux/spi/spi.h>
-#include <linux/i2c.h>
-#include <linux/i2c/at24.h>
-#include <linux/gpio.h>
-#include <asm/mach/time.h>
-#include <mach/kirkwood.h>
-#include <mach/irqs.h>
-#include <plat/time.h>
-#include "common.h"
-#include "lacie_v2-common.h"
-
-/*****************************************************************************
- * 512KB SPI Flash on Boot Device (MACRONIX MX25L4005)
- ****************************************************************************/
-
-static struct mtd_partition lacie_v2_flash_parts[] = {
- {
- .name = "u-boot",
- .size = MTDPART_SIZ_FULL,
- .offset = 0,
- .mask_flags = MTD_WRITEABLE, /* force read-only */
- },
-};
-
-static const struct flash_platform_data lacie_v2_flash = {
- .type = "mx25l4005a",
- .name = "spi_flash",
- .parts = lacie_v2_flash_parts,
- .nr_parts = ARRAY_SIZE(lacie_v2_flash_parts),
-};
-
-static struct spi_board_info __initdata lacie_v2_spi_slave_info[] = {
- {
- .modalias = "m25p80",
- .platform_data = &lacie_v2_flash,
- .irq = -1,
- .max_speed_hz = 20000000,
- .bus_num = 0,
- .chip_select = 0,
- },
-};
-
-void __init lacie_v2_register_flash(void)
-{
- spi_register_board_info(lacie_v2_spi_slave_info,
- ARRAY_SIZE(lacie_v2_spi_slave_info));
- kirkwood_spi_init();
-}
-
-/*****************************************************************************
- * I2C devices
- ****************************************************************************/
-
-static struct at24_platform_data at24c04 = {
- .byte_len = SZ_4K / 8,
- .page_size = 16,
-};
-
-/*
- * i2c addr | chip | description
- * 0x50 | HT24LC04 | eeprom (512B)
- */
-
-static struct i2c_board_info __initdata lacie_v2_i2c_info[] = {
- {
- I2C_BOARD_INFO("24c04", 0x50),
- .platform_data = &at24c04,
- }
-};
-
-void __init lacie_v2_register_i2c_devices(void)
-{
- kirkwood_i2c_init();
- i2c_register_board_info(0, lacie_v2_i2c_info,
- ARRAY_SIZE(lacie_v2_i2c_info));
-}
-
-/*****************************************************************************
- * Hard Disk power
- ****************************************************************************/
-
-static int __initdata lacie_v2_gpio_hdd_power[] = { 16, 17, 41, 42, 43 };
-
-void __init lacie_v2_hdd_power_init(int hdd_num)
-{
- int i;
- int err;
-
- /* Power up all hard disks. */
- for (i = 0; i < hdd_num; i++) {
- err = gpio_request(lacie_v2_gpio_hdd_power[i], NULL);
- if (err == 0) {
- err = gpio_direction_output(
- lacie_v2_gpio_hdd_power[i], 1);
- /* Free the HDD power GPIOs. This allow user-space to
- * configure them via the gpiolib sysfs interface. */
- gpio_free(lacie_v2_gpio_hdd_power[i]);
- }
- if (err)
- pr_err("Failed to power up HDD%d\n", i + 1);
- }
-}
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.h b/arch/arm/mach-kirkwood/lacie_v2-common.h
deleted file mode 100644
index fc64f57..0000000
--- a/arch/arm/mach-kirkwood/lacie_v2-common.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/lacie_v2-common.h
- *
- * 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.
- */
-
-#ifndef __ARCH_KIRKWOOD_LACIE_V2_COMMON_H
-#define __ARCH_KIRKWOOD_LACIE_V2_COMMON_H
-
-void lacie_v2_register_flash(void);
-void lacie_v2_register_i2c_devices(void);
-void lacie_v2_hdd_power_init(int hdd_num);
-
-#endif
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 9/9] ARM: kirkwood: update defconfig after DT conversions
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (7 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms Thomas Petazzoni
@ 2013-08-01 8:45 ` Thomas Petazzoni
2013-08-01 15:48 ` [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Andrew Lunn
9 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 8:45 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/configs/kirkwood_defconfig | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 0f2aa61..ad9ea15 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -9,27 +9,17 @@ CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_ARCH_KIRKWOOD=y
-CONFIG_MACH_D2NET_V2=y
CONFIG_MACH_DB88F6281_BP=y
-CONFIG_MACH_DOCKSTAR=y
-CONFIG_MACH_ESATA_SHEEVAPLUG=y
-CONFIG_MACH_GURUPLUG=y
-CONFIG_MACH_INETSPACE_V2=y
-CONFIG_MACH_MV88F6281GTW_GE=y
-CONFIG_MACH_NET2BIG_V2=y
-CONFIG_MACH_NET5BIG_V2=y
-CONFIG_MACH_NETSPACE_MAX_V2=y
-CONFIG_MACH_NETSPACE_V2=y
CONFIG_MACH_OPENRD_BASE=y
CONFIG_MACH_OPENRD_CLIENT=y
CONFIG_MACH_OPENRD_ULTIMATE=y
CONFIG_MACH_RD88F6192_NAS=y
CONFIG_MACH_RD88F6281=y
-CONFIG_MACH_SHEEVAPLUG=y
CONFIG_MACH_T5325=y
CONFIG_MACH_TS219=y
CONFIG_MACH_TS41X=y
CONFIG_MACH_CLOUDBOX_DT=y
+CONFIG_MACH_D2NET_V2_DT=y
CONFIG_MACH_DB88F628X_BP_DT=y
CONFIG_MACH_DLINK_KIRKWOOD_DT=y
CONFIG_MACH_DOCKSTAR_DT=y
@@ -43,6 +33,9 @@ CONFIG_MACH_IOMEGA_IX2_200_DT=y
CONFIG_MACH_KM_KIRKWOOD_DT=y
CONFIG_MACH_LSXL_DT=y
CONFIG_MACH_MPLCEC4_DT=y
+CONFIG_MACH_MV88F6281GTW_GE_DT=y
+CONFIG_MACH_NET2BIG_V2_DT=y
+CONFIG_MACH_NET5BIG_V2_DT=y
CONFIG_MACH_NETSPACE_LITE_V2_DT=y
CONFIG_MACH_NETSPACE_MAX_V2_DT=y
CONFIG_MACH_NETSPACE_MINI_V2_DT=y
--
1.8.1.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 1/9] ARM: kirkwood: convert d2net_v2 to DT
2013-08-01 8:45 ` [PATCH 1/9] ARM: kirkwood: convert d2net_v2 " Thomas Petazzoni
@ 2013-08-01 9:07 ` Simon Guinot
2013-08-01 9:26 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Simon Guinot @ 2013-08-01 9:07 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 01, 2013 at 10:45:30AM +0200, Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> arch/arm/boot/dts/kirkwood-d2net-v2.dts | 204 ++++++++++++++++++++++++++++
> arch/arm/mach-kirkwood/Kconfig | 13 +-
> arch/arm/mach-kirkwood/Makefile | 2 +-
> arch/arm/mach-kirkwood/board-d2net_v2.c | 72 ++++++++++
> arch/arm/mach-kirkwood/board-dt.c | 3 +
> arch/arm/mach-kirkwood/common.h | 6 +
> arch/arm/mach-kirkwood/d2net_v2-setup.c | 231 --------------------------------
> 7 files changed, 293 insertions(+), 238 deletions(-)
> create mode 100644 arch/arm/boot/dts/kirkwood-d2net-v2.dts
> create mode 100644 arch/arm/mach-kirkwood/board-d2net_v2.c
> delete mode 100644 arch/arm/mach-kirkwood/d2net_v2-setup.c
>
> diff --git a/arch/arm/boot/dts/kirkwood-d2net-v2.dts b/arch/arm/boot/dts/kirkwood-d2net-v2.dts
> new file mode 100644
> index 0000000..f789ebd
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-d2net-v2.dts
> @@ -0,0 +1,204 @@
> +/dts-v1/;
> +
> +/include/ "kirkwood.dtsi"
> +/include/ "kirkwood-6281.dtsi"
> +
> +/ {
> + model = "LaCie d2 Network v2";
> + compatible = "lacie,d2net_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
> +
> + memory {
> + device_type = "memory";
> + reg = <0x00000000 0x20000000>; // FIXME
> + };
> +
> + chosen {
> + bootargs = "console=ttyS0,115200n8 earlyprintk";
> + };
> +
> + ocp at f1000000 {
> + pinctrl: pinctrl at 10000 {
> + pinctrl-0 = <&pmx_inhibit_poweroff
> + &pmx_cpld_leds
> + &pmx_sysrst>;
> +
> + pmx_spi: pmx-spi {
> + marvell,pins = "mpp0", "mpp1", "mpp2", "mpp3";
> + marvell,function = "spi";
> + };
> +
> + pmx_i2c: pmx-i2c {
> + marvell,pins = "mpp8", "mpp9";
> + marvell,function = "twsi0";
> + };
> +
> + pmx_uart: pmx-uart {
> + marvell,pins = "mpp10", "mpp11";
> + marvell,function = "uart0";
> + };
> +
> + pmx_leds: pmx-leds {
> + marvell,pins = "mpp12";
> + marvell,function = "gpo";
> + };
> +
> + pmx_keys: pmx-keys {
> + marvell,pins = "mpp13", "mpp15", "mpp34";
> + marvell,function = "gpio";
> + };
> +
> + pmx_poweroff: pmx-poweroff {
> + marvell,pins = "mpp7";
> + marvell,function = "gpo";
> + };
> +
> + pmx_sata_power: pmx-sata-power {
> + marvell,pins = "mpp16";
> + marvell,function = "gpio";
> + };
> +
> + pmx_sata: pmx-sata {
> + marvell,pins = "mpp21";
> + marvell,function = "sata0";
> + };
> +
> + pmx_sata: pmx-sata {
> + marvell,pins = "mpp14", "mpp24", "mpp26", "mpp28";
> + marvell,function = "gpio";
> + };
> +
> + pmx_sysrst: pmx-sysrst {
> + marvell,pins = "mpp6"
> + marvell,function = "sysrst";
> + };
> +
> + pmx_inhibit_poweroff: pmx-inhibit-poweroff {
> + marvell,pins = "mpp35"
> + marvell,function = "gpio";
> + };
> +
> + pmx_cpld_leds: pmx-cpld-leds {
> + marvell,pins = "mpp29", "mpp30";
> + marvell,function = "gpio";
> + };
> + };
> +
> + spi at 10600 {
> + status = "okay";
> + pinctrl-0 = <&pmx_spi>;
> + pinctrl-names = "default";
> +
> + flash at 0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "mx25l4005a";
> + reg = <0>;
> + spi-max-frequency = <20000000>;
> + mode = <0>;
> +
> + partition at 0 {
> + reg = <0x0 0x80000>;
> + label = "u-boot";
> + };
> + };
> + };
> +
> + i2c at 11000 {
> + status = "okay";
> + pinctrl-0 = <&pmx_i2c>;
> + pinctrl-names = "default";
> +
> + eeprom at 50 {
> + compatible = "at,24c04";
> + pagesize = <16>;
> + reg = <0x50>;
> + };
> + };
> +
> + serial at 12000 {
> + status = "ok";
> + pinctrl-0 = <&pmx_uart>;
> + pinctrl-names = "default";
> + };
> +
> + sata at 80000 {
> + nr-ports = <2>;
> + status = "okay";
> + pinctrl-0 = <&pmx_sata>;
> + pinctrl-names = "default";
> + };
> +
> + ehci at 50000 {
> + pinctrl-0 = <&pmx_usb>;
> + pinctrl-names = "default";
> + };
> + };
> +
> + gpio_keys {
> + compatible = "gpio-keys";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + pinctrl-0 = <&pmx_keys>;
> + pinctrl-names = "default";
> +
> + button at 1 {
> + label = "Back power switch (on|auto)";
> + linux,code = <1>;
> + linux,input-type = <5>; /* EV_SW */
> + gpios = <&gpio0 13 0>;
> + };
> +
> + button at 2 {
> + label = "Back power switch (auto|off)";
> + linux,code = <2>;
> + linux,input-type = <5>; /* EV_SW */
> + gpios = <&gpio0 15 0>;
> + };
> +
> + button at 3 {
> + label = "Front Push Button";
> + linux,code = <116>; /* KEY_POWER */
> + gpios = <&gpio1 2 1>;
> + };
> + };
> +
> + gpio-leds {
> + compatible = "gpio-leds";
> + pinctrl-0 = <&pmx_led>;
> + pinctrl-names = "default";
> +
> + fail {
> + label = "d2net_v2:red:fail";
> + gpios = <&gpio0 12 0>;
> + default-state = "on";
> + };
> + };
> +
> + gpio_poweroff {
> + compatible = "gpio-poweroff";
> + pinctrl-0 = <&pmx_poweroff>;
> + pinctrl-names = "default";
> + gpios = <&gpio0 7 0>;
> + };
> +
> + regulators {
> + compatible = "simple-bus";
> + pinctrl-0 = <&pmx_sata_power>;
> + pinctrl-names = "default";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sata0_power: regulator at 1 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA0 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 16 0>;
> + };
> + };
> +};
> +
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index b634f96..cb0c197 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -2,12 +2,6 @@ if ARCH_KIRKWOOD
>
> menu "Marvell Kirkwood Implementations"
>
> -config MACH_D2NET_V2
> - bool "LaCie d2 Network v2 NAS Board"
> - help
> - Say 'Y' here if you want your kernel to support the
> - LaCie d2 Network v2 NAS.
> -
> config MACH_DOCKSTAR
> bool "Seagate FreeAgent DockStar"
> help
> @@ -146,6 +140,13 @@ config MACH_CLOUDBOX_DT
> Say 'Y' here if you want your kernel to support the LaCie
> CloudBox NAS, using Flattened Device Tree.
>
> +config MACH_D2NET_V2_DT
> + bool "LaCie d2 Network v2 NAS Board (Flattened Device Tree)"
> + select ARCH_KIRKWOOD_DT
> + help
> + Say 'Y' here if you want your kernel to support the
> + LaCie d2 Network v2 NAS, using Flattened Device Tree.
> +
> config MACH_DB88F628X_BP_DT
> bool "Marvell DB-88F628x-BP Development Board (Flattened Device Tree)"
> help
> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> index ac4cd75..d204380 100644
> --- a/arch/arm/mach-kirkwood/Makefile
> +++ b/arch/arm/mach-kirkwood/Makefile
> @@ -1,6 +1,5 @@
> obj-y += common.o irq.o pcie.o mpp.o
>
> -obj-$(CONFIG_MACH_D2NET_V2) += d2net_v2-setup.o lacie_v2-common.o
> obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
> obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
> obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
> @@ -20,6 +19,7 @@ obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
>
> obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
> obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o
> +obj-$(CONFIG_MACH_D2NET_V2_DT) += board-d2net_v2.o
> obj-$(CONFIG_MACH_DB88F628X_BP_DT) += board-db88f628x-bp.o
> obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
> obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
> diff --git a/arch/arm/mach-kirkwood/board-d2net_v2.c b/arch/arm/mach-kirkwood/board-d2net_v2.c
> new file mode 100644
> index 0000000..8e2c52c
> --- /dev/null
> +++ b/arch/arm/mach-kirkwood/board-d2net_v2.c
> @@ -0,0 +1,72 @@
> +/*
> + * arch/arm/mach-kirkwood/d2net_v2-setup.c
> + *
> + * LaCie d2 Network Space v2 Board Setup
> + *
> + * Copyright (C) 2010 Simon Guinot <sguinot@lacie.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +#include <linux/mv643xx_eth.h>
> +#include <asm/mach/arch.h>
> +#include <mach/kirkwood.h>
> +#include <linux/platform_data/leds-kirkwood-ns2.h>
> +#include "common.h"
> +
> +/*****************************************************************************
> + * Ethernet
> + ****************************************************************************/
> +
> +static struct mv643xx_eth_platform_data d2net_v2_ge00_data = {
> + .phy_addr = MV643XX_ETH_PHY_ADDR(8),
> +};
> +
> +/*****************************************************************************
> + * Dual-GPIO CPLD LEDs
> + ****************************************************************************/
> +
> +#define D2NET_V2_GPIO_BLUE_LED_SLOW 29
> +#define D2NET_V2_GPIO_BLUE_LED_CMD 30
> +
> +static struct ns2_led d2net_v2_led_pins[] = {
> + {
> + .name = "d2net_v2:blue:sata",
> + .cmd = D2NET_V2_GPIO_BLUE_LED_CMD,
> + .slow = D2NET_V2_GPIO_BLUE_LED_SLOW,
> + },
> +};
> +
> +static struct ns2_led_platform_data d2net_v2_leds_data = {
> + .num_leds = ARRAY_SIZE(d2net_v2_led_pins),
> + .leds = d2net_v2_led_pins,
> +};
> +
> +static struct platform_device d2net_v2_leds = {
> + .name = "leds-ns2",
> + .id = -1,
> + .dev = {
> + .platform_data = &d2net_v2_leds_data,
> + },
> +};
Hi Thomas,
Thanks for this patch.
Note that the leds-ns2 drivers has already been converted to DT. Please
have a look at Documentation/devicetree/bindings/leds/leds-ns2.txt or
arch/arm/boot/dts/kirkwood-ns2.dts.
Once the LED part will be removed, you may also consider to move the
mv643xx_eth initialization into board-ns2.c (and maybe also renaming
this file into board-lacie.c).
Regards,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130801/17b02305/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms
2013-08-01 8:45 ` [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms Thomas Petazzoni
@ 2013-08-01 9:17 ` Simon Guinot
2013-08-01 9:25 ` Thomas Petazzoni
0 siblings, 1 reply; 17+ messages in thread
From: Simon Guinot @ 2013-08-01 9:17 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 01, 2013 at 10:45:37AM +0200, Thomas Petazzoni wrote:
> Now that all LaCie platforms have been converted to use the Device
> Tree, we can get rid of the lacie_v2-common.{c,h} files.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> arch/arm/mach-kirkwood/lacie_v2-common.c | 114 -------------------------------
> arch/arm/mach-kirkwood/lacie_v2-common.h | 16 -----
> 2 files changed, 130 deletions(-)
> delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.c
> delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.h
Please take care...
You can't remove this files. A lot of functions are still used by
netxbig_v2-setup.c. The LaCie "Big" boards are not converted to DT.
Note that I am currently working on the leds-netxbig driver conversion,
which is needed by the "Big" boards.
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130801/b2b73ecb/attachment-0001.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 7/9] ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms to DT
2013-08-01 8:45 ` [PATCH 7/9] ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms " Thomas Petazzoni
@ 2013-08-01 9:24 ` Simon Guinot
0 siblings, 0 replies; 17+ messages in thread
From: Simon Guinot @ 2013-08-01 9:24 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 01, 2013 at 10:45:36AM +0200, Thomas Petazzoni wrote:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> arch/arm/boot/dts/kirkwood-net2big-v2.dts | 204 ++++++++++++++++++
> arch/arm/boot/dts/kirkwood-net5big-v2.dts | 238 +++++++++++++++++++++
> arch/arm/mach-kirkwood/Kconfig | 24 +--
> arch/arm/mach-kirkwood/Makefile | 4 +-
> .../{netxbig_v2-setup.c => board-netxbig_v2.c} | 213 +-----------------
> 5 files changed, 459 insertions(+), 224 deletions(-)
> create mode 100644 arch/arm/boot/dts/kirkwood-net2big-v2.dts
> create mode 100644 arch/arm/boot/dts/kirkwood-net5big-v2.dts
> rename arch/arm/mach-kirkwood/{netxbig_v2-setup.c => board-netxbig_v2.c} (53%)
OK. Please drop my reply to your patch 8. For some reasons, I got this
one right after...
It looks all good. I am going to test it.
Thanks
Simon
>
> diff --git a/arch/arm/boot/dts/kirkwood-net2big-v2.dts b/arch/arm/boot/dts/kirkwood-net2big-v2.dts
> new file mode 100644
> index 0000000..06beca9
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-net2big-v2.dts
> @@ -0,0 +1,204 @@
> +/*
> + * LaCie 2Big Network v2
> + *
> + * Simon Guinot <sguinot@lacie.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.
> + */
> +
> +/include/ "kirkwood.dtsi"
> +/include/ "kirkwood-6281.dtsi"
> +
> +/ {
> + model = "LaCie 2Big Network v2";
> + compatible = "lacie,net2big-v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
> +
> + memory {
> + device_type = "memory";
> + reg = <0x00000000 0x20000000>; /* 512 MB */
> + };
> +
> + chosen {
> + bootargs = "console=ttyS0,115200n8 earlyprintk";
> + };
> +
> + ocp at f1000000 {
> + pinctrl at 10000 {
> + pinctrl-0 = <&pmx_misc &pmx_sysrst>;
> + pinctrl-names = "default";
> +
> + pmx_keys: pmx-keys {
> + marvell,pins = "mpp13", "mpp15", "mpp34";
> + marvell,function = "gpio";
> + };
> +
> + pmx_sata_power: pmx-sata-power {
> + marvell,pins = "mpp16", "mpp17";
> + marvell,function = "gpio";
> + };
> +
> + pmx_sata1: pmx-sata1 {
> + marvell,pins = "mpp20";
> + marvell,function = "sata1";
> + };
> +
> + pmx_sata0: pmx-sata0 {
> + marvell,pins = "mpp21";
> + marvell,function = "sata0";
> + };
> +
> + pmx_poweroff: pmx-poweroff {
> + marvell,pins = "mpp7";
> + marvell,function = "gpo";
> + };
> +
> + pmx_sysrst: pmx-sysrst {
> + marvell,pins = "mpp6";
> + marvell,function = "sysrst";
> + };
> +
> + /*
> + * MPP14: USB fuse alarm
> + * MPP24: USB mode select
> + * MPP26: USB device vbus
> + * MPP28: USB enable host vbus
> + * MPP35: inhibit switch power-off
> + * MPP36: SATA HDD1 presence
> + * MPP37: SATA HDD2 presence
> + * MPP40: eSATA presence
> + * MPP44: GPIO extension (data 0)
> + * MPP45: GPIO extension (data 1)
> + * MPP46: GPIO extension (data 2)
> + * MPP47: GPIO extension (addr 0)
> + * MPP48: GPIO extension (addr 1)
> + * MPP49: GPIO extension (addr 2)
> + */
> + pmx_misc: pmx-misc {
> + marvell,pins = "mpp14", "mpp24", "mpp26", "mpp28", "mpp29",
> + "mpp35", "mpp36", "mpp37", "mpp40", "mpp44",
> + "mpp45", "mpp46", "mpp47", "mpp48", "mpp49";
> + marvell,function = "gpio";
> + };
> + };
> +
> + spi at 10600 {
> + status = "okay";
> + pinctrl-0 = <&pmx_spi>;
> + pinctrl-names = "default";
> +
> + flash at 0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "mx25l4005a";
> + reg = <0>;
> + spi-max-frequency = <20000000>;
> + mode = <0>;
> +
> + partition at 0 {
> + reg = <0x0 0x80000>;
> + label = "u-boot";
> + };
> + };
> + };
> +
> + i2c at 11000 {
> + status = "okay";
> + pinctrl-0 = <&pmx_i2c>;
> + pinctrl-names = "default";
> +
> + eeprom at 50 {
> + compatible = "at,24c04";
> + pagesize = <16>;
> + reg = <0x50>;
> + };
> + };
> +
> + serial at 12000 {
> + pinctrl-0 = <&pmx_uart0>;
> + pinctrl-names = "default";
> + clock-frequency = <200000000>;
> + status = "ok";
> + };
> +
> + ehci at 50000 {
> + status = "okay";
> + };
> +
> + sata at 80000 {
> + pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
> + pinctrl-names = "default";
> + status = "okay";
> + nr-ports = <2>;
> + };
> + };
> +
> + gpio_poweroff {
> + compatible = "gpio-poweroff";
> + pinctrl-0 = <&pmx_poweroff>;
> + pinctrl-names = "default";
> + gpios = <&gpio0 7 0>;
> + };
> +
> + gpio_keys {
> + compatible = "gpio-keys";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + pinctrl-0 = <&pmx_keys>;
> + pinctrl-names = "default";
> +
> + button at 1 {
> + label = "Back power switch (on|auto)";
> + linux,code = <0x1>;
> + linux,input-type = <5>; /* EV_SW */
> + gpios = <&gpio0 13 1>;
> + };
> + button at 1 {
> + label = "Back power switch (auto|off)";
> + linux,code = <0x2>;
> + linux,input-type = <5>; /* EV_SW */
> + gpios = <&gpio0 15 1>;
> + };
> + button at 1 {
> + label = "Function button";
> + linux,code = <0x165>; /* KEY_OPTION */
> + gpios = <&gpio1 3 1>;
> + };
> + };
> +
> + regulators {
> + compatible = "simple-bus";
> + pinctrl-0 = <&pmx_sata_power>;
> + pinctrl-names = "default";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sata0_power: regulator at 1 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA0 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 16 0>;
> + };
> +
> + sata1_power: regulator at 2 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA1 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 17 0>;
> + };
> + };
> +};
> diff --git a/arch/arm/boot/dts/kirkwood-net5big-v2.dts b/arch/arm/boot/dts/kirkwood-net5big-v2.dts
> new file mode 100644
> index 0000000..61dea84
> --- /dev/null
> +++ b/arch/arm/boot/dts/kirkwood-net5big-v2.dts
> @@ -0,0 +1,238 @@
> +/*
> + * LaCie 5Big Network v2
> + *
> + * Simon Guinot <sguinot@lacie.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.
> + */
> +
> +/include/ "kirkwood.dtsi"
> +/include/ "kirkwood-6281.dtsi"
> +
> +/ {
> + model = "LaCie 5Big Network v2";
> + compatible = "lacie,net5big-v2", "marvell,kirkwood-88f6281", "marvell,kirkwood";
> +
> + memory {
> + device_type = "memory";
> + reg = <0x00000000 0x20000000>; /* 512 MB */
> + };
> +
> + chosen {
> + bootargs = "console=ttyS0,115200n8 earlyprintk";
> + };
> +
> + ocp at f1000000 {
> + pinctrl at 10000 {
> + pinctrl-0 = <&pmx_misc &pmx_sysrst>;
> + pinctrl-names = "default";
> +
> + pmx_keys: pmx-keys {
> + marvell,pins = "mpp13", "mpp15", "mpp34";
> + marvell,function = "gpio";
> + };
> +
> + pmx_sata_power: pmx-sata-power {
> + marvell,pins = "mpp16", "mpp17", "mpp41", "mpp42", "mpp43";
> + marvell,function = "gpio";
> + };
> +
> + pmx_poweroff: pmx-poweroff {
> + marvell,pins = "mpp7";
> + marvell,function = "gpo";
> + };
> +
> + pmx_sysrst: pmx-sysrst {
> + marvell,pins = "mpp6";
> + marvell,function = "sysrst";
> + };
> +
> + /*
> + * MPP14: USB fuse alarm
> + * MPP28: USB enable host vbus
> + * MPP29: GPIO extension ALE
> + * MPP35: inhibit switch power-off
> + * MPP36: SATA HDD1 presence
> + * MPP37: SATA HDD2 presence
> + * MPP38: SATA HDD3 presence
> + * MPP39: SATA HDD4 presence
> + * MPP40: SATA HDD5 presence
> + * MPP44: GPIO extension (data 0)
> + * MPP45: GPIO extension (data 1)
> + * MPP46: GPIO extension (data 2)
> + * MPP47: GPIO extension (addr 0)
> + * MPP48: GPIO extension (addr 1)
> + * MPP49: GPIO extension (addr 2)
> + */
> + pmx_misc: pmx-misc {
> + marvell,pins = "mpp14", "mpp28", "mpp29", "mpp35", "mpp36",
> + "mpp37", "mpp38", "mpp39", "mpp40", "mpp44",
> + "mpp45", "mpp46", "mpp47", "mpp48", "mpp49";
> + marvell,function = "gpio";
> + };
> +
> + pmx_ge1: pmx-ge1 {
> + marvell,pins = "mpp20", "mpp21", "mpp22", "mpp23", "mpp24",
> + "mpp25", "mpp26", "mpp27", "mpp30", "mpp31",
> + "mpp32", "mpp33";
> + marvell,function = "ge1";
> + };
> + };
> +
> + spi at 10600 {
> + status = "okay";
> + pinctrl-0 = <&pmx_spi>;
> + pinctrl-names = "default";
> +
> + flash at 0 {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + compatible = "mx25l4005a";
> + reg = <0>;
> + spi-max-frequency = <20000000>;
> + mode = <0>;
> +
> + partition at 0 {
> + reg = <0x0 0x80000>;
> + label = "u-boot";
> + };
> + };
> + };
> +
> + i2c at 11000 {
> + status = "okay";
> + pinctrl-0 = <&pmx_i2c>;
> + pinctrl-names = "default";
> +
> + eeprom at 50 {
> + compatible = "at,24c04";
> + pagesize = <16>;
> + reg = <0x50>;
> + };
> + };
> +
> + serial at 12000 {
> + pinctrl-0 = <&pmx_uart0>;
> + pinctrl-names = "default";
> + clock-frequency = <200000000>;
> + status = "ok";
> + };
> +
> + ehci at 50000 {
> + status = "okay";
> + };
> +
> + sata at 80000 {
> + pinctrl-0 = <&pmx_sata0 &pmx_sata1>;
> + pinctrl-names = "default";
> + status = "okay";
> + nr-ports = <2>;
> + };
> + };
> +
> + gpio_poweroff {
> + compatible = "gpio-poweroff";
> + pinctrl-0 = <&pmx_poweroff>;
> + pinctrl-names = "default";
> + gpios = <&gpio0 7 0>;
> + };
> +
> + gpio_keys {
> + compatible = "gpio-keys";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + pinctrl-0 = <&pmx_keys>;
> + pinctrl-names = "default";
> +
> + button at 1 {
> + label = "Back power switch (on|auto)";
> + linux,code = <0x1>;
> + linux,input-type = <5>; /* EV_SW */
> + gpios = <&gpio0 13 1>;
> + };
> + button at 1 {
> + label = "Back power switch (auto|off)";
> + linux,code = <0x2>;
> + linux,input-type = <5>; /* EV_SW */
> + gpios = <&gpio0 15 1>;
> + };
> + button at 1 {
> + label = "Function button";
> + linux,code = <0x165>; /* KEY_OPTION */
> + gpios = <&gpio1 3 1>;
> + };
> + };
> +
> + regulators {
> + compatible = "simple-bus";
> + pinctrl-0 = <&pmx_sata_power>;
> + pinctrl-names = "default";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + sata0_power: regulator at 1 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA0 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 16 0>;
> + };
> +
> + sata1_power: regulator at 2 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA1 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio0 17 0>;
> + };
> +
> + sata2_power: regulator at 3 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA2 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio1 9 0>;
> + };
> +
> + sata3_power: regulator at 4 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA3 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio1 10 0>;
> + };
> +
> + sata4_power: regulator at 5 {
> + compatible = "regulator-fixed";
> + reg = <1>;
> + regulator-name = "SATA4 Power";
> + regulator-min-microvolt = <5000000>;
> + regulator-max-microvolt = <5000000>;
> + enable-active-high;
> + regulator-always-on;
> + regulator-boot-on;
> + gpio = <&gpio1 11 0>;
> + };
> + };
> +};
> diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
> index 5c207a8..0f2cafb 100644
> --- a/arch/arm/mach-kirkwood/Kconfig
> +++ b/arch/arm/mach-kirkwood/Kconfig
> @@ -2,18 +2,6 @@ if ARCH_KIRKWOOD
>
> menu "Marvell Kirkwood Implementations"
>
> -config MACH_NET2BIG_V2
> - bool "LaCie 2Big Network v2 NAS Board"
> - help
> - Say 'Y' here if you want your kernel to support the
> - LaCie 2Big Network v2 NAS.
> -
> -config MACH_NET5BIG_V2
> - bool "LaCie 5Big Network v2 NAS Board"
> - help
> - Say 'Y' here if you want your kernel to support the
> - LaCie 5Big Network v2 NAS.
> -
> config MACH_OPENRD
> bool
>
> @@ -200,6 +188,18 @@ config MACH_MV88F6281GTW_GE_DT
> Say 'Y' here if you want your kernel to support the
> Marvell 88F6281 GTW GE Board (Flattened Device Tree).
>
> +config MACH_NET2BIG_V2_DT
> + bool "LaCie 2Big Network v2 NAS Board (Flattened Device Tree)"
> + help
> + Say 'Y' here if you want your kernel to support the
> + LaCie 2Big Network v2 NAS (Flattened Device Tree).
> +
> +config MACH_NET5BIG_V2_DT
> + bool "LaCie 5Big Network v2 NAS Board (Flattened Device Tree)"
> + help
> + Say 'Y' here if you want your kernel to support the
> + LaCie 5Big Network v2 NAS (Flattened Device Tree).
> +
> config MACH_NETSPACE_LITE_V2_DT
> bool "LaCie Network Space Lite v2 NAS (Flattened Device Tree)"
> select ARCH_KIRKWOOD_DT
> diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
> index d0bd566..a2ec379 100644
> --- a/arch/arm/mach-kirkwood/Makefile
> +++ b/arch/arm/mach-kirkwood/Makefile
> @@ -1,7 +1,5 @@
> obj-y += common.o irq.o pcie.o mpp.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
> obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o
> obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
> @@ -26,6 +24,8 @@ obj-$(CONFIG_MACH_KM_KIRKWOOD_DT) += board-km_kirkwood.o
> obj-$(CONFIG_MACH_LSXL_DT) += board-lsxl.o
> obj-$(CONFIG_MACH_MPLCEC4_DT) += board-mplcec4.o
> obj-$(CONFIG_MACH_MV88F6281GTW_GE_DT) += board-mv88f6281gtw_ge.o
> +obj-$(CONFIG_MACH_NET2BIG_V2) += board-netxbig_v2.o
> +obj-$(CONFIG_MACH_NET5BIG_V2) += board-netxbig_v2.o
> obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
> obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
> obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
> diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/board-netxbig_v2.c
> similarity index 53%
> rename from arch/arm/mach-kirkwood/netxbig_v2-setup.c
> rename to arch/arm/mach-kirkwood/board-netxbig_v2.c
> index 913d032..7d71981 100644
> --- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
> +++ b/arch/arm/mach-kirkwood/board-netxbig_v2.c
> @@ -23,19 +23,14 @@
> #include <linux/kernel.h>
> #include <linux/init.h>
> #include <linux/platform_device.h>
> -#include <linux/ata_platform.h>
> #include <linux/mv643xx_eth.h>
> -#include <linux/input.h>
> #include <linux/gpio.h>
> -#include <linux/gpio_keys.h>
> #include <linux/leds.h>
> #include <asm/mach-types.h>
> #include <asm/mach/arch.h>
> #include <mach/kirkwood.h>
> #include <linux/platform_data/leds-kirkwood-netxbig.h>
> #include "common.h"
> -#include "mpp.h"
> -#include "lacie_v2-common.h"
>
> /*****************************************************************************
> * Ethernet
> @@ -50,61 +45,6 @@ static struct mv643xx_eth_platform_data netxbig_v2_ge01_data = {
> };
>
> /*****************************************************************************
> - * SATA
> - ****************************************************************************/
> -
> -static struct mv_sata_platform_data netxbig_v2_sata_data = {
> - .n_ports = 2,
> -};
> -
> -/*****************************************************************************
> - * GPIO keys
> - ****************************************************************************/
> -
> -#define NETXBIG_V2_GPIO_SWITCH_POWER_ON 13
> -#define NETXBIG_V2_GPIO_SWITCH_POWER_OFF 15
> -#define NETXBIG_V2_GPIO_FUNC_BUTTON 34
> -
> -#define NETXBIG_V2_SWITCH_POWER_ON 0x1
> -#define NETXBIG_V2_SWITCH_POWER_OFF 0x2
> -
> -static struct gpio_keys_button netxbig_v2_buttons[] = {
> - [0] = {
> - .type = EV_SW,
> - .code = NETXBIG_V2_SWITCH_POWER_ON,
> - .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_ON,
> - .desc = "Back power switch (on|auto)",
> - .active_low = 1,
> - },
> - [1] = {
> - .type = EV_SW,
> - .code = NETXBIG_V2_SWITCH_POWER_OFF,
> - .gpio = NETXBIG_V2_GPIO_SWITCH_POWER_OFF,
> - .desc = "Back power switch (auto|off)",
> - .active_low = 1,
> - },
> - [2] = {
> - .code = KEY_OPTION,
> - .gpio = NETXBIG_V2_GPIO_FUNC_BUTTON,
> - .desc = "Function button",
> - .active_low = 1,
> - },
> -};
> -
> -static struct gpio_keys_platform_data netxbig_v2_button_data = {
> - .buttons = netxbig_v2_buttons,
> - .nbuttons = ARRAY_SIZE(netxbig_v2_buttons),
> -};
> -
> -static struct platform_device netxbig_v2_gpio_buttons = {
> - .name = "gpio-keys",
> - .id = -1,
> - .dev = {
> - .platform_data = &netxbig_v2_button_data,
> - },
> -};
> -
> -/*****************************************************************************
> * GPIO extension LEDs
> ****************************************************************************/
>
> @@ -264,159 +204,12 @@ static struct platform_device netxbig_v2_leds = {
> },
> };
>
> -/*****************************************************************************
> - * General Setup
> - ****************************************************************************/
> -
> -static unsigned int net2big_v2_mpp_config[] __initdata = {
> - MPP0_SPI_SCn,
> - MPP1_SPI_MOSI,
> - MPP2_SPI_SCK,
> - MPP3_SPI_MISO,
> - MPP6_SYSRST_OUTn,
> - MPP7_GPO, /* Request power-off */
> - MPP8_TW0_SDA,
> - MPP9_TW0_SCK,
> - MPP10_UART0_TXD,
> - MPP11_UART0_RXD,
> - MPP13_GPIO, /* Rear power switch (on|auto) */
> - MPP14_GPIO, /* USB fuse alarm */
> - MPP15_GPIO, /* Rear power switch (auto|off) */
> - MPP16_GPIO, /* SATA HDD1 power */
> - MPP17_GPIO, /* SATA HDD2 power */
> - MPP20_SATA1_ACTn,
> - MPP21_SATA0_ACTn,
> - MPP24_GPIO, /* USB mode select */
> - MPP26_GPIO, /* USB device vbus */
> - MPP28_GPIO, /* USB enable host vbus */
> - MPP29_GPIO, /* GPIO extension ALE */
> - MPP34_GPIO, /* Rear Push button */
> - MPP35_GPIO, /* Inhibit switch power-off */
> - MPP36_GPIO, /* SATA HDD1 presence */
> - MPP37_GPIO, /* SATA HDD2 presence */
> - MPP40_GPIO, /* eSATA presence */
> - MPP44_GPIO, /* GPIO extension (data 0) */
> - MPP45_GPIO, /* GPIO extension (data 1) */
> - MPP46_GPIO, /* GPIO extension (data 2) */
> - MPP47_GPIO, /* GPIO extension (addr 0) */
> - MPP48_GPIO, /* GPIO extension (addr 1) */
> - MPP49_GPIO, /* GPIO extension (addr 2) */
> - 0
> -};
> -
> -static unsigned int net5big_v2_mpp_config[] __initdata = {
> - MPP0_SPI_SCn,
> - MPP1_SPI_MOSI,
> - MPP2_SPI_SCK,
> - MPP3_SPI_MISO,
> - MPP6_SYSRST_OUTn,
> - MPP7_GPO, /* Request power-off */
> - MPP8_TW0_SDA,
> - MPP9_TW0_SCK,
> - MPP10_UART0_TXD,
> - MPP11_UART0_RXD,
> - MPP13_GPIO, /* Rear power switch (on|auto) */
> - MPP14_GPIO, /* USB fuse alarm */
> - MPP15_GPIO, /* Rear power switch (auto|off) */
> - MPP16_GPIO, /* SATA HDD1 power */
> - MPP17_GPIO, /* SATA HDD2 power */
> - MPP20_GE1_TXD0,
> - MPP21_GE1_TXD1,
> - MPP22_GE1_TXD2,
> - MPP23_GE1_TXD3,
> - MPP24_GE1_RXD0,
> - MPP25_GE1_RXD1,
> - MPP26_GE1_RXD2,
> - MPP27_GE1_RXD3,
> - MPP28_GPIO, /* USB enable host vbus */
> - MPP29_GPIO, /* GPIO extension ALE */
> - MPP30_GE1_RXCTL,
> - MPP31_GE1_RXCLK,
> - MPP32_GE1_TCLKOUT,
> - MPP33_GE1_TXCTL,
> - MPP34_GPIO, /* Rear Push button */
> - MPP35_GPIO, /* Inhibit switch power-off */
> - MPP36_GPIO, /* SATA HDD1 presence */
> - MPP37_GPIO, /* SATA HDD2 presence */
> - MPP38_GPIO, /* SATA HDD3 presence */
> - MPP39_GPIO, /* SATA HDD4 presence */
> - MPP40_GPIO, /* SATA HDD5 presence */
> - MPP41_GPIO, /* SATA HDD3 power */
> - MPP42_GPIO, /* SATA HDD4 power */
> - MPP43_GPIO, /* SATA HDD5 power */
> - MPP44_GPIO, /* GPIO extension (data 0) */
> - MPP45_GPIO, /* GPIO extension (data 1) */
> - MPP46_GPIO, /* GPIO extension (data 2) */
> - MPP47_GPIO, /* GPIO extension (addr 0) */
> - MPP48_GPIO, /* GPIO extension (addr 1) */
> - MPP49_GPIO, /* GPIO extension (addr 2) */
> - 0
> -};
> -
> -#define NETXBIG_V2_GPIO_POWER_OFF 7
> -
> -static void netxbig_v2_power_off(void)
> +void __init netxbig_v2_init(void)
> {
> - gpio_set_value(NETXBIG_V2_GPIO_POWER_OFF, 1);
> -}
> -
> -static void __init netxbig_v2_init(void)
> -{
> - /*
> - * Basic setup. Needs to be called early.
> - */
> - kirkwood_init();
> - if (machine_is_net2big_v2())
> - kirkwood_mpp_conf(net2big_v2_mpp_config);
> - else
> - kirkwood_mpp_conf(net5big_v2_mpp_config);
> -
> - if (machine_is_net2big_v2())
> - lacie_v2_hdd_power_init(2);
> - else
> - lacie_v2_hdd_power_init(5);
> -
> - kirkwood_ehci_init();
> kirkwood_ge00_init(&netxbig_v2_ge00_data);
> - if (machine_is_net5big_v2())
> + if (of_machine_is_compatible("lacie,net5big-v2")) {
> kirkwood_ge01_init(&netxbig_v2_ge01_data);
> - kirkwood_sata_init(&netxbig_v2_sata_data);
> - kirkwood_uart0_init();
> - lacie_v2_register_flash();
> - lacie_v2_register_i2c_devices();
> -
> - if (machine_is_net5big_v2())
> netxbig_v2_leds.dev.platform_data = &net5big_v2_leds_data;
> + }
> platform_device_register(&netxbig_v2_leds);
> - platform_device_register(&netxbig_v2_gpio_buttons);
> -
> - if (gpio_request(NETXBIG_V2_GPIO_POWER_OFF, "power-off") == 0 &&
> - gpio_direction_output(NETXBIG_V2_GPIO_POWER_OFF, 0) == 0)
> - pm_power_off = netxbig_v2_power_off;
> - else
> - pr_err("netxbig_v2: failed to configure power-off GPIO\n");
> }
> -
> -#ifdef CONFIG_MACH_NET2BIG_V2
> -MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
> - .atag_offset = 0x100,
> - .init_machine = netxbig_v2_init,
> - .map_io = kirkwood_map_io,
> - .init_early = kirkwood_init_early,
> - .init_irq = kirkwood_init_irq,
> - .init_time = kirkwood_timer_init,
> - .restart = kirkwood_restart,
> -MACHINE_END
> -#endif
> -
> -#ifdef CONFIG_MACH_NET5BIG_V2
> -MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
> - .atag_offset = 0x100,
> - .init_machine = netxbig_v2_init,
> - .map_io = kirkwood_map_io,
> - .init_early = kirkwood_init_early,
> - .init_irq = kirkwood_init_irq,
> - .init_time = kirkwood_timer_init,
> - .restart = kirkwood_restart,
> -MACHINE_END
> -#endif
> --
> 1.8.1.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130801/6badf89a/attachment-0001.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms
2013-08-01 9:17 ` Simon Guinot
@ 2013-08-01 9:25 ` Thomas Petazzoni
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 9:25 UTC (permalink / raw)
To: linux-arm-kernel
Dear Simon Guinot,
On Thu, 1 Aug 2013 11:17:25 +0200, Simon Guinot wrote:
> On Thu, Aug 01, 2013 at 10:45:37AM +0200, Thomas Petazzoni wrote:
> > Now that all LaCie platforms have been converted to use the Device
> > Tree, we can get rid of the lacie_v2-common.{c,h} files.
> >
> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > ---
> > arch/arm/mach-kirkwood/lacie_v2-common.c | 114 -------------------------------
> > arch/arm/mach-kirkwood/lacie_v2-common.h | 16 -----
> > 2 files changed, 130 deletions(-)
> > delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.c
> > delete mode 100644 arch/arm/mach-kirkwood/lacie_v2-common.h
>
> Please take care...
>
> You can't remove this files. A lot of functions are still used by
> netxbig_v2-setup.c. The LaCie "Big" boards are not converted to DT.
> Note that I am currently working on the leds-netxbig driver conversion,
> which is needed by the "Big" boards.
As you realized afterwards, PATCH 7 precisely converts those boards to
the Device Tree.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/9] ARM: kirkwood: convert d2net_v2 to DT
2013-08-01 9:07 ` Simon Guinot
@ 2013-08-01 9:26 ` Thomas Petazzoni
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 9:26 UTC (permalink / raw)
To: linux-arm-kernel
Dear Simon Guinot,
On Thu, 1 Aug 2013 11:07:21 +0200, Simon Guinot wrote:
> Thanks for this patch.
>
> Note that the leds-ns2 drivers has already been converted to DT. Please
> have a look at Documentation/devicetree/bindings/leds/leds-ns2.txt or
> arch/arm/boot/dts/kirkwood-ns2.dts.
>
> Once the LED part will be removed, you may also consider to move the
> mv643xx_eth initialization into board-ns2.c (and maybe also renaming
> this file into board-lacie.c).
Thanks for this feedback, I'll have a look.
Thanks,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
` (8 preceding siblings ...)
2013-08-01 8:45 ` [PATCH 9/9] ARM: kirkwood: update defconfig after DT conversions Thomas Petazzoni
@ 2013-08-01 15:48 ` Andrew Lunn
2013-08-01 15:54 ` Thomas Petazzoni
9 siblings, 1 reply; 17+ messages in thread
From: Andrew Lunn @ 2013-08-01 15:48 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 01, 2013 at 10:45:29AM +0200, Thomas Petazzoni wrote:
> Hello,
>
> Here is a set of patches that converts a few additional Kirkwood
> boards to use the Device Tree. I intend to continue this effort with
> the remaining Kirkwood boards.
Hi Thomas
I think it would be good to leave one board that somebody has with
both DT and old style startup, for one or two cycles.
I used to regularly test both on my QNAP, but its currently in a
container heading west, and i will not have access to it for a couple
of months. Is there another board we can pick which somebody has?
Andrew
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT
2013-08-01 15:48 ` [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Andrew Lunn
@ 2013-08-01 15:54 ` Thomas Petazzoni
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-08-01 15:54 UTC (permalink / raw)
To: linux-arm-kernel
Dear Andrew Lunn,
On Thu, 1 Aug 2013 17:48:21 +0200, Andrew Lunn wrote:
> > Here is a set of patches that converts a few additional Kirkwood
> > boards to use the Device Tree. I intend to continue this effort with
> > the remaining Kirkwood boards.
>
> Hi Thomas
>
> I think it would be good to leave one board that somebody has with
> both DT and old style startup, for one or two cycles.
>
> I used to regularly test both on my QNAP, but its currently in a
> container heading west, and i will not have access to it for a couple
> of months. Is there another board we can pick which somebody has?
For now, the HP t5325 has not been converted to DT (I'm working on the
patches, but I have issues with audio), and I have the platform here.
My goal is to convert all boards for 3.12, so that I could do the
clean up of MPP, PCIe and other related stuff. I don't know if I'll
achieve that, but if not, we can always put back the Guruplug legacy
support, for example.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-08-01 15:54 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 8:45 [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 1/9] ARM: kirkwood: convert d2net_v2 " Thomas Petazzoni
2013-08-01 9:07 ` Simon Guinot
2013-08-01 9:26 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 2/9] ARM: kirkwood: remove support for legacy booting of Dockstar Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 3/9] ARM: kirkwood: remove support for legacy booting of Guruplug Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 4/9] ARM: kirkwood: remove support for legacy booting of Sheevaplug Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 5/9] ARM: kirkwood: remove LaCie boards that are supported through DT Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 6/9] ARM: kirkwood: convert the mv88f6281gtw_ge board to DT Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 7/9] ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms " Thomas Petazzoni
2013-08-01 9:24 ` Simon Guinot
2013-08-01 8:45 ` [PATCH 8/9] ARM: kirkwood: remove unused common code for LaCie platforms Thomas Petazzoni
2013-08-01 9:17 ` Simon Guinot
2013-08-01 9:25 ` Thomas Petazzoni
2013-08-01 8:45 ` [PATCH 9/9] ARM: kirkwood: update defconfig after DT conversions Thomas Petazzoni
2013-08-01 15:48 ` [PATCH 0/9] ARM: kirkwood: convert a few more boards to DT Andrew Lunn
2013-08-01 15:54 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox