Skip to contentSkip to conversation

arm64: dts: marvell: espressobin: Add support for LED2

PATCH In review Pali Rohár 4 participants 7 messages Oct 6, 2020 – Nov 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: marvell: espressobin: Add support for LED2

LED2 is connected to MPP1_2 pin. It is working only on V7 boards. V5 boards have hw bug which cause that LED2 is non-working.

So enable LED2 only for Espressobin V7 boards.

Note that LED1 is connected to LED_WLAN# pin on miniPCIe card and LED3 to power supply. Therefore on Espressobin board only LED2 can be controlled directly from the host. LED1 is possible to control via WiFi card inserted in miniPCIe slot if driver for particular card supports it.

---

Previous version of this patch was sent by Uwe in March 2018, but it did not work on any tested V5 board. Now we know it was due to V5 HW bug.

https://lore.kernel.org/linux-arm-kernel/[email protected]/

---
 .../dts/marvell/armada-3720-espressobin-v7-emmc.dts |  4 ++++
 .../boot/dts/marvell/armada-3720-espressobin-v7.dts |  4 ++++
 .../boot/dts/marvell/armada-3720-espressobin.dtsi   | 13 +++++++++++++
 3 files changed, 21 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts +4 -0
index 4775a7eda481..75401eab4d42 100644
@@ -39,3 +39,7 @@
 &sdhci0 {
 	status = "okay";
 };
+
+&led2 {
+	status = "okay";
+};
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts +4 -0
index c47a93978386..48a7f50fb427 100644
@@ -34,3 +34,7 @@
 &switch0port3 {
 	label = "wan";
 };
+
+&led2 {
+	status = "okay";
+};
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi +13 -0
index 8a1c678bea5f..daffe136c523 100644
@@ -41,6 +41,19 @@
 			  3300000 0x0>;
 		enable-active-high;
 	};
+
+	led2: gpio-led2 {
+		/* led2 is working only on v7 board */
+		status = "disabled";
+
+		compatible = "gpio-leds";
+
+		led2 {
+			label = "led2";
+			gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
 };
 
 /* J9 */
Signature · 1 line
2.20.1
#1 lore raw

Hello! Gregory, I would like to remind you following patch.

Andre, if you have a time, could you test it too?

Quoted 76 lines · On Tuesday 06 October 2020 14:44:55 Pali Rohár wrote:

LED2 is connected to MPP1_2 pin. It is working only on V7 boards. V5 boards have hw bug which cause that LED2 is non-working.

So enable LED2 only for Espressobin V7 boards.

Note that LED1 is connected to LED_WLAN# pin on miniPCIe card and LED3 to power supply. Therefore on Espressobin board only LED2 can be controlled directly from the host. LED1 is possible to control via WiFi card inserted in miniPCIe slot if driver for particular card supports it.

---

Previous version of this patch was sent by Uwe in March 2018, but it did not work on any tested V5 board. Now we know it was due to V5 HW bug.

https://lore.kernel.org/linux-arm-kernel/[email protected]/

---
 .../dts/marvell/armada-3720-espressobin-v7-emmc.dts |  4 ++++
 .../boot/dts/marvell/armada-3720-espressobin-v7.dts |  4 ++++
 .../boot/dts/marvell/armada-3720-espressobin.dtsi   | 13 +++++++++++++
 3 files changed, 21 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts +4 -0
index 4775a7eda481..75401eab4d42 100644
@@ -39,3 +39,7 @@
 &sdhci0 {
 	status = "okay";
 };
+
+&led2 {
+	status = "okay";
+};
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts +4 -0
index c47a93978386..48a7f50fb427 100644
@@ -34,3 +34,7 @@
 &switch0port3 {
 	label = "wan";
 };
+
+&led2 {
+	status = "okay";
+};
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi +13 -0
index 8a1c678bea5f..daffe136c523 100644
@@ -41,6 +41,19 @@
 			  3300000 0x0>;
 		enable-active-high;
 	};
