* [PATCH 0/2] Khadas VIM4 PWM status LED support
@ 2026-05-12 17:47 Ronald Claveau via B4 Relay
2026-05-12 17:47 ` [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions Ronald Claveau via B4 Relay
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ronald Claveau via B4 Relay @ 2026-05-12 17:47 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
Ronald Claveau
This series adds support for the PWM-driven status LED on the Khadas
VIM4 board (Amlogic T7).
The VIM4 exposes a heartbeat LED wired to the PWM_AO_C output, routed
through pin group pwm_ao_c_d. Before wiring it up in the board DTS,
the SoC pinmux definitions had to be corrected: the original
pwm_ao_c node was conflating two distinct pin groups (pwm_ao_c_d and
pwm_ao_c_e) into a single ambiguous entry.
Patch 1 fixes the pwm_ao_c pinmux entries in the T7 DTSI by splitting
them into two properly named nodes. Neither alternate is in use yet,
so there is no functional impact on existing boards.
Patch 2 enables the pwm_ao_cd controller on the VIM4 and adds a
pwm-leds node with a heartbeat trigger. The xtal-clk node is also
moved to restore alphabetical ordering among root node children.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
Ronald Claveau (2):
arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions
arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED
.../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 30 +++++++++++++++++-----
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 12 +++++++--
2 files changed, 33 insertions(+), 9 deletions(-)
---
base-commit: 31f32e8cdf59291e467250dfc57d1a8c718f63d2
change-id: 20260512-add-kvim4-sysled-8cc159524561
Best regards,
--
Ronald Claveau <linux-kernel-dev@aliel.fr>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions
2026-05-12 17:47 [PATCH 0/2] Khadas VIM4 PWM status LED support Ronald Claveau via B4 Relay
@ 2026-05-12 17:47 ` Ronald Claveau via B4 Relay
2026-05-13 8:04 ` Neil Armstrong
2026-05-12 17:47 ` [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED Ronald Claveau via B4 Relay
2026-05-13 8:29 ` [PATCH 0/2] Khadas VIM4 PWM status LED support Neil Armstrong
2 siblings, 1 reply; 7+ messages in thread
From: Ronald Claveau via B4 Relay @ 2026-05-12 17:47 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
Ronald Claveau
From: Ronald Claveau <linux-kernel-dev@aliel.fr>
The pwm_ao_c pin node was incomplete: it was missing the group name
suffix, conflating two distinct pin groups (pwm_ao_c_d and pwm_ao_c_e)
into a single, ambiguous entry.
Split the node into two separate pinmux entries:
- pwm_ao_c_d_pins: uses group "pwm_ao_c_d"
- pwm_ao_c_e_pins: uses group "pwm_ao_c_e"
Both alternate pins are not yet referenced by any peripheral node,
so this has no functional impact on existing boards. No backport needed.
Fixes: ee6e05a49b93 ("arm64: dts: amlogic: t7: Add PWM pinctrl nodes")
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
index 7fe72c94ed623..62f6b9baad28b 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
@@ -400,9 +400,17 @@ mux {
};
};
- pwm_ao_c_pins: pwm-ao-c {
+ pwm_ao_c_d_pins: pwm-ao-c-d {
mux {
- groups = "pwm_ao_c";
+ groups = "pwm_ao_c_d";
+ function = "pwm_ao_c";
+ bias-disable;
+ };
+ };
+
+ pwm_ao_c_e_pins: pwm-ao-c-e {
+ mux {
+ groups = "pwm_ao_c_e";
function = "pwm_ao_c";
bias-disable;
};
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED
2026-05-12 17:47 [PATCH 0/2] Khadas VIM4 PWM status LED support Ronald Claveau via B4 Relay
2026-05-12 17:47 ` [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions Ronald Claveau via B4 Relay
@ 2026-05-12 17:47 ` Ronald Claveau via B4 Relay
2026-05-13 8:05 ` Neil Armstrong
2026-05-13 8:29 ` [PATCH 0/2] Khadas VIM4 PWM status LED support Neil Armstrong
2 siblings, 1 reply; 7+ messages in thread
From: Ronald Claveau via B4 Relay @ 2026-05-12 17:47 UTC (permalink / raw)
To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
Ronald Claveau
From: Ronald Claveau <linux-kernel-dev@aliel.fr>
The VIM4 board exposes a status LED wired to the PWM_AO_C_D output.
Enable the pwm_ao_cd controller with its pinmux, and declare a
pwm-leds node with a heartbeat trigger.
Also, move the xtal-clk node to restore alphabetical ordering.
Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
---
.../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 30 +++++++++++++++++-----
1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
index 69d6118ba57e7..c41525a34b721 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
+++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
@@ -45,13 +45,6 @@ secmon_reserved_bl32: secmon@5300000 {
};
};
- xtal: xtal-clk {
- compatible = "fixed-clock";
- clock-frequency = <24000000>;
- clock-output-names = "xtal";
- #clock-cells = <0>;
- };
-
dc_in: regulator-dc-in {
compatible = "regulator-fixed";
regulator-name = "DC_IN";
@@ -60,6 +53,16 @@ dc_in: regulator-dc-in {
regulator-always-on;
};
+ pwm-leds {
+ compatible = "pwm-leds";
+
+ status {
+ linux,default-trigger="heartbeat";
+ max-brightness = <255>;
+ pwms = <&pwm_ao_cd 0 30040 0>;
+ };
+ };
+
sd_3v3: regulator-sdcard-3v3 {
compatible = "regulator-fixed";
regulator-name = "SD_3V3";
@@ -155,6 +158,13 @@ wifi32k: wifi32k {
clock-frequency = <32768>;
pwms = <&pwm_ab 0 30518 0>;
};
+
+ xtal: xtal-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <24000000>;
+ clock-output-names = "xtal";
+ #clock-cells = <0>;
+ };
};
&pwm_ab {
@@ -163,6 +173,12 @@ &pwm_ab {
pinctrl-names = "default";
};
+&pwm_ao_cd {
+ status = "okay";
+ pinctrl-0 = <&pwm_ao_c_d_pins>;
+ pinctrl-names = "default";
+};
+
/* SDIO */
&sd_emmc_a {
status = "okay";
--
2.49.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions
2026-05-12 17:47 ` [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions Ronald Claveau via B4 Relay
@ 2026-05-13 8:04 ` Neil Armstrong
0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2026-05-13 8:04 UTC (permalink / raw)
To: linux-kernel-dev, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel
On 5/12/26 19:47, Ronald Claveau via B4 Relay wrote:
> From: Ronald Claveau <linux-kernel-dev@aliel.fr>
>
> The pwm_ao_c pin node was incomplete: it was missing the group name
> suffix, conflating two distinct pin groups (pwm_ao_c_d and pwm_ao_c_e)
> into a single, ambiguous entry.
>
> Split the node into two separate pinmux entries:
> - pwm_ao_c_d_pins: uses group "pwm_ao_c_d"
> - pwm_ao_c_e_pins: uses group "pwm_ao_c_e"
>
> Both alternate pins are not yet referenced by any peripheral node,
> so this has no functional impact on existing boards. No backport needed.
>
> Fixes: ee6e05a49b93 ("arm64: dts: amlogic: t7: Add PWM pinctrl nodes")
> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
> ---
> arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> index 7fe72c94ed623..62f6b9baad28b 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi
> @@ -400,9 +400,17 @@ mux {
> };
> };
>
> - pwm_ao_c_pins: pwm-ao-c {
> + pwm_ao_c_d_pins: pwm-ao-c-d {
> mux {
> - groups = "pwm_ao_c";
> + groups = "pwm_ao_c_d";
> + function = "pwm_ao_c";
> + bias-disable;
> + };
> + };
> +
> + pwm_ao_c_e_pins: pwm-ao-c-e {
> + mux {
> + groups = "pwm_ao_c_e";
> function = "pwm_ao_c";
> bias-disable;
> };
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
I'll squash it on the old commit.
Thanks,
Neil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED
2026-05-12 17:47 ` [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED Ronald Claveau via B4 Relay
@ 2026-05-13 8:05 ` Neil Armstrong
2026-05-13 10:26 ` Ronald Claveau
0 siblings, 1 reply; 7+ messages in thread
From: Neil Armstrong @ 2026-05-13 8:05 UTC (permalink / raw)
To: linux-kernel-dev, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel
On 5/12/26 19:47, Ronald Claveau via B4 Relay wrote:
> From: Ronald Claveau <linux-kernel-dev@aliel.fr>
>
> The VIM4 board exposes a status LED wired to the PWM_AO_C_D output.
> Enable the pwm_ao_cd controller with its pinmux, and declare a
> pwm-leds node with a heartbeat trigger.
>
> Also, move the xtal-clk node to restore alphabetical ordering.
Please send a separate patch for that
>
> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
> ---
> .../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 30 +++++++++++++++++-----
> 1 file changed, 23 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
> index 69d6118ba57e7..c41525a34b721 100644
> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
> @@ -45,13 +45,6 @@ secmon_reserved_bl32: secmon@5300000 {
> };
> };
>
> - xtal: xtal-clk {
> - compatible = "fixed-clock";
> - clock-frequency = <24000000>;
> - clock-output-names = "xtal";
> - #clock-cells = <0>;
> - };
> -
> dc_in: regulator-dc-in {
> compatible = "regulator-fixed";
> regulator-name = "DC_IN";
> @@ -60,6 +53,16 @@ dc_in: regulator-dc-in {
> regulator-always-on;
> };
>
> + pwm-leds {
> + compatible = "pwm-leds";
> +
> + status {
> + linux,default-trigger="heartbeat";
> + max-brightness = <255>;
> + pwms = <&pwm_ao_cd 0 30040 0>;
> + };
> + };
> +
> sd_3v3: regulator-sdcard-3v3 {
> compatible = "regulator-fixed";
> regulator-name = "SD_3V3";
> @@ -155,6 +158,13 @@ wifi32k: wifi32k {
> clock-frequency = <32768>;
> pwms = <&pwm_ab 0 30518 0>;
> };
> +
> + xtal: xtal-clk {
> + compatible = "fixed-clock";
> + clock-frequency = <24000000>;
> + clock-output-names = "xtal";
> + #clock-cells = <0>;
> + };
> };
>
> &pwm_ab {
> @@ -163,6 +173,12 @@ &pwm_ab {
> pinctrl-names = "default";
> };
>
> +&pwm_ao_cd {
> + status = "okay";
> + pinctrl-0 = <&pwm_ao_c_d_pins>;
> + pinctrl-names = "default";
> +};
> +
> /* SDIO */
> &sd_emmc_a {
> status = "okay";
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] Khadas VIM4 PWM status LED support
2026-05-12 17:47 [PATCH 0/2] Khadas VIM4 PWM status LED support Ronald Claveau via B4 Relay
2026-05-12 17:47 ` [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions Ronald Claveau via B4 Relay
2026-05-12 17:47 ` [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED Ronald Claveau via B4 Relay
@ 2026-05-13 8:29 ` Neil Armstrong
2 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2026-05-13 8:29 UTC (permalink / raw)
To: linux-kernel-dev, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel
On 5/12/26 19:47, Ronald Claveau via B4 Relay wrote:
> This series adds support for the PWM-driven status LED on the Khadas
> VIM4 board (Amlogic T7).
>
> The VIM4 exposes a heartbeat LED wired to the PWM_AO_C output, routed
> through pin group pwm_ao_c_d. Before wiring it up in the board DTS,
> the SoC pinmux definitions had to be corrected: the original
> pwm_ao_c node was conflating two distinct pin groups (pwm_ao_c_d and
> pwm_ao_c_e) into a single ambiguous entry.
>
> Patch 1 fixes the pwm_ao_c pinmux entries in the T7 DTSI by splitting
> them into two properly named nodes. Neither alternate is in use yet,
> so there is no functional impact on existing boards.
>
> Patch 2 enables the pwm_ao_cd controller on the VIM4 and adds a
> pwm-leds node with a heartbeat trigger. The xtal-clk node is also
> moved to restore alphabetical ordering among root node children.
>
> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
> ---
> Ronald Claveau (2):
> arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions
> arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED
>
> .../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 30 +++++++++++++++++-----
> arch/arm64/boot/dts/amlogic/amlogic-t7.dtsi | 12 +++++++--
> 2 files changed, 33 insertions(+), 9 deletions(-)
> ---
> base-commit: 31f32e8cdf59291e467250dfc57d1a8c718f63d2
> change-id: 20260512-add-kvim4-sysled-8cc159524561
>
> Best regards,
Squashed patch 1 on ee6e05a49b93 ("arm64: dts: amlogic: t7: Add PWM pinctrl nodes")
Neil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED
2026-05-13 8:05 ` Neil Armstrong
@ 2026-05-13 10:26 ` Ronald Claveau
0 siblings, 0 replies; 7+ messages in thread
From: Ronald Claveau @ 2026-05-13 10:26 UTC (permalink / raw)
To: Neil Armstrong
Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel,
Kevin Hilman, Jerome Brunet, Martin Blumenstingl, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
On 5/13/26 10:05 AM, Neil Armstrong wrote:
> On 5/12/26 19:47, Ronald Claveau via B4 Relay wrote:
>> From: Ronald Claveau <linux-kernel-dev@aliel.fr>
>>
>> The VIM4 board exposes a status LED wired to the PWM_AO_C_D output.
>> Enable the pwm_ao_cd controller with its pinmux, and declare a
>> pwm-leds node with a heartbeat trigger.
>>
>> Also, move the xtal-clk node to restore alphabetical ordering.
>
> Please send a separate patch for that
>
Thanks for your review, I will add a new patch.
>>
>> Signed-off-by: Ronald Claveau <linux-kernel-dev@aliel.fr>
>> ---
>> .../dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts | 30 ++++++++++++
>> +++++-----
>> 1 file changed, 23 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-
>> vim4.dts b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>> index 69d6118ba57e7..c41525a34b721 100644
>> --- a/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>> +++ b/arch/arm64/boot/dts/amlogic/amlogic-t7-a311d2-khadas-vim4.dts
>> @@ -45,13 +45,6 @@ secmon_reserved_bl32: secmon@5300000 {
>> };
>> };
>> - xtal: xtal-clk {
>> - compatible = "fixed-clock";
>> - clock-frequency = <24000000>;
>> - clock-output-names = "xtal";
>> - #clock-cells = <0>;
>> - };
>> -
>> dc_in: regulator-dc-in {
>> compatible = "regulator-fixed";
>> regulator-name = "DC_IN";
>> @@ -60,6 +53,16 @@ dc_in: regulator-dc-in {
>> regulator-always-on;
>> };
>> + pwm-leds {
>> + compatible = "pwm-leds";
>> +
>> + status {
>> + linux,default-trigger="heartbeat";
>> + max-brightness = <255>;
>> + pwms = <&pwm_ao_cd 0 30040 0>;
>> + };
>> + };
>> +
>> sd_3v3: regulator-sdcard-3v3 {
>> compatible = "regulator-fixed";
>> regulator-name = "SD_3V3";
>> @@ -155,6 +158,13 @@ wifi32k: wifi32k {
>> clock-frequency = <32768>;
>> pwms = <&pwm_ab 0 30518 0>;
>> };
>> +
>> + xtal: xtal-clk {
>> + compatible = "fixed-clock";
>> + clock-frequency = <24000000>;
>> + clock-output-names = "xtal";
>> + #clock-cells = <0>;
>> + };
>> };
>> &pwm_ab {
>> @@ -163,6 +173,12 @@ &pwm_ab {
>> pinctrl-names = "default";
>> };
>> +&pwm_ao_cd {
>> + status = "okay";
>> + pinctrl-0 = <&pwm_ao_c_d_pins>;
>> + pinctrl-names = "default";
>> +};
>> +
>> /* SDIO */
>> &sd_emmc_a {
>> status = "okay";
>>
>
--
Best regards,
Ronald
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-05-13 10:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 17:47 [PATCH 0/2] Khadas VIM4 PWM status LED support Ronald Claveau via B4 Relay
2026-05-12 17:47 ` [PATCH 1/2] arm64: dts: amlogic: t7: Fix pwm_ao_c pinmux definitions Ronald Claveau via B4 Relay
2026-05-13 8:04 ` Neil Armstrong
2026-05-12 17:47 ` [PATCH 2/2] arm64: dts: amlogic: t7: khadas-vim4: add PWM-driven status LED Ronald Claveau via B4 Relay
2026-05-13 8:05 ` Neil Armstrong
2026-05-13 10:26 ` Ronald Claveau
2026-05-13 8:29 ` [PATCH 0/2] Khadas VIM4 PWM status LED support Neil Armstrong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox