Received: from mail.naobsd.org (sakura.naobsd.org [160.16.200.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BEBC14EC40 for ; Thu, 27 Jun 2024 11:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=160.16.200.221 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719489356; cv=none; b=oVLxIDXUtpvGDkYMD/wDEOAsgZILawXdNOsU93io8zZO2x2HLQ/6L9yneOlCxRSjv0dCPsiuJ18kv4IV1bKytmgegQh3lJGkfP5l8sibMJVnYKuZTYaaYzkC32zl4ALNZj+9UfaNzEjTiviBp+Nk/7XB6VMZc0Mip8GgvhI2oZc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719489356; c=relaxed/simple; bh=FH4obEJqOnFmB1OK8m/tCUZHc5v9lz9FILPEL4yEMwg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gh8yBFtArI+s2RZswv8QK7xsk6NycmpPyHUWewOYIZtN9HtjJ/UeIxZrZsVePeH7DZmiTTWHXbdntLWpkSeobZOvdKcL4dn4w/cl4NMOi3U4nTO+2tsObsJk7MdlqVFH8JS/rrrQe+gQJ8isxix9HyOBH+/uFRuQEDocmp8N+FI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=milkv.io; spf=none smtp.mailfrom=milkv.io; arc=none smtp.client-ip=160.16.200.221 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=milkv.io Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=milkv.io 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> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 { -- 2.43.0