-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: kirkwood: convert the mv88f6281gtw_ge board to DT
This commit converts the mv88f6281gtw_ge Kirkwood board to use a Device Tree representation, except for the Ethernet devices and the DSA switch. Even though the mv643xx_eth driver has a DT binding, converting this board to use it is for now left on the side because it doesn't use a simple PHY, but a DSA switch instead. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
- Loading branch information
Thomas Petazzoni
authored and
Jason Cooper
committed
Aug 6, 2013
1 parent
0230bd4
commit 37ae08c
Showing
8 changed files
with
193 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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@f1000000 { | ||
pinctrl@10000 { | ||
pmx_usb_led: pmx-usb-led { | ||
marvell,pins = "mpp12"; | ||
marvell,function = "gpo"; | ||
}; | ||
|
||
pmx_leds: pmx-leds { | ||
marvell,pins = "mpp20", "mpp21"; | ||
marvell,function = "gpio"; | ||
}; | ||
|
||
pmx_keys: pmx-keys { | ||
marvell,pins = "mpp46", "mpp47"; | ||
marvell,function = "gpio"; | ||
}; | ||
}; | ||
|
||
spi@10600 { | ||
pinctrl-0 = <&pmx_spi>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
|
||
flash@0 { | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
compatible = "mx25l12805d"; | ||
reg = <0>; | ||
spi-max-frequency = <50000000>; | ||
mode = <0>; | ||
}; | ||
}; | ||
|
||
serial@12000 { | ||
pinctrl-0 = <&pmx_uart0>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <200000000>; | ||
status = "ok"; | ||
}; | ||
|
||
ehci@50000 { | ||
status = "okay"; | ||
}; | ||
|
||
pcie-controller { | ||
status = "okay"; | ||
|
||
pcie@1,0 { | ||
status = "okay"; | ||
}; | ||
}; | ||
}; | ||
|
||
gpio-leds { | ||
compatible = "gpio-leds"; | ||
pinctrl-0 = <&pmx_leds &pmx_usb_led>; | ||
pinctrl-names = "default"; | ||
|
||
green-status { | ||
label = "gtw:green:Status"; | ||
gpios = <&gpio0 20 0>; | ||
}; | ||
|
||
red-status { | ||
label = "gtw:red:Status"; | ||
gpios = <&gpio0 21 0>; | ||
}; | ||
|
||
green-usb { | ||
label = "gtw:green:USB"; | ||
gpios = <&gpio0 12 0>; | ||
}; | ||
}; | ||
|
||
gpio_keys { | ||
compatible = "gpio-keys"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
pinctrl-0 = <&pmx_keys>; | ||
pinctrl-names = "default"; | ||
|
||
button@1 { | ||
label = "SWR Button"; | ||
linux,code = <0x198>; /* KEY_RESTART */ | ||
gpios = <&gpio1 15 1>; | ||
}; | ||
button@2 { | ||
label = "WPS Button"; | ||
linux,code = <0x211>; /* KEY_WPS_BUTTON */ | ||
gpios = <&gpio1 14 1>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* arch/arm/mach-kirkwood/board-mv88f6281gtw_ge.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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.