From: Jonas Karlman <jonas@kwiboo.se>
To: Heiko Stuebner <heiko@sntech.de>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Yao Zi <ziyao@disroot.org>,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Jonas Karlman <jonas@kwiboo.se>
Subject: [PATCH 7/7] arm64: dts: rockchip: Add gpio-leds node to Radxa E20C
Date: Fri, 28 Feb 2025 06:40:13 +0000 [thread overview]
Message-ID: <20250228064024.3200000-8-jonas@kwiboo.se> (raw)
In-Reply-To: <20250228064024.3200000-1-jonas@kwiboo.se>
Radxa E20C has three gpio controlled leds (sys, wan and lan).
Add a gpio-leds node and set default trigger to heartbeat for the sys
led and netdev for the lan and wan leds.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
.../boot/dts/rockchip/rk3528-radxa-e20c.dts | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
index d19e319b4100..7a14f8d5d601 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts
@@ -8,6 +8,7 @@
/dts-v1/;
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include "rk3528.dtsi"
/ {
@@ -45,6 +46,36 @@ button-user {
};
};
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&lan_led_g>, <&sys_led_g>, <&wan_led_g>;
+
+ led-lan {
+ color = <LED_COLOR_ID_GREEN>;
+ default-state = "off";
+ function = LED_FUNCTION_LAN;
+ gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "netdev";
+ };
+
+ led-sys {
+ color = <LED_COLOR_ID_GREEN>;
+ default-state = "on";
+ function = LED_FUNCTION_HEARTBEAT;
+ gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_LOW>;
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-wan {
+ color = <LED_COLOR_ID_GREEN>;
+ default-state = "off";
+ function = LED_FUNCTION_WAN;
+ gpios = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "netdev";
+ };
+ };
+
vcc_1v8: regulator-1v8-vcc {
compatible = "regulator-fixed";
regulator-name = "vcc_1v8";
@@ -81,6 +112,20 @@ user_key: user-key {
rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
+
+ gpio-leds {
+ lan_led_g: lan-led-g {
+ rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ sys_led_g: sys-led-g {
+ rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ wan_led_g: wan-led-g {
+ rockchip,pins = <4 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
};
&saradc {
--
2.48.1
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2025-02-28 6:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 6:40 [PATCH 0/7] rockchip: Add support for leds and user button on Radxa E20C Jonas Karlman
2025-02-28 6:40 ` [PATCH 1/7] dt-bindings: soc: rockchip: Add RK3528 ioc grf syscon Jonas Karlman
2025-02-28 18:39 ` Conor Dooley
2025-02-28 6:40 ` [PATCH 2/7] dt-bindings: pinctrl: Add pinctrl support for RK3528 Jonas Karlman
2025-02-28 7:53 ` Heiko Stübner
2025-02-28 18:39 ` Conor Dooley
2025-02-28 6:40 ` [PATCH 3/7] pinctrl: rockchip: Add " Jonas Karlman
2025-02-28 7:56 ` Heiko Stübner
2025-03-17 7:00 ` Chukun Pan
2025-03-17 8:01 ` Jonas Karlman
2025-02-28 6:40 ` [PATCH 4/7] arm64: dts: rockchip: Add pinctrl and gpio nodes " Jonas Karlman
2025-02-28 10:46 ` Yao Zi
2025-03-02 11:14 ` Jonas Karlman
2025-03-02 11:52 ` Heiko Stübner
2025-03-02 16:09 ` Yao Zi
2025-02-28 6:40 ` [PATCH 5/7] arm64: dts: rockchip: Add uart0 pinctrl to Radxa E20C Jonas Karlman
2025-02-28 6:40 ` [PATCH 6/7] arm64: dts: rockchip: Add user button " Jonas Karlman
2025-02-28 6:40 ` Jonas Karlman [this message]
2025-03-04 7:51 ` [PATCH 0/7] rockchip: Add support for leds and user button on " Linus Walleij
2025-03-04 12:02 ` (subset) " Heiko Stuebner
2025-03-04 18:13 ` Jonas Karlman
2025-03-04 18:27 ` Heiko Stübner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250228064024.3200000-8-jonas@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh@kernel.org \
--cc=ziyao@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox