Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1117C4332F for ; Fri, 23 Dec 2022 12:50:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3435A85473; Fri, 23 Dec 2022 13:50:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="2Gh7C4YX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2E49785385; Fri, 23 Dec 2022 07:39:49 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C172985068 for ; Fri, 23 Dec 2022 07:39:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Mihai.Sain@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1671777585; x=1703313585; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ME/qHaqPlSYwBhlWbwxbxagKZPLkcUWvVLPar9mrmes=; b=2Gh7C4YXNbKl4dGQWDjPX8LX2qOw/ZRWS9wR6Q4hbpT5hrLeBhqljm5E YsD+KF2gYeVG71m3ioFduIxQceiGSVXFJ+mNwXXE19ZS+XJaOTwJ6gBG+ t78/VWPfXWzFanecM+G3FX5rb0+bu/MXGrhXKD4t7Bm1cA/ZNgqRuekpO i8yzv7Xpoddx3c3hoGTtLy72tjqR2vG1I9diLxp+NdZqptKaVa9L0Ac+5 9irpMzUO2QgNq/0uVlATf0UepO2d9SjzFRN3qG4eAzXVJcn2WgXNyZ13I zuGI2ie4KmekHjIM0t+JMFr6XKYpRg7nluZo9PsqHtcJ6aD6X2yNae+J+ A==; X-IronPort-AV: E=Sophos;i="5.96,267,1665471600"; d="scan'208";a="205161507" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Dec 2022 23:39:43 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 22 Dec 2022 23:39:43 -0700 Received: from virtualbox.microchip.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Thu, 22 Dec 2022 23:39:41 -0700 From: Mihai Sain To: , , , CC: Mihai Sain Subject: [[PATCH] board: at91: sam9x60: set blue led on at boot time Date: Fri, 23 Dec 2022 08:39:36 +0200 Message-ID: <20221223063936.1651-1-mihai.sain@microchip.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Mailman-Approved-At: Fri, 23 Dec 2022 13:50:29 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Set blue led on at boot time in order to highlight that u-boot is loaded. This is done for all sam9x60 based boards which contain an RGB led. Signed-off-by: Mihai Sain --- board/atmel/sam9x60_curiosity/sam9x60_curiosity.c | 10 ++++++++++ board/atmel/sam9x60ek/sam9x60ek.c | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c index 8cf67d148d..0fe0de9fde 100644 --- a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c +++ b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c @@ -25,6 +25,13 @@ DECLARE_GLOBAL_DATA_PTR; void at91_prepare_cpu_var(void); +static void board_leds_init(void) +{ + at91_set_pio_output(AT91_PIO_PORTD, 17, 0); /* LED RED */ + at91_set_pio_output(AT91_PIO_PORTD, 19, 0); /* LED GREEN */ + at91_set_pio_output(AT91_PIO_PORTD, 21, 1); /* LED BLUE */ +} + int board_late_init(void) { at91_prepare_cpu_var(); @@ -62,6 +69,9 @@ int board_init(void) { /* address of boot parameters */ gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; + + board_leds_init(); + return 0; } diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c index d8d2c3a18f..5cd620f1a9 100644 --- a/board/atmel/sam9x60ek/sam9x60ek.c +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -24,6 +24,13 @@ DECLARE_GLOBAL_DATA_PTR; void at91_prepare_cpu_var(void); +static void board_leds_init(void) +{ + at91_set_pio_output(AT91_PIO_PORTB, 11, 0); /* LED RED */ + at91_set_pio_output(AT91_PIO_PORTB, 12, 0); /* LED GREEN */ + at91_set_pio_output(AT91_PIO_PORTB, 13, 1); /* LED BLUE */ +} + #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { @@ -66,6 +73,8 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + board_leds_init(); + return 0; } -- 2.39.0