All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add LEDs support for the ARM Versatile DT
@ 2016-01-05 14:02 Linus Walleij
  2016-01-05 14:02 ` [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT Linus Walleij
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Linus Walleij @ 2016-01-05 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

This adds support for the board LEDs to the ARM Versatile device tree
version.

I can't decice if this is a regression or not. The board file version
of Versatile supported the LEDs, the Device Tree version never did
until now.

The board file version of Versatile was deleted in
commit 16956fed35fecde2201e23458cda193526b19559
"ARM: versatile: switch to DT only booting and remove legacy code"

If we consider the DT version a full drop-in replacement for the
board file version, then this should go in as a regression fix. If
it is not, we can delay it to the next merge window.

Sending this to arm at kernel.org anyway so the ARM SoC maintainers can
decide.

Linus Walleij (2):
  ARM: versatile: add the syscon LEDs to the DT
  ARM: versatile: enable the right LEDs

 arch/arm/boot/dts/versatile-ab.dts   | 62 +++++++++++++++++++++++++++++++++++-
 arch/arm/configs/versatile_defconfig |  3 +-
 2 files changed, 63 insertions(+), 2 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT
  2016-01-05 14:02 [PATCH 0/2] Add LEDs support for the ARM Versatile DT Linus Walleij
@ 2016-01-05 14:02 ` Linus Walleij
  2016-01-05 15:37   ` Rob Herring
  2016-01-08 10:47   ` Arnd Bergmann
  2016-01-05 14:02 ` [PATCH 2/2] ARM: versatile: enable the right LEDs Linus Walleij
  2016-01-08 10:48 ` [PATCH 0/2] Add LEDs support for the ARM Versatile DT Arnd Bergmann
  2 siblings, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2016-01-05 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

The device tree version of Versatile AP/PB never had LED support
so we are missing LEDs from our hardware boards. Add this as
syscon LEDs like we did for Integrator and Juno. We need to
spawn devices in the syscon with "simple-mfd" for this to work.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 61 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/versatile-ab.dts b/arch/arm/boot/dts/versatile-ab.dts
index 3279bf1a17a1..6fd7efbead34 100644
--- a/arch/arm/boot/dts/versatile-ab.dts
+++ b/arch/arm/boot/dts/versatile-ab.dts
@@ -30,9 +30,69 @@
 	};
 
 	core-module at 10000000 {
-		compatible = "arm,core-module-versatile", "syscon";
+		compatible = "arm,core-module-versatile", "syscon", "simple-mfd";
 		reg = <0x10000000 0x200>;
 
+		led at 08.0 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x01>;
+			label = "versatile:0";
+			linux,default-trigger = "heartbeat";
+			default-state = "on";
+		};
+		led at 08.1 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x02>;
+			label = "versatile:1";
+			linux,default-trigger = "mmc0";
+			default-state = "off";
+		};
+		led at 08.2 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x04>;
+			label = "versatile:2";
+			linux,default-trigger = "cpu0";
+			default-state = "off";
+		};
+		led at 08.3 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x08>;
+			label = "versatile:3";
+			default-state = "off";
+		};
+		led at 08.4 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x10>;
+			label = "versatile:4";
+			default-state = "off";
+		};
+		led at 08.5 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x20>;
+			label = "versatile:5";
+			default-state = "off";
+		};
+		led at 08.6 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x40>;
+			label = "versatile:6";
+			default-state = "off";
+		};
+		led at 08.7 {
+			compatible = "register-bit-led";
+			offset = <0x08>;
+			mask = <0x80>;
+			label = "versatile:7";
+			default-state = "off";
+		};
+
 		/* OSC1 on AB, OSC4 on PB */
 		osc1: cm_aux_osc at 24M {
 			#clock-cells = <0>;
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] ARM: versatile: enable the right LEDs
  2016-01-05 14:02 [PATCH 0/2] Add LEDs support for the ARM Versatile DT Linus Walleij
  2016-01-05 14:02 ` [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT Linus Walleij
@ 2016-01-05 14:02 ` Linus Walleij
  2016-01-08 10:46   ` Arnd Bergmann
  2016-01-08 10:48 ` [PATCH 0/2] Add LEDs support for the ARM Versatile DT Arnd Bergmann
  2 siblings, 1 reply; 8+ messages in thread
From: Linus Walleij @ 2016-01-05 14:02 UTC (permalink / raw)
  To: linux-arm-kernel

The Versatile now only has device tree boot support, and the
device tree version does not support CONFIG_LEDS_VERSATILE.
Instead select CONFIG_LEDS_SYSCON and MFD_SYSCON, so we can
get LEDs support from the same generic driver that drives
most other ARM reference boards.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/configs/versatile_defconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index 75ef20462030..295408ea9dc7 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -54,6 +54,7 @@ CONFIG_SPI=y
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_PL061=y
 # CONFIG_HWMON is not set
+CONFIG_MFD_SYSCON=y
 CONFIG_FB=y
 CONFIG_FB_ARMCLCD=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
@@ -66,7 +67,7 @@ CONFIG_MMC=y
 CONFIG_MMC_ARMMMCI=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=y
