From patchwork Wed Jun 30 11:10:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tianrui Wei X-Patchwork-Id: 1498868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=outlook.com header.i=@outlook.com header.a=rsa-sha256 header.s=selector1 header.b=PgDHbVtB; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GFJYY2x09z9sS8 for ; Wed, 30 Jun 2021 21:10:57 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2A69F8325A; Wed, 30 Jun 2021 13:10:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=outlook.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=outlook.com header.i=@outlook.com header.b="PgDHbVtB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 65FC4831B9; Wed, 30 Jun 2021 13:10:50 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-hk2apc01olkn0810.outbound.protection.outlook.com [IPv6:2a01:111:f400:febc::810]) (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 8CFD2831B9 for ; Wed, 30 Jun 2021 13:10:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tianrui-wei@outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CJOrWkt3zVwhasWbaN+uxstRxd5H3LtjM/No+PpCVojsHtC6NypvGbZagWPS3iwXl+yojfYo2mtNMbc0jXktR3B1QmcaGhw6FR5v+3D+TUiirlY8aQ6mx3OXlI6HTz2mO+/BZxzMMpNe25COQLcpBVQIcA2BbzMFb68lRKmBbLjMdxhGn3QN4oHoCXJB+f2ijVhii72v6euKlwSLeudO0kHRzWTqq0DI0M5LeyBQq2VpwOJ32qBlTzyag3piR0OaWYvhFW53w5LZdF17Z2ZnvI+MYZRbzUXfhP2WP8r3LSU/0oaugj/BJYXLa7fT+oo9T2iW3tOmwqcoIop/oMuoTg== 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=aaCwXXjXarr75Pqljh/Slh3+LthZsLk8jNxBdEHj8as=; b=RenshV5u2qz6shuQyQ1JNyCqV11asqMWM1DCBnvuzoF94qzd6a8gl6qt5/VWF2TqI14Y1Z472+JlpAzPOaTn7wlMKlAnCpvKjT6et/azQqXx7PPR6SveRKivOEnpzTv+siCQdefgz5kYvjg22exivjlDWjtxQJfM49bmQzZVfm4qyxdSQNyEm7Q0j1IS00LfCIOMc/X/5lfuwJY2f11DZ1y00Zq4evs+ZqEHEntXK47d5bUVRK3UlYRtQ12IJ5bZ2g6q4tcnF+UAV1XgnXU4XBQzK+Ux5xX1IXuc77F6MzreLOuGLJ4CeJSKIoHcn1KYcKjP2lt4o9H06FRs88qXoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aaCwXXjXarr75Pqljh/Slh3+LthZsLk8jNxBdEHj8as=; b=PgDHbVtBkpfFnn3IKWtLnXuvN7DexjzD5n/PaZZ5iqJRQoCbwco1GxjP/7nIkz4K+0OkXR153M3PV3UsSGMVZuUCDXCKXMAwf0A5XBALSiU0bRLnIGw7adW1JbTTo5Ws4QZfP46Y0acuYt+SDBGm3AwpX2arTSCsaKppczXPywKrm2+ZpzUGWjyN9/WN1Pt6B6jLdqpvtJCxYuUboRsP9BgX5X+PzZh9WWQ3LhRtrPtOe3FGAaNRQmgEobFGdwD9uqcou5JYfD6yDyN/VbqsbviLdx6jaWMahsQ9EWX95MYQdaAx7HIeyD07dU7zXDDP4p2ig6Q0kXQsmq5ec+O2rw== Received: from PS1PR01CA0013.apcprd01.prod.exchangelabs.com (2603:1096:300:75::25) by KU1PR03MB2760.apcprd03.prod.outlook.com (2603:1096:802:27::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.19; Wed, 30 Jun 2021 11:10:42 +0000 Received: from PU1APC01FT047.eop-APC01.prod.protection.outlook.com (2603:1096:300:75:cafe::64) by PS1PR01CA0013.outlook.office365.com (2603:1096:300:75::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 30 Jun 2021 11:10:42 +0000 Received: from SY4PR01MB6798.ausprd01.prod.outlook.com (2a01:111:e400:7ebe::4d) by PU1APC01FT047.mail.protection.outlook.com (2a01:111:e400:7ebe::279) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.22 via Frontend Transport; Wed, 30 Jun 2021 11:10:41 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:B475CEED00C7A83746C6E09D72B07BCA01E9521C20AA530A54D555DFF02CF372; UpperCasedChecksum:D2C95F0FC72E60F8AFC893B0A67A3A5D0BA9D5AF7918E2F0785B5B65642DDB43; SizeAsReceived:7382; Count:45 Received: from SY4PR01MB6798.ausprd01.prod.outlook.com ([fe80::5476:5394:7bb7:6941]) by SY4PR01MB6798.ausprd01.prod.outlook.com ([fe80::5476:5394:7bb7:6941%2]) with mapi id 15.20.4264.026; Wed, 30 Jun 2021 11:10:40 +0000 From: Tianrui Wei To: u-boot@lists.denx.de Cc: ycliang@andestech.com, rick@andestech.com, peng.fan@nxp.com, jh80.chung@samsung.com, jbalkind@ucsb.edu, seanga2@gmail.com, bmeng.cn@gmail.com Subject: [PATCH v10 0/2] Add OpenPiton-riscv64 Board Support Date: Wed, 30 Jun 2021 19:10:26 +0800 Message-ID: X-Mailer: git-send-email 2.32.0 X-TMN: [0djbzDpF8SmWaFDd8Wz98V6KnOr0Wv9p] X-ClientProxiedBy: HK2P15301CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::22) To SY4PR01MB6798.ausprd01.prod.outlook.com (2603:10c6:10:137::12) X-Microsoft-Original-Message-ID: <20210630111028.5017-1-tianrui-wei@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (111.18.44.10) by HK2P15301CA0012.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.1 via Frontend Transport; Wed, 30 Jun 2021 11:10:38 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 45 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 652c2d34-ef77-4a4f-39b2-08d93bb7b1fe X-MS-TrafficTypeDiagnostic: KU1PR03MB2760: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q+UoxQw3jMaPVX9xngqy40M+n31vxoOtFHqj8OQ17/NT5i/uaS/uRbS1AR57IWUHkiGDVCxqVtOZGPUQ4cwqYXP4Npxd5er/JyPIWB8pDfb6fiURFNBYonDpU8KW8krM9jlmK5IDrL1+bU/NaZD8kZyuzTAy2HXxaZAXjIs5lUX/pLyWiIk7UYuHCGEM7wZWp4d8LDnPowbPGgJE51OTAxVfAu4uFG9/kzqg29X4XVMsIQV6wgI7ZUIF5Ff/KC8oahzAoIMIhmQGdLNhtY1QjgUx4f8kWa2kSzuPfOOvUhDeINsnK06x51KREZdzqQeLfvjhUOvV3fNozin1gut7+AL+LpHQxonr3RAdQpEtqpnCCk7RqnWY9Qnz+D30XKJ/3lfo+/3wNKRphrNrW74rtUNGj/Zpo+mi0mABq5F9YPdy1gIV3CWLR8QRgchM2uUA X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VHI47Ra2gS15etFjBKTFXLlqxMNrBCJbahLAQlouIIgyj7C89hiqEgQjZjLtFQT4MDeII+K2yDTtr2yJ+XlwGh7H6RSDuQritchZF2o2UMHlotjiBvsFm4uMmMMM9OS0gzFIPpFkXCqi7353XCxbtg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 652c2d34-ef77-4a4f-39b2-08d93bb7b1fe X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jun 2021 11:10:40.3984 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: PU1APC01FT047.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KU1PR03MB2760 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean This patch set is to add OpenPiton board support. Patches are split into several parts: - [PATCH 1/2] add OpenPiton support to mmc driver - [PATCH 2/2] add support for OpenPiton board Description - for mmc driver, it's settings are automatically configured at hardware level. We only need to expose the memory mapped interface through U-Boot driver model - For OpenPiton, as we need to embed the device tree blob into the bitstream, there is currently no itb support Tests checks - Able to boot Debian Linux from SD card on Digilent Genesys 2 - Checkpatch is performed, with some warnings ignored Changelogs - V2 . fix styles and typos in [1/2] and [2/2] . add board documentation in [2/2] - V3 . fix styles in [1/2] - V4 . fix checkpatch warnings in [1/2] except MAINTAINERS - V5 . major changes in device tree . changed to OF_SEPARATE . formatting update for mmc - V6 . eliminate debug outputs altogether . separate defconfigs between SPL and u-boot proper . style updates thanks to Sean - V7 . mmc dm fixes . mmc style updates, improving readibility . mmc add write support . OpenPiton RISC-V 64 board Kconfig fixes - V8 . mmc style updates - V9 . fix typo in board doc Acknowledgements We'd like to thank all maintainers who have reviewed our code. But we'd like to thank Sean, Jaehoon and Leo in particular for taking much time and energy to help us write better code. Tianrui Wei (2): board: riscv: add openpiton-riscv64 SoC support mmc: openpiton: add piton_mmc driver arch/riscv/Kconfig | 4 + arch/riscv/dts/Makefile | 1 + arch/riscv/dts/openpiton-riscv64.dts | 153 ++++++++ board/openpiton/riscv64/Kconfig | 40 +++ board/openpiton/riscv64/MAINTAINERS | 8 + board/openpiton/riscv64/Makefile | 5 + board/openpiton/riscv64/openpiton-riscv64.c | 33 ++ configs/openpiton_riscv64_defconfig | 76 ++++ configs/openpiton_riscv64_spl_defconfig | 87 +++++ doc/board/index.rst | 1 + doc/board/openpiton/index.rst | 9 + doc/board/openpiton/riscv64.rst | 376 ++++++++++++++++++++ drivers/mmc/Kconfig | 9 + drivers/mmc/Makefile | 1 + drivers/mmc/piton_mmc.c | 161 +++++++++ include/configs/openpiton-riscv64.h | 61 ++++ 16 files changed, 1025 insertions(+) create mode 100644 arch/riscv/dts/openpiton-riscv64.dts create mode 100644 board/openpiton/riscv64/Kconfig create mode 100644 board/openpiton/riscv64/MAINTAINERS create mode 100644 board/openpiton/riscv64/Makefile create mode 100644 board/openpiton/riscv64/openpiton-riscv64.c create mode 100644 configs/openpiton_riscv64_defconfig create mode 100644 configs/openpiton_riscv64_spl_defconfig create mode 100644 doc/board/openpiton/index.rst create mode 100644 doc/board/openpiton/riscv64.rst create mode 100644 drivers/mmc/piton_mmc.c create mode 100644 include/configs/openpiton-riscv64.h