+
+	led2: gpio-led2 {
+		/* led2 is working only on v7 board */
+		status = "disabled";
+
+		compatible = "gpio-leds";
+
+		led2 {
+			label = "led2";
+			gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
 };
 
 /* J9 */
Signature · 1 line
2.20.1
maintainer
#2 lore raw
Quoted 1 line · Pali Rohár

Hello! Gregory, I would like to remind you following patch.

Hi Pali

Since the merge window is open at the moment, no new patches will be accepted until it closes.

You should resend once -rc1 is out.

Andrew

#4 lore raw
In reply to Pali Rohár
Quoted 3 lines · Pali Rohár

Hello! Gregory, I would like to remind you following patch.

Andre, if you have a time, could you test it too?

I would, but I desoldered all LEDs a long time ago because they're way too bright...

Regards,
Andre

#5 lore raw
Quoted 7 lines · On Wednesday 21 October 2020 17:01:19 Andre Heider wrote:
Quoted 3 lines · Pali Rohár

Hello! Gregory, I would like to remind you following patch.

Andre, if you have a time, could you test it too?

I would, but I desoldered all LEDs a long time ago because they're way too bright...

No, problem, on V5 is needed just to check that led2 is not exported in sysfs.

#3 lore raw
In reply to Andrew Lunn
Quoted 9 lines · On Monday 19 October 2020 14:25:37 Andrew Lunn wrote:
Quoted 1 line · Pali Rohár

Hello! Gregory, I would like to remind you following patch.

Hi Pali

Since the merge window is open at the moment, no new patches will be accepted until it closes.

You should resend once -rc1 is out.

Hello! -rc1 was already released. And as there are no new changes in
https://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git/
repository since I sent this patch, I guess that I resending it not needed.

maintainer
#6 lore raw
In reply to Pali Rohár

Hi Pali,

Quoted 5 lines

LED2 is connected to MPP1_2 pin. It is working only on V7 boards. V5 boards have hw bug which cause that LED2 is non-working.

So enable LED2 only for Espressobin V7 boards.

Quoted 7 lines

Note that LED1 is connected to LED_WLAN# pin on miniPCIe card and LED3 to power supply. Therefore on Espressobin board only LED2 can be controlled directly from the host. LED1 is possible to control via WiFi card inserted in miniPCIe slot if driver for particular card supports it.

Applied on mvebu/dt64

Thanks,

Gregory

Quoted 64 lines

---

Previous version of this patch was sent by Uwe in March 2018, but it did not work on any tested V5 board. Now we know it was due to V5 HW bug.

https://lore.kernel.org/linux-arm-kernel/[email protected]/

---
 .../dts/marvell/armada-3720-espressobin-v7-emmc.dts |  4 ++++
 .../boot/dts/marvell/armada-3720-espressobin-v7.dts |  4 ++++
 .../boot/dts/marvell/armada-3720-espressobin.dtsi   | 13 +++++++++++++
 3 files changed, 21 insertions(+)
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts +4 -0
index 4775a7eda481..75401eab4d42 100644
@@ -39,3 +39,7 @@
 &sdhci0 {
 	status = "okay";
 };
+
+&led2 {
+	status = "okay";
+};
arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts +4 -0
index c47a93978386..48a7f50fb427 100644
@@ -34,3 +34,7 @@
 &switch0port3 {
 	label = "wan";
 };
+
+&led2 {
+	status = "okay";
+};
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dtsi +13 -0
index 8a1c678bea5f..daffe136c523 100644
@@ -41,6 +41,19 @@
 			  3300000 0x0>;
 		enable-active-high;
 	};
+
+	led2: gpio-led2 {
+		/* led2 is working only on v7 board */
+		status = "disabled";
+
+		compatible = "gpio-leds";
+
+		led2 {
+			label = "led2";
+			gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
+			default-state = "off";
+		};
+	};
 };
 
 /* J9 */
Signature · 1 line
2.20.1
Signature · 3 lines
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com