From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
balbi@ti.com, gregkh@linuxfoundation.org, arnd@arndb.de,
akpm@linux-foundation.org, rob@landley.net, davem@davemloft.net,
cesarb@cesarb.net, linux-usb@vger.kernel.org,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
tony@atomide.com, grant.likely@secretlab.ca,
rob.herring@calxeda.com, b-cousson@ti.com,
linux@arm.linux.org.uk, eballetbo@gmail.com, javier@dowhile0.org,
mchehab@redhat.com, santosh.shilimkar@ti.com,
broonie@opensource.wolfsonmicro.com, swarren@nvidia.com,
linux-doc@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/6] drivers: phy: add generic PHY framework
Date: Tue, 02 Apr 2013 23:51:17 +0200 [thread overview]
Message-ID: <515B52D5.5090709@gmail.com> (raw)
In-Reply-To: <515A0C70.90201@wwwdotorg.org>
On 04/02/2013 12:38 AM, Stephen Warren wrote:
> On 04/01/2013 04:27 PM, Sylwester Nawrocki wrote:
>> On 03/28/2013 06:43 AM, Kishon Vijay Abraham I wrote:
>>> diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt
>
>>> +example2:
>>> +phys: phy {
>>> + compatible = "xxx";
>>> + reg =<...>;
>>> + .
>>> + .
>>> + phys =<&phys 1>;
>>> + .
>>> + .
>>> +};
>>> +
>>> +This node represents a controller that uses one of the PHYs which is defined
>>> +previously. Note that the phy handle has an additional specifier "1" to
>>> +differentiate between the three PHYs. For this case, the controller driver
>>> +should use of_phy_get_with_args/devm_of_phy_get_with_args.
>>
>> This means a PHY user needs to know indexes at the PHY driver ?
>
> The client node's DT has to specify which of the provider's PHYs it
> references, yes. Presumably the device driver for the client node knows
> absolutely nothing about this.
Ah, right. The device driver for the client node not necessarily need to be
aware about this. I think I got misled by the 'index' argument of
of_phy_get_with_args() which the PHY consumer need to supply. However it is
only an index pointing to a PHY specifier in its 'phys' property, hence it
would be normally 0 if the client needs only one PHY. Hopefully I got it
right this time.
>> I have been thinking of using this for an IP which has 4 video PHYs: 2 MIPI
>> CSI-2 and 2 MIPI DSI. The IP has just 2 registers, each of which is shared
>> between one MIPI CSI-2 DPHY and one MIPI DSI DPHY. So I thought about creating
>> a single device node for this IP and using 4 indexes for the PHYs, e.g. 0...3.
>
> That sounds right.
>
>> Then users of each PHY type would use only indexes 0..1 (to select their
>> corresponding port).
>
> I don't follow that. If the provider exports PHYs 0..3, then the client
> nodes would refer to PHYS 0..3 not 0..1.
Indeed, it seems I just wanted to preserve the CSI/DSI "channel" information
(0, 1), but that is not really needed anywhere.
>> However I fail to see how this could now be represented in the bindings.
>
> Exactly like the example you gave below, I would expect.
>
>> I assume struct phy::type could be used to differentiate between CSI-2 and DSI.
>> And struct phy::port could be used to select specific CSI-2 or DSI channel
>> (0, 1). Ideally the phy users should not care about index of a PHY at the PHY
>> device tree node. E.g. there are 2 MIPI CSI-2 receivers and each has only
>> one PHY assigned to it. I'm just wondering how the binding should look like,
>> so a PHY could be associated with a receiver automatically by the phy-core,
>> e.g.
>
> Details such as phy::type and phy::port sounds like internal driver
> implementation details which would have no effect on the bindings.
Yes, I seem to have mixed the phy-core implementation and the bindings a
bit.
My intention was to have the PHYs registered with phy::port that would
reflect
data channel id, as specified in the SoC's datasheet. However I can't
think of
any use of it at the moment, except for debugging purpose.
>> /* DPHY IP node */
>> video-phy {
>> reg =<0x10000000 8>;
>> };
>>
>> /* MIPI DSI nodes */
>> dsi_0 {
>> phys =<&video-phy 0>;
>> };
>>
>> dsi_1 {
>> phys =<&video-phy 1>;
>> };
>>
>> /* MIPI CSI-2 nodes */
>> csi_0 {
>> phys =<&video-phy 2>;
>> };
>>
>> csi_1 {
>> phys =<&video-phy 3>;
>> };
>
> That looks correct to me.
>
>> I'm not sure if it is not an overkill to use this the PHY framework with
>> a device which has only 2 registers. Perhaps something less heavy could
>> be designed for it. However, if the PHY framework is commonly used there
>> should be no issue wrt enabling the whole big infrastructure for a simple
>> device like this.
>
> I don't think the number of registers should really makes any
> difference; the whole point of the PHY framework is to decouple to
> providers and consumers, so doing anything custom for special cases
> would completely destroy the ability of the PHY framework to do that.
Ok, that's a very good argument. Something I have not been focused on
that much, given the architecture of hardware I used to work with.
I'll git it a try and I'll see if any any further questions jump out.
WARNING: multiple messages have this Message-ID (diff)
From: sylvester.nawrocki@gmail.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/6] drivers: phy: add generic PHY framework
Date: Tue, 02 Apr 2013 23:51:17 +0200 [thread overview]
Message-ID: <515B52D5.5090709@gmail.com> (raw)
In-Reply-To: <515A0C70.90201@wwwdotorg.org>
On 04/02/2013 12:38 AM, Stephen Warren wrote:
> On 04/01/2013 04:27 PM, Sylwester Nawrocki wrote:
>> On 03/28/2013 06:43 AM, Kishon Vijay Abraham I wrote:
>>> diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt
>
>>> +example2:
>>> +phys: phy {
>>> + compatible = "xxx";
>>> + reg =<...>;
>>> + .
>>> + .
>>> + phys =<&phys 1>;
>>> + .
>>> + .
>>> +};
>>> +
>>> +This node represents a controller that uses one of the PHYs which is defined
>>> +previously. Note that the phy handle has an additional specifier "1" to
>>> +differentiate between the three PHYs. For this case, the controller driver
>>> +should use of_phy_get_with_args/devm_of_phy_get_with_args.
>>
>> This means a PHY user needs to know indexes at the PHY driver ?
>
> The client node's DT has to specify which of the provider's PHYs it
> references, yes. Presumably the device driver for the client node knows
> absolutely nothing about this.
Ah, right. The device driver for the client node not necessarily need to be
aware about this. I think I got misled by the 'index' argument of
of_phy_get_with_args() which the PHY consumer need to supply. However it is
only an index pointing to a PHY specifier in its 'phys' property, hence it
would be normally 0 if the client needs only one PHY. Hopefully I got it
right this time.
>> I have been thinking of using this for an IP which has 4 video PHYs: 2 MIPI
>> CSI-2 and 2 MIPI DSI. The IP has just 2 registers, each of which is shared
>> between one MIPI CSI-2 DPHY and one MIPI DSI DPHY. So I thought about creating
>> a single device node for this IP and using 4 indexes for the PHYs, e.g. 0...3.
>
> That sounds right.
>
>> Then users of each PHY type would use only indexes 0..1 (to select their
>> corresponding port).
>
> I don't follow that. If the provider exports PHYs 0..3, then the client
> nodes would refer to PHYS 0..3 not 0..1.
Indeed, it seems I just wanted to preserve the CSI/DSI "channel" information
(0, 1), but that is not really needed anywhere.
>> However I fail to see how this could now be represented in the bindings.
>
> Exactly like the example you gave below, I would expect.
>
>> I assume struct phy::type could be used to differentiate between CSI-2 and DSI.
>> And struct phy::port could be used to select specific CSI-2 or DSI channel
>> (0, 1). Ideally the phy users should not care about index of a PHY at the PHY
>> device tree node. E.g. there are 2 MIPI CSI-2 receivers and each has only
>> one PHY assigned to it. I'm just wondering how the binding should look like,
>> so a PHY could be associated with a receiver automatically by the phy-core,
>> e.g.
>
> Details such as phy::type and phy::port sounds like internal driver
> implementation details which would have no effect on the bindings.
Yes, I seem to have mixed the phy-core implementation and the bindings a
bit.
My intention was to have the PHYs registered with phy::port that would
reflect
data channel id, as specified in the SoC's datasheet. However I can't
think of
any use of it at the moment, except for debugging purpose.
>> /* DPHY IP node */
>> video-phy {
>> reg =<0x10000000 8>;
>> };
>>
>> /* MIPI DSI nodes */
>> dsi_0 {
>> phys =<&video-phy 0>;
>> };
>>
>> dsi_1 {
>> phys =<&video-phy 1>;
>> };
>>
>> /* MIPI CSI-2 nodes */
>> csi_0 {
>> phys =<&video-phy 2>;
>> };
>>
>> csi_1 {
>> phys =<&video-phy 3>;
>> };
>
> That looks correct to me.
>
>> I'm not sure if it is not an overkill to use this the PHY framework with
>> a device which has only 2 registers. Perhaps something less heavy could
>> be designed for it. However, if the PHY framework is commonly used there
>> should be no issue wrt enabling the whole big infrastructure for a simple
>> device like this.
>
> I don't think the number of registers should really makes any
> difference; the whole point of the PHY framework is to decouple to
> providers and consumers, so doing anything custom for special cases
> would completely destroy the ability of the PHY framework to do that.
Ok, that's a very good argument. Something I have not been focused on
that much, given the architecture of hardware I used to work with.
I'll git it a try and I'll see if any any further questions jump out.
next prev parent reply other threads:[~2013-04-02 21:51 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 5:43 [PATCH v4 0/6] Generic PHY Framework Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` [PATCH v4 1/6] drivers: phy: add generic PHY framework Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
[not found] ` <1364449408-9510-2-git-send-email-kishon-l0cyMroinI0@public.gmane.org>
2013-03-28 15:45 ` Stephen Warren
2013-03-28 15:45 ` Stephen Warren
2013-03-28 15:45 ` Stephen Warren
[not found] ` <5154658A.3080209-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-02 8:37 ` Kishon Vijay Abraham I
2013-04-02 8:37 ` Kishon Vijay Abraham I
2013-04-02 8:37 ` Kishon Vijay Abraham I
2013-04-02 15:40 ` Stephen Warren
2013-04-02 15:40 ` Stephen Warren
[not found] ` <515AFC06.8000502-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-04-03 5:32 ` Kishon Vijay Abraham I
2013-04-03 5:32 ` Kishon Vijay Abraham I
2013-04-03 5:32 ` Kishon Vijay Abraham I
2013-04-01 19:34 ` Sylwester Nawrocki
2013-04-01 19:34 ` Sylwester Nawrocki
[not found] ` <5159E157.6000800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-02 8:39 ` Kishon Vijay Abraham I
2013-04-02 8:39 ` Kishon Vijay Abraham I
2013-04-02 8:39 ` Kishon Vijay Abraham I
2013-04-01 22:27 ` Sylwester Nawrocki
2013-04-01 22:27 ` Sylwester Nawrocki
[not found] ` <515A09D8.7040703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-01 22:38 ` Stephen Warren
2013-04-01 22:38 ` Stephen Warren
2013-04-01 22:38 ` Stephen Warren
2013-04-02 21:51 ` Sylwester Nawrocki [this message]
2013-04-02 21:51 ` Sylwester Nawrocki
2013-03-28 5:43 ` [PATCH v4 2/6] usb: phy: omap-usb2: use the new " Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
[not found] ` <1364449408-9510-1-git-send-email-kishon-l0cyMroinI0@public.gmane.org>
2013-03-28 5:43 ` [PATCH v4 3/6] usb: otg: twl4030: " Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` [PATCH v4 4/6] ARM: OMAP: USB: Add phy binding information Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` [PATCH v4 5/6] ARM: dts: omap: update usb_otg_hs data Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` [PATCH v4 6/6] usb: musb: omap2430: use the new generic PHY framework Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 5:43 ` Kishon Vijay Abraham I
2013-03-28 18:31 ` [PATCH v4 0/6] Generic PHY Framework David Miller
2013-03-28 18:31 ` David Miller
[not found] ` <20130328.143142.2080627792603647441.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-04-03 5:59 ` Kishon Vijay Abraham I
2013-04-03 5:59 ` Kishon Vijay Abraham I
2013-04-03 5:59 ` Kishon Vijay Abraham I
2013-04-03 6:31 ` David Miller
2013-04-03 6:31 ` David Miller
2013-04-03 6:35 ` Kishon Vijay Abraham I
2013-04-03 6:35 ` Kishon Vijay Abraham I
2013-04-03 6:35 ` Kishon Vijay Abraham I
2013-04-03 16:33 ` David Miller
2013-04-03 16:33 ` David Miller
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=515B52D5.5090709@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=b-cousson@ti.com \
--cc=balbi@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=cesarb@cesarb.net \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=eballetbo@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=javier@dowhile0.org \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mchehab@redhat.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=santosh.shilimkar@ti.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=tony@atomide.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 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.