-CONFIG_LEDS_VERSATILE=y
+CONFIG_LEDS_SYSCON=y
 CONFIG_LEDS_TRIGGERS=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
 CONFIG_LEDS_TRIGGER_CPU=y
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT
  2016-01-05 14:02 ` [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT Linus Walleij
@ 2016-01-05 15:37   ` Rob Herring
  2016-01-05 23:24     ` Linus Walleij
  2016-01-08 10:47   ` Arnd Bergmann
  1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring @ 2016-01-05 15:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 5, 2016 at 8:02 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> The device tree version of Versatile AP/PB never had LED support
> so we are missing LEDs from our hardware boards. Add this as
> syscon LEDs like we did for Integrator and Juno. We need to
> spawn devices in the syscon with "simple-mfd" for this to work.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 61 insertions(+), 1 deletion(-)

Acked-by: Rob Herring <robh@kernel.org>

I guess this means you have tested my series on actual h/w now?

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT
  2016-01-05 15:37   ` Rob Herring
@ 2016-01-05 23:24     ` Linus Walleij
  0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2016-01-05 23:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 5, 2016 at 4:37 PM, Rob Herring <robh@kernel.org> wrote:
> On Tue, Jan 5, 2016 at 8:02 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
>> The device tree version of Versatile AP/PB never had LED support
>> so we are missing LEDs from our hardware boards. Add this as
>> syscon LEDs like we did for Integrator and Juno. We need to
>> spawn devices in the syscon with "simple-mfd" for this to work.
>>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>>  arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 61 insertions(+), 1 deletion(-)
>
> Acked-by: Rob Herring <robh@kernel.org>
>
> I guess this means you have tested my series on actual h/w now?

Yups tested today on Versatile AB. I sent some 4 different
patches for various issues (that were there all the time with
the device tree boot) and after that it works like a charm.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/2] ARM: versatile: enable the right LEDs
  2016-01-05 14:02 ` [PATCH 2/2] ARM: versatile: enable the right LEDs Linus Walleij
@ 2016-01-08 10:46   ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-01-08 10:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 05 January 2016 15:02:09 Linus Walleij wrote:
> The Versatile now only has device tree boot support, and the
> device tree version does not support CONFIG_LEDS_VERSATILE.
> Instead select CONFIG_LEDS_SYSCON and MFD_SYSCON, so we can
> get LEDs support from the same generic driver that drives
> most other ARM reference boards.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> 

Applied to next/defconfig, thanks!

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT
  2016-01-05 14:02 ` [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT Linus Walleij
  2016-01-05 15:37   ` Rob Herring
@ 2016-01-08 10:47   ` Arnd Bergmann
  1 sibling, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-01-08 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 05 January 2016 15:02:08 Linus Walleij wrote:
> The device tree version of Versatile AP/PB never had LED support
> so we are missing LEDs from our hardware boards. Add this as
> syscon LEDs like we did for Integrator and Juno. We need to
> spawn devices in the syscon with "simple-mfd" for this to work.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> 

Applied to next/dt, thanks!

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 0/2] Add LEDs support for the ARM Versatile DT
  2016-01-05 14:02 [PATCH 0/2] Add LEDs support for the ARM Versatile DT Linus Walleij
  2016-01-05 14:02 ` [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT Linus Walleij
  2016-01-05 14:02 ` [PATCH 2/2] ARM: versatile: enable the right LEDs Linus Walleij
@ 2016-01-08 10:48 ` Arnd Bergmann
  2 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2016-01-08 10:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday 05 January 2016 15:02:07 Linus Walleij wrote:
> This adds support for the board LEDs to the ARM Versatile device tree
> version.
> 
> I can't decice if this is a regression or not. The board file version
> of Versatile supported the LEDs, the Device Tree version never did
> until now.
> 
> The board file version of Versatile was deleted in
> commit 16956fed35fecde2201e23458cda193526b19559
> "ARM: versatile: switch to DT only booting and remove legacy code"
> 
> If we consider the DT version a full drop-in replacement for the
> board file version, then this should go in as a regression fix. If
> it is not, we can delay it to the next merge window.
> 
> Sending this to arm at kernel.org anyway so the ARM SoC maintainers can
> decide.
> 

It's really late, but I'd consider them sort-of fixes, and they seem
rather harmless, so I've put them in.

	Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-08 10:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 14:02 [PATCH 0/2] Add LEDs support for the ARM Versatile DT Linus Walleij
2016-01-05 14:02 ` [PATCH 1/2] ARM: versatile: add the syscon LEDs to the DT Linus Walleij
2016-01-05 15:37   ` Rob Herring
2016-01-05 23:24     ` Linus Walleij
2016-01-08 10:47   ` Arnd Bergmann
2016-01-05 14:02 ` [PATCH 2/2] ARM: versatile: enable the right LEDs Linus Walleij
2016-01-08 10:46   ` Arnd Bergmann
2016-01-08 10:48 ` [PATCH 0/2] Add LEDs support for the ARM Versatile DT Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.