imx8mp-somdevices: Light on LED at boot up.
authorJosep Orga <jorga@somdevices.com>
Thu, 7 Sep 2023 11:11:22 +0000 (13:11 +0200)
committerJosep Orga <jorga@somdevices.com>
Wed, 13 Sep 2023 07:30:33 +0000 (09:30 +0200)
Signed-off-by: Josep Orga <jorga@somdevices.com>
arch/arm/dts/imx8mp-somdevices.dts
board/somdevices/imx8mp_somdevices/imx8mp_somdevices.c
board/somdevices/imx8mp_somdevices/spl.c

index 89307da..b2545f2 100644 (file)
@@ -23,8 +23,8 @@
                pinctrl-0 = <&pinctrl_gpio_led>;
 
                status {
-                       label = "yellow:status";
-                       gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
+                       label = "green:status";
+                       gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        pinctrl_gpio_led: gpioledgrp {
                fsl,pins = <
-                       MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO16   0x19
+                       MX8MP_IOMUXC_SAI5_RXFS__GPIO3_IO19      0x19
                >;
        };
 
index 47108f7..fb5826a 100644 (file)
@@ -28,6 +28,7 @@
 #include <imx_sip.h>
 #include <linux/arm-smccc.h>
 #include <mmc.h>
+#include <led.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -470,6 +471,9 @@ int board_init(void)
        arm_smccc_smc(IMX_SIP_GPC, IMX_SIP_GPC_PM_DOMAIN,
                      MIPI, true, 0, 0, 0, 0, &res);
 
+       if (CONFIG_IS_ENABLED(LED))
+               led_default_state();
+
        return 0;
 }
 
index f527966..2c0b2a7 100644 (file)
@@ -67,12 +67,18 @@ void spl_dram_init(void)
        ddr_init(&dram_timing);
 }
 
+#define LED_GPIO IMX_GPIO_NR(3, 19)
+
 #if CONFIG_IS_ENABLED(DM_PMIC_PCA9450)
 int power_init_board(void)
 {
        struct udevice *dev;
        int ret;
 
+       /* Light on LED */
+       gpio_request(LED_GPIO, "led");
+       gpio_direction_output(LED_GPIO, 1);
+
        ret = pmic_get("pca9450@25", &dev);
        if (ret == -ENODEV) {
                puts("No pca9450@25\n");