Add LEDs support for the ARM Versatile DT
Subsystems (2)
cover Add LEDs support for the ARM Versatile DT
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(-)
Signature · 1 line
2.4.3
PATCH 1/2 ARM: versatile: add the syscon LEDs to the DT
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.
--- arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-)
arch/arm/boot/dts/versatile-ab.dts +61 -1
@@ -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>;
Signature · 1 line
2.4.3
Rob Herring
maintainerPATCH 1/2 ARM: versatile: add the syscon LEDs to the DT
Quoted 9 lines · Linus Walleij
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 <[email protected]>--- arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-)
I guess this means you have tested my series on actual h/w now?
Rob
PATCH 1/2 ARM: versatile: add the syscon LEDs to the DT
Quoted 6 lines · Rob Herring
Quoted 5 lines · Linus Walleij
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.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Linus Walleij <[email protected]>--- arch/arm/boot/dts/versatile-ab.dts | 62 +++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-)Acked-by Rob Herring <[email protected]>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
Arnd Bergmann
AppliedPATCH 1/2 ARM: versatile: add the syscon LEDs to the DT
In reply to Linus WalleijQuoted 7 lines · 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 <[email protected]>
Applied to next/dt, thanks!
Arnd
PATCH 2/2 ARM: versatile: enable the right LEDs
In reply to Linus WalleijThe 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.
--- arch/arm/configs/versatile_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/configs/versatile_defconfig +2 -1
@@ -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
Signature · 1 line
2.4.3
Arnd Bergmann
AppliedPATCH 2/2 ARM: versatile: enable the right LEDs
Quoted 8 lines · 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 selectCONFIG_LEDS_SYSCONandMFD_SYSCON, so we can get LEDs support from the same generic driver that drives most other ARM reference boards.Signed-off-by Linus Walleij <[email protected]>
Applied to next/defconfig, thanks!
Arnd
cover Add LEDs support for the ARM Versatile DT
In reply to Linus WalleijQuoted 11 lines · 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"
Quoted 7 lines
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