Jason Cooper | 767fc1e | 2012-10-22 02:15:35 +0000 | [diff] [blame] | 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 | |
| 21 | static struct mv643xx_eth_platform_data topkick_ge00_data = { |
| 22 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
| 23 | }; |
| 24 | |
| 25 | static 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 | |
| 53 | static 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 | |
| 67 | #define TOPKICK_SATA0_PWR_ENABLE 36 |
| 68 | |
| 69 | void __init usi_topkick_init(void) |
| 70 | { |
| 71 | /* |
| 72 | * Basic setup. Needs to be called early. |
| 73 | */ |
| 74 | kirkwood_mpp_conf(topkick_mpp_config); |
| 75 | |
| 76 | /* SATA0 power enable */ |
| 77 | gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); |
| 78 | |
Jason Cooper | 767fc1e | 2012-10-22 02:15:35 +0000 | [diff] [blame] | 79 | kirkwood_ge00_init(&topkick_ge00_data); |
| 80 | kirkwood_sdio_init(&topkick_mvsdio_data); |
| 81 | } |