From 6bc03c2ef7be4e7f9e765d9494206f948886e85c Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 13 May 2026 13:43:08 +0200 Subject: [PATCH 1/3] arm64: imx93-chargebyte_defconfig: Prepare LEDs for AC Power Board Current config wasn't prepared for AC Power Board, which has 4 individual LEDs (red, green, blue, white) driven by NXP PCA9632. - Enable LEDS_GROUP_MULTICOLOR to group all 4 individual LEDs to a RGBW one - Make LEDS_CLASS_MULTICOLOR and LEDS_PCA963X built-in for sooner LED handling during boot - Enable LEDS_TRIGGER_PATTERN for RGB fading effects Signed-off-by: Stefan Wahren --- arch/arm64/configs/imx93-chargebyte_defconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm64/configs/imx93-chargebyte_defconfig b/arch/arm64/configs/imx93-chargebyte_defconfig index 24c7796271b9f5..a5c98a1d9fb08d 100644 --- a/arch/arm64/configs/imx93-chargebyte_defconfig +++ b/arch/arm64/configs/imx93-chargebyte_defconfig @@ -628,14 +628,16 @@ CONFIG_SCSI_UFSHCD=y CONFIG_SCSI_UFSHCD_PLATFORM=y CONFIG_NEW_LEDS=y CONFIG_LEDS_CLASS=y -CONFIG_LEDS_CLASS_MULTICOLOR=m +CONFIG_LEDS_CLASS_MULTICOLOR=y +CONFIG_LEDS_CROS_EC=m CONFIG_LEDS_LM3692X=m CONFIG_LEDS_PCA9532=m CONFIG_LEDS_GPIO=y -CONFIG_LEDS_PCA963X=m +CONFIG_LEDS_PCA963X=y CONFIG_LEDS_PCA995X=m CONFIG_LEDS_PWM=y CONFIG_LEDS_SYSCON=y +CONFIG_LEDS_GROUP_MULTICOLOR=y CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y @@ -645,6 +647,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_TRANSIENT=y CONFIG_LEDS_TRIGGER_PANIC=y CONFIG_LEDS_TRIGGER_NETDEV=y +CONFIG_LEDS_TRIGGER_PATTERN=y CONFIG_LEDS_TRIGGER_TTY=y CONFIG_EDAC=y CONFIG_EDAC_SYNOPSYS=y From c781886c4fec62e4e172c4bda945547b13efd347 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 13 May 2026 14:08:15 +0200 Subject: [PATCH 2/3] leds: rgb: leds-group-multicolor: Implement default-intensity Before this change the driver initialized all LEDs with maximum intensity. This isn't useful for LEDs, which needs to be configured via DT. So introduce a new DT property to define the default intensity of all indiviual LEDs. In case something went wrong the driver fallsback to maximum brightness. Additionally this also works with triggers. So it should be possible to blink with a specific RGB color. This has been tested with Tarragon board. Signed-off-by: Stefan Wahren --- drivers/leds/rgb/leds-group-multicolor.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/leds/rgb/leds-group-multicolor.c b/drivers/leds/rgb/leds-group-multicolor.c index b6c7679015fdf5..b76b13bfa343f3 100644 --- a/drivers/leds/rgb/leds-group-multicolor.c +++ b/drivers/leds/rgb/leds-group-multicolor.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -106,11 +107,27 @@ static int leds_gmc_probe(struct platform_device *pdev) for (i = 0; i < count; i++) { struct led_classdev *led_cdev = priv->monochromatics[i]; + u32 intensity; subled[i].color_index = led_cdev->color; - /* Configure the LED intensity to its maximum */ - subled[i].intensity = max_brightness; + ret = of_property_read_u32_index(pdev->dev.of_node, "default-intensity", + i, &intensity); + if (ret) { + if (ret != -EINVAL) { + dev_warn(dev, "Unable to get default-intensity[%d]: %d\n", + i, ret); + } + subled[i].intensity = max_brightness; + } else if (intensity > max_brightness) { + dev_warn(dev, "default-intensity[%d] is invalid\n", i); + subled[i].intensity = max_brightness; + } else { + subled[i].intensity = intensity; + } + + dev_dbg(dev, "subled[%d]: color_index: %u, intensity: %u\n", + i, subled[i].color_index, subled[i].intensity); } /* Initialise the multicolor's LED class device */ From ef64815b34031b9c5b5c025deae4c1e045d6d0bd Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Wed, 13 May 2026 14:31:00 +0200 Subject: [PATCH 3/3] arm64: dts: imx93-charge-som-ac-pb: Group LEDs and make them blink white This groups all 4 individual LEDs to an additional RGBW LED (rgb:status). Be aware that the sysfs of the individual LEDs become read-only. Additionally the LEDs will now blink white during boot. Unfortunately this can only be tested with real hardware. Signed-off-by: Stefan Wahren --- .../dts/freescale/imx93-charge-som-ac-pb.dtso | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx93-charge-som-ac-pb.dtso b/arch/arm64/boot/dts/freescale/imx93-charge-som-ac-pb.dtso index 20c6eac7de82b4..8b0bacc619c3b6 100644 --- a/arch/arm64/boot/dts/freescale/imx93-charge-som-ac-pb.dtso +++ b/arch/arm64/boot/dts/freescale/imx93-charge-som-ac-pb.dtso @@ -53,6 +53,15 @@ enable-active-high; regulator-always-on; }; + + multi-led { + compatible = "leds-group-multicolor"; + color = ; + function = LED_FUNCTION_STATUS; + leds = <&led0>, <&led1>, <&led2>, <&led3>; + default-intensity = <0>, <0>, <0>, <255>; + linux,default-trigger = "timer"; + }; }; &bbnsm_pwrkey { @@ -280,25 +289,25 @@ #address-cells = <1>; #size-cells = <0>; - led@0 { + led0: led@0 { reg = <0>; color = ; function = LED_FUNCTION_STATUS; }; - led@1 { + led1: led@1 { reg = <1>; color = ; function = LED_FUNCTION_STATUS; }; - led@2 { + led2: led@2 { reg = <2>; color = ; function = LED_FUNCTION_STATUS; }; - led@3 { + led3: led@3 { reg = <3>; color = ; function = LED_FUNCTION_STATUS;