From patchwork Fri Sep 27 13:08:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 1168484 X-Patchwork-Delegate: eugen.hristev@microchip.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="tXldPndR"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46fsZJ0wS0z9sN1 for ; Fri, 27 Sep 2019 23:09:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 72876C21F24; Fri, 27 Sep 2019 13:09:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B8B45C21EC5; Fri, 27 Sep 2019 13:09:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B2492C21E47; Fri, 27 Sep 2019 13:08:57 +0000 (UTC) Received: from esa6.microchip.iphmx.com (esa6.microchip.iphmx.com [216.71.154.253]) by lists.denx.de (Postfix) with ESMTPS id B8124C21E73 for ; Fri, 27 Sep 2019 13:08:56 +0000 (UTC) Received-SPF: Pass (esa6.microchip.iphmx.com: domain of Tudor.Ambarus@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Tudor.Ambarus@microchip.com"; x-sender="Tudor.Ambarus@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Tudor.Ambarus@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; spf=Pass smtp.mailfrom=Tudor.Ambarus@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: FbxY6zUbZFzOI056GgVWozurOINBIbvw6NDPSRfRGlCfDQCEB11ABrbSHMK0SmVnumXLvKObuX PzrzwXpT/hzrKUct+pHpx62xaOF5wEAtGFTmREByiwzSALhn6ABnaXlyaPT5JxAAmxCCtFFtBQ BlZFBgYvYFCuq4VQkm55uHpid3/z7IGYGUwkdSdu3QviHzsui5s6/7Vy1snI+z05hEifXIrfmy dtt+4tdyNgj8P8+RoIsvsn3o2BLGA6y79P3H0m9CpQaKWvqjiOROGj4uetEsqUIKu6l9iq6K9K LcA= X-IronPort-AV: E=Sophos;i="5.64,555,1559545200"; d="scan'208";a="47910887" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 27 Sep 2019 06:08:54 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 27 Sep 2019 06:08:54 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 27 Sep 2019 06:08:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FXWsx/km2Zqx8/1y32eGkA129qSCswwsX1FwPSQJYnP/oT5u1kdDBBuoWbw/Am3I/xPNzIhnLXzAsw0bz6Erdy5ZREFR/5ZrkAxcLbS2cnpULKEDvin7CC2rqy6dsqhsOCbjsWVVllcuM1/2q4LUmOv3D293bh5B7nvX2TtpRH4fr3gqqrhvJPu6fOMGlEKz3UKiR6DGA90CnHXgUliir+Fx+p1J/ZHXBMkgEMD++seCRaj/hJun+SPbfcZ9dzTNcBDu82sfznJZN2yxN62K7n8qZs5lbCnPtHWixgq0VUK7i2QOk14om815T/BLez6g6x5n5UbGuGMxZEbW6dj20A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OqtjzkEsVvvEzv+a3pBeDDXMpaH1u0WunMYs1uzIO6c=; b=mwzvqrGTUKyO7TzKM6oo9oflBBW7U6Y7zuse2MPSQp2uFHXMeqV8yK3RN2C/sx1bIQtuiYQ93ia5UZFkgBHy/epp+CXHViRF+8w5gUQDm2rLRcoIxRMCi0MxB9xmwjrr+qIlBitzBw9Y1Sz+81PkXQHHY0i9CWRXGejVp2Oe2mX6cRTSANeaJWDa4mHYZVwQrRLJbhRkDNiolTH7RzNtNbK8wXlL6bve6qJgpeKMH2zhxlOSKciFiYPfm0Xtzh6JfEbBvDLA55jDvfEsSIHH3TYy9bRpXRokIC6QP4sI0mkBhpOclhly80GP4Gh19ShzbGM2QC/hqHBmv4xRNiowWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OqtjzkEsVvvEzv+a3pBeDDXMpaH1u0WunMYs1uzIO6c=; b=tXldPndRhJvlKagvxEzlcXtuanYgZbw6gIVYeD3sHBEKIo0k84GPC4nFKIBlzZRmQdhwCjfaTgEsNA/KhLXbrtgUMwOsoZnZA7sioX2EeoMsSb60TngIN5913TFaRq31zSMPthx45PqMGo4wV05auivcQ1A7pgNMis+tJ9IPKYE= Received: from MN2PR11MB4448.namprd11.prod.outlook.com (52.135.39.157) by MN2PR11MB3872.namprd11.prod.outlook.com (10.255.180.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.17; Fri, 27 Sep 2019 13:08:52 +0000 Received: from MN2PR11MB4448.namprd11.prod.outlook.com ([fe80::c951:b15a:e4b3:30f7]) by MN2PR11MB4448.namprd11.prod.outlook.com ([fe80::c951:b15a:e4b3:30f7%7]) with mapi id 15.20.2284.023; Fri, 27 Sep 2019 13:08:52 +0000 From: To: Thread-Topic: [U-boot][PATCH v3 06/14] board: atmel: Add sam9x60ek board Thread-Index: AQHVdTS16ohqyc2w/ky1QDp/+NAB+w== Date: Fri, 27 Sep 2019 13:08:52 +0000 Message-ID: <20190927130818.478-7-tudor.ambarus@microchip.com> References: <20190927130818.478-1-tudor.ambarus@microchip.com> In-Reply-To: <20190927130818.478-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1P18901CA0016.EURP189.PROD.OUTLOOK.COM (2603:10a6:801::26) To MN2PR11MB4448.namprd11.prod.outlook.com (2603:10b6:208:193::29) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.9.5 x-originating-ip: [109.103.8.26] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 179c1806-31c6-438d-be22-08d7434bd813 x-ms-traffictypediagnostic: MN2PR11MB3872: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 0173C6D4D5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(136003)(396003)(39860400002)(376002)(189003)(199004)(86362001)(66066001)(52116002)(5660300002)(6506007)(71200400001)(99286004)(71190400001)(186003)(36756003)(2616005)(486006)(26005)(478600001)(256004)(14454004)(66476007)(7416002)(66446008)(50226002)(64756008)(102836004)(66946007)(11346002)(476003)(305945005)(25786009)(386003)(76176011)(446003)(7736002)(8936002)(8676002)(81166006)(6862004)(6636002)(6436002)(66556008)(37006003)(107886003)(3846002)(54906003)(316002)(6486002)(81156014)(4326008)(6116002)(1076003)(6512007)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB3872; H:MN2PR11MB4448.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Qe71gI4SFj30Tn+QqYYJST/KZCtFhpa9c8ngDN1FCbloPjlCnGibvksQNnqSqIo6HLtFzBorouNhDnFQMfQfwEjrlgJ9SgStJeqqWkF592d8z05NjdOKtpPvIHJWtmWVXsBR+r8NuN1VatcBQ3L980btdUPf03VUYbA5G3dMLgwp4HEg7jPz4ORGjHo5yTBPDbtqrQShA629b8TEwk3tBQ+AsY1LxagqG6u/oiUcXVaaIGpu7k3cW2Qu1kJOtDgdXKNwPFm6K1/4WXP3es7meSi0kNHnLpnLZmUdEFeh0JPrEvtyGk974TAY48qjjAlA+6t2lnVPpeXOUq+7esnUk0dvVJqYOqTTxueWfYhy/12+Grfqhucwq7s7Eyww+PaGyGB6e/1g32L8YMK6BMuOtURz6lsnQ4FInWwxONETnEU= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 179c1806-31c6-438d-be22-08d7434bd813 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2019 13:08:52.6703 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: sbL0cqZiPF0SvuVZJXd41S5/sSHhjknL40pktpjZHnd+4baBBRqj3U2lH1aTT8XaKF5LF94H0+qWAgYCMPJWEuuT8gvuQnKWKts4dq7vJX4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3872 Cc: Nicolas.Ferre@microchip.com, joe.hershberger@ni.com, Sandeep.Sheriker@microchip.com, sr@denx.de, Claudiu.Beznea@microchip.com, u-boot@lists.denx.de, marek.vasut+renesas@gmail.com Subject: [U-Boot] [U-boot][PATCH v3 06/14] board: atmel: Add sam9x60ek board X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" From: Sandeep Sheriker Mallikarjun Add new board SAM9X60-EK using the ARM926 SAM9X60 SoC. Signed-off-by: Sandeep Sheriker Mallikarjun [tudor.ambarus@microchip.com: - fix number of DRAM banks: One DDR2-SDRAM (W972GG6KB 2 Gbit = 16 Mbit x 16 x 8 banks] - drop SPL related macros - drop memtest macros - drop CONFIG_SPI_BOOT, CONFIG_SYS_USE_DATAFLASH related macros - drop inclusion of asm/arch/at91sam9_smc.h] Signed-off-by: Tudor Ambarus --- arch/arm/mach-at91/Kconfig | 7 +++++ board/atmel/sam9x60ek/Kconfig | 12 ++++++++ board/atmel/sam9x60ek/MAINTAINERS | 7 +++++ board/atmel/sam9x60ek/Makefile | 7 +++++ board/atmel/sam9x60ek/sam9x60ek.c | 59 ++++++++++++++++++++++++++++++++++++++ include/configs/sam9x60ek.h | 60 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+) create mode 100644 board/atmel/sam9x60ek/Kconfig create mode 100644 board/atmel/sam9x60ek/MAINTAINERS create mode 100644 board/atmel/sam9x60ek/Makefile create mode 100644 board/atmel/sam9x60ek/sam9x60ek.c create mode 100644 include/configs/sam9x60ek.h diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 3cf13042b7b4..85524004f9e4 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -160,6 +160,12 @@ config TARGET_GARDENA_SMART_GATEWAY_AT91SAM select BOARD_LATE_INIT select SUPPORT_SPL +config TARGET_SAM9X60EK + bool "SAM9X60-EK board" + select SAM9X60 + select BOARD_EARLY_INIT_F + select BOARD_LATE_INIT + config TARGET_SAMA5D2_PTC_EK bool "SAMA5D2 PTC EK board" select BOARD_EARLY_INIT_F @@ -316,6 +322,7 @@ source "board/atmel/at91sam9m10g45ek/Kconfig" source "board/atmel/at91sam9n12ek/Kconfig" source "board/atmel/at91sam9rlek/Kconfig" source "board/atmel/at91sam9x5ek/Kconfig" +source "board/atmel/sam9x60ek/Kconfig" source "board/atmel/sama5d2_ptc_ek/Kconfig" source "board/atmel/sama5d2_xplained/Kconfig" source "board/atmel/sama5d27_som1_ek/Kconfig" diff --git a/board/atmel/sam9x60ek/Kconfig b/board/atmel/sam9x60ek/Kconfig new file mode 100644 index 000000000000..32fae2108e6e --- /dev/null +++ b/board/atmel/sam9x60ek/Kconfig @@ -0,0 +1,12 @@ +if TARGET_SAM9X60EK + +config SYS_BOARD + default "sam9x60ek" + +config SYS_VENDOR + default "atmel" + +config SYS_CONFIG_NAME + default "sam9x60ek" + +endif diff --git a/board/atmel/sam9x60ek/MAINTAINERS b/board/atmel/sam9x60ek/MAINTAINERS new file mode 100644 index 000000000000..e8c1346863a3 --- /dev/null +++ b/board/atmel/sam9x60ek/MAINTAINERS @@ -0,0 +1,7 @@ +SAM9X60EK BOARD +M: Sandeep Sheriker M +M: Eugen Hristev +S: Maintained +F: board/atmel/sam9x60ek/ +F: include/configs/sam9x60ek.h +F: configs/sam9x60ek_mmc_defconfig diff --git a/board/atmel/sam9x60ek/Makefile b/board/atmel/sam9x60ek/Makefile new file mode 100644 index 000000000000..12a406a3bb5c --- /dev/null +++ b/board/atmel/sam9x60ek/Makefile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries +# +# Author: Sandeep Sheriker M + +obj-y += sam9x60ek.o diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c new file mode 100644 index 000000000000..62938741ddd6 --- /dev/null +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries + * + * Author: Sandeep Sheriker M + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +void at91_prepare_cpu_var(void); + +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + at91_prepare_cpu_var(); + return 0; +} +#endif + +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) +{ + at91_seriald_hw_init(); +} +#endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F +int board_early_init_f(void) +{ +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#endif + return 0; +} +#endif + +int board_init(void) +{ + /* address of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + return 0; +} + +int dram_init(void) +{ + gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, + CONFIG_SYS_SDRAM_SIZE); + return 0; +} diff --git a/include/configs/sam9x60ek.h b/include/configs/sam9x60ek.h new file mode 100644 index 000000000000..b778bd8e83eb --- /dev/null +++ b/include/configs/sam9x60ek.h @@ -0,0 +1,60 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Configuation settings for the SAM9X60EK board. + * + * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries + * + * Author: Sandeep Sheriker M + */ + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +/* ARM asynchronous clock */ +#define CONFIG_SYS_AT91_SLOW_CLOCK 32768 +#define CONFIG_SYS_AT91_MAIN_CLOCK 24000000 /* 24 MHz crystal */ + +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG +#define CONFIG_SKIP_LOWLEVEL_INIT + +#define CONFIG_USART_BASE ATMEL_BASE_DBGU +#define CONFIG_USART_ID 0 /* ignored in arm */ + +/* general purpose I/O */ +#define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ + +/* + * BOOTP options + */ +#define CONFIG_BOOTP_BOOTFILESIZE + +/* + * define CONFIG_USB_EHCI_HCD to enable USB Hi-Speed (aka 2.0) + * NB: in this case, USB 1.1 devices won't be recognized. + */ + +/* SDRAM */ +#define CONFIG_SYS_SDRAM_BASE 0x20000000 +#define CONFIG_SYS_SDRAM_SIZE 0x10000000 /* 256 megs */ + +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE) + +#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ + +#ifdef CONFIG_SD_BOOT +/* bootstrap + u-boot + env + linux in sd card */ +#define CONFIG_BOOTCOMMAND \ + "fatload mmc 0:1 0x21000000 at91-sam9x60ek.dtb;" \ + "fatload mmc 0:1 0x22000000 zImage;" \ + "bootz 0x22000000 - 0x21000000" +#endif + +/* + * Size of malloc() pool + */ +#define CONFIG_SYS_MALLOC_LEN (512 * 1024 + 0x1000) + +#endif