This backports upstream LED drivers (BCM6328 and BCM6358).
Signed-off-by: Álvaro Fernández Rojas
---
target/linux/brcm63xx/config-3.18 | 2 +
target/linux/brcm63xx/config-4.1 | 2 +
.../040-leds-add-BCM6328-LED-driver.patch | 464 +
.../041-leds-add-BCM6358-LED-driver.patch | 293 +
...8-add-more-configuration-options-and-fix-.patch | 106 +
.../020-leds-add-BCM6328-LED-driver.patch | 464 +
.../021-leds-add-BCM6358-LED-driver.patch | 293 +
...8-add-more-configuration-options-and-fix-.patch | 106 +
8 files changed, 1730 insertions(+)
create mode 100644
target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
create mode 100644
target/linux/brcm63xx/patches-3.18/041-leds-add-BCM6358-LED-driver.patch
create mode 100644
target/linux/brcm63xx/patches-3.18/042-leds-bcm6328-add-more-configuration-options-and-fix-.patch
create mode 100644
target/linux/brcm63xx/patches-4.1/020-leds-add-BCM6328-LED-driver.patch
create mode 100644
target/linux/brcm63xx/patches-4.1/021-leds-add-BCM6358-LED-driver.patch
create mode 100644
target/linux/brcm63xx/patches-4.1/022-leds-bcm6328-add-more-configuration-options-and-fix-.patch
diff --git a/target/linux/brcm63xx/config-3.18
b/target/linux/brcm63xx/config-3.18
index b72080b..5a9029e 100644
--- a/target/linux/brcm63xx/config-3.18
+++ b/target/linux/brcm63xx/config-3.18
@@ -132,6 +132,8 @@ CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
CONFIG_KEXEC=y
+CONFIG_LEDS_BCM6328=y
+CONFIG_LEDS_BCM6358=y
CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y
CONFIG_MDIO_BOARDINFO=y
diff --git a/target/linux/brcm63xx/config-4.1 b/target/linux/brcm63xx/config-4.1
index d61b6e6..8da087c 100644
--- a/target/linux/brcm63xx/config-4.1
+++ b/target/linux/brcm63xx/config-4.1
@@ -137,6 +137,8 @@ CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_IRQ_WORK=y
CONFIG_KEXEC=y
+CONFIG_LEDS_BCM6328=y
+CONFIG_LEDS_BCM6358=y
CONFIG_LEDS_GPIO=y
CONFIG_LIBFDT=y
# CONFIG_LZ4_COMPRESS is not set
diff --git
a/target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
b/target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
new file mode 100644
index 000..fc3d03a
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/040-leds-add-BCM6328-LED-driver.patch
@@ -0,0 +1,464 @@
+From fd7b025a238d0a5440bfa26c585eb78097bf48dc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
+Date: Tue, 28 Apr 2015 09:50:50 -0700
+Subject: [PATCH] leds: add BCM6328 LED driver
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This adds support for the LED controller on Broadcom's BCM6328.
+
+Signed-off-by: Álvaro Fernández Rojas
+Signed-off-by: Jonas Gorski
+Acked-by: Jacek Anaszewski
+Signed-off-by: Bryan Wu
+---
+ drivers/leds/Kconfig| 8 +
+ drivers/leds/Makefile | 1 +
+ drivers/leds/leds-bcm6328.c | 413
+ 3 files changed, 422 insertions(+)
+ create mode 100644 drivers/leds/leds-bcm6328.c
+
+--- a/drivers/leds/Kconfig
b/drivers/leds/Kconfig
+@@ -42,6 +42,14 @@ config LEDS_88PM860X
+ This option enables support for on-chip LED drivers found on Marvell
+ Semiconductor 88PM8606 PMIC.
+
++config LEDS_BCM6328
++ tristate "LED Support for Broadcom BCM6328"
++ depends on LEDS_CLASS
++ depends on OF
++ help
++This option enables support for LEDs connected to the BCM6328
++LED HW controller accessed via MMIO registers.
++
+ config LEDS_LM3530
+ tristate "LCD Backlight driver for LM3530"
+ depends on LEDS_CLASS
+--- a/drivers/leds/Makefile
b/drivers/leds/Makefile
+@@ -7,6 +7,7 @@ obj-$(CONFIG_LEDS_TRIGGERS)+= led-trig
+
+ # LED Platform Drivers
+ obj-$(CONFIG_LEDS_88PM860X) += leds-88pm860x.o
++obj-$(CONFIG_LEDS_BCM6328)+= leds-bcm6328.o
+ obj-$(CONFIG_LEDS_BD2802) += leds-bd2802.o
+ obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
+ obj-$(CONFIG_LEDS_LM3530) += leds-lm3530.o
+--- /dev/null
b/drivers/leds/leds-bcm6328.c
+@@ -0,0 +1,413 @@
++/*
++ * Driver for BCM6328 memory-mapped LEDs, based on leds-syscon.c
++ *
++ * Copyright 2015 Álvaro Fernández Rojas
++ * Copyright 2015 Jonas Gorski
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ */
++#include
++#include
++#include
++#include
++#include
++#include
++
++#define BCM6328_REG_INIT 0x00
++#define BCM6328_REG_MODE_HI 0x04
++#define BCM6328_REG_MODE_LO 0x08
++#define BCM6328_REG_HWDIS 0x0c
++#define BCM632