From patchwork Mon Jul 22 07:37:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1134746 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="jOs3Zx4t"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="xQkk3IGx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45sYQ01L62z9s3l for ; Mon, 22 Jul 2019 17:38:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 50A5DC21CB1; Mon, 22 Jul 2019 07:38:42 +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 8B97CC21C2C; Mon, 22 Jul 2019 07:38:10 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E5701C21C2C; Mon, 22 Jul 2019 07:38:08 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lists.denx.de (Postfix) with ESMTPS id DEC14C21BE5 for ; Mon, 22 Jul 2019 07:38:04 +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=1563781085; x=1595317085; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=AlY2P1L7fIJneYYb3Nwl6wXJVPafZgn3RKmCl5Pk+7U=; b=jOs3Zx4tmlo9CvJSfBhZrOYnTWYsf3qTpZoYqqLogMNBkKXSkST28XTP 6bidQRLkI8AzkU0/OUWkCZS/AiTnY0OIrJGXgsKUN9Jj7igtS0qBD1KER CzVr/S1NYWoNJFrvCaUlKbeWHCebxpQ0apKGK4AmMDpPWL6npaysELr8R zhWP6IXbp8h3iwI0jbRae63flLaH2sGFMdSCA3d/HWDotxrdrH+4LQI8u hpreTAGFKKNdQP9+TG2mMKHRiIsqMeN5XP9jzdv6Rhc4JQDTS7bA2sp4i RvFdCkD1reGCnVLTbJBzdAP9W0WvWsbH6DrMNfM0xrSJ2Nxa39J+u/inD A==; IronPort-SDR: Ts/eQKcRcWdG1hiGs3shjkrfzoZ11gJUtTAs97jdx+Oban5Ou3nzOFzdkZxxX/d66UUG/EmWIH gk0Gf8yQILgppgImNT01Vnmg2/NCIQnlA7kGeTK5mDwveci9zz2pQaOEqRocMJoj4Ptm3+niDZ JzcsNCMDfYU0n9Wlo44BHk6Y3e74rGzgJ4HbIAV72cOZhJ6bWI4+raln6rnCRf81Z+XznMsORu GyEDV/UregSyYtoPC2QYCNWlfPQaLLpEHJkX7+lFMpsAS+su9zAzNUx7G6n2k5UgB/vm8sV3ZT iFc= X-IronPort-AV: E=Sophos;i="5.64,294,1559491200"; d="scan'208";a="220098955" Received: from mail-sn1nam01lp2050.outbound.protection.outlook.com (HELO NAM01-SN1-obe.outbound.protection.outlook.com) ([104.47.32.50]) by ob1.hgst.iphmx.com with ESMTP; 22 Jul 2019 15:38:01 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EH73FEYwEMZxHsz1GIN8iLSrm98NHO+b+16G5MvYmCbfOR8hFBAAV2R6E/N9HvGIC/d/UGkOTJFNNRo2JaDUJSs4j5ou4SyMB8YvwafbJ+yYVReXQhJZ9uw9RzJCbcjsHTXKUOGsi8mL+eWsFLPcKPvCptadALhBBIphAWLuPaEXgnOcAiCO28Ce8ArPej27CRffXt9S1Xt81RQRD3Dr44mwmwxY7+eANIPYS9SbUNzrCwloe/0L5mm9WZaq2OE5M/WiYBvO0Duf4dcrX+qgplnEa/pv8HP+OEY4P1KAn0ClZ+igSsn70BvqZC8QKPW2leV/V83Ct0cYc9ksbgg9jQ== 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=6kgKpyZ+Bppyo/DUbzY/mngbtll6ZCMgriL4lCKL16E=; b=b/yJeHmhvUOTh9Z1pQj9snPKHAMfo4g+p4+JvIy+Q8laQAc2UznAAZsB6v6ZfvMvn0rNj/R2/PfExgyqTS/WbNXSSBmLe+ma5m8ZyPf4zOC6pToJNauF3jMwspelhQFSiF+mbza9EJgM0fkezyYdAu/BfT8h7ZjepmCgizmi335kc1YQaV0kAnKZFrpZnVm9AoCWBla1/90C8+3XD+jpJR7E/wgs6zVwWJkmvlMtVIdybMyC55gF5VkBR5agHfcbY4iml0IdyoZcD3YULaFB9cPN1Ev5zgI2mpMMdSIlCB1j+k0+C1ChToBMjhF10BTgquJuOm2CjNDl6aTuX2+GeA== 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=6kgKpyZ+Bppyo/DUbzY/mngbtll6ZCMgriL4lCKL16E=; b=xQkk3IGxuQtPEH14uwe4vNhpeVwXmjZIYByoErcY7sO7jJZhvJS3jBQ7Amyl9MWMw0QqWjNaZUN3fDEvjJ40bv6HGl4kd6yccQ8HRCK+1fk2tWJ+k2PiPw10Bi+CZxOni/ZTKpZHQ9eCW9CHsE3H52NRg+SQqsv3hBH3e6FRD5E= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB6768.namprd04.prod.outlook.com (10.186.147.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Mon, 22 Jul 2019 07:37:59 +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; Mon, 22 Jul 2019 07:37:59 +0000 From: Anup Patel To: Joe Hershberger , Rick Chen , Bin Meng , Lukas Auer Thread-Topic: [PATCH v10 0/4] Update SiFive Unleashed Drivers Thread-Index: AQHVQGBiVjKqDROKVkOmGVBvk/atkg== Date: Mon, 22 Jul 2019 07:37:58 +0000 Message-ID: <20190722073732.2616-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: TY2PR02CA0025.apcprd02.prod.outlook.com (2603:1096:404:a6::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: 12304967-31f4-4866-69e3-08d70e7784ae 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:MN2PR04MB6768; x-ms-traffictypediagnostic: MN2PR04MB6768: x-ms-exchange-purlcount: 5 x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:6108; x-forefront-prvs: 01068D0A20 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(4636009)(396003)(39860400002)(136003)(346002)(376002)(366004)(40224003)(189003)(199004)(66556008)(81166006)(81156014)(66946007)(5660300002)(66446008)(8676002)(3846002)(8936002)(66476007)(14454004)(4326008)(64756008)(68736007)(6306002)(6512007)(71190400001)(50226002)(71200400001)(53936002)(86362001)(305945005)(6486002)(966005)(102836004)(7736002)(2906002)(54906003)(110136005)(66066001)(316002)(36756003)(6436002)(256004)(14444005)(1076003)(25786009)(6116002)(6506007)(26005)(52116002)(486006)(15650500001)(44832011)(99286004)(478600001)(186003)(386003)(2616005)(476003); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB6768; H:MN2PR04MB6061.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8tNHPdp/UaHc2cSiermEP6fygi0EwTFlsLxOxP0CFVERRvT/NSETxnPLYI8Ca0OJOQeIKcF6e+K6h6vnlzaghzHTmWIcxs+Abk/caz74Zvgb92g5ZDHgJtnth3ZxkV+4FqVsHpIUHK78sIJK8hrXbsdIwuFFqO3pPT6RnX00zplEi12VCqh2pz6ucYkBSWs97h7Ls8IIlHjXVVxyHA89cQRaeTIXLQVI0YH7DWNUtkgsflfoGKlriiFln8VtNOW82rd+kDF50dzjCTV6bgMs66QG5IuJmd/XTun3XZvPTY5PKRqfehWTJ16UxckCh5rEvlpLgbU+PVZouK9/D8mlhG6Jhymu1maSlM/k0pNw5FdNwhFSSNP6Kkdn1na7WdRA3vhsQUu4xPOuen+e98KjxOiTQbOkfrrBB20D1XXdAv0= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12304967-31f4-4866-69e3-08d70e7784ae X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jul 2019 07:37:59.0062 (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: MN2PR04MB6768 Cc: U-Boot Mailing List , Palmer Dabbelt , Alistair Francis Subject: [U-Boot] [PATCH v10 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_v10 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 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 | 83 ++++++--- include/configs/sifive-fu540.h | 18 +- 3 files changed, 264 insertions(+), 154 deletions(-) --- 2.17.1