devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
	devicetree@vger.kernel.org, linux-ide@vger.kernel.org,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>
Subject: Re: [PATCH 1/5] Phy: DT binding documentation for Marvell MVEBU SATA phy.
Date: Thu, 5 Dec 2013 10:43:19 +0100	[thread overview]
Message-ID: <20131205094319.GD10498@lunn.ch> (raw)
In-Reply-To: <52A01742.2080405@ti.com>

On Thu, Dec 05, 2013 at 11:33:46AM +0530, Kishon Vijay Abraham I wrote:
> Hi,
> 
> On Wednesday 04 December 2013 10:46 PM, Andrew Lunn wrote:
> > Describe the binding for the Marvell MVEBU SATA phy. This driver
> > can be used at least with Kirkwood, Dove and maybe others.
> > Additionally, update the SATA binding with the properties to link
> > to the phy nodes.
> > 
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> >  Documentation/devicetree/bindings/ata/marvell.txt  |  6 ++++++
> >  .../devicetree/bindings/phy/phy-mvebu-sata.txt     | 22 ++++++++++++++++++++++
> >  2 files changed, 28 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/phy/phy-mvebu-sata.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/ata/marvell.txt b/Documentation/devicetree/bindings/ata/marvell.txt
> > index b5cdd20cde9c..e072fa105b49 100644
> > --- a/Documentation/devicetree/bindings/ata/marvell.txt
> > +++ b/Documentation/devicetree/bindings/ata/marvell.txt
> > @@ -6,11 +6,17 @@ Required Properties:
> >  - interrupts    : Interrupt controller is using
> >  - nr-ports      : Number of SATA ports in use.
> >  
> > +Optional Properties:
> > +- phys		: List of phandles to sata phys
> > +- phy-names	: Should be "0", "1", etc, one number per phandle
> 
> over aligned..

Could you explain please? Here is what it looks like without the patch
formatting, which could be messing up the display of tabs, due to the
+ at the beginning:

Required Properties:
- compatibility : "marvell,orion-sata"
- reg		: Address range of controller
- interrupts	: Interrupt controller is using
- nr-ports	: Number of SATA ports in use.

Optional Properties:
- phys		: List of phandles to sata phys
- phy-names	: Should be "0", "1", etc, one number per phandle



> > +
> >  Example:
> >  
> >  	sata@80000 {
> >  		compatible = "marvell,orion-sata";
> >  		reg = <0x80000 0x5000>;
> >  		interrupts = <21>;
> > +		phys = <&sata_phy0>, <&sata_phy1>;
> > +		phy-names = "0", "1";
> 
> more descriptive phy-names? sata-phy0?
> >  		nr-ports = <2>;

I could do, but i was following how the clocks work. Unfortunately,
the binding documentation is out of date and does not contain
clocks. A real example is:

		sata@80000 {
			compatible = "marvell,orion-sata";
			reg = <0x80000 0x5000>;
			interrupts = <21>;
			clocks = <&gate_clk 14>, <&gate_clk 15>;
			clock-names = "0", "1";
			phys = <&sata_phy0>, <&sata_phy1>;
			phy-names = "0", "1";
			status = "disabled";
		};

So clocks and the phy are described nearly identically. I can however
handle phys differently if you wish.

I will also submit a separate patch to the binding documentation to
add the clocks.


> >  	}
> > diff --git a/Documentation/devicetree/bindings/phy/phy-mvebu-sata.txt b/Documentation/devicetree/bindings/phy/phy-mvebu-sata.txt
> > new file mode 100644
> > index 000000000000..1cf9cef50b4b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/phy/phy-mvebu-sata.txt
> 
> Just name this mvebu-phy.txt so that we can add bindings of other mvebu PHYs
> here when it's added.

O.K. I also have a pcie phy driver, but it does not work
yet. devm_phy_get() is too restrictive for a complex device like a
PCIe controller.

> > +		sata-phy@1 {
> 
> The value after '@' must match the first address specified in the reg property
> of the node according to the ePAPR spec.

O.K, will fix.

> > +			compatible = "marvell,mvebu-sata-phy";
> > +			reg = <0x84000 0x0334>;
> > +			clocks = <&gate_clk 15>;
> > +			clock-names = "sata";
> > +			#phy-cells = <1>;
> 
> Is it on purpose that your are having phy-cells value to 1?

Yes. Each instance only controls one phy.

     Thanks
	Andrew

  reply	other threads:[~2013-12-05  9:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 17:15 [PATCH 0/5] MVEBU SATA PHY driver Andrew Lunn
2013-12-04 17:16 ` [PATCH 1/5] Phy: DT binding documentation for Marvell MVEBU SATA phy Andrew Lunn
2013-12-05  6:03   ` Kishon Vijay Abraham I
2013-12-05  9:43     ` Andrew Lunn [this message]
2013-12-05  9:47       ` Andrew Lunn
2013-12-05 10:35       ` Kishon Vijay Abraham I
2013-12-10 22:59       ` Andrew Lunn
2013-12-11  5:41         ` Kishon Vijay Abraham I
     [not found] ` <1386177364-10164-1-git-send-email-andrew-g2DYL2Zd6BY@public.gmane.org>
2013-12-04 17:16   ` [PATCH 2/5] Phy: Add a PHY driver for Marvell MVEBU SATA PHY Andrew Lunn
2013-12-05  6:10     ` Kishon Vijay Abraham I
2013-12-04 17:16 ` [PATCH 3/5] SATA: MV: Add support for the optional PHYs Andrew Lunn
2013-12-05  6:15   ` Kishon Vijay Abraham I
2013-12-04 17:16 ` [PATCH 4/5] Phy: Add DT nodes on kirkwood and Dove for the SATA PHY Andrew Lunn
2013-12-04 20:01   ` Sergei Shtylyov
2013-12-04 19:18     ` Andrew Lunn
2013-12-05  6:17   ` Kishon Vijay Abraham I
2013-12-04 17:16 ` [PATCH 5/5] ARM: defconfig: Enable generic phy in dove and kirkwood Andrew Lunn
2013-12-04 20:03   ` Sergei Shtylyov

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=20131205094319.GD10498@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=kishon@ti.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sebastian.hesselbarth@googlemail.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).