From patchwork Wed Jul 24 04:09:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1136026 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="dRvNv83E"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="EFo4F+4y"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45thgq53tyz9s3l for ; Wed, 24 Jul 2019 14:09:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3D860C21DD3; Wed, 24 Jul 2019 04:09:37 +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 EDCECC21C27; Wed, 24 Jul 2019 04:09:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1F1CAC21C27; Wed, 24 Jul 2019 04:09:33 +0000 (UTC) Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by lists.denx.de (Postfix) with ESMTPS id 2F360C21BE5 for ; Wed, 24 Jul 2019 04:09:32 +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=1563941438; x=1595477438; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=Sj+yr+qvziWfu5FnYEJO6zwAv86uMx+KD4rm0Rfit9U=; b=dRvNv83EYf4Bxk4ozFCzH9FVr+9+w+1eeZirql5rNB8RhZnbc6u9loKD udj+UE79vA4Jrwd3P/+FcBCp3hTCq0f3NY317GDK2iHJKlxhedSxedkhD LIyjdd2QKH2/8SwNpJxS4tvIQvpAaMah8ZA9rdrazvv2IwY62vL4//PeJ smMvdPBsPtEebjiO0urwjOWOaDFUe2k3WWDfc4LFNUBagSda4Vuq1yKDt NjWgSX9GNYl4Z1ugJtWPX57zfZF5uZhnegQHvrHAmOSwpi8+RMFyUccuK vqXySx5d97LuL5MJlsGBK6gyYrgwquhUpQVkI/QeKQx+WbDuKGwVkX/Sp Q==; IronPort-SDR: MqwGquXdGsAHqfZfG1ofVHc2uRpHS1ge6Z1iJQtmPg54Qfe/E8xhz8FK6t4SGbx8igmf0yu4oL pkvSxI4mW1iJp9JxXt0xFaf5/t/v6A6jCiptrRtGebK0YpaQy1Ek2swXVWfzhGabzlFNTEV52P zBz8n024SxxYuixIBcauX490iv+LCgPnJZVg7t2WUAU6i7zSLljG8GJdh7NCoXzTVOnJIdYBEK e4KhnhrT6ISTSw/t6M3J7y/zS5iZ4b3I25FTVOqBZrvqgJRg6vBt4XB/7oxjnC8ma5fJ/eu3wA OQ0= X-IronPort-AV: E=Sophos;i="5.64,300,1559491200"; d="scan'208";a="213935815" Received: from mail-dm3nam05lp2055.outbound.protection.outlook.com (HELO NAM05-DM3-obe.outbound.protection.outlook.com) ([104.47.49.55]) by ob1.hgst.iphmx.com with ESMTP; 24 Jul 2019 12:10:33 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RPUbxbNaZ6PEdIy7Tga0qs4S0/nfcz13ajnAui2wsEjhHIi803MjLBArSgXujqO7kOyv5mDYm65ZtgEhAmANcEy6lvr9qS74kV/po8KnPRYCAPXUXvFr8Mkhk8v2kbNt+IQF3KW1u5vEIqMvAHQ+g9pL/iy6kdP6R9aK34NADHi+VQBPGpP5VlCTIaQ0psqLzUmDAdACLTRaOk2G6i+RK87HJAndi4DMXJNinfoPI2QxIE30JORBmNIDScbUtUWdqARj0eOUkGChLKp3mJ3Tu+2vwDwKTLupe3E3T7PwnCFZHk7YMnZAQZNEm6s6XnGNb2imCPzlwoP0waC7PjrSsA== 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=eQRwpSic8y0ag2FnpV0JbErR0E5yRssdeq8rXJKCLNM=; b=MfddnKSvnkM9u/oIlHVnwLfU0IJ63k673GgeIZ2M1fQAEwQSrf2eARptAb9ewpSOIYMKyyPqpLaIWY7Bu/GpISt1mLQWiMevZM+3ELwYWnh1TjiD7oOukLqy7lEyc6eSiwIBPk8ArRvB7zz459jDkzvMTR3snrKxzrxiJ4AYPnQ/mS/E37I5LJ+1p8ZURIm6RqcHSdNfCuC74BuQ6BqAILpojUeNDGunCc7kKq/I44vOSb6xC8/3usgU9u/RDFN//L2D5zEMtiPaw57KMk003ASeck0SKJ+gchVGPbxF1YcvFxtoiTRe7IMzEm5ctVJjiSzlANJXr6hAuEmlQVCo3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eQRwpSic8y0ag2FnpV0JbErR0E5yRssdeq8rXJKCLNM=; b=EFo4F+4yzofO1A21Ck+FzsrMN+1f7jbf2WdN924u0jEaQtk9XgYtcVhhcBFGZx1qC7gGgA//C6Ti0M8P9rGgl0HYvarTVgyko/Vb0VE275NWEOOmaWxOORurcgbk/7Icxnev0fC9i/akoZnj12CbgMUFaemKXOm9adgGtgMltWM= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB5582.namprd04.prod.outlook.com (20.178.248.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Wed, 24 Jul 2019 04:09:28 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::a815:e61a:b4aa:60c8]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::a815:e61a:b4aa:60c8%7]) with mapi id 15.20.2094.013; Wed, 24 Jul 2019 04:09:27 +0000 From: Anup Patel To: Joe Hershberger , Rick Chen , Bin Meng , Lukas Auer Thread-Topic: [PATCH v11 0/4] Update SiFive Unleashed Drivers Thread-Index: AQHVQdWVkO4JReId+UWCyRhGSWF0Dw== Date: Wed, 24 Jul 2019 04:09:27 +0000 Message-ID: <20190724040902.9714-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0027.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::13) To MN2PR04MB6061.namprd04.prod.outlook.com (2603:10b6:208:d8::15) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Anup.Patel@wdc.com; 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: 67e30450-41d0-4c3b-4158-08d70fecb848 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:MN2PR04MB5582; x-ms-traffictypediagnostic: MN2PR04MB5582: x-ms-exchange-purlcount: 5 x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 0108A997B2 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(376002)(136003)(39860400002)(366004)(396003)(346002)(199004)(189003)(40224003)(7736002)(81166006)(6116002)(478600001)(6436002)(8676002)(6486002)(99286004)(110136005)(4326008)(52116002)(44832011)(486006)(14454004)(3846002)(86362001)(2906002)(54906003)(68736007)(66066001)(316002)(25786009)(6512007)(256004)(14444005)(53936002)(6306002)(26005)(305945005)(5660300002)(50226002)(102836004)(1076003)(476003)(64756008)(66476007)(66446008)(966005)(66556008)(8936002)(36756003)(66946007)(386003)(15650500001)(71190400001)(71200400001)(81156014)(186003)(6506007)(2616005); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB5582; H:MN2PR04MB6061.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: rmJmhdGrZAj3de/L9cZ485AWPx6d4My0/W5Ez/5V1rr50PLQ3HO2OehJl2IfCycWKhnYgs9qWDKzM4kUwd8To6x5AwQpoT3jElr+zN/OaGcKwjlqOfCNn7O7gf9bW5C1Yt48S04p2XTbpaVRcrEJbWqC8sBVD81DQURAk5INUk4c6Rq0RifQGHoQhPXIBNC3FfqTzySY0QJx59P/8hzdolyGMkv/TSpgC9rDQ3jJvhHv13TL67yYA42GPHkcMzWtNtAHyEiAceQU2iBxhfeBGuGhpn59ZWrGGVoVrC4IVV8j8fokshfrebnFbMcxIRfJhiwV6v9tZWbJOium+4ynqCC7wFICU1uUuWMhRrsMlxO5rjCeCAdSGaRXzlo+D38GPvDP2zejIAQ1VoDhrfnH+pIOiHaldBjC1ywHeXNTb/Y= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 67e30450-41d0-4c3b-4158-08d70fecb848 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2019 04:09:27.7614 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Anup.Patel@wdc.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5582 Cc: U-Boot Mailing List , Palmer Dabbelt , Alistair Francis Subject: [U-Boot] [PATCH v11 0/4] Update SiFive Unleashed Drivers 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 series update SiFive Unleashed clock driver and Cadence MACB driver so that: 1. It is in sync with upstream Linux driver 2. It uses latest DT bindings as-per upstream Linux driver With this series, we can now use latest DT bindings with U-Boot. I have tested SiFive Serial driver and Cadence MACB ethernet driver with this changes and both work fine. The legacy FSBL will still pass DTB with older DT bindings which will break the updated SiFive Unleashed clock driver. To tackle this, we have embedded DTB in OpenSBI FW_PAYLOAD firmware for SiFive Unleashed so that OpenSBI will override and pass updated DTB to U-Boot. The updated DTB passed by OpenSBI is in fact the DTB build by upstream Linux so we can straight away pass this DTB to Linux as well. This series can be found in riscv_unleashed_clk_sync_v11 branch at: https://github.com/avpatel/u-boot.git To try this series use latest OpenSBI at: https://github.com/riscv/opensbi.git And Linux-5.3-rc1 from v5.3-rc1_unleashed branch at: https://github.com/avpatel/linux.git Changes since v10: - Addressed comments from Joe on MACB driver changes Changes since v9: - Remove all accepted and merged patches except MACB driver patches - Rebased MACB driver patches upon v2 patches from Ramon Fried (Refer, https://www.mail-archive.com/u-boot@lists.denx.de/msg334300.html) - Added separate patch to sync-up SiFive Unleashed config header with QEMU RISC-V virt machine config header - Added separate patch for more updates to SiFive Unleashed README Changes since v8: - Removed probe() from macb_config for PATCH6 - Renamed set_tx_clk() to clk_init() in macb_config for PATCH6 Changes since v7: - Update PATCH6 to not treat dma_burst_length = 0 as skip gmac_configure_dma() - Update PATCH9 to check endianess at runtime Changes since v6: - Added separate patch to fix endianess check in gmac_configure_dma() Changes since v5: - Addressed Ramon's comments in PATCH6 - Addressed Bin's comments in PATCH7 Changes since v4: - Rebased patches upon Ramon's MACB changes (Refer, https://patchwork.ozlabs.org/patch/1114025/) - Added PATCH7 to setup ethaddr based on board serial number read from OTP - Added PATCH8 to update documentation Changes since v3: - Extend MACB ethernet driver for SiFive Unleashed board (just like Linux) Changes since v2: - Dropped PATCH6 which adds new compatible string to MACB driver because more changes are required in MACB driver for different ethernet speeds Changes since v1: - Dropped GEMGXL clock driver - Added new compatible string for SiFive MACB ethernet Anup Patel (4): net: macb: Extend MACB driver for SiFive Unleashed board net: macb: Fix check for little-endian system in gmac_configure_dma() riscv: sifive: fu540: Sync-up config header with RISC-V QEMU support doc: sifive-fu540: Update README to explicitly load DTB for Linux doc/README.sifive-fu540 | 317 ++++++++++++++++++++------------- drivers/net/macb.c | 84 ++++++--- include/configs/sifive-fu540.h | 18 +- 3 files changed, 265 insertions(+), 154 deletions(-) --- 2.17.1