diff options
| author | Andrew Lunn <andrew@lunn.ch> | 2012-07-17 02:05:27 -0400 |
|---|---|---|
| committer | Andrew Lunn <andrew@lunn.ch> | 2012-07-27 10:50:49 -0400 |
| commit | f3af1c73f0dde5848d1da50372979c784f2aa34a (patch) | |
| tree | 9be02ad2a117cdf11e7350af109d2107d0d832cd | |
| parent | b94a257cdb115c0bc2058685b18280c9319780a3 (diff) | |
ARM: Kirkwood: Describe GoFlex Net LEDs and SATA in DT.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Josh Coombs <josh.coombs@gmail.com>
| -rw-r--r-- | arch/arm/boot/dts/kirkwood-goflexnet.dts | 50 | ||||
| -rw-r--r-- | arch/arm/mach-kirkwood/board-goflexnet.c | 84 |
2 files changed, 50 insertions, 84 deletions
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index c5d5a4e9f11e..f6974d1d27b0 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts | |||
| @@ -45,5 +45,55 @@ | |||
| 45 | reg = <0x02500000 0xd800000>; | 45 | reg = <0x02500000 0xd800000>; |
| 46 | }; | 46 | }; |
| 47 | }; | 47 | }; |
| 48 | sata@80000 { | ||
| 49 | status = "okay"; | ||
| 50 | nr-ports = <2>; | ||
| 51 | }; | ||
| 52 | |||
| 53 | }; | ||
| 54 | gpio-leds { | ||
| 55 | compatible = "gpio-leds"; | ||
| 56 | |||
| 57 | health { | ||
| 58 | label = "status:green:health"; | ||
| 59 | gpios = <&gpio1 14 1>; | ||
| 60 | linux,default-trigger = "default-on"; | ||
| 61 | }; | ||
| 62 | fault { | ||
| 63 | label = "status:orange:fault"; | ||
| 64 | gpios = <&gpio1 15 1>; | ||
| 65 | }; | ||
| 66 | left0 { | ||
| 67 | label = "status:white:left0"; | ||
| 68 | gpios = <&gpio1 10 0>; | ||
| 69 | }; | ||
| 70 | left1 { | ||
| 71 | label = "status:white:left1"; | ||
| 72 | gpios = <&gpio1 11 0>; | ||
| 73 | }; | ||
| 74 | left2 { | ||
| 75 | label = "status:white:left2"; | ||
| 76 | gpios = <&gpio1 12 0>; | ||
| 77 | }; | ||
| 78 | left3 { | ||
| 79 | label = "status:white:left3"; | ||
| 80 | gpios = <&gpio1 13 0>; | ||
| 81 | }; | ||
| 82 | right0 { | ||
| 83 | label = "status:white:right0"; | ||
| 84 | gpios = <&gpio1 6 0>; | ||
| 85 | }; | ||
| 86 | right1 { | ||
| 87 | label = "status:white:right1"; | ||
| 88 | gpios = <&gpio1 7 0>; | ||
| 89 | }; | ||
| 90 | right2 { | ||
| 91 | label = "status:white:right2"; | ||
| 92 | gpios = <&gpio1 8 0>; | ||
| 93 | }; | ||
| 94 | right3 { | ||
| 95 | label = "status:white:right3"; | ||
| 96 | gpios = <&gpio1 9 0>; | ||
| 97 | }; | ||
| 48 | }; | 98 | }; |
| 49 | }; | 99 | }; |
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c index 3957ece46d36..413e2c8ef5fe 100644 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ b/arch/arm/mach-kirkwood/board-goflexnet.c | |||
| @@ -27,7 +27,6 @@ | |||
| 27 | #include <linux/of_irq.h> | 27 | #include <linux/of_irq.h> |
| 28 | #include <linux/of_platform.h> | 28 | #include <linux/of_platform.h> |
| 29 | #include <linux/gpio.h> | 29 | #include <linux/gpio.h> |
| 30 | #include <linux/leds.h> | ||
| 31 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
| 32 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
| 33 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
| @@ -41,86 +40,6 @@ static struct mv643xx_eth_platform_data goflexnet_ge00_data = { | |||
| 41 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 40 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
| 42 | }; | 41 | }; |
| 43 | 42 | ||
| 44 | static struct mv_sata_platform_data goflexnet_sata_data = { | ||
| 45 | .n_ports = 2, | ||
| 46 | }; | ||
| 47 | |||
| 48 | static struct gpio_led goflexnet_led_pins[] = { | ||
| 49 | { | ||
| 50 | .name = "status:green:health", | ||
| 51 | .default_trigger = "default-on", | ||
| 52 | .gpio = 46, | ||
| 53 | .active_low = 1, | ||
| 54 | }, | ||
| 55 | { | ||
| 56 | .name = "status:orange:fault", | ||
| 57 | .default_trigger = "none", | ||
| 58 | .gpio = 47, | ||
| 59 | .active_low = 1, | ||
| 60 | }, | ||
| 61 | { | ||
| 62 | .name = "status:white:left0", | ||
| 63 | .default_trigger = "none", | ||
| 64 | .gpio = 42, | ||
| 65 | .active_low = 0, | ||
| 66 | }, | ||
| 67 | { | ||
| 68 | .name = "status:white:left1", | ||
| 69 | .default_trigger = "none", | ||
| 70 | .gpio = 43, | ||
| 71 | .active_low = 0, | ||
| 72 | }, | ||
| 73 | { | ||
| 74 | .name = "status:white:left2", | ||
| 75 | .default_trigger = "none", | ||
| 76 | .gpio = 44, | ||
| 77 | .active_low = 0, | ||
| 78 | }, | ||
| 79 | { | ||
| 80 | .name = "status:white:left3", | ||
| 81 | .default_trigger = "none", | ||
| 82 | .gpio = 45, | ||
| 83 | .active_low = 0, | ||
| 84 | }, | ||
| 85 | { | ||
| 86 | .name = "status:white:right0", | ||
| 87 | .default_trigger = "none", | ||
| 88 | .gpio = 38, | ||
| 89 | .active_low = 0, | ||
| 90 | }, | ||
| 91 | { | ||
| 92 | .name = "status:white:right1", | ||
| 93 | .default_trigger = "none", | ||
| 94 | .gpio = 39, | ||
| 95 | .active_low = 0, | ||
| 96 | }, | ||
| 97 | { | ||
| 98 | .name = "status:white:right2", | ||
| 99 | .default_trigger = "none", | ||
| 100 | .gpio = 40, | ||
| 101 | .active_low = 0, | ||
| 102 | }, | ||
| 103 | { | ||
| 104 | .name = "status:white:right3", | ||
| 105 | .default_trigger = "none", | ||
| 106 | .gpio = 41, | ||
| 107 | .active_low = 0, | ||
| 108 | }, | ||
| 109 | }; | ||
| 110 | |||
| 111 | static struct gpio_led_platform_data goflexnet_led_data = { | ||
| 112 | .leds = goflexnet_led_pins, | ||
| 113 | .num_leds = ARRAY_SIZE(goflexnet_led_pins), | ||
| 114 | }; | ||
| 115 | |||
| 116 | static struct platform_device goflexnet_leds = { | ||
| 117 | .name = "leds-gpio", | ||
| 118 | .id = -1, | ||
| 119 | .dev = { | ||
| 120 | .platform_data = &goflexnet_led_data, | ||
| 121 | } | ||
| 122 | }; | ||
| 123 | |||
| 124 | static unsigned int goflexnet_mpp_config[] __initdata = { | 43 | static unsigned int goflexnet_mpp_config[] __initdata = { |
| 125 | MPP29_GPIO, /* USB Power Enable */ | 44 | MPP29_GPIO, /* USB Power Enable */ |
| 126 | MPP47_GPIO, /* LED Orange */ | 45 | MPP47_GPIO, /* LED Orange */ |
| @@ -149,7 +68,4 @@ void __init goflexnet_init(void) | |||
| 149 | kirkwood_ehci_init(); | 68 | kirkwood_ehci_init(); |
| 150 | 69 | ||
| 151 | kirkwood_ge00_init(&goflexnet_ge00_data); | 70 | kirkwood_ge00_init(&goflexnet_ge00_data); |
| 152 | kirkwood_sata_init(&goflexnet_sata_data); | ||
| 153 | |||
| 154 | platform_device_register(&goflexnet_leds); | ||
| 155 | } | 71 | } |
