From patchwork Thu Jun 27 11:52:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FUKAUMI Naoki X-Patchwork-Id: 13714296 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 94CDAC2BD09 for ; Thu, 27 Jun 2024 11:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CByj2pl36K/TKJijfQ2m0C6O4+S3c8WAwJcTtWa01mg=; b=Ro7oNJCw1Xj8RV qNkmPQUwiT+ZALcOIeuaacxIM7dfOZjrrpzAp+WmksBtmLuYX3eZDXzpe9zeLrgciBrtoGSU9+eXT ZGoc3oD2i9x4C+U5n1+J6eGpz66PluG35K17W4vq3envhfTexfXeA/HqD1eqES5EaZp4hLmHjbAvM NNXGKV0/hYE+7iBWIpLl97hvcQHXHVYjpH1GBppN/PjR+E8rMOzldQ8ofv3q2KP5GB7E3se0s1ilh GStydcGAmT942dQOlF7jeJBBo2UOIFdRwqCU3B772g2TnHl5uG+AgUPisVtkWRdxz+ycj2mqyfz55 t87WOdJFbgE3hxIicBVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnjP-0000000AEYx-2mw9; Thu, 27 Jun 2024 11:56:12 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj4-0000000AEVg-3WxX for linux-riscv@bombadil.infradead.org; Thu, 27 Jun 2024 11:55:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=UR5R/S4zH+LvNg75YIWJqgZSeK8Iz2vARL5qLu+rQU4=; b=janfTyg8OvugQ+zmCP62UImdI/ HAqP7XnjW5N2ksKooyVx+pIcgfCZx9m+wbUdUI7duGRjUegV3KvBzoBP93t/uzlDGVhMOUMs/lXkI VOJ89WBwayP4/KCRG4qwi0kFTvwc/0GXcKSh0Pd+8H0ci8Myto4ANvncFZAb1bL88G7nW1cFuDp9W VhqJSbL3GDd4spLRVPxMG+zgccgIUJog9J2SE6hB4lrOxxuPMTOza7eqAy39RNp+wS0IVCgEOMS5R ezBh5RN5K4w+O1VkfRpJwnKoMVVRvR+Eu8+cN23wLK6ZMXYuFvLwVMGXQZ/g6YeHsH0uAqQvFNllr 34jd/gMg==; Received: from sakura.naobsd.org ([160.16.200.221] helo=mail.naobsd.org) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj1-0000000DVB3-1W5n for linux-riscv@lists.infradead.org; Thu, 27 Jun 2024 11:55:41 +0000 Received: from secure.fukaumi.org ([10.0.0.2]) by mail.naobsd.org (8.14.4/8.14.4/Debian-4.1ubuntu1.1) with ESMTP id 45RBr0rZ021179; Thu, 27 Jun 2024 20:53:01 +0900 From: FUKAUMI Naoki To: kernel@esmil.dk Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, FUKAUMI Naoki Subject: [PATCH v3 1/4] riscv: defconfig: enable "heartbeat" led trigger Date: Thu, 27 Jun 2024 20:52:33 +0900 Message-ID: <20240627115236.618-1-naoki@milkv.io> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_125539_864187_73DFF72D X-CRM114-Status: UNSURE ( 6.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org following JH7110 based boards have a LED for heartbeat. - Milk-V Mars - Pine64 Star64 - StarFive VisionFive 2 This patch adds and enables related configuration for it. Signed-off-by: FUKAUMI Naoki Changes in v2: - reword commit message to include other JH7110 based boards --- arch/riscv/configs/defconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 3f1f055866af..5f5582d7d7fd 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -147,6 +147,7 @@ CONFIG_MICREL_PHY=y CONFIG_MICROSEMI_PHY=y CONFIG_MOTORCOMM_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 @@ -246,6 +247,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 From patchwork Thu Jun 27 11:52:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FUKAUMI Naoki X-Patchwork-Id: 13714298 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FC8BC2BD09 for ; Thu, 27 Jun 2024 11:56:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gUtfhKyteS9R8gvYeNMSF2pxYcGK1C5cw7+PTruNBlE=; b=uGhRk/ig70ZujP 747517o4t38bewZ9862I7WigHGD5e6vsrG+wyXvDAzy3mmPAtbkD7Pwr9TtejxfQNC/9ZEVweZSXj MGJMpfxPZpXvgmDB+wnLOX1Omppjgx3rxCDekPFlTKc5GWYopQ4+hXrJb8IJUrJelJDC0WqIB+fRB 6jW3ZjIXPwYwoHCmWrjzPOtBJ9+jqRNJH8C+143u1CDtuTjI1LIsHZwWpckFbVkUefNocMqlm82z1 F2DIsMrYRDKA/QCcrKNaKTD/LR2uKyU38I1KuQg7CchG+puUgQ0ctvbi0gYbjcI8bQz199c9GjMUh FniJlA7iQiXBKC5uC/rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnje-0000000AEfV-1iok; Thu, 27 Jun 2024 11:56:18 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj4-0000000AEVh-3xnc for linux-riscv@bombadil.infradead.org; Thu, 27 Jun 2024 11:55:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=Vlzlm/49+m8i0infKudfAark56YywDXqG48rtyMxt7U=; b=Yje3zYRF4M3zNLfdid5LzTJlYZ qEL9ph2QYXjf5g1pZ0KTlXlL94q3NKIR/fakKPN6hjCD2rW8tX8kBZOXIQXqLZgNqSmxO/N8raZHv gv9ze+iHJZCJaK2OGx2+Y2I2ZFZrDCWEkWH8npHrEOJ5n00RXoQgENfYVDCnM0T1rIuBxLIMXGtzW LdSKlcKcrt/8Qyupc0FZGiiu1RT/qBSS84rEitTJZmBPIGQ7hMym1yGUWQYiJhsF+xPC6RwqMiHXN +0AMzTCmlp/SZN6qfXj+7udLrBZaEa+YgoHi/tQCa9c/N/iFP/vKiBEy+dpSfQp+KHbBX52b2Nh5w 3eAiom0g==; Received: from sakura.naobsd.org ([160.16.200.221] helo=mail.naobsd.org) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj1-0000000DVB1-1SAD for linux-riscv@lists.infradead.org; Thu, 27 Jun 2024 11:55:41 +0000 Received: from secure.fukaumi.org ([10.0.0.2]) by mail.naobsd.org (8.14.4/8.14.4/Debian-4.1ubuntu1.1) with ESMTP id 45RBr0ra021179; Thu, 27 Jun 2024 20:53:04 +0900 From: FUKAUMI Naoki To: kernel@esmil.dk Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, FUKAUMI Naoki Subject: [PATCH v3 2/4] riscv: dts: starfive: enable heartbeat LED for Milk-V Mars Date: Thu, 27 Jun 2024 20:52:34 +0900 Message-ID: <20240627115236.618-2-naoki@milkv.io> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627115236.618-1-naoki@milkv.io> References: <20240627115236.618-1-naoki@milkv.io> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_125539_842612_773A2304 X-CRM114-Status: UNSURE ( 7.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Milk-V Mars has a green LED to show system load[1]. This patch enables a green LED as a heartbeat LED. Signed-off-by: FUKAUMI Naoki [1] https://github.com/milkv-mars/mars-buildroot-sdk/blob/dev/linux/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dtsi#L79 Changes in v3: - add default-state = "on" to turn LED on at U-Boot (not enabled yet) Changes in v2: - reorder properties in led-0 --- arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts index 5cb9e99e1dac..5cae7a5d2f86 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts +++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts @@ -4,11 +4,25 @@ */ /dts-v1/; +#include +#include #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 = ; + default-state = "on"; + function = LED_FUNCTION_HEARTBEAT; + linux,default-trigger = "heartbeat"; + }; + }; }; &gmac0 { From patchwork Thu Jun 27 11:52:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FUKAUMI Naoki X-Patchwork-Id: 13714297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80056C3064D for ; Thu, 27 Jun 2024 11:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Lz1yM46ZrTr+T8nPfijCi3qpo7x9JFZszlNYWKL+F9w=; b=jeuWN0Of3eH12y kKu/7sGyB3bOmxybgnWLxANyH4zboPo/4cBTAqINuuE9Yof3HYk17SOtfePvzxGh/xJh3kzV0MAHx YARh63O/eqYfOlxIFFLSTCJTgEy4ZFjzergCr/ZokFT/AWeUBvBwvJWyVTchbMJB4LmYEAIoospS2 Et+lVU5TDm6PczhNcx51LJ0COk4JnZZcAkHA5F5KlcFIdCsSaz6homzd8TB9XWto/Bp6Oag1SdLCP rTIXUVBK+oS4cNCIfqgvCHAkXmCbVc9KqauH/AZwsJl45pu+CGV6hLa1F7Wn0S8gjonig2DIn2l2U hua1uhAgOTzZ/QrXEanA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnjb-0000000AEdS-1II9; Thu, 27 Jun 2024 11:56:16 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj6-0000000AEVn-2xFD for linux-riscv@bombadil.infradead.org; Thu, 27 Jun 2024 11:55:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=HOHblRxpjrDXEv5rzYrr1RteTC8ZRzUEqbbqHkvHtYw=; b=Am+/verdnAldzZEolwaOY3+6/n bgmoJQfbA8MZwx/iGSziPHtGSrVrLLWkiMJxxyhszeCGaenKPaYWio7TxLRmboR1GrRqhiEOUUmq8 gikKinbGDAnw4qdqbHGV8juADekZciLGTj4Z9b2YRVl8Rpwc5f8daF1VKt/kT0/w55fkWP9n2hz2Z KbTm7obHRNJ0JJnowmzUA4U+pgXslWKIjdwgMB2xfopwNtH71OplIY3LjyzRRPA+a/xG4eZB1CLDW 2Qphwd2WeWCSUwc8Y9Xl7qBBdbAvyO7VYvanbKKy/mmns8o1cntLiXPrzq+3yMAJrZOic2vWZs3dd JXbv+cgw==; Received: from sakura.naobsd.org ([160.16.200.221] helo=mail.naobsd.org) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj2-0000000DVB4-0yEu for linux-riscv@lists.infradead.org; Thu, 27 Jun 2024 11:55:43 +0000 Received: from secure.fukaumi.org ([10.0.0.2]) by mail.naobsd.org (8.14.4/8.14.4/Debian-4.1ubuntu1.1) with ESMTP id 45RBr0rb021179; Thu, 27 Jun 2024 20:53:04 +0900 From: FUKAUMI Naoki To: kernel@esmil.dk Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, FUKAUMI Naoki Subject: [PATCH v3 3/4] riscv: dts: starfive: enable heartbeat LED for Pine64 Star64 Date: Thu, 27 Jun 2024 20:52:35 +0900 Message-ID: <20240627115236.618-3-naoki@milkv.io> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627115236.618-1-naoki@milkv.io> References: <20240627115236.618-1-naoki@milkv.io> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_125540_773814_E087E321 X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Pine64 Star64 has a blue LED to show system load[1]. This patch enables a blue LED as a heartbeat LED. Signed-off-by: FUKAUMI Naoki [1] https://github.com/Fishwaldo/Star64_linux/blob/Star64_devel/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dtsi#L79 Changes in v3: - add default-state = "on" to turn LED on at U-Boot (not enabled yet) Changes in v2: - new --- .../boot/dts/starfive/jh7110-pine64-star64.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts index 2d41f18e0359..b9962b4e8eca 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts +++ b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts @@ -4,6 +4,8 @@ */ /dts-v1/; +#include +#include #include "jh7110-common.dtsi" / { @@ -12,6 +14,18 @@ / { aliases { ethernet1 = &gmac1; }; + + leds { + compatible = "gpio-leds"; + + led-0 { + gpios = <&aongpio 3 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "on"; + function = LED_FUNCTION_HEARTBEAT; + linux,default-trigger = "heartbeat"; + }; + }; }; &gmac0 { From patchwork Thu Jun 27 11:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FUKAUMI Naoki X-Patchwork-Id: 13714299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0198CC2BD09 for ; Thu, 27 Jun 2024 11:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WaVcihS7CUSCmOY0R9Wnsr+WdknvPRbVEcFON49TJ1I=; b=gZjV1R3i18HN/k C1xl2KJPlhxWYtABA5nDmIYKoP8QJtakpTHiutuQfs+X1VVo9JZChVmsf5a3tn/S4hdrsXeb/W52d Omas6+ZawF69w9YlrrwmNYhzpa7YpQ2ESEqtBuNIvEObA0VJtaJ1UdW0Y7pNx0psFY3Wca1oH/Pcf edIPnYTGJzsCUWrW6JndfGWPTzQbOxr1ebuJCCsw5Y6zzyazCNi/j51kJlUGOn1EDeL+0xoBJ2DTi c+nk3LO4fSI2P1Ga9/xuT8/zB+sYLgyjGS533tnXu2ohvb22dc7cUEePlk0PM0W+OT1a67Rw7V+ws pLdSQKzYAHy63yQFiAlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnjh-0000000AEiO-2yQ8; Thu, 27 Jun 2024 11:56:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj6-0000000AEVm-2xe0 for linux-riscv@bombadil.infradead.org; Thu, 27 Jun 2024 11:55:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=689za1HeQTUTb6AcrNWYfyGCkT0JdxnkEgTMKfzXogE=; b=Q4m3XUDkQ5pIyvIe3iPtOl0mkQ xYMSQHJqRS53TMnxc1na745M2E1svxuSl7QmqAuIgp7p1a1HV/bQzYQZfSqmSj6d9bbMh0NTZ2e/y WhAkoBhjQPqrA9/Q5dk0t0LSRnBN7szNtOlMHOwshn9LmJWTJuk/OQ2D8GUUtzBlEPcC3rbjjqb22 YSDYW0LM29pG4tkFquAWksJUe5MTK/I4rWm7XwGdDpQcnLeQspb4d6fDvWmInjOIPHV8li2ZVLfWK jRtM6yHb/mQwqqWSVmclSVH3TCo8BiAiL+A+0K62o8XXEkSgTCS0L5Sk9AOY2Hbp7OeTssBGWgm27 whii81Og==; Received: from sakura.naobsd.org ([160.16.200.221] helo=mail.naobsd.org) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMnj1-0000000DVB2-1jaK for linux-riscv@lists.infradead.org; Thu, 27 Jun 2024 11:55:43 +0000 Received: from secure.fukaumi.org ([10.0.0.2]) by mail.naobsd.org (8.14.4/8.14.4/Debian-4.1ubuntu1.1) with ESMTP id 45RBr0rc021179; Thu, 27 Jun 2024 20:53:04 +0900 From: FUKAUMI Naoki To: kernel@esmil.dk Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, FUKAUMI Naoki Subject: [PATCH v3 4/4] riscv: dts: starfive: enable heartbeat LED for StarFive VisionFive 2 Date: Thu, 27 Jun 2024 20:52:36 +0900 Message-ID: <20240627115236.618-4-naoki@milkv.io> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240627115236.618-1-naoki@milkv.io> References: <20240627115236.618-1-naoki@milkv.io> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_125539_923767_80C95402 X-CRM114-Status: UNSURE ( 7.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org StarFive VisionFive 2 has a green LED to show system load[1]. This patch enables a green LED as a heartbeat LED. Signed-off-by: FUKAUMI Naoki [1] https://github.com/starfive-tech/linux/blob/a61d1d826ca3060fd76ab31d37c691fc09b52fc0/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi#L79 Changes in v3: - add default-state = "on" to turn LED on at U-Boot (not enabled yet) Changes in v2: - new --- .../dts/starfive/jh7110-starfive-visionfive-2.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi index 18f38fc790a4..06efbed53cc7 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi @@ -5,12 +5,26 @@ */ /dts-v1/; +#include +#include #include "jh7110-common.dtsi" / { aliases { ethernet1 = &gmac1; }; + + leds { + compatible = "gpio-leds"; + + led-0 { + gpios = <&aongpio 3 GPIO_ACTIVE_HIGH>; + color = ; + default-state = "on"; + function = LED_FUNCTION_HEARTBEAT; + linux,default-trigger = "heartbeat"; + }; + }; }; &gmac1 {