aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Collins <jeffcollins9292@gmail.com>2021-02-25 11:11:58 -0500
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-03-22 21:05:41 +0100
commitdb6ff390b03f8e5de06ecf9540dcbd74c0aef67f (patch)
tree463f79542a772a85d2f8b759014ee15f79c9d7ea
parentcd48473bb8679937573d5761fa6d2d9cce358eb0 (diff)
downloadupstream-db6ff390b03f8e5de06ecf9540dcbd74c0aef67f.tar.gz
upstream-db6ff390b03f8e5de06ecf9540dcbd74c0aef67f.tar.bz2
upstream-db6ff390b03f8e5de06ecf9540dcbd74c0aef67f.zip
mvebu: add LED support for GL.iNet GL-MV1000
This patch enables LED support for the GL.iNet GL-MV1000 Signed-off-by: Jeff Collins <jeffcollins9292@gmail.com> [add SPDX identifier on new file, add aliases, minor cosmetic issues] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> (cherry picked from commit 6e0c780eb3b4ba1e52216c1d671897749dd81829)
-rwxr-xr-xtarget/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds18
-rw-r--r--target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts29
2 files changed, 46 insertions, 1 deletions
diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds
new file mode 100755
index 0000000000..42f4deb88a
--- /dev/null
+++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds
@@ -0,0 +1,18 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-only
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+glinet,gl-mv1000)
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
+ ;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
index 86c33fa100..0e15debdea 100644
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
@@ -8,6 +8,13 @@
model = "GL.iNet GL-MV1000";
compatible = "glinet,gl-mv1000", "marvell,armada3720";
+ aliases {
+ led-boot = &led_power;
+ led-failsafe = &led_power;
+ led-running = &led_power;
+ led-upgrade = &led_power;
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -23,12 +30,32 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
-
+
gpios-states = <0>;
states = <1800000 0x1
3300000 0x0>;
enable-active-high;
};
+
+ leds {
+ compatible = "gpio-leds";
+
+ vpn {
+ label = "green:vpn";
+ gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
+ };
+
+ wan {
+ label = "green:wan";
+ gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
+ };
+
+ led_power: power {
+ label = "green:power";
+ gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ };
};
&spi0 {
40'>240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468