mips: luton: Enable use of serial gpio for LED
authorLars Povlsen <lars.povlsen@microchip.com>
Wed, 2 Jan 2019 08:52:24 +0000 (09:52 +0100)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Wed, 16 Jan 2019 12:56:43 +0000 (13:56 +0100)
This enables the use of the MSCC serial GPIO driver to control the
LEDs on the MSCC VCoreIII 'luton' SoC.

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
board/mscc/luton/luton.c
configs/mscc_luton_defconfig

index b509b6beb3381cc56f48884804ab43dc6f7f9b57..807c717e33a470ba5d55f11123ceae5682ce03cf 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <led.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -27,6 +28,11 @@ int board_early_init_r(void)
 
        /* Address of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
+
+       /* LED setup */
+       if (IS_ENABLED(CONFIG_LED))
+               led_default_state();
+
        return 0;
 }
 
index 03922f537992c080bb1cc5f409b2a9797f69b72b..0b3eb3865c48ba73413606f9e7171e5df1e717ff 100644 (file)
@@ -46,6 +46,9 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_CLK=y
 CONFIG_DM_GPIO=y
+CONFIG_MSCC_SGPIO=y
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y