summaryrefslogtreecommitdiff
path: root/arch/arm/mach-kirkwood/board-openblocks_a6.c
blob: 815fc6451d526bdf3db94fa082879c1711093e36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
 *
 * arch/arm/mach-kirkwood/board-openblocks_a6.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/mv643xx_eth.h>
#include <linux/clk.h>
#include <linux/clk-private.h>
#include "common.h"
#include "mpp.h"

static struct mv643xx_eth_platform_data openblocks_ge00_data = {
	.phy_addr	= MV643XX_ETH_PHY_ADDR(0),
};

static unsigned int openblocks_a6_mpp_config[] __initdata = {
	MPP0_NF_IO2,
	MPP1_NF_IO3,
	MPP2_NF_IO4,
	MPP3_NF_IO5,
	MPP4_NF_IO6,
	MPP5_NF_IO7,
	MPP6_SYSRST_OUTn,
	MPP8_UART1_RTS,
	MPP9_UART1_CTS,
	MPP10_UART0_TXD,
	MPP11_UART0_RXD,
	MPP13_UART1_TXD,
	MPP14_UART1_RXD,
	MPP15_UART0_RTS,
	MPP16_UART0_CTS,
	MPP18_NF_IO0,
	MPP19_NF_IO1,
	MPP20_GPIO, /* DIP SW0 */
	MPP21_GPIO, /* DIP SW1 */
	MPP22_GPIO, /* DIP SW2 */
	MPP23_GPIO, /* DIP SW3 */
	MPP24_GPIO, /* GPIO 0 */
	MPP25_GPIO, /* GPIO 1 */
	MPP26_GPIO, /* GPIO 2 */
	MPP27_GPIO, /* GPIO 3 */
	MPP28_GPIO, /* GPIO 4 */
	MPP29_GPIO, /* GPIO 5 */
	MPP30_GPIO, /* GPIO 6 */
	MPP31_GPIO, /* GPIO 7 */
	MPP36_TW1_SDA,
	MPP37_TW1_SCK,
	MPP38_GPIO, /* INIT */
	MPP39_GPIO, /* USB OC */
	MPP41_GPIO, /* LED: Red */
	MPP42_GPIO, /* LED: Green */
	MPP43_GPIO, /* LED: Yellow */
	0,
};

void __init openblocks_a6_init(void)
{
	/*
	 * Basic setup. Needs to be called early.
	 */
	kirkwood_mpp_conf(openblocks_a6_mpp_config);
	kirkwood_ge00_init(&openblocks_ge00_data);
}