diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2015-03-29 17:04:56 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-04-01 11:22:10 -0400 |
commit | 05f5507f59d6d3eab1c2172c6266b664b61599b5 (patch) | |
tree | 2349977cecf5a5fdecdf5221fcb6f03f31f6e185 | |
parent | f8fd30ebdb36f2598f382a6e57fa010477ad094f (diff) |
MIPS: OCTEON: add GPIO LED support for DSR-1000N
DSR-1000N board has two GPIO LEDs next to USB ports. Add support for them.
[ralf@linux-mips.org: Resolved conflict due to the moving of the DTS files
into vendor subdirectories.]
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9624/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts | 12 | ||||
-rw-r--r-- | arch/mips/cavium-octeon/octeon-platform.c | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts b/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts index fa33115bde33..9c48e0586ba7 100644 --- a/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts +++ b/arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts | |||
@@ -587,4 +587,16 @@ | |||
587 | usbn = &usbn; | 587 | usbn = &usbn; |
588 | led0 = &led0; | 588 | led0 = &led0; |
589 | }; | 589 | }; |
590 | |||
591 | dsr1000n-leds { | ||
592 | compatible = "gpio-leds"; | ||
593 | usb1 { | ||
594 | label = "usb1"; | ||
595 | gpios = <&gpio 9 1>; /* Active low */ | ||
596 | }; | ||
597 | usb2 { | ||
598 | label = "usb2"; | ||
599 | gpios = <&gpio 10 1>; /* Active low */ | ||
600 | }; | ||
601 | }; | ||
590 | }; | 602 | }; |
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c index 12410a2788d8..e1d56f32f784 100644 --- a/arch/mips/cavium-octeon/octeon-platform.c +++ b/arch/mips/cavium-octeon/octeon-platform.c | |||
@@ -958,6 +958,13 @@ end_led: | |||
958 | } | 958 | } |
959 | } | 959 | } |
960 | 960 | ||
961 | if (octeon_bootinfo->board_type != CVMX_BOARD_TYPE_CUST_DSR1000N) { | ||
962 | int dsr1000n_leds = fdt_path_offset(initial_boot_params, | ||
963 | "/dsr1000n-leds"); | ||
964 | if (dsr1000n_leds >= 0) | ||
965 | fdt_nop_node(initial_boot_params, dsr1000n_leds); | ||
966 | } | ||
967 | |||
961 | return 0; | 968 | return 0; |
962 | } | 969 | } |
963 | 970 | ||