All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: 敬锐 <micky_ching@realsil.com.cn>
Cc: "sameo@linux.intel.com" <sameo@linux.intel.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"rogerable@realtek.com" <rogerable@realtek.com>,
	王炜 <wei_wang@realsil.com.cn>
Subject: Re: [RESEND PATCH v2 7/9] mfd: rtsx: add support for rts524A
Date: Wed, 25 Feb 2015 07:21:13 +0000	[thread overview]
Message-ID: <20150225072113.GF21323@x1> (raw)
In-Reply-To: <54ED413B.8080000@realsil.com.cn>

On Wed, 25 Feb 2015, 敬锐 wrote:

> 
> On 02/16/2015 10:28 PM, Lee Jones wrote:
> >
> > +static int rts524a_optimize_phy(struct rtsx_pcr *pcr)
> > +{
> > +	int err;
> > +
> > +	err = rtsx_pci_write_register(pcr, RTS524A_PM_CTRL3,
> > +		D3_DELINK_MODE_EN, 0x00);
> > +	if (err < 0)
> > +		return err;
> > +
> > +	rtsx_pci_write_phy_register(pcr, PHY_PCR,
> > +		PHY_PCR_FORCE_CODE | PHY_PCR_OOBS_CALI_50 |
> > +		PHY_PCR_OOBS_VCM_08 | PHY_PCR_OOBS_SEN_90 | PHY_PCR_RSSI_EN);
> > +	rtsx_pci_write_phy_register(pcr, PHY_SSCCR3,
> > +		PHY_SSCCR3_STEP_IN | PHY_SSCCR3_CHECK_DELAY);
> > +
> > +	if (is_version(pcr, 0x524A, IC_VER_A)) {
> > +		rtsx_pci_write_phy_register(pcr, PHY_SSCCR3,
> > +			PHY_SSCCR3_STEP_IN | PHY_SSCCR3_CHECK_DELAY);
> > +		rtsx_pci_write_phy_register(pcr, PHY_SSCCR2,
> > +			PHY_SSCCR2_PLL_NCODE | PHY_SSCCR2_TIME0 |
> > +			PHY_SSCCR2_TIME2_WIDTH);
> > +		rtsx_pci_write_phy_register(pcr, PHY_ANA1A,
> > +			PHY_ANA1A_TXR_LOOPBACK | PHY_ANA1A_RXT_BIST |
> > +			PHY_ANA1A_TXR_BIST | PHY_ANA1A_REV);
> > +		rtsx_pci_write_phy_register(pcr, PHY_ANA1D,
> > +			PHY_ANA1D_DEBUG_ADDR);
> > +		rtsx_pci_write_phy_register(pcr, PHY_DIG1E,
> > +			PHY_DIG1E_REV | PHY_DIG1E_D0_X_D1 |
> > +			PHY_DIG1E_RX_ON_HOST | PHY_DIG1E_RCLK_REF_HOST |
> > +			PHY_DIG1E_RCLK_TX_EN_KEEP |
> > +			PHY_DIG1E_RCLK_TX_TERM_KEEP |
> > +			PHY_DIG1E_RCLK_RX_EIDLE_ON | PHY_DIG1E_TX_TERM_KEEP |
> > +			PHY_DIG1E_RX_TERM_KEEP | PHY_DIG1E_TX_EN_KEEP |
> > +			PHY_DIG1E_RX_EN_KEEP);
> > +	}
> > +
> > +	rtsx_pci_write_phy_register(pcr, PHY_ANA08,
> > +		PHY_ANA08_RX_EQ_DCGAIN | PHY_ANA08_SEL_RX_EN |
> > +		PHY_ANA08_RX_EQ_VAL | PHY_ANA08_SCP | PHY_ANA08_SEL_IPI);
> > To the uninitiated this function is mostly randomness.  How about some
> > nice comments to illuminate?
> I'm not clear with these setting either, it is used to fix some phy 
> setting, the default phy setting
> it not stable on some special platform, so we have to modify them by driver,
> newer version of chip will change its default value to more stable 
> configure, so some value is
> no need to setting for Version B/C...

That doesn't help me in any way.  Use the datasheet, look-up the
values and insert a nice, succinct explanation of what you're doing
and why it's required please.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2015-02-25  7:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  7:30 [RESEND PATCH v2 0/9] mfd: rtsx: add support for new rts524A and rts525A micky_ching
2015-01-22  7:30 ` [RESEND PATCH v2 1/9] mfd: rtsx: replace TAB by SPC after #define micky_ching
2015-01-22  7:30 ` [RESEND PATCH v2 2/9] mfd: rtsx: place register address and values togather micky_ching
2015-01-22  7:30 ` [RESEND PATCH v2 3/9] mfd: rtsx: update PETXCFG address micky_ching
2015-01-22  7:30 ` [RESEND PATCH v2 4/9] mfd: rtsx: update driving settings micky_ching
2015-01-22  7:40   ` Joe Perches
2015-01-22  7:30 ` [RESEND PATCH v2 5/9] mfd: rtsx: update phy register micky_ching
2015-02-16 14:07   ` Lee Jones
2015-01-22  7:30 ` [RESEND PATCH v2 6/9] mfd: rtsx: remove LCTLR defination micky_ching
2015-02-16 14:31   ` Lee Jones
2015-01-22  7:30 ` [RESEND PATCH v2 7/9] mfd: rtsx: add support for rts524A micky_ching
2015-02-02  1:07   ` 敬锐
2015-02-02  8:52     ` Lee Jones
2015-02-16 14:28   ` Lee Jones
2015-02-25  3:27     ` 敬锐
2015-02-25  7:21       ` Lee Jones [this message]
2015-01-22  7:30 ` [RESEND PATCH v2 8/9] mfd: rtsx: add support for rts525A micky_ching
2015-02-16 14:37   ` Lee Jones
2015-01-22  7:30 ` [RESEND PATCH v2 9/9] mfd: rtsx: using pcr_dbg replace dev_dbg micky_ching

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=20150225072113.GF21323@x1 \
    --to=lee.jones@linaro.org \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=micky_ching@realsil.com.cn \
    --cc=rogerable@realtek.com \
    --cc=sameo@linux.intel.com \
    --cc=wei_wang@realsil.com.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.