ARM: dts: imx27-phytec-phycore-*: Add diagnostic PMIC LEDs
Subsystems (2)
PATCH 1/1 ARM: dts: imx27-phytec-phycore-*: Add diagnostic PMIC LEDs
PCM-038 module have three triple LEDs connected to PMIC which can be used for diagnostic purposes. This patch adds support for these LEDs for PCM-038 SOM and adds basic LED-triggers for these LEDs for PCM-970 RDK, the remaining LEDs are available for use from userspace.
--- arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 50 +++++++++++++++++++++++++ arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 6 +++ 2 files changed, 56 insertions(+)
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts +50 -0
@@ -96,6 +96,56 @@ status = "okay"; }; +&pmicleds { + ledr1: led at 3 { + reg = <3>; + label = "system:red1:user"; + }; + + ledg1: led at 4 { + reg = <4>; + label = "system:green1:user"; + }; + + ledb1: led at 5 { + reg = <5>; + label = "system:blue1:user"; + }; + + ledr2: led at 6 { + reg = <6>; + label = "system:red2:user"; + }; + + ledg2: led at 7 { + reg = <7>; + label = "system:green2:user"; + }; + + ledb2: led at 8 { + reg = <8>; + label = "system:blue2:user"; + }; + + ledr3: led at 9 { + reg = <9>; + label = "system:red3:nand"; + linux,default-trigger = "nand-disk"; + }; + + ledg3: led at 10 { + reg = <10>; + label = "system:green3:live"; + linux,default-trigger = "heartbeat"; + }; + + ledb3: led at 11 { + reg = <11>; + label = "system:blue3:cpu"; + linux,default-trigger = "cpu0"; + }; +}; + &sdhci2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sdhc2>;
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi +6 -0
@@ -69,6 +69,12 @@ fsl,mc13xxx-uses-adc; fsl,mc13xxx-uses-rtc; + pmicleds: leds { + #address-cells = <1>; + #size-cells = <0>; + led-control = <0x001 0x000 0x000 0x000 0x000 0x000>; + }; + regulators { /* SW1A and SW1B joined operation */ sw1_reg: sw1a {
Signature · 1 line
1.8.3.2
PATCH 1/1 ARM: dts: imx27-phytec-phycore-*: Add diagnostic PMIC LEDs
Quoted 57 lines · Alexander Shiyan
PCM-038 module have three triple LEDs connected to PMIC which can be used for diagnostic purposes. This patch adds support for these LEDs for PCM-038 SOM and adds basic LED-triggers for these LEDs for PCM-970 RDK, the remaining LEDs are available for use from userspace.
Signed-off-by Alexander Shiyan <[email protected]>--- arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 50 +++++++++++++++++++++++++ arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 6 +++ 2 files changed, 56 insertions(+)arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts +37
-0@@ -96,6 +96,56 @@ status = "okay"; }; +&pmicleds { + ledr1: led at 3 { + reg = <3>; + label = "system:red1:user"; + }; + + ledg1: led at 4 { + reg = <4>; + label = "system:green1:user"; + }; + + ledb1: led at 5 { + reg = <5>; + label = "system:blue1:user"; + }; + + ledr2: led at 6 { + reg = <6>; + label = "system:red2:user"; + }; + + ledg2: led at 7 { + reg = <7>; + label = "system:green2:user"; + }; + + ledb2: led at 8 { + reg = <8>; + label = "system:blue2:user"; + }; + + ledr3: led at 9 { + reg = <9>; + label = "system:red3:nand"; + linux,default-trigger = "nand-disk"; + }; +
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts line 145
Quoted 10 lines
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts +10
-0+ ledg3: led at 10 { + reg = <10>; + label = "system:green3:live"; + linux,default-trigger = "heartbeat"; + }; + + ledb3: led at 11 { + reg = <11>; + label = "system:blue3:cpu"; + linux,default-trigger = "cpu0";
I do not see this trigger and above "nand-disk" in Documentation/devicetree/bindings/leds/common.txt.
So they're just missing from bindings doc and kernel actually supports them?
Quoted 11 lines
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts +3
-0+ }; +}; + &sdhci2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sdhc2>;arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi +0
-0
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi line 75
Quoted 7 lines
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi +4
-0@@ -69,6 +69,12 @@ fsl,mc13xxx-uses-adc; fsl,mc13xxx-uses-rtc; + pmicleds: leds { + #address-cells = <1>; + #size-cells = <0>; + led-control = <0x001 0x000 0x000 0x000 0x000 0x000>;
I can only see led-control mentioned in Documentation/devicetree/bindings/mfd/mc13xxx.txt as below.
- leds : Contain the led nodes and initial register values in property "led-control".
But I failed to see where this property is actually defined.
Shawn
Quoted 8 lines
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi +2
-0+ }; + regulators { /* SW1A and SW1B joined operation */ sw1_reg: sw1a {Signature · 1 line
1.8.3.2
???????????, 17 ??????? 2014, 10:55 +08:00 ?? Shawn Guo <[email protected]>:
Quoted 18 lines · Alexander Shiyan
Quoted 9 lines
PCM-038 module have three triple LEDs connected to PMIC which can be used for diagnostic purposes. This patch adds support for these LEDs for PCM-038 SOM and adds basic LED-triggers for these LEDs for PCM-970 RDK, the remaining LEDs are available for use from userspace.
Signed-off-by Alexander Shiyan <[email protected]>--- arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts | 50+++++++++++++++++++++++++
Review
Quoted 4 lines
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi | 6 +++ 2 files changed, 56 insertions(+)(quoted diff) +0
-0
b/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dtsQuoted 2 lines
index 9f8ad51..9a07543 100644
---a/arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts
...
Quoted 14 lines
Quoted 14 lines
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts +14
-0+ ledr3: led at 9 { + reg = <9>; + label = "system:red3:nand"; + linux,default-trigger = "nand-disk"; + }; + + ledg3: led at 10 { + reg = <10>; + label = "system:green3:live"; + linux,default-trigger = "heartbeat"; + }; + + ledb3: led at 11 { + reg = <11>;
Quoted 8 lines
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts line 145
Quoted 2 lines
arch/arm/boot/dts/imx27-phytec-phycore-rdk.dts +2
-0+ label = "system:blue3:cpu"; + linux,default-trigger = "cpu0";I do not see this trigger and above "nand-disk" in
Documentation/devicetree/bindings/leds/common.txt.
So they're just missing from bindings doc and kernel actually supports them?
Yes, seems this is undocumented yet.
Defined in drivers/mtd/nand/nand_base.c: nand_base_init(). Present in the mainline kernel.
...
Quoted 13 lines
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi line 75
Quoted 9 lines
+++
b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsiarch/arm/boot/dts/imx27-phytec-phycore-som.dtsi +4
-0@@ -69,6 +69,12 @@ fsl,mc13xxx-uses-adc; fsl,mc13xxx-uses-rtc; + pmicleds: leds { + #address-cells = <1>; + #size-cells = <0>; + led-control = <0x001 0x000 0x000 0x000 0x000 0x000>;I can only see led-control mentioned in
Documentation/devicetree/bindings/mfd/mc13xxx.txtas below.
Quoted 4 lines
- leds : Contain the led nodes and initial register values in property "led-control".
But I failed to see where this property is actually defined.
Not quite understand the question. Please rephrase.
---
PATCH 1/1 ARM: dts: imx27-phytec-phycore-*: Add diagnostic PMIC LEDs
Quoted 13 lines · Alexander Shiyan
Quoted 13 lines
arch/arm/boot/dts/imx27-phytec-phycore-som.dtsi line 75
Quoted 9 lines
+++
b/arch/arm/boot/dts/imx27-phytec-phycore-som.dtsiarch/arm/boot/dts/imx27-phytec-phycore-som.dtsi +4
-0@@ -69,6 +69,12 @@ fsl,mc13xxx-uses-adc; fsl,mc13xxx-uses-rtc; + pmicleds: leds { + #address-cells = <1>; + #size-cells = <0>; + led-control = <0x001 0x000 0x000 0x000 0x000 0x000>;I can only see led-control mentioned in
Documentation/devicetree/bindings/mfd/mc13xxx.txtas below.
Quoted 6 lines
Quoted 4 lines
- leds : Contain the led nodes and initial register values in property "led-control".
But I failed to see where this property is actually defined.
Not quite understand the question. Please rephrase.
The documentation of property "led-control" isn't so clear to me. But anyway it's not a problem of this patch. Patch applied.
Shawn