[V2,1/2] stmmac: Add binding document for IMG Pistachio DWMAC
diff mbox

Message ID 1428356558-18367-1-git-send-email-abrestic@chromium.org
State New, archived
Headers show

Commit Message

Andrew Bresticker April 6, 2015, 9:42 p.m. UTC
Add a binding document for the DWMAC ethernet controller found on the
IMG Pistachio SoC.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: James Hartley <james.hartley@imgtec.com>
---
No changes from v1.
---
 .../devicetree/bindings/net/pistachio-dwmac.txt    | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/pistachio-dwmac.txt

Comments

Arnd Bergmann April 6, 2015, 10:10 p.m. UTC | #1
On Monday 06 April 2015 14:42:38 Andrew Bresticker wrote:
> At the moment, the only additional setup required for the DWMAC
> on the IMG Pistachio SoC is to request and enable a separate gate
> clock for the register interface.
> 
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> Signed-off-by: Govindraj Raja <govindraj.raja@imgtec.com>
> Cc: James Hartley <james.hartley@imgtec.com>

Why do you need a special glue driver for that?

Since you don't do anything special, I'd say it should be possible
to handle this with just the default driver.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrew Bresticker April 6, 2015, 10:27 p.m. UTC | #2
On Mon, Apr 6, 2015 at 3:10 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday 06 April 2015 14:42:38 Andrew Bresticker wrote:
>> At the moment, the only additional setup required for the DWMAC
>> on the IMG Pistachio SoC is to request and enable a separate gate
>> clock for the register interface.
>>
>> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>> Signed-off-by: Govindraj Raja <govindraj.raja@imgtec.com>
>> Cc: James Hartley <james.hartley@imgtec.com>
>
> Why do you need a special glue driver for that?
>
> Since you don't do anything special, I'd say it should be possible
> to handle this with just the default driver.

Right, at the moment we only need to request and enable a second
clock, which could be added to the core driver.  If we don't expect to
have to extend this driver to deal with other configurations (which
IIRC there were some concerns about when I wrote this), then I'm fine
with folding this change into the core driver - James?

Thanks,
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Andrew Bresticker April 7, 2015, 8:40 p.m. UTC | #3
On Tue, Apr 7, 2015 at 10:16 AM, James Hartley <James.Hartley@imgtec.com> wrote:
>
>
>> -----Original Message-----
>> From: abrestic@google.com [mailto:abrestic@google.com] On Behalf Of
>> Andrew Bresticker
>> Sent: 06 April 2015 23:28
>> To: Arnd Bergmann; James Hartley
>> Cc: David S. Miller; Giuseppe Cavallaro; devicetree@vger.kernel.org;
>> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Govindraj Raja
>> Subject: Re: [PATCH V2 2/2] stmmac: Add IMG Pistachio platform glue layer
>>
>> On Mon, Apr 6, 2015 at 3:10 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> > On Monday 06 April 2015 14:42:38 Andrew Bresticker wrote:
>> >> At the moment, the only additional setup required for the DWMAC on
>> >> the IMG Pistachio SoC is to request and enable a separate gate clock
>> >> for the register interface.
>> >>
>> >> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
>> >> Signed-off-by: Govindraj Raja <govindraj.raja@imgtec.com>
>> >> Cc: James Hartley <james.hartley@imgtec.com>
>> >
>> > Why do you need a special glue driver for that?
>> >
>> > Since you don't do anything special, I'd say it should be possible to
>> > handle this with just the default driver.
>>
>> Right, at the moment we only need to request and enable a second clock,
>> which could be added to the core driver.  If we don't expect to have to
>> extend this driver to deal with other configurations (which IIRC there were
>> some concerns about when I wrote this), then I'm fine with folding this change
>> into the core driver - James?
>
> Weren't the concerns about USB not Ethernet?  I don't remember anything that
> would stop us extending the driver for eth.

OK, let's try this then: https://patchwork.kernel.org/patch/6174881/

-Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/Documentation/devicetree/bindings/net/pistachio-dwmac.txt b/Documentation/devicetree/bindings/net/pistachio-dwmac.txt
new file mode 100644
index 0000000..9781469
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/pistachio-dwmac.txt
@@ -0,0 +1,24 @@ 
+IMG Pistachio Ethernet Controller
+=================================
+
+This device is a variant of the DWMAC and inherits the properties described
+in ./stmmac.txt.
+
+Required properties:
+--------------------
+ - compatible: Must contain "img,pistachio-dwmac" and "snps,dwmac".
+ - clocks: Must contain an entry for each entry in clock-names.
+   See ../clock/clock-bindings.txt for details.
+ - clock-names: Must include "stmmaceth" and "sys".
+
+Example:
+--------
+ethernet@18140000 {
+	compatible = "img,pistachio-dwmac";
+	reg = <0x18140000 0x2000>;
+	interrupts = <GIC_SHARED 50 IRQ_TYPE_LEVEL_HIGH>;
+	interrupt-names = "macirq";
+	clocks = <&clk_core CLK_ENET>, <&cr_periph SYS_CLK_ENET>;
+	clock-names = "stmmaceth", "sys";
+	phy-mode = "rmii";
+};