devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Loc Ho <lho@apm.com>
Cc: Olof Johansson <olof@lixom.net>, Tejun Heo <tj@kernel.org>,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	devicetree@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Jon Masters <jcm@redhat.com>, Tuan Phan <tphan@apm.com>,
	Suman Tripathi <stripathi@apm.com>
Subject: Re: [PATCH 1/3] Documentation: Add APM X-Gene SoC 6.0Gbps SATA PHY driver binding documentation
Date: Fri, 15 Nov 2013 20:26:07 +0100	[thread overview]
Message-ID: <201311152026.07433.arnd@arndb.de> (raw)
In-Reply-To: <CAPw-ZT=x3eTd_vgVgyu0HR7j2wmSfQkkSeCMJSJ_i3MTPwiM-g@mail.gmail.com>

On Friday 15 November 2013, Loc Ho wrote:
> >> +- CTLE0                        : PHY override parameters for channel 0 register REG1
> >> +                         field CTLE_EQ. First value for Gen1, second value
> >> +                         for Gen2, and third value for Gen3. Default is 0x2.
> >> +- CTLE1                        : PHY override parameters for channel 1 register REG1
> >> +                         field CTLE_EQ. First value for Gen1, second value
> >> +                         for Gen2, and third value for Gen3. Default is 0x2.
> >> +- PQ0                  : PHY override parameters for channel 0 register REG125
> >> +                         field PQ_REG. First value for Gen1, second value
> >> +                         for Gen2, and third value for Gen3. Default is 0xA.
> >> +- PQ1                  : PHY override parameters for channel 1 register REG125
> >> +                         field PQ_REG. First value for Gen1, second value
> >> +                         for Gen2, and third value for Gen3. Default is 0xA.
> >
> > As mentioned before, I don't think putting register-level information into the binding
> > is the right approach here.
> >
> [Loc Ho]
> I don't want to change the driver for every possible customer or APM
> boards out there. In general, if the board designer follows the board
> design guideline, this isn't necessary. Unfortunately, I can not
> control what customer do. If these setting is NOT driven by DTS, then
> I or others may have to change the driver every time there is an new
> board. Another option is pass them as module parameters.

Module parameters are certainly not a solution for this, that would make the
problem worse.

Would it be possible to read out the values that were set by the firmware
at startup and reuse those during run-time? I assume that the devices are
already brought up when the kernel starts.

If that s not possible, change the properties to be named after what the
setting does and make the values be units that are sensible to a board
designer, e.g. (specifics are totally made up here)

 - polarity:	If present, override the polarity of the signal line.
		zero for negative polarity, one for positive polarity.
		If absent, use the firmware default.
 - signal-clock-frequency: If present, override the signal clock frequency.
		This value is defined in HZ
 - x-y-time:	If present, override the timing setting for the X/Y signal
		time, in nanoseconds.

This way, you can reuse the properties for an updated version of the device
that has similar settings but a different register layout.

	Arnd

  reply	other threads:[~2013-11-15 19:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-14 19:31 [PATCH 0/3] ata: Add APM X-Gene SoC 6.0Gbps SATA PHY support Loc Ho
2013-11-14 19:31 ` [PATCH 1/3] Documentation: Add APM X-Gene SoC 6.0Gbps SATA PHY driver binding documentation Loc Ho
2013-11-14 19:31   ` [PATCH 2/3] ata: Add APM X-Gene SoC 6.0Gbps SATA PHY driver Loc Ho
2013-11-14 19:31     ` [PATCH 3/3] arm64: Add APM X-Gene SoC 6.0Gbps SATA PHY DTS entries Loc Ho
2013-11-15 12:46     ` [PATCH 2/3] ata: Add APM X-Gene SoC 6.0Gbps SATA PHY driver Arnd Bergmann
2013-11-15 16:14       ` Loc Ho
     [not found]   ` <1384457519-21335-2-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2013-11-15 12:35     ` [PATCH 1/3] Documentation: Add APM X-Gene SoC 6.0Gbps SATA PHY driver binding documentation Arnd Bergmann
2013-11-15 12:52       ` Arnd Bergmann
2013-11-15 16:22       ` Loc Ho
2013-11-15 19:26         ` Arnd Bergmann [this message]
2013-11-15 19:33           ` Loc Ho
2013-11-15 19:54             ` Arnd Bergmann
2013-11-15 20:00               ` Loc Ho
2013-11-15 20:19                 ` Arnd Bergmann
2013-11-15 20:52                   ` Loc Ho
2013-11-15 12:31 ` [PATCH 0/3] ata: Add APM X-Gene SoC 6.0Gbps SATA PHY support Arnd Bergmann

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=201311152026.07433.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jcm@redhat.com \
    --cc=lho@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=stripathi@apm.com \
    --cc=tj@kernel.org \
    --cc=tphan@apm.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;
as well as URLs for NNTP newsgroup(s).