* [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on
@ 2026-11-06 18:40 Owen O'Hehir
2026-11-06 18:51 ` E Shattow
2026-11-06 18:54 ` Conor Dooley
0 siblings, 2 replies; 9+ messages in thread
From: Owen O'Hehir @ 2026-11-06 18:40 UTC (permalink / raw)
To: Conor Dooley, Emil Renner Berthing
Cc: E Shattow, Rob Herring, Krzysztof Kozlowski, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv,
devicetree, linux-kernel
The firmware turns the status power LED on, but the node has no
default-state, so the LED switches off when leds-gpio probes and the
board looks powered down.
Default the LED to on.
Tested on a VisionFive 2 v1.3B.
Fixes: 1ec99dfe9eb0 ("riscv: dts: starfive: jh7110-common: add status power led node")
Signed-off-by: Owen O'Hehir <oo.hehir@gmail.com>
---
arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
index 64de468f2..7ec94e968 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
@@ -44,6 +44,7 @@ leds {
led_status_power: led-0 {
gpios = <&aongpio 3 GPIO_ACTIVE_HIGH>;
+ default-state = "on";
};
};
base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b
--
2.43.0
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 18:40 [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on Owen O'Hehir @ 2026-11-06 18:51 ` E Shattow 2026-11-06 19:59 ` Owen O'Hehir 2026-11-06 18:54 ` Conor Dooley 1 sibling, 1 reply; 9+ messages in thread From: E Shattow @ 2026-11-06 18:51 UTC (permalink / raw) To: Owen O'Hehir, Conor Dooley, Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel Hi Owen, On 11/6/26 10:40, Owen O'Hehir wrote: > The firmware turns the status power LED on, but the node has no > default-state, so the LED switches off when leds-gpio probes and the > board looks powered down. > > Default the LED to on. > > Tested on a VisionFive 2 v1.3B. > > Fixes: 1ec99dfe9eb0 ("riscv: dts: starfive: jh7110-common: add status power led node") > Signed-off-by: Owen O'Hehir <oo.hehir@gmail.com> > --- > arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi > index 64de468f2..7ec94e968 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi > @@ -44,6 +44,7 @@ leds { > > led_status_power: led-0 { > gpios = <&aongpio 3 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > }; > }; > > > base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b I think this change may disagree with fastboot select function on VisionFive2 Lite, where (if I understand this correctly) it is read as an input; see that schematic listed as the "VisionFive 2 Lit Schematic": https://www.starfivetech.com/en/index.php?s=docs&c=search&keyword=schematic You may reference also the ghidra archive https://web.archive.org/web/20260718140236/https://freeshell.de/e/riscv64/hrv-jhre-JH-7110%20BootROM%20analysis_2026_02_22.gar for decompilation of JH-7110 BootROM loader, and there (to the best of my understanding) it is not interacting with that register so it must be purely the SoC reset state. -E ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 18:51 ` E Shattow @ 2026-11-06 19:59 ` Owen O'Hehir 2026-11-06 20:30 ` E Shattow 0 siblings, 1 reply; 9+ messages in thread From: Owen O'Hehir @ 2026-11-06 19:59 UTC (permalink / raw) To: E Shattow, Conor Dooley, Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel Hi E, Thanks for checking. You're right about the commit message: I saw the LED lit before Linux probes and assumed the firmware set it, without checking where it comes from. On the Lite, the schematic (sheet 21) shows RGPIO3 driving the system LED and also used for fastboot detection, through jumper J20 that pulls it to 1.8 V via R257 (1k). Detection happens at reset, before Linux, and R257 limits the current whichever level the pin is driven to afterwards, so I don't think driving it high conflicts there. Owen ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 19:59 ` Owen O'Hehir @ 2026-11-06 20:30 ` E Shattow 2026-11-06 21:12 ` Owen O'Hehir 2026-11-06 21:13 ` Owen O'Hehir 0 siblings, 2 replies; 9+ messages in thread From: E Shattow @ 2026-11-06 20:30 UTC (permalink / raw) To: Owen O'Hehir, Conor Dooley, Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel Hi Owen, On 11/6/26 11:59, Owen O'Hehir wrote: > Hi E, > > Thanks for checking. You're right about the commit message: I saw the > LED lit before Linux probes and assumed the firmware set it, without > checking where it comes from. > > On the Lite, the schematic (sheet 21) shows RGPIO3 driving the system > LED and also used for fastboot detection, through jumper J20 that pulls > it to 1.8 V via R257 (1k). Detection happens at reset, before Linux, No, the software is not any concern for a hardware description. > and R257 limits the current whichever level the pin is driven to > afterwards, so I don't think driving it high conflicts there. > > Owen It may or may not conflict in software operation but that has nothing to do with if it should be applied to device tree that describes hardware. Conor since applied, which is trusting you researched this correctly before sending to the list. I'm saying that all things being good in intention this is obviously not well researched, and not allowing for discussion to verify the fix before applying. Anyways it is a user light not a power LED. Pine64 Star64 has a power LED and this user LED. If a board does not have power LED then co-opting the user LED is something that should be done in inittab not treating upstream device tree as a preferences config file for userland. -E ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 20:30 ` E Shattow @ 2026-11-06 21:12 ` Owen O'Hehir 2026-11-06 21:13 ` Owen O'Hehir 1 sibling, 0 replies; 9+ messages in thread From: Owen O'Hehir @ 2026-11-06 21:12 UTC (permalink / raw) To: E Shattow, Conor Dooley, Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel Hi E, Ok, fair point. Conor, could you please drop this patch? Apologies for the hassle. Owen ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 20:30 ` E Shattow 2026-11-06 21:12 ` Owen O'Hehir @ 2026-11-06 21:13 ` Owen O'Hehir 1 sibling, 0 replies; 9+ messages in thread From: Owen O'Hehir @ 2026-11-06 21:13 UTC (permalink / raw) To: E Shattow, Conor Dooley, Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel Hi E, Ok, fair point. Conor, could you please drop this patch? Apologies for the hassle. Owen ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 18:40 [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on Owen O'Hehir 2026-11-06 18:51 ` E Shattow @ 2026-11-06 18:54 ` Conor Dooley 2026-11-06 19:06 ` E Shattow 1 sibling, 1 reply; 9+ messages in thread From: Conor Dooley @ 2026-11-06 18:54 UTC (permalink / raw) To: Conor Dooley, Emil Renner Berthing, Owen O'Hehir Cc: Conor Dooley, E Shattow, Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel From: Conor Dooley <conor.dooley@microchip.com> On Fri, 06 Nov 2026 18:40:55 +0000, Owen O'Hehir wrote: > The firmware turns the status power LED on, but the node has no > default-state, so the LED switches off when leds-gpio probes and the > board looks powered down. > > Default the LED to on. > > Tested on a VisionFive 2 v1.3B. > > [...] Applied to riscv-dt-fixes, thanks! [1/1] riscv: dts: starfive: jh7110-common: keep the status power LED on https://git.kernel.org/conor/c/68dbe2550bd4 Thanks, Conor. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 18:54 ` Conor Dooley @ 2026-11-06 19:06 ` E Shattow 2026-11-06 21:15 ` Conor Dooley 0 siblings, 1 reply; 9+ messages in thread From: E Shattow @ 2026-11-06 19:06 UTC (permalink / raw) To: Conor Dooley, Emil Renner Berthing, Owen O'Hehir Cc: Conor Dooley, Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel Hi Conor, On 11/6/26 10:54, Conor Dooley wrote: > From: Conor Dooley <conor.dooley@microchip.com> > > On Fri, 06 Nov 2026 18:40:55 +0000, Owen O'Hehir wrote: >> The firmware turns the status power LED on, but the node has no >> default-state, so the LED switches off when leds-gpio probes and the >> board looks powered down. >> >> Default the LED to on. >> >> Tested on a VisionFive 2 v1.3B. >> >> [...] > > Applied to riscv-dt-fixes, thanks! > > [1/1] riscv: dts: starfive: jh7110-common: keep the status power LED on > https://git.kernel.org/conor/c/68dbe2550bd4 > > Thanks, > Conor. I replied this a moment earlier: https://lore.kernel.org/lkml/179fe9e8-322b-4745-8734-d5de5f1e8487@freeshell.de/ This disagrees with VisionFive 2 Lite schematic; if when this node is consumed by a bootloader it will be evident we are not describing the hardware correctly, no? If you want the light on and it wasn't on at reset or due to boot ROM, then that is userland stuff and not hardware description... but that is your decision to make as maintainer. -E ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on 2026-11-06 19:06 ` E Shattow @ 2026-11-06 21:15 ` Conor Dooley 0 siblings, 0 replies; 9+ messages in thread From: Conor Dooley @ 2026-11-06 21:15 UTC (permalink / raw) To: E Shattow Cc: Emil Renner Berthing, Owen O'Hehir, Conor Dooley, Rob Herring, Krzysztof Kozlowski, Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2011 bytes --] On Fri, Nov 06, 2026 at 11:06:22AM -0800, E Shattow wrote: > Hi Conor, > > On 11/6/26 10:54, Conor Dooley wrote: > > From: Conor Dooley <conor.dooley@microchip.com> > > > > On Fri, 06 Nov 2026 18:40:55 +0000, Owen O'Hehir wrote: > >> The firmware turns the status power LED on, but the node has no > >> default-state, so the LED switches off when leds-gpio probes and the > >> board looks powered down. > >> > >> Default the LED to on. > >> > >> Tested on a VisionFive 2 v1.3B. > >> > >> [...] > > > > Applied to riscv-dt-fixes, thanks! > > > > [1/1] riscv: dts: starfive: jh7110-common: keep the status power LED on > > https://git.kernel.org/conor/c/68dbe2550bd4 > > > > Thanks, > > Conor. > > I replied this a moment earlier: > https://lore.kernel.org/lkml/179fe9e8-322b-4745-8734-d5de5f1e8487@freeshell.de/ > > This disagrees with VisionFive 2 Lite schematic; if when this node is > consumed by a bootloader it will be evident we are not describing the > hardware correctly, no? I am not sure if that's actually relevant though? If the visionfive2lite needs this gpio then it shouldn't be listed in a leds node. Changing the default status of it doesn't affect the fact that it is wrong to begin with, wrong before the patch and wrong afterwards. If there are some boards that include this common.dtsi but don't have these leds, they're not common and should be moved to the relevant dts files. If you know what those are, please send a patch doing the move. > If you want the light on and it wasn't on at reset or due to boot ROM, > then that is userland stuff and not hardware description... but that is > your decision to make as maintainer. It's a power status led, I think it's pretty reasonable for it to actually represent power status without intervention in userspace, the alternative I guess could be something like setting the function property to "power" - but I'm not sure if that does anything for gpio-leds. Cheers, Conor. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-11-06 21:15 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-11-06 18:40 [PATCH] riscv: dts: starfive: jh7110-common: keep the status power LED on Owen O'Hehir 2026-11-06 18:51 ` E Shattow 2026-11-06 19:59 ` Owen O'Hehir 2026-11-06 20:30 ` E Shattow 2026-11-06 21:12 ` Owen O'Hehir 2026-11-06 21:13 ` Owen O'Hehir 2026-11-06 18:54 ` Conor Dooley 2026-11-06 19:06 ` E Shattow 2026-11-06 21:15 ` Conor Dooley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®