* [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger
@ 2024-06-13 2:48 FUKAUMI Naoki
2024-06-13 2:48 ` [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars FUKAUMI Naoki
0 siblings, 1 reply; 8+ messages in thread
From: FUKAUMI Naoki @ 2024-06-13 2:48 UTC (permalink / raw)
To: kernel; +Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, FUKAUMI Naoki
Milk-V Mars has a green LED for heartbeat. This patch adds and enables
related configuration for it.
Signed-off-by: FUKAUMI Naoki <naoki@milkv.io>
---
arch/riscv/configs/defconfig | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 12dc8c73a8ac..dce53f36e68d 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -144,6 +144,7 @@ CONFIG_STMMAC_ETH=m
CONFIG_MICREL_PHY=y
CONFIG_MICROSEMI_PHY=y
CONFIG_CAN_RCAR_CANFD=m
+# CONFIG_INPUT_LEDS is not set
CONFIG_INPUT_MOUSEDEV=y
CONFIG_KEYBOARD_SUN4I_LRADC=m
CONFIG_SERIAL_8250=y
@@ -223,6 +224,11 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_STARFIVE=y
CONFIG_MMC_SDHI=y
CONFIG_MMC_SUNXI=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_SUN6I=y
CONFIG_DMADEVICES=y
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
2024-06-13 2:48 [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger FUKAUMI Naoki
@ 2024-06-13 2:48 ` FUKAUMI Naoki
2024-06-20 23:13 ` Heinrich Schuchardt
0 siblings, 1 reply; 8+ messages in thread
From: FUKAUMI Naoki @ 2024-06-13 2:48 UTC (permalink / raw)
To: kernel; +Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, FUKAUMI Naoki
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@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;
+ };
+ };
};
&gmac0 {
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
2024-06-13 2:48 ` [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars FUKAUMI Naoki
@ 2024-06-20 23:13 ` Heinrich Schuchardt
2024-06-21 1:02 ` FUKAUMI Naoki
0 siblings, 1 reply; 8+ messages in thread
From: Heinrich Schuchardt @ 2024-06-20 23:13 UTC (permalink / raw)
To: FUKAUMI Naoki; +Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, kernel
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@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?
Best regards
Heinrich
> + };
> + };
> };
>
> &gmac0 {
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
2024-06-20 23:13 ` Heinrich Schuchardt
@ 2024-06-21 1:02 ` FUKAUMI Naoki
2024-06-23 23:09 ` FUKAUMI Naoki
0 siblings, 1 reply; 8+ messages in thread
From: FUKAUMI Naoki @ 2024-06-21 1:02 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, kernel
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@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.
Best regards,
--
FUKAUMI Naoki
Shenzhen MilkV Technology Co., Ltd.
> Best regards
>
> Heinrich
>
>> + };
>> + };
>> };
>> &gmac0 {
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
2024-06-21 1:02 ` FUKAUMI Naoki
@ 2024-06-23 23:09 ` FUKAUMI Naoki
2024-06-24 9:44 ` Emil Renner Berthing
0 siblings, 1 reply; 8+ messages in thread
From: FUKAUMI Naoki @ 2024-06-23 23:09 UTC (permalink / raw)
To: Heinrich Schuchardt
Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, kernel
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@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?
--
FUKAUMI Naoki
Shenzhen MilkV Technology Co., Ltd.
> Best regards,
>
> --
> FUKAUMI Naoki
> Shenzhen MilkV Technology Co., Ltd.
>
>> Best regards
>>
>> Heinrich
>>
>>> + };
>>> + };
>>> };
>>> &gmac0 {
>>
>>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
2024-06-23 23:09 ` FUKAUMI Naoki
@ 2024-06-24 9:44 ` Emil Renner Berthing
2024-06-24 10:42 ` FUKAUMI Naoki
0 siblings, 1 reply; 8+ messages in thread
From: Emil Renner Berthing @ 2024-06-24 9:44 UTC (permalink / raw)
To: FUKAUMI Naoki, Heinrich Schuchardt
Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, kernel
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@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/
/Emil
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars
2024-06-24 9:44 ` Emil Renner Berthing
@ 2024-06-24 10:42 ` FUKAUMI Naoki
0 siblings, 0 replies; 8+ messages in thread
From: FUKAUMI Naoki @ 2024-06-24 10:42 UTC (permalink / raw)
To: Emil Renner Berthing, Heinrich Schuchardt
Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, kernel
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@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
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger
@ 2024-06-13 0:58 FUKAUMI Naoki
0 siblings, 0 replies; 8+ messages in thread
From: FUKAUMI Naoki @ 2024-06-13 0:58 UTC (permalink / raw)
To: kernel; +Cc: robh, krzk+dt, conor+dt, devicetree, linux-riscv, FUKAUMI Naoki
Milk-V Mars has a green LED for heartbeat. This patch adds and enables
related configuration for it.
Signed-off-by: FUKAUMI Naoki <naoki@milkv.com>
---
arch/riscv/configs/defconfig | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index 12dc8c73a8ac..dce53f36e68d 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -144,6 +144,7 @@ CONFIG_STMMAC_ETH=m
CONFIG_MICREL_PHY=y
CONFIG_MICROSEMI_PHY=y
CONFIG_CAN_RCAR_CANFD=m
+# CONFIG_INPUT_LEDS is not set
CONFIG_INPUT_MOUSEDEV=y
CONFIG_KEYBOARD_SUN4I_LRADC=m
CONFIG_SERIAL_8250=y
@@ -223,6 +224,11 @@ CONFIG_MMC_DW=y
CONFIG_MMC_DW_STARFIVE=y
CONFIG_MMC_SDHI=y
CONFIG_MMC_SUNXI=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_SUN6I=y
CONFIG_DMADEVICES=y
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-06-24 10:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 2:48 [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger FUKAUMI Naoki
2024-06-13 2:48 ` [PATCH 2/2] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars FUKAUMI Naoki
2024-06-20 23:13 ` Heinrich Schuchardt
2024-06-21 1:02 ` FUKAUMI Naoki
2024-06-23 23:09 ` FUKAUMI Naoki
2024-06-24 9:44 ` Emil Renner Berthing
2024-06-24 10:42 ` FUKAUMI Naoki
-- strict thread matches above, loose matches on Subject: below --
2024-06-13 0:58 [PATCH 1/2] riscv: defconfig: enable "heartbeat" led trigger FUKAUMI Naoki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).