[PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars

FUKAUMI Naoki naoki at milkv.io
Mon Jun 24 03:42:47 PDT 2024


Hi,

On 6/24/24 18:44, Emil Renner Berthing wrote:
> FUKAUMI Naoki wrote:
>> Hi,
>>
>> On 6/21/24 10:02, FUKAUMI Naoki wrote:
>>> Hi,
>>>
>>> On 6/21/24 08:13, Heinrich Schuchardt wrote:
>>>> On 6/13/24 04:48, FUKAUMI Naoki wrote:
>>>>> Milk-V Mars has a green LED to show system load. This patch enables
>>>>> a green LED as a heartbeat LED.
>>>>>
>>>>> Signed-off-by: FUKAUMI Naoki <naoki at milkv.io>
>>>>> ---
>>>>>    arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts | 13 +++++++++++++
>>>>>    1 file changed, 13 insertions(+)
>>>>>
>>>>> diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
>>>>> b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
>>>>> index fa0eac78e0ba..4f4bbf64dbe4 100644
>>>>> --- a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
>>>>> +++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
>>>>> @@ -4,11 +4,24 @@
>>>>>     */
>>>>>    /dts-v1/;
>>>>> +#include <dt-bindings/gpio/gpio.h>
>>>>> +#include <dt-bindings/leds/common.h>
>>>>>    #include "jh7110-common.dtsi"
>>>>>    / {
>>>>>        model = "Milk-V Mars";
>>>>>        compatible = "milkv,mars", "starfive,jh7110";
>>>>> +
>>>>> +    leds {
>>>>> +        compatible = "gpio-leds";
>>>>> +
>>>>> +        led-0 {
>>>>> +            gpios = <&aongpio 3 GPIO_ACTIVE_HIGH>;
>>>>> +            color = <LED_COLOR_ID_GREEN>;
>>>>> +            linux,default-trigger = "heartbeat";
>>>>> +            function = LED_FUNCTION_HEARTBEAT;
>>>>
>>>> According to the schematics the StarFive VisionFive 2 board like the
>>>> Mars board has RGPIO3 connected to a green LED to display the power
>>>> status. Shouldn't we consider both boards?
>>>
>>> I think LED usage is vendor/board specific.
>>
>> do I need to do something for VF2 to merge my patch?
> 
> It's not strictly required, but it would be great if you could add the LED to
> the VF2 too, thank you.
> 
> Also I'm not sure if you saw my previous reply:
> https://lore.kernel.org/linux-riscv/CAJM55Z_j8gWFyKvsiu-oGDV7Hacr4Amt5FdkHdjKnhZwZgxncA@mail.gmail.com/

sorry, I missed your previous reply...

I think it's better to follow vendor kernel behavior (except strange 
label...), so I want to use linux,default-trigger in dts.

Best regards,

--
FUKAUMI Naoki
Shenzhen MilkV Technology Co., Ltd.

> /Emil
> 



More information about the linux-riscv mailing list