From patchwork Wed Jun 19 04:00:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1118438 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="CID2zUf7"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="VDz+vuYo"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45TB8229l9z9s7h for ; Wed, 19 Jun 2019 14:01:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A3EF4C21E53; Wed, 19 Jun 2019 04:01:01 +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 47D4CC21C3F; Wed, 19 Jun 2019 04:00:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6B5DCC21C3F; Wed, 19 Jun 2019 04:00:57 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by lists.denx.de (Postfix) with ESMTPS id 87A73C21BE5 for ; Wed, 19 Jun 2019 04:00:56 +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=1560916856; x=1592452856; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=2Tf6B7E3Ugp3j/Kw5ykLsqCYcz0F9bvPmI2IyrfeENM=; b=CID2zUf7QXtDjRvEXM7nSPsOS2XFmzX3oVobLcQ+z1FkcPKjiivoCMEI BMlNQYx0/OGUrbtjPS6v5D905dIdYn3ZtHgHo+nZ8G6ilVcMrgS1lmRQJ GkrHoT6IuGVdSrlfTNmGfVmRIHHZtOsLSxWlnQjwamTD6YB2cVPn8TZoI 0nHWK6k8lB9DbCUFs2qh47jOjvEh/FQFHwIt6UgGtRYT1UeF0Z944RZGj Ok2VOWsu9coY2d8xSbSJKYn193F9ERJtOlaW2P86IiJWYwYgG5HhFtv+O dtGQ0oeHIfxzt2bZu4nQyeCeVThCS96lUArGooVdi8E4SY+fSAWxLi4zO Q==; X-IronPort-AV: E=Sophos;i="5.63,391,1557158400"; d="scan'208";a="217277924" Received: from mail-co1nam05lp2050.outbound.protection.outlook.com (HELO NAM05-CO1-obe.outbound.protection.outlook.com) ([104.47.48.50]) by ob1.hgst.iphmx.com with ESMTP; 19 Jun 2019 12:00:52 +0800 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=2Tf6B7E3Ugp3j/Kw5ykLsqCYcz0F9bvPmI2IyrfeENM=; b=VDz+vuYoHfXhlvwESLoFv7nftbdkFVNlqMDhwdpxog7N1sXenr4UVMpQgiZ+CoVhFvkiubmsdgrYKPgslGIab/QW5mnQPnrim0Nq3JoV67MZFsD7l2J2F2eeM3VdJgEHU7zOx2sAyVrcnnaHpTKhLW9A4AbgHxaMGLfYjQNT7Vk= Received: from DM6PR04MB6059.namprd04.prod.outlook.com (20.178.226.89) by DM6SPR01MB0055.namprd04.prod.outlook.com (20.179.71.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.15; Wed, 19 Jun 2019 04:00:51 +0000 Received: from DM6PR04MB6059.namprd04.prod.outlook.com ([fe80::408b:3614:6cbf:6d84]) by DM6PR04MB6059.namprd04.prod.outlook.com ([fe80::408b:3614:6cbf:6d84%7]) with mapi id 15.20.1987.013; Wed, 19 Jun 2019 04:00:51 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Simon Glass Thread-Topic: [PATCH v2 0/6] Update SiFive Unleashed Drivers Thread-Index: AQHVJlOVt6fbS1rG+UKlTutopw+dyA== Date: Wed, 19 Jun 2019 04:00:51 +0000 Message-ID: <20190619040027.5011-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0012.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::22) To DM6PR04MB6059.namprd04.prod.outlook.com (2603:10b6:5:129::25) 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: 4b554dac-2f4a-4e86-4ac4-08d6f46ab7ff 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:DM6SPR01MB0055; x-ms-traffictypediagnostic: DM6SPR01MB0055: x-ms-exchange-purlcount: 2 wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-forefront-prvs: 0073BFEF03 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(376002)(366004)(396003)(39860400002)(136003)(346002)(189003)(199004)(386003)(44832011)(110136005)(1076003)(68736007)(71190400001)(81156014)(64756008)(15650500001)(2906002)(966005)(6512007)(478600001)(99286004)(8676002)(6306002)(5660300002)(25786009)(71200400001)(72206003)(316002)(66556008)(66446008)(54906003)(66476007)(36756003)(66946007)(81166006)(186003)(14444005)(86362001)(4326008)(305945005)(6486002)(7736002)(486006)(73956011)(26005)(66066001)(256004)(52116002)(3846002)(14454004)(8936002)(2616005)(53936002)(6116002)(50226002)(6436002)(476003)(6506007)(102836004); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6SPR01MB0055; H:DM6PR04MB6059.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: /Tg/YSg2yl3yooLi9x7kFEXTq+vyk4fUJCMYht/RyBLlO6AaYYV0zAuksH5blfEj7pEihfpPnKnJeai4GC45uu30epwptuk+u/MV7eLqz4ACi2IO8FFAN1YlSq5xdZ4/JxIO6JISX+qnBGI+lqwR7JGUwzg7uTHtg0LwyygK1Do7gNFZZmXIZt/WSpHisMLSWPV/eXr/VfIM0YeXCuU5winyehK0Dwwb2oBbLLwC4ZEWVU/5lh5nkAQk1MiBqnmrk40HL376MyBtasGDImhXtgCZhK9u0jUKfZt68QtwK4UGygGKfn/T+xxuLp5lC9zPMKB1RpcfuolXXE/ffjEXKDhSJ3HQNxQI0OJqHF9r2e6s10wFnUoiYHCqXIN7ZRmCrIKHf5R4xz71qKYqtFy+tiIgncN1TenPCxqwgtSk0fg= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b554dac-2f4a-4e86-4ac4-08d6f46ab7ff X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2019 04:00:51.2584 (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: DM6SPR01MB0055 Cc: Palmer Dabbelt , U-Boot Mailing List Subject: [U-Boot] [PATCH v2 0/6] 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 and ethernet drivers 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 to U-Boot 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. In fact, the updated DTB passed by OpenSBI can be used by latest Linux (i.e. V5.2-rc1 or higher) as well. The OpenSBI changes to embed SiFive Unleashed DTB can be found in sifive_unleashed_dtb_fix_v2 branch of: https://github.com/avpatel/opensbi.git This series can be found in riscv_unleashed_clk_sync_v2 branch of: https://github.com/avpatel/u-boot.git Changes since v1: - Dropped GEMGXL clock driver - Added new compatible string for SiFive MACB ethernet Anup Patel (6): clk: sifive: Factor-out PLL library as separate module clk: sifive: Sync-up WRPLL library with upstream Linux clk: sifive: Sync-up DT bindings header with upstream Linux clk: sifive: Sync-up main driver with upstream Linux clk: sifive: Drop GEMGXL clock driver net: macb: Add compatible string for MACB on SiFive Unleashed board/sifive/fu540/Kconfig | 1 - drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/analogbits/Kconfig | 4 + drivers/clk/analogbits/Makefile | 3 + .../{sifive => analogbits}/wrpll-cln28hpc.c | 168 ++++++++---------- drivers/clk/sifive/Kconfig | 10 -- drivers/clk/sifive/Makefile | 4 - drivers/clk/sifive/fu540-prci.c | 123 +++++++------ drivers/clk/sifive/gemgxl-mgmt.c | 60 ------- drivers/net/macb.c | 1 + include/dt-bindings/clk/sifive-fu540-prci.h | 29 --- include/dt-bindings/clock/sifive-fu540-prci.h | 18 ++ .../linux/clk}/analogbits-wrpll-cln28hpc.h | 70 +++----- 14 files changed, 196 insertions(+), 297 deletions(-) create mode 100644 drivers/clk/analogbits/Kconfig create mode 100644 drivers/clk/analogbits/Makefile rename drivers/clk/{sifive => analogbits}/wrpll-cln28hpc.c (69%) delete mode 100644 drivers/clk/sifive/gemgxl-mgmt.c delete mode 100644 include/dt-bindings/clk/sifive-fu540-prci.h create mode 100644 include/dt-bindings/clock/sifive-fu540-prci.h rename {drivers/clk/sifive => include/linux/clk}/analogbits-wrpll-cln28hpc.h (52%) --- 2.17.1