blob: 2a53b2e6bd2f46838e0f25fdae42eb95313e28e0 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Ilko Iliev61fdb732009-06-12 21:20:39 +02002/*
3 * (C) Copyright 2007-2008
Stelian Pop5ee0c7f2011-11-01 00:00:39 +01004 * Stelian Pop <stelian@popies.net>
Ilko Iliev61fdb732009-06-12 21:20:39 +02005 * Lead Tech Design <www.leadtechdesign.com>
6 * Ilko Iliev <www.ronetix.at>
Ilko Iliev61fdb732009-06-12 21:20:39 +02007 */
8
9#include <common.h>
Andreas Bießmann30263a22013-11-29 12:13:46 +010010#include <asm/gpio.h>
Wenyou Yang78f89762016-02-03 10:16:50 +080011#include <asm/arch/clk.h>
Asen Dimov6a595142011-07-26 04:48:41 +000012#include <asm/arch/gpio.h>
Ilko Iliev61fdb732009-06-12 21:20:39 +020013
14void coloured_LED_init(void)
15{
Wenyou Yang78f89762016-02-03 10:16:50 +080016 at91_periph_clk_enable(ATMEL_ID_PIOC);
Ilko Iliev61fdb732009-06-12 21:20:39 +020017
Andreas Bießmann30263a22013-11-29 12:13:46 +010018 gpio_direction_output(CONFIG_RED_LED, 1);
19 gpio_direction_output(CONFIG_GREEN_LED, 1);
20 gpio_direction_output(CONFIG_YELLOW_LED, 1);
Ilko Iliev61fdb732009-06-12 21:20:39 +020021
Andreas Bießmann30263a22013-11-29 12:13:46 +010022 gpio_set_value(CONFIG_RED_LED, 0);
23 gpio_set_value(CONFIG_GREEN_LED, 1);
24 gpio_set_value(CONFIG_YELLOW_LED, 1);
Ilko Iliev61fdb732009-06-12 21:20:39 +020025}