devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V8 1/7] sxgbe: Add device-tree binding support document
@ 2014-03-20 17:25 Byungho An
  2014-03-21 11:02 ` Mark Rutland
  0 siblings, 1 reply; 3+ messages in thread
From: Byungho An @ 2014-03-20 17:25 UTC (permalink / raw)
  To: 'netdev', linux-samsung-soc, devicetree
  Cc: 'David Miller', 'GIRISH K S',
	'SIVAREDDY KALLAM', 'Vipul Chandrakant',
	'Ilho Lee'

From: Siva Reddy <siva.kallam@samsung.com>

This patch adds binding document for SXGBE ethernet driver via device-tree.

Signed-off-by: Siva Reddy Kallam <siva.kallam@samsung.com>
Signed-off-by: Byungho An <bh74.an@samsung.com>
---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   60 ++++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/samsung-sxgbe.txt

diff --git a/Documentation/devicetree/bindings/net/samsung-sxgbe.txt b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
new file mode 100644
index 0000000..231acf8
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt
@@ -0,0 +1,60 @@
+* Samsung 10G Ethernet driver (SXGBE)
+
+Required properties:
+- compatible: Should be "samsung,sxgbe-v2.0a"
+- reg: Address and length of the register set for the device
+- interrupt-parent: Should be the phandle for the interrupt controller
+  that services interrupts for this device
+- interrupts: Should contain the SXGBE interrupts
+  These interrupts are ordered by fixed and follows variable
+  trasmit DMA interrupts, receive DMA interrupts and lpi interrupt.
+  index 0 - this is fixed common interrupt of SXGBE and it is always
+  available.
+  index 1 to 25 - 8 variable trasmit interrupts, variable 16 receive interrupts
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "sgmii", "xgmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.
+- samsung,burst-map: Integer, Program the possible bursts supported by sxgbe
+  This is an interger and represents allowable DMA bursts when fixed burst.
+  Allowable range is 0x01-0x3F. When this field is set fixed burst is enabled.
+  When fixed length is needed for burst mode, it can be set within allowable
+  range.
+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced address mode.
+  When enhanced address mode is needed, it can be set.
+- samsung,force-thresh-dma-mode: Boolean, Force DMA to use the threshold mode
+  for both tx and rx.
+- samsung,force-sf-dma-mode: Boolean, Force DMA to use the Store and Forward
+  mode for both tx and rx. This flag is ignored if force-thresh-dma-mode is set.
+
+Optional properties:
+- mac-address: 6 bytes, mac address
+- max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather
+		  than the maximum frame size.
+
+Example:
+
+	aliases {
+		ethernet0 = <&sxgbe0>;
+	};
+
+	sxgbe0: ethernet@1a040000 {
+		compatible = "samsung,sxgbe-v2.0a";
+		reg = <0 0x1a040000 0 0x10000>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 209 4>, <0 185 4>, <0 186 4>, <0 187 4>,
+			     <0 188 4>, <0 189 4>, <0 190 4>, <0 191 4>,
+			     <0 192 4>, <0 193 4>, <0 194 4>, <0 195 4>,
+			     <0 196 4>, <0 197 4>, <0 198 4>, <0 199 4>,
+			     <0 200 4>, <0 201 4>, <0 202 4>, <0 203 4>,
+			     <0 204 4>, <0 205 4>, <0 206 4>, <0 207 4>,
+			     <0 208 4>, <0 210 4>;
+		samsung,pbl = <0x08>
+		samsung,burst-map = <0x20>
+		samsung,adv-addr-mode = "true"
+		samsung,force-sf-dma-mode = "true"
+		mac-address = [ 00 11 22 33 44 55 ]; /* Filled in by U-Boot */
+		max-frame-size = <9000>;
+		phy-mode = "xgmii";
+	};
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V8 1/7] sxgbe: Add device-tree binding support document
  2014-03-20 17:25 [PATCH V8 1/7] sxgbe: Add device-tree binding support document Byungho An
@ 2014-03-21 11:02 ` Mark Rutland
  2014-03-21 14:57   ` Byungho An
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Rutland @ 2014-03-21 11:02 UTC (permalink / raw)
  To: Byungho An
  Cc: 'netdev', linux-samsung-soc@vger.kernel.org,
	devicetree@vger.kernel.org, 'David Miller',
	'GIRISH K S', 'SIVAREDDY KALLAM',
	'Vipul Chandrakant', 'Ilho Lee'

> +Example:
> +
> +	aliases {
> +		ethernet0 = <&sxgbe0>;
> +	};
> +
> +	sxgbe0: ethernet@1a040000 {
> +		compatible = "samsung,sxgbe-v2.0a";
> +		reg = <0 0x1a040000 0 0x10000>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 209 4>, <0 185 4>, <0 186 4>, <0 187 4>,
> +			     <0 188 4>, <0 189 4>, <0 190 4>, <0 191 4>,
> +			     <0 192 4>, <0 193 4>, <0 194 4>, <0 195 4>,
> +			     <0 196 4>, <0 197 4>, <0 198 4>, <0 199 4>,
> +			     <0 200 4>, <0 201 4>, <0 202 4>, <0 203 4>,
> +			     <0 204 4>, <0 205 4>, <0 206 4>, <0 207 4>,
> +			     <0 208 4>, <0 210 4>;
> +		samsung,pbl = <0x08>
> +		samsung,burst-map = <0x20>
> +		samsung,adv-addr-mode = "true"
> +		samsung,force-sf-dma-mode = "true"

You don't need these strings for boolean properties. Their presence of
the property alone (even in the absende of a value) is sufficient. These
should simply be:

	samsung,adv-addr-map;
	samsung,force-sf-dma-mode;

It is still an open question as to whether these properties are
necessary.

Cheers,
Mark.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH V8 1/7] sxgbe: Add device-tree binding support document
  2014-03-21 11:02 ` Mark Rutland
@ 2014-03-21 14:57   ` Byungho An
  0 siblings, 0 replies; 3+ messages in thread
From: Byungho An @ 2014-03-21 14:57 UTC (permalink / raw)
  To: 'Mark Rutland'
  Cc: 'netdev', linux-samsung-soc, devicetree,
	'David Miller', 'GIRISH K S',
	'SIVAREDDY KALLAM', 'Vipul Chandrakant',
	'Ilho Lee'

Mark Rutland <mark.rutland@arm.com> wrote:
> > +Example:
> > +
> > +	aliases {
> > +		ethernet0 = <&sxgbe0>;
> > +	};
> > +
> > +	sxgbe0: ethernet@1a040000 {
> > +		compatible = "samsung,sxgbe-v2.0a";
> > +		reg = <0 0x1a040000 0 0x10000>;
> > +		interrupt-parent = <&gic>;
> > +		interrupts = <0 209 4>, <0 185 4>, <0 186 4>, <0 187 4>,
> > +			     <0 188 4>, <0 189 4>, <0 190 4>, <0 191 4>,
> > +			     <0 192 4>, <0 193 4>, <0 194 4>, <0 195 4>,
> > +			     <0 196 4>, <0 197 4>, <0 198 4>, <0 199 4>,
> > +			     <0 200 4>, <0 201 4>, <0 202 4>, <0 203 4>,
> > +			     <0 204 4>, <0 205 4>, <0 206 4>, <0 207 4>,
> > +			     <0 208 4>, <0 210 4>;
> > +		samsung,pbl = <0x08>
> > +		samsung,burst-map = <0x20>
> > +		samsung,adv-addr-mode = "true"
> > +		samsung,force-sf-dma-mode = "true"
> 
> You don't need these strings for boolean properties. Their presence of the
> property alone (even in the absende of a value) is sufficient. These should
> simply be:
> 
> 	samsung,adv-addr-map;
> 	samsung,force-sf-dma-mode;
OK. It looks better

> 
> It is still an open question as to whether these properties are necessary.
I understood, actually those two properties are for future.
"samsung,adv-addr-map" is needed for more than 32 bit addressing and
"force-sf-dma-mode" to use full dma fifo.
As of now these are not mandatory property.
These will be added later, I'll remove it this patch series.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-21 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-20 17:25 [PATCH V8 1/7] sxgbe: Add device-tree binding support document Byungho An
2014-03-21 11:02 ` Mark Rutland
2014-03-21 14:57   ` Byungho An

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).