mips: ocelot: Enable use of serial gpio for LED
authorLars Povlsen <lars.povlsen@microchip.com>
Wed, 2 Jan 2019 08:52:26 +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 'ocelot' pcb123 and pcb120.

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

index a557cacd1b8dd250fd25db64ea235afceaef7e1a..a05c308669209ad5a89dc3b70294902c0580e120 100644 (file)
@@ -9,6 +9,7 @@
 #include <asm/types.h>
 #include <environment.h>
 #include <spi.h>
+#include <led.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -56,6 +57,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 66451000d9a990f3ddd0ac3dc0f31c8fba040ab2..fb6a5bdc310c4802bd45e871c700ad7c638e8dd4 100644 (file)
@@ -48,6 +48,9 @@ CONFIG_CLK=y
 CONFIG_DM_GPIO=y
 CONFIG_MTD=y
 CONFIG_MTD_SPI_NAND=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