mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Piotr Sroka <piotrs@cadence.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: RE: [v2 PATCH 3/3] mmc: sdhci-cadence: Update PHY delay configuration
Date: Tue, 7 Mar 2017 11:00:22 +0000	[thread overview]
Message-ID: <DM5PR07MB308240E2DC885342BA477D04DD2F0@DM5PR07MB3082.namprd07.prod.outlook.com> (raw)
In-Reply-To: <CAK7LNATAa7svo_DrotgM0XKMhLbZ2Qum8qe6fJxxf4Z+ouH_wA@mail.gmail.com>

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 <piotrs@cadence.com>:
> > 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

  reply	other threads:[~2017-03-07 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 13:39 Piotr Sroka
2017-03-07  8:02 ` Masahiro Yamada
2017-03-07 11:00   ` Piotr Sroka [this message]
2017-03-09  2:37     ` Masahiro Yamada
2017-03-13  7:57       ` Piotr Sroka
2017-03-17 17:22         ` Masahiro Yamada
2017-03-20  8:38           ` Piotr Sroka
2017-03-29 11:59             ` Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR07MB308240E2DC885342BA477D04DD2F0@DM5PR07MB3082.namprd07.prod.outlook.com \
    --to=piotrs@cadence.com \
    --cc=adrian.hunter@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®