Merge branch 'timer/cleanup' into late/mvebu2
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-kirkwood / board-usi_topkick.c
CommitLineData
767fc1ea
JC
1/*
2 * Copyright 2012 (C), Jason Cooper <jason@lakedaemon.net>
3 *
4 * arch/arm/mach-kirkwood/board-usi_topkick.c
5 *
6 * USI Topkick Init for drivers not converted to flattened device tree yet.
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mv643xx_eth.h>
16#include <linux/gpio.h>
17#include <linux/platform_data/mmc-mvsdio.h>
18#include "common.h"
19#include "mpp.h"
20
21static struct mv643xx_eth_platform_data topkick_ge00_data = {
22 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
23};
24
25static struct mvsdio_platform_data topkick_mvsdio_data = {
26 /* unfortunately the CD signal has not been connected */
27};
28
29/*
30 * GPIO LED layout
31 *
32 * /-SYS_LED(2)
33 * |
34 * | /-DISK_LED
35 * | |
36 * | | /-WLAN_LED(2)
37 * | | |
38 * [SW] [*] [*] [*]
39 */
40
41/*
42 * Switch positions
43 *
44 * /-SW_LEFT
45 * |
46 * | /-SW_IDLE
47 * | |
48 * | | /-SW_RIGHT
49 * | | |
50 * PS [L] [I] [R] LEDS
51 */
52
53static unsigned int topkick_mpp_config[] __initdata = {
54 MPP21_GPIO, /* DISK_LED (low active) - yellow */
55 MPP36_GPIO, /* SATA0 power enable (high active) */
56 MPP37_GPIO, /* SYS_LED2 (low active) - red */
57 MPP38_GPIO, /* SYS_LED (low active) - blue */
58 MPP39_GPIO, /* WLAN_LED (low active) - green */
59 MPP43_GPIO, /* SW_LEFT (low active) */
60 MPP44_GPIO, /* SW_RIGHT (low active) */
61 MPP45_GPIO, /* SW_IDLE (low active) */
62 MPP46_GPIO, /* SW_LEFT (low active) */
63 MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */
64 0
65};
66
767fc1ea
JC
67void __init usi_topkick_init(void)
68{
69 /*
70 * Basic setup. Needs to be called early.
71 */
72 kirkwood_mpp_conf(topkick_mpp_config);
73
767fc1ea 74
767fc1ea
JC
75 kirkwood_ge00_init(&topkick_ge00_data);
76 kirkwood_sdio_init(&topkick_mvsdio_data);
77}