From patchwork Tue Jun 18 09:18:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 1117752 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="RU5rNuAU"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="Em/gx6ca"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45SjDd2jskz9sBr for ; Tue, 18 Jun 2019 19:18:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1783BC21F4E; Tue, 18 Jun 2019 09:18:18 +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 A40A6C21E6A; Tue, 18 Jun 2019 09:18:16 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 93269C21E6A; Tue, 18 Jun 2019 09:18:15 +0000 (UTC) Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by lists.denx.de (Postfix) with ESMTPS id DDA9DC21E2B for ; Tue, 18 Jun 2019 09:18:14 +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=1560849496; x=1592385496; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=qfslW1IvqieeJxMMjba3gA25D2aUe1F5BkR5xIzrkKc=; b=RU5rNuAUNsLloRUlHMjs2UVyPnBm23SqhrZiViNl8mfQsJy9t6wKlpj/ 3Cmnfo3dJTPYCgJ4GwJbmfoyb+Ht3iktpFKMIsmjMsrr+xJhKZFJDwVYo fqf3BOBc6JddiMSU8NsVYuPVEPTOjjU3RbTZISIhUxH2SxEIE8JfYsgiQ Szuerf+/Pz6LhS3AKQOlgbj9s/UR/zUIJM3hardCJy7ywo1GQoUoZeoaU nRU3qKVik2buzOl2emR3s3TKwcQF3RCdlZS8ziIchHhqpO1gqQYHfZvCu rSZ5r6Xe1TJsnBqhi7vaYJclsvzartLdGnJkUYHEzXvM2PNRrnoODtWd4 Q==; X-IronPort-AV: E=Sophos;i="5.63,388,1557158400"; d="scan'208";a="112489834" Received: from mail-co1nam04lp2052.outbound.protection.outlook.com (HELO NAM04-CO1-obe.outbound.protection.outlook.com) ([104.47.45.52]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 17:18:11 +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=qfslW1IvqieeJxMMjba3gA25D2aUe1F5BkR5xIzrkKc=; b=Em/gx6ca9CxjTsj5ScaSzLSwNNi9fGvQa7tuNmgefOiJkZT8TwIq9PSemWUcvLmyTiL5eWvsXsUI28BZC1y/OwTc064Mf6g4e+ZpOUF3++NIDydlc1WuESuc9dizjEKLfCgv9IjRZ79b0Xh34YtfEPXby9R2QnwdMm9cWqw4rjg= Received: from MN2PR04MB6061.namprd04.prod.outlook.com (20.178.246.15) by MN2PR04MB5485.namprd04.prod.outlook.com (20.178.248.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1987.15; Tue, 18 Jun 2019 09:18:09 +0000 Received: from MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::98ab:5e60:9c5c:4e0e]) by MN2PR04MB6061.namprd04.prod.outlook.com ([fe80::98ab:5e60:9c5c:4e0e%7]) with mapi id 15.20.1965.017; Tue, 18 Jun 2019 09:18:09 +0000 From: Anup Patel To: Rick Chen , Bin Meng , Lukas Auer , Simon Glass Thread-Topic: [PATCH 0/4] Update SiFive Unleashed Clock Driver Thread-Index: AQHVJba+Y5TIK4kH/EaV64CzDW6UDw== Date: Tue, 18 Jun 2019 09:18:09 +0000 Message-ID: <20190618091743.3078-1-anup.patel@wdc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR01CA0137.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:35::31) 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: 62912e57-bcc4-41e0-6b14-08d6f3cde118 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:MN2PR04MB5485; x-ms-traffictypediagnostic: MN2PR04MB5485: x-ms-exchange-purlcount: 2 wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 007271867D x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6029001)(396003)(366004)(376002)(346002)(39860400002)(136003)(199004)(189003)(7736002)(4326008)(8936002)(15650500001)(1076003)(2906002)(966005)(14454004)(72206003)(68736007)(478600001)(66066001)(476003)(50226002)(44832011)(486006)(2616005)(316002)(54906003)(110136005)(71190400001)(71200400001)(6116002)(3846002)(52116002)(186003)(99286004)(26005)(6436002)(6306002)(36756003)(102836004)(6486002)(53936002)(6512007)(81166006)(6506007)(386003)(8676002)(81156014)(14444005)(256004)(25786009)(305945005)(66446008)(64756008)(66556008)(66476007)(66946007)(86362001)(5660300002)(73956011); DIR:OUT; SFP:1102; SCL:1; SRVR:MN2PR04MB5485; 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: IiCoVGx35BH5SmKa5DfxKHC7cWu8r5QEG+goviYIb7gEB8hA5LIsmadlWuSYfsySY6DzIk9V1bQXJPnEhQrxv+VoswjZh0oYIPZbzj+zsT0GDnLxvaSJ94splLQRnV8fU9uDpF+XnXUE/dzw9W2BC13W/IZLmoMCD1bnwqeQR0/OL/GIr+5f0HKq7CEGxh+SCPgCbp0gADgUV+kleoAzDRAIS7olighFsibhFiTLERV3Awk15ead4rkOMCTka5ynfnXmuUWVnswY47C4r+jm3wgOpjsxfy+tIm77xvl5LTpBBVnPVf3V0u72umtG63tvMiEibgWbmzQrugsJEOVx3J1y5ej1n5yswF1PfmxQVxv6Md1l1TGShAEhFSgTlQ0Cx05RG+7nqeV1DgpWa4ozDKLvx9z9FebdfTmlBEpc1RY= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62912e57-bcc4-41e0-6b14-08d6f3cde118 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2019 09:18:09.3350 (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: MN2PR04MB5485 Cc: U-Boot Mailing List , Palmer Dabbelt Subject: [U-Boot] [PATCH 0/4] Update SiFive Unleashed Clock Driver 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 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_v1 branch of: https://github.com/avpatel/opensbi.git This series can be found in riscv_unleashed_clk_sync_v1 branch of: https://github.com/avpatel/u-boot.git Anup Patel (4): 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 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 | 3 - drivers/clk/sifive/Makefile | 2 - drivers/clk/sifive/fu540-prci.c | 123 +++++++------ 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 +++----- 11 files changed, 195 insertions(+), 227 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 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