Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754997AbdCGLh1 (ORCPT ); Tue, 7 Mar 2017 06:37:27 -0500 Received: from mail-sn1nam01on0047.outbound.protection.outlook.com ([104.47.32.47]:6480 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753543AbdCGLhR (ORCPT ); Tue, 7 Mar 2017 06:37:17 -0500 From: Piotr Sroka To: Masahiro Yamada CC: linux-mmc , Adrian Hunter , Ulf Hansson , Linux Kernel Mailing List Subject: RE: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration Thread-Topic: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration Thread-Index: AQHSln8jciSgWn5fkkGB6GObxzP5rqGJBXYAgAAbfIA= Date: Tue, 7 Mar 2017 11:00:22 +0000 Message-ID: References: <1488807587-5375-1-git-send-email-piotrs@cadence.com> In-Reply-To: Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-dg-tag-bcast: x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5LnR4dCIgcD0iYzpcdXNlcnNccGlvdHJzXGFwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0YmEyOWUzNWJcbXNnc1xtc2ctNDI4MjI5M2EtMDMyNS0xMWU3LWFmN2UtYjg3NjNmYWJhNWQxXGFtZS10ZXN0XDQyODIyOTNjLTAzMjUtMTFlNy1hZjdlLWI4NzYzZmFiYTVkMWJvZHkudHh0IiBzej0iMjczMSIgdD0iMTMxMzMzNTgwMjMyNzQ1MjQ3IiBoPSJaREVDd2YreWgvdlF2ajJDblBBaFZTMkRIWVU9IiBpZD0iIiBibD0iMCIgYm89IjEiLz48L21ldGE+ x-dg-paste: authentication-results: socionext.com; dkim=none (message not signed) header.d=none;socionext.com; dmarc=none action=none header.from=cadence.com; x-originating-ip: [213.131.238.28] x-ms-office365-filtering-correlation-id: 05f6bea4-d0b3-447a-204c-08d465492720 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DM5PR07MB3084; x-microsoft-exchange-diagnostics: 1;DM5PR07MB3084;7:AvjarRYiY+sITeEThJkCIbMAliH1VUGruwKzLDmRCqO1UmrJ397ipx69pf/ZThSWtvWl+Wf0G5D0VvG6V/eJrac6dMAnAAeDCLlzBHLeB5auXjqPmo2r1mLyFz6u5q6DCBZr2OfZFeabQOYTwwCBXwD69SrxZXKNUuxhXvToVzIvh6BrUUzE0YuV6TC3XRVHWhWj+ezdkLAs5SARNhWtm1k7x9Zwtxm9yOH7tl3wF6pnr4fq5yk+DMikHe3rjaq2JVQwgpBAZslh6Ct3zQMiQ98G46AnhfMJPDD9Zmi5rv/Y57h0cQ6oe78KwEqNNbuRX5i30q4haX03qD7nYAvn9Q==;20:Oa8zaFhaZBOmVyp+NJtZiNASV745LP36Nuk6xHhHHk2WnIkWBYmMh+mXUdDlMCNkc1o32Fn/neH40pGqBIkMmmmlseXgxKg5W5QfqHsq1OOhdDkX2M7EN8EN4ZnPXdtCJSm7LsN3l46gRsash7bCcRjRmRORQS3vGD4mOe77n9S/10uXUq1puRSuMGCcv8fKdX8JzCnBLiuASwABKtEXJf+TANc5driZI3UFDZJvdQfhHkeJcqtvUZKKmgJw5ldV x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(72806322054110); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123564025)(20161123558025)(20161123562025)(20161123560025)(20161123555025)(6072148);SRVR:DM5PR07MB3084;BCL:0;PCL:0;RULEID:;SRVR:DM5PR07MB3084; x-forefront-prvs: 0239D46DB6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(39450400003)(377424004)(13464003)(377454003)(86362001)(3846002)(8676002)(8936002)(102836003)(2906002)(229853002)(7736002)(54356999)(77096006)(54906002)(6916009)(2950100002)(9686003)(6246003)(305945005)(110136004)(38730400002)(6436002)(53936002)(92566002)(4326008)(6116002)(81166006)(25786008)(3280700002)(6506006)(5660300001)(76176999)(99286003)(3660700001)(106116001)(2900100001)(7696004)(33656002)(189998001)(50986999)(74316002)(66066001)(15650500001)(55016002)(122556002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR07MB3084;H:DM5PR07MB3082.namprd07.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Mar 2017 11:00:22.7265 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3084 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v27BbZLd027085 Content-Length: 2573 Lines: 59 Hi Masahiro, > -----Original Message----- > Sent: 07 March, 2017 9:03 AM > To: Piotr Sroka > Subject: Re: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration > > Hi Piotr, > > 2017-03-06 22:39 GMT+09:00 Piotr Sroka : > > PHY settings can be different for different platforms and SoCs. > > Fixed PHY input delays was replaced with SoC specific compatible data. > > DTS properties are used for configuration new PHY DLL delays. > > > Probably you are familiar with this IP. > > Please teach me this. > > With this patch, we will have two groups for PHY parameters. > > (A) specified via a data array associated with a compatible string SDHCI_CDNS_PHY_DLY_SD_HS SDHCI_CDNS_PHY_DLY_SD_DEFAULT > SDHCI_CDNS_PHY_DLY_UHS_SDR12 > SDHCI_CDNS_PHY_DLY_UHS_SDR25 > SDHCI_CDNS_PHY_DLY_UHS_SDR50 > SDHCI_CDNS_PHY_DLY_UHS_DDR50 > SDHCI_CDNS_PHY_DLY_EMMC_LEGACY > SDHCI_CDNS_PHY_DLY_EMMC_SDR > SDHCI_CDNS_PHY_DLY_EMMC_DDR > > (B) specified with DT property > SDHCI_CDNS_PHY_DLY_SDCLK > SDHCI_CDNS_PHY_DLY_HSMMC > SDHCI_CDNS_PHY_DLY_STROBE > > I am confused. > What is the difference between (A) and (B)? The first group of delays are input delays. These delays are set in current version of sdhci-cadence driver in sdhci_cdns_phy_init function. Following by spec: They are provided to help in meeting timings relations between data window and sampling clock. The clock is fixed position in respect to the SDCLK. And the idea of sampling is to delay and align the data to the data window. If the default values of the delays are not sufficient/correct for the chip/board implementation those can be adjusted The second group are DLL delays. There are three delays SDHCI_CDNS_PHY_DLY_SDCLK - sdclk delay line use to delay outgoing sdclk signal SDHCI_CDNS_PHY_DLY_HSMMC - sdclk delay line use to delay outgoing sdclk signal for for HS200, HS400 and HS400ES SDHCI_CDNS_PHY_DLY_STROBE - DLL strobe delay for HS400ES Following by spec: They allows to setup basic DLL parameters. In general the default values are sufficient to start working in any speed mode. The default values of delays and phase detect select can be adjusted depending on the chip/board implementation. In general all PHY delays values either should be properly hardcoded in HW or they should be properly set by FW depending on the chip/board. So PHY driver should do not touch PHY delays at all or should set values which are proper for specific chip/board. I am not sure where exactly they should be placed in dts file or in compatible data. Best Regards Piotr Sroka