From patchwork Mon Feb 25 08:15:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1047625 X-Patchwork-Delegate: uboot@andestech.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=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="V+6AIC7Z"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="bidLUVt/"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 447FK15311z9s9T for ; Mon, 25 Feb 2019 19:21:25 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2B7DFC21DD7; Mon, 25 Feb 2019 08:21:10 +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=BAD_ENC_HEADER, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_BLOCKED, 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 37798C21DFF; Mon, 25 Feb 2019 08:16:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 21B87C21DC1; Mon, 25 Feb 2019 08:16:15 +0000 (UTC) Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lists.denx.de (Postfix) with ESMTPS id D5A01C21E08 for ; Mon, 25 Feb 2019 08:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1551082564; x=1582618564; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7gUybMIIi8xE3XahoPcZEppePSMNLmYnvK9uh+YrWGE=; b=V+6AIC7ZD2EVXwkfL+TRUGLr27MHe3zPJieEANrzw2bTrs+bxseiMPZv Zi+zYNwro16I+RVjBWx0VUsLR+0Jt3Qata03XDn2ouEcoFNuCZU0UE2Zc fo9PC9G1tYTvTiPk4Vl8N1OOn0ddx7yAkwuhYeIrFhquDSO2l0Xfa9efF BSaXmT5xf89Mfx/IBuoc57/0EO6qAC+tLTFCeY3rKhyZoHMUzMd0IIYsp BhRF+ags+vaPID0TRrMHDrgLD8RbkvUaTkutPt+RtbhFp8Fsw0F0w61fv W9COK5ZLPmoTLODLSl14XWoo/EWxOgVvE4l/145OEFtEAO8MkmSVd/Pqc Q==; X-IronPort-AV: E=Sophos;i="5.58,410,1544457600"; d="scan'208";a="102080832" Received: from mail-dm3nam03lp2058.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([104.47.41.58]) by ob1.hgst.iphmx.com with ESMTP; 25 Feb 2019 16:16:01 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8YYyD6Dw2mJSOvth8WFUujj1bvrUsN7YleCCeljZoc8=; b=bidLUVt/XW5RUJu5ikFfa1G4i5RvYSURrs8YfJzg6/GzPPA2tjJOBe1GMfJ6QJjm+zhuWX1ZhMZ+eebIH2xgTgMj16VmqZXtvnG+ciztBq1+kxf7PsV9loTMddj6o8b0eLldJ97Utd/EreYNq6WMtUW9+wkbJ/UFtmO0cN+rIJY= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB5789.namprd04.prod.outlook.com (20.179.20.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.15; Mon, 25 Feb 2019 08:15:20 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::d197:7b59:7e0d:e819]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::d197:7b59:7e0d:e819%3]) with mapi id 15.20.1643.019; Mon, 25 Feb 2019 08:15:20 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Joe Hershberger , Michal Simek , Michal Simek , Lukas Auer , Masahiro Yamada , Simon Glass Thread-Topic: [PATCH v10 13/15] riscv: Add SiFive FU540 board support Thread-Index: AQHUzOI/hbPQwPcHQ0yhFGYV0i0i2A== Date: Mon, 25 Feb 2019 08:15:19 +0000 Message-ID: <20190225081334.23256-14-anup.patel@wdc.com> References: <20190225081334.23256-1-anup.patel@wdc.com> In-Reply-To: <20190225081334.23256-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: TYAPR01CA0069.jpnprd01.prod.outlook.com (2603:1096:404:2b::33) To MN2PR04MB6061.namprd04.prod.outlook.com (2603:10b6:208:d8::15) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [129.253.179.161] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3fb9825f-0d42-4f67-fc63-08d69af961b4 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600110)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:MN2PR04MB5789; x-ms-traffictypediagnostic: MN2PR04MB5789: wdcipoutbound: EOP-TRUE x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; MN2PR04MB5789; 23:Ivx6pjHC9D7liNhUYofMQuCfDtH3VZRqAM5Gem/?= =?iso-8859-1?q?QrSyWa5pLaJp5rygIlZGMdQz/?= =?iso-8859-1?q?OvDItWkfhzqlnBbPXpgOIFdWY/J4PFnnZgq1OzWPcaaD+SiK9oT?= =?iso-8859-1?q?gXRPNhpMFZmMgnoM5gb7pmK5coX7pCHwuJtgqvGOl89mpR9Zk8j?= =?iso-8859-1?q?3yvD53afmExKP3CaB35QHxfZoUciF72fYQ7pWfr4hQbbya5CiX3?= =?iso-8859-1?q?L8aiOPRFFeL6JduXckjmrcD7dHmglDqnB1Iifj4J7op9bbgirJK?= =?iso-8859-1?q?IdgDWMxtkb3iouHSc8YKsZLAyFXYaAEXf3TsoTqJFen/sODrTNJ?= =?iso-8859-1?q?L6KpLV6/lNaYYZujCdMCKbUrec+2gpA453CrdzV5vsBcyFv77OH?= =?iso-8859-1?q?NxoImiSb2tvryD6ZnJ9Df6JX0gADiR0siQtLygDzn7cau2Nce21?= =?iso-8859-1?q?9Vg9iBDZ6lvlRfWAFRTQSRuA+gOltLexirxXjdxUCyji/4raY4b?= =?iso-8859-1?q?Daky7w9bxfUWONPXkWS9Ykz9yTGN/kAmlkIJYU9YEcpR58xUlbv?= =?iso-8859-1?q?Azq1hJpC3ZX/9NKgXCwELeyVt1N0DBWVI9IKs5CW9/IYGFKVful?= =?iso-8859-1?q?xzyn0uZBXeS6OF91RM8vt5TezMuIqQ3QiSDE3dIVU8gKFN0KR8y?= =?iso-8859-1?q?EnXUZnVbm4eERUIZyZ4ScdpQDNCKP8/SavlnU2qU2matkW5rK+q?= =?iso-8859-1?q?jcL87SzsBx3zEHG412/LEE/TFskSx0SVcvdEBKw5Bx9/RyWE19y?= =?iso-8859-1?q?VGd2Nqsz5Je9YdQe3jFfmAsUODs1vbWwEDfL4YJQEXi0Q6xS25n?= =?iso-8859-1?q?IBwqYM/pHGhdzgLoX0qlODIgXtmMW7iLXnIkhDcX5Ef6ZWvgkj2?= =?iso-8859-1?q?sZv5sSDRxx7ArlnFjqrvAez7SwjvivgK9ZuqEksrBDdTT1WTDst?= =?iso-8859-1?q?TXtZQ27VwavbQUmRMayTrndgaLOMJ8IS35Ir+zfqYGz+B5XzvLd?= =?iso-8859-1?q?Ej72mKTCtkIMBsglgFcye8sJM83Ejgub/U6j0ZV1ANcCM2vR7RG?= =?iso-8859-1?q?IQ+1ujDAN9hux9N73B0WlHboKi6nBypAnFIKEcZEI5VLOCtDHMm?= =?iso-8859-1?q?EF+BG7ppP56jafGIdAcXLPeoNk371PtjjHSxgUd1FFuqsjsNqPV?= =?iso-8859-1?q?KJyOqXDFP22GNNWV3avGvW94TuO8HOjlDmOIm6FYltcLKqk2QHD?= =?iso-8859-1?q?mS7fXbv43zWAgjm7tLqvx6gsqlZLDchHpfukUUu5beH5+pOJ77c?= =?iso-8859-1?q?1QqxLoZ5Uo9Va1cyjMV8qOxpbjUTntXRCylcs6q2Izuqf+B6BkN?= =?iso-8859-1?q?KEum7rPamOajwdKIGjNGSabmMIFTkHY4HytTZ/f1/3m5PJR6X38?= =?iso-8859-1?q?Q2naCKbXf7umUu3ni55/S5HVUTk4X//zOs0=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 095972DF2F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(376002)(346002)(396003)(366004)(39860400002)(136003)(189003)(199004)(66066001)(6512007)(186003)(53936002)(7736002)(305945005)(44832011)(478600001)(106356001)(26005)(486006)(2616005)(476003)(105586002)(7416002)(5660300002)(14454004)(6506007)(386003)(72206003)(8676002)(86362001)(54906003)(110136005)(81156014)(71190400001)(316002)(102836004)(6346003)(71200400001)(81166006)(1076003)(36756003)(25786009)(99286004)(97736004)(52116002)(50226002)(76176011)(2906002)(8936002)(11346002)(6486002)(6436002)(4326008)(68736007)(446003)(256004)(6116002)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB5789; H:MN2PR04MB6061.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: XDRRn3SzhWhUXmcHPrMksfWw+DswDsE6UsEUVyLebekwwmGepyQzq94BuKZpo5AdegroTG7zSMLjdnAlpo4rQllZB6XaTxsLjc2BDf+l6UC3N2i10AJmKJ54jUCS/Dao42BgXd78b4t6FJO3gGbec/HbyCVIduczxTcOGLaA4xYh/pODBbcE9GzOhGr6DTyszTn8JecnityteWCM+asJ7nH3Wgniv37D0RNms0EriokcNWSK2SDXL0AlwRKfQtQQKP1t6dUCdNwTV+B7S1B85mTkssvF4JUTcxFGf3ieIrStIpDPZveQsiM+/cpld7qsCOGUJlEqbHHb7K4+kTdHGICSOWJHiV0EhsLxoA28wBYkwPNKoqfx1hGNLZSfuBUAkLVgmsGneH8V9xt9O91Rj4euT0I+OJbC2v39Ls8ihqY= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fb9825f-0d42-4f67-fc63-08d69af961b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Feb 2019 08:15:15.1997 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5789 Cc: Palmer Dabbelt , Alexander Graf , U-Boot Mailing List Subject: [U-Boot] [PATCH v10 13/15] riscv: Add SiFive FU540 board support 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" This patch adds SiFive FU540 board support. For now, only SiFive serial, SiFive PRCI, and Cadance MACB drivers are only enabled. The SiFive FU540 defconfig by default builds U-Boot for S-Mode because U-Boot on SiFive FU540 will run in S-Mode as payload of BBL or OpenSBI. Signed-off-by: Atish Patra Signed-off-by: Anup Patel Reviewed-by: Alexander Graf Reviewed-by: Lukas Auer Reviewed-by: Bin Meng --- arch/riscv/Kconfig | 4 ++++ board/sifive/fu540/Kconfig | 42 +++++++++++++++++++++++++++++++++ board/sifive/fu540/MAINTAINERS | 9 +++++++ board/sifive/fu540/Makefile | 5 ++++ board/sifive/fu540/fu540.c | 17 ++++++++++++++ configs/sifive_fu540_defconfig | 11 +++++++++ include/configs/sifive-fu540.h | 43 ++++++++++++++++++++++++++++++++++ 7 files changed, 131 insertions(+) create mode 100644 board/sifive/fu540/Kconfig create mode 100644 board/sifive/fu540/MAINTAINERS create mode 100644 board/sifive/fu540/Makefile create mode 100644 board/sifive/fu540/fu540.c create mode 100644 configs/sifive_fu540_defconfig create mode 100644 include/configs/sifive-fu540.h diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 6879047ff7..36512a8995 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -14,11 +14,15 @@ config TARGET_AX25_AE350 config TARGET_QEMU_VIRT bool "Support QEMU Virt Board" +config TARGET_SIFIVE_FU540 + bool "Support SiFive FU540 Board" + endchoice # board-specific options below source "board/AndesTech/ax25-ae350/Kconfig" source "board/emulation/qemu-riscv/Kconfig" +source "board/sifive/fu540/Kconfig" # platform-specific options below source "arch/riscv/cpu/ax25/Kconfig" diff --git a/board/sifive/fu540/Kconfig b/board/sifive/fu540/Kconfig new file mode 100644 index 0000000000..6be3d88144 --- /dev/null +++ b/board/sifive/fu540/Kconfig @@ -0,0 +1,42 @@ +if TARGET_SIFIVE_FU540 + +config SYS_BOARD + default "fu540" + +config SYS_VENDOR + default "sifive" + +config SYS_CPU + default "generic" + +config SYS_CONFIG_NAME + default "sifive-fu540" + +config SYS_TEXT_BASE + default 0x80000000 if !RISCV_SMODE + default 0x80200000 if RISCV_SMODE + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select GENERIC_RISCV + imply CMD_DHCP + imply CMD_EXT2 + imply CMD_EXT4 + imply CMD_FAT + imply CMD_FS_GENERIC + imply CMD_NET + imply CMD_PING + imply CLK_SIFIVE + imply CLK_SIFIVE_FU540_PRCI + imply DOS_PARTITION + imply EFI_PARTITION + imply IP_DYN + imply ISO_PARTITION + imply MACB + imply MII + imply NET_RANDOM_ETHADDR + imply PHY_LIB + imply PHY_MSCC + imply SIFIVE_SERIAL + +endif diff --git a/board/sifive/fu540/MAINTAINERS b/board/sifive/fu540/MAINTAINERS new file mode 100644 index 0000000000..702d803ad8 --- /dev/null +++ b/board/sifive/fu540/MAINTAINERS @@ -0,0 +1,9 @@ +SiFive FU540 BOARD +M: Paul Walmsley +M: Palmer Dabbelt +M: Anup Patel +M: Atish Patra +S: Maintained +F: board/sifive/fu540/ +F: include/configs/sifive-fu540.h +F: configs/sifive_fu540_defconfig diff --git a/board/sifive/fu540/Makefile b/board/sifive/fu540/Makefile new file mode 100644 index 0000000000..6e1862c475 --- /dev/null +++ b/board/sifive/fu540/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (c) 2019 Western Digital Corporation or its affiliates. + +obj-y += fu540.o diff --git a/board/sifive/fu540/fu540.c b/board/sifive/fu540/fu540.c new file mode 100644 index 0000000000..5adc4a3d4a --- /dev/null +++ b/board/sifive/fu540/fu540.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2019 Western Digital Corporation or its affiliates. + * + * Authors: + * Anup Patel + */ + +#include +#include + +int board_init(void) +{ + /* For now nothing to do here. */ + + return 0; +} diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig new file mode 100644 index 0000000000..2f8cca9de0 --- /dev/null +++ b/configs/sifive_fu540_defconfig @@ -0,0 +1,11 @@ +CONFIG_RISCV=y +CONFIG_TARGET_SIFIVE_FU540=y +CONFIG_RISCV_SMODE=y +CONFIG_ARCH_RV64I=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_NR_DRAM_BANKS=1 +CONFIG_FIT=y +CONFIG_DISPLAY_CPUINFO=y +CONFIG_DISPLAY_BOARDINFO=y +CONFIG_CMD_MII=y +CONFIG_OF_PRIOR_STAGE=y diff --git a/include/configs/sifive-fu540.h b/include/configs/sifive-fu540.h new file mode 100644 index 0000000000..7007b5f6af --- /dev/null +++ b/include/configs/sifive-fu540.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (c) 2019 Western Digital Corporation or its affiliates. + * + * Authors: + * Anup Patel + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#define CONFIG_SYS_SDRAM_BASE 0x80000000 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M) + +#define CONFIG_SYS_LOAD_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M) + +#define CONFIG_SYS_MALLOC_LEN SZ_8M + +#define CONFIG_SYS_BOOTM_LEN SZ_16M + +#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 + +/* Environment options */ +#define CONFIG_ENV_SIZE SZ_4K + +#define BOOT_TARGET_DEVICES(func) \ + func(DHCP, dhcp, na) + +#include + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_high=0xffffffffffffffff\0" \ + "initrd_high=0xffffffffffffffff\0" \ + "kernel_addr_r=0x80600000\0" \ + "fdt_addr_r=0x82200000\0" \ + "scriptaddr=0x82300000\0" \ + "pxefile_addr_r=0x82400000\0" \ + "ramdisk_addr_r=0x82500000\0" \ + BOOTENV + +#endif /* __CONFIG_H */