ARM: kirkwood: convert a few more boards to DT
Subsystems (4)
cover ARM: kirkwood: convert a few more boards to DT
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.cSignature · 1 line
1.8.1.2
PATCH 1/9 ARM: kirkwood: convert d2net_v2 to DT
--- 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
arch/arm/boot/dts/kirkwood-d2net-v2.dts new file +204 -0
@@ -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>; + }; + }; +}; +
arch/arm/mach-kirkwood/Kconfig +7 -6
@@ -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
arch/arm/mach-kirkwood/Makefile +1 -1
@@ -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
arch/arm/mach-kirkwood/board-d2net_v2.c new file +72 -0
72 lines not on this page · raw message
arch/arm/mach-kirkwood/board-dt.c +3 -0
@@ -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 ();
arch/arm/mach-kirkwood/common.h +6 -0
@@ -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
arch/arm/mach-kirkwood/d2net_v2-setup.c deleted +0 -231
231 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 1/9 ARM: kirkwood: convert d2net_v2 to DT
Quoted 336 lines · Thomas Petazzoni
Signed-off-by Thomas Petazzoni <[email protected]>--- 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.carch/arm/boot/dts/kirkwood-d2net-v2.dts new file +204
-0@@ -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>; + }; + }; +}; +arch/arm/mach-kirkwood/Kconfig +7
-6@@ -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)" helparch/arm/mach-kirkwood/Makefile +1
-1@@ -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.oarch/arm/mach-kirkwood/board-d2net_v2.c new file +56
-0@@ -0,0 +1,72 @@ +/* +* arch/arm/mach-kirkwood/d2net_v2-setup.c +* +* LaCie d2 Network Space v2 Board Setup +* +* Copyright (C) 2010 Simon Guinot <[email protected]> +* +* 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),
arch/arm/mach-kirkwood/board-d2net_v2.c line 66
Quoted 10 lines
arch/arm/mach-kirkwood/board-d2net_v2.c new file +10
-0+ .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>
PATCH 1/9 ARM: kirkwood: convert d2net_v2 to DT
Dear Simon Guinot,
Quoted 9 lines · Simon Guinot
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.txtorarch/arm/boot/dts/kirkwood-ns2.dts.Once the LED part will be removed, you may also consider to move the
mv643xx_ethinitialization intoboard-ns2.c(and maybe also renaming this file intoboard-lacie.c).
Thanks for this feedback, I'll have a look.
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/9 ARM: kirkwood: remove support for legacy booting of Dockstar
In reply to Thomas PetazzoniThe Kirkwood Dockstar platform has already been converted to the Device Tree, so we can remove the legacy booting option for this platform.
--- 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
arch/arm/mach-kirkwood/Kconfig +0 -6
@@ -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
arch/arm/mach-kirkwood/Makefile +0 -1
@@ -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
arch/arm/mach-kirkwood/dockstar-setup.c deleted +0 -111
111 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 3/9 ARM: kirkwood: remove support for legacy booting of Guruplug
In reply to Thomas PetazzoniThe Kirkwood Guruplug platform has already been converted to the Device Tree, so we can remove the legacy booting option for this platform.
--- 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
arch/arm/mach-kirkwood/Kconfig +0 -6
@@ -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
arch/arm/mach-kirkwood/Makefile +0 -1
@@ -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
arch/arm/mach-kirkwood/guruplug-setup.c deleted +0 -133
133 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 4/9 ARM: kirkwood: remove support for legacy booting of Sheevaplug
In reply to Thomas PetazzoniThe Kirkwood Sheevaplug platform has already been converted to the Device Tree, so we can remove the legacy booting option for this platform.
--- 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
arch/arm/mach-kirkwood/Kconfig +0 -12
@@ -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
arch/arm/mach-kirkwood/Makefile +0 -2
@@ -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
arch/arm/mach-kirkwood/sheevaplug-setup.c deleted +0 -161
161 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 5/9 ARM: kirkwood: remove LaCie boards that are supported through DT
In reply to Thomas PetazzoniThe "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.
--- 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
arch/arm/mach-kirkwood/Kconfig +0 -18
@@ -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
arch/arm/mach-kirkwood/Makefile +0 -3
@@ -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
arch/arm/mach-kirkwood/netspace_v2-setup.c deleted +0 -293
293 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 6/9 ARM: kirkwood: convert the mv88f6281gtw_ge board to DT
In reply to Thomas Petazzoni--- 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
arch/arm/boot/dts/Makefile +1 -0
@@ -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 \
arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts new file +125 -0
125 lines not on this page · raw message
arch/arm/mach-kirkwood/Kconfig +7 -6
@@ -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
arch/arm/mach-kirkwood/Makefile +1 -1
@@ -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
arch/arm/mach-kirkwood/board-dt.c +4 -0
@@ -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",
arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.c new file +50 -0
50 lines not on this page · raw message
arch/arm/mach-kirkwood/common.h +6 -0
@@ -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
arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c deleted +0 -172
172 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 7/9 ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms to DT
In reply to Thomas Petazzoni---
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%)arch/arm/boot/dts/kirkwood-net2big-v2.dts new file +204 -0
@@ -0,0 +1,204 @@ +/* + * LaCie 2Big Network v2 + * + * Simon Guinot <[email protected]> + * + * 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>; + }; + }; +};
arch/arm/boot/dts/kirkwood-net5big-v2.dts new file +238 -0
238 lines not on this page · raw message
arch/arm/mach-kirkwood/Kconfig +12 -12
@@ -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
arch/arm/mach-kirkwood/Makefile +2 -2
@@ -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
arch/arm/mach-kirkwood/board-netxbig_v2.c renamed from arch/arm/mach-kirkwood/netxbig_v2-setup.c +3 -210
242 lines not on this page · raw message
Signature · 1 line
1.8.1.2
PATCH 7/9 ARM: kirkwood: convert LaCie Net{2, 5}Big v2 platforms to DT
Quoted 11 lines · Thomas Petazzoni
Signed-off-by Thomas Petazzoni <[email protected]>--- 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
Quoted 778 lines
arch/arm/boot/dts/kirkwood-net2big-v2.dts new file +204
-0@@ -0,0 +1,204 @@ +/* + * LaCie 2Big Network v2 + * + * Simon Guinot <[email protected]> + * + * 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>; + }; + }; +};arch/arm/boot/dts/kirkwood-net5big-v2.dts new file +238
-0@@ -0,0 +1,238 @@ +/* + * LaCie 5Big Network v2 + * + * Simon Guinot <[email protected]> + * + * 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>; + }; + }; +};arch/arm/mach-kirkwood/Kconfig +12
-12@@ -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_DTarch/arm/mach-kirkwood/Makefile +2
-2@@ -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.oarch/arm/mach-kirkwood/board-netxbig_v2.c renamed from arch/arm/mach-kirkwood/netxbig_v2-setup.c +3
-210@@ -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 Signature · 7 lines
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>
PATCH 8/9 ARM: kirkwood: remove unused common code for LaCie platforms
In reply to Thomas PetazzoniNow that all LaCie platforms have been converted to use the Device Tree, we can get rid of the lacie_v2-common.{c,h} files.
--- 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
arch/arm/mach-kirkwood/lacie_v2-common.c deleted +0 -114
@@ -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 ); - } -}
arch/arm/mach-kirkwood/lacie_v2-common.h deleted +0 -16
@@ -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
Signature · 1 line
1.8.1.2
PATCH 8/9 ARM: kirkwood: remove unused common code for LaCie platforms
Quoted 10 lines · Thomas Petazzoni
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 <[email protected]>--- 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>
PATCH 8/9 ARM: kirkwood: remove unused common code for LaCie platforms
Dear Simon Guinot,
Quoted 12 lines · Simon Guinot
Quoted 10 lines · Thomas Petazzoni
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 <[email protected]>--- 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
Quoted 6 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 9/9 ARM: kirkwood: update defconfig after DT conversions
In reply to Thomas Petazzoni--- arch/arm/configs/kirkwood_defconfig | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-)
arch/arm/configs/kirkwood_defconfig +4 -11
@@ -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
Signature · 1 line
1.8.1.2
cover ARM: kirkwood: convert a few more boards to DT
In reply to Thomas PetazzoniQuoted 5 lines · Thomas Petazzoni
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
cover ARM: kirkwood: convert a few more boards to DT
Dear Andrew Lunn,
Quoted 4 lines · Andrew Lunn
Quoted 3 lines
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.
Quoted 8 lines
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com