From: Mark Rutland <mark.rutland@arm.com>
To: Loc Ho <lho@apm.com>
Cc: "olof@lixom.net" <olof@lixom.net>,
"tj@kernel.org" <tj@kernel.org>, "arnd@arndb.de" <arnd@arndb.de>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"dmilburn@redhat.com" <dmilburn@redhat.com>,
"jcm@redhat.com" <jcm@redhat.com>,
"patches@apm.com" <patches@apm.com>, Tuan Phan <tphan@apm.com>,
Suman Tripathi <stripathi@apm.com>
Subject: Re: [PATCH v7 3/4] PHY: add APM X-Gene SoC 15Gbps Multi-purpose PHY driver
Date: Wed, 15 Jan 2014 12:09:46 +0000 [thread overview]
Message-ID: <20140115120946.GD25824@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <1389769840-15469-4-git-send-email-lho@apm.com>
On Wed, Jan 15, 2014 at 07:10:39AM +0000, Loc Ho wrote:
[...]
> + * The APM X-Gene PHY consists of two PLL clock macro's (CMU) and lanes.
> + * The first PLL clock macro is used for internal reference clock. The second
> + * PLL clock macro is used to generate the clock for the PHY. This driver
> + * configures the first PLL CMU, the second PLL CMU, and programs the PHY to
> + * operate according to the mode of operation. The first PLL CMU is only
> + * required if internal clock is enabled.
> + *
> + * Logical Layer Out Of HW module units:
> + *
> + * -----------------
> + * | Internal | |------|
> + * | Ref PLL CMU |----| | ------------- ---------
> + * ------------ ---- | MUX |-----|PHY PLL CMU|----| Serdes|
> + * | | | | ---------
> + * External Clock ------| | -------------
> + * |------|
> + *
> + * The Ref PLL CMU CSR (Configureation System Registers) is accessed
> + * indirectly from the SDS offset at 0x2000. It is only required for
> + * internal reference clock.
> + * The PHY PLL CMU CSR is accessed indirectly from the SDS offset at 0x0000.
> + * The Serdes CSR is accessed indirectly from the SDS offset at 0x0400.
> + *
> + * The Ref PLL CMU can be located within the same PHY IP or outside the PHY IP
> + * due to shared Ref PLL CMU. For PHY with Ref PLL CMU shared with another IP,
> + * it is located outside the PHY IP. This is the case for the PHY located
> + * at 0x1f23a000 (SATA Port 4/5). For such PHY, another resource is required
> + * to located the SDS/Ref PLL CMU module and its clock for that IP enabled.
> + *
> + * Currently, this driver only supports SATA mode with external clock.
> + */
Having looked at this and the binding, I'm confused as to why we need an
additional reg entry when we're using the external clock.
Surely the second resource (the external CMU base) is a property of the
shared ref PLL clock, rather than the PHY itself. How do you handle two
units trying to use the shared PLL?
I think makes sense to model the ref PLL CMU as a separate clock, and
use clock-names to differentiate between the two inputs to the mux:
external: external_clock {
compatible = "fixed-clock";
clock-frequency = < ... >;
#clock-cells = <0>;
};
ref_pll: reference_clock {
compatible = "apm,xgene-ref-pll";
reg = < .... >;
#clock-cells = <0>;
};
phy {
compatible = "apm,xgene-phy";
reg = < ... >;
clocks = <&ref_pll>, <&external>;
clock-names = "ref-pll", "external";
...
};
That also means the phy only needs a single compatible string -- you can
figure out what to do by probing the set of clocks.
Does that make sense? Is there something I'm missing?
[...]
> + /* Retrieve optional clock */
> + ctx->clk = clk_get(&pdev->dev, NULL);
There's no clocks proeprty in the binding. Please add one.
Cheers,
Mark.
next prev parent reply other threads:[~2014-01-15 12:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 7:10 [PATCH v7 0/4] PHY: Add APM X-Gene SoC 15Gbps Multi-purpose PHY support Loc Ho
2014-01-15 7:10 ` [PATCH v7 1/4] PHY: Add function set_speed to generic PHY framework Loc Ho
[not found] ` <1389769840-15469-2-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org>
2014-01-15 7:10 ` [PATCH v7 2/4] Documentation: Add APM X-Gene SoC 15Gbps Multi-purpose PHY driver binding documentation Loc Ho
2014-01-15 7:10 ` [PATCH v7 3/4] PHY: add APM X-Gene SoC 15Gbps Multi-purpose PHY driver Loc Ho
2014-01-15 7:10 ` [PATCH v7 4/4] arm64: Add APM X-Gene SoC 15Gbps Multi-purpose PHY DTS entries Loc Ho
2014-01-15 12:09 ` Mark Rutland [this message]
2014-01-15 20:11 ` [PATCH v7 3/4] PHY: add APM X-Gene SoC 15Gbps Multi-purpose PHY driver Loc Ho
2014-01-15 11:31 ` [PATCH v7 2/4] Documentation: Add APM X-Gene SoC 15Gbps Multi-purpose PHY driver binding documentation Mark Rutland
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=20140115120946.GD25824@e106331-lin.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=dmilburn@redhat.com \
--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=patches@apm.com \
--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).