Skip to contentSkip to conversation

sxgbe: Add device-tree binding support document

PATCH Superseded Byungho An 3 participants 7 messages Mar 18, 2014 – Mar 21, 2014 1 message not in the archive

Subsystems (4)

v4 of 14 Superseded Latest is v14 →

lore
Share & tools
lore

Byungho An

author
#0 lore raw

PATCH v4 1/8 sxgbe: Add device-tree binding support document

From: Siva Reddy <[email protected]>

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

---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/samsung-sxgbe.txt
(quoted diff) +0 -0

b/Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file mode 100644
index 0000000..ca27947

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +13 -0
@@ -0,0 +1,53 @@
+* 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: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.
+- samsung,fixed-burst: Boolean, Program the DMA to use the fixed burst mode
+- 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 0x00-0x3F. This field is valid only when fixed burst is
+  enabled, otherwise ignored.
+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced address
mode.
+- 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.
+- samsung,phy-addr: Integer, Address of the PHY attached with SXGBE. +
+Optional properties:
+- mac-address: 6 bytes, mac address
+
+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>;

+ mac-address = [000000000000]; /* Filled in by U-Boot */
+ phy-mode = "xaui";
+ };

Signature · 1 line
1.7.10.4
#1 lore raw

Hi,

As a general note it's helpful for devicetree to be Cc'd on the entire series (though the binding document should be a separate patch) as it provides useful context for reviewing the binding.

Quoted 33 lines · Byungho An

From: Siva Reddy <[email protected]>

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

---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/samsung-sxgbe.txt
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +13 -0
new file mode 100644
index 0000000..ca27947
@@ -0,0 +1,53 @@
+* 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

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 5 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.

There's no need to abbreviate to "pbl".

Is this a property of the hardware, or configuration that the kernel will program in? If the latter, why can the kernel not choose?

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 5 lines
+- samsung,fixed-burst: Boolean, Program the DMA to use the fixed burst mode
+- samsung,burst-map: Integer, Program the possible bursts supported by sxgbe
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+  This is an interger and represents allowable DMA bursts when fixed burst.
+  Allowable range is 0x00-0x3F. This field is valid only when fixed burst is
+  enabled, otherwise ignored.

If that's the case, why not have just this property and have it imply the use of fixed burst mode?

When is it necessary to use fixed burst mode?

Quoted 2 lines

+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced address mode.

When would this be selected, and why can the kernel not choose?

Quoted 2 lines
+- samsung,force_thresh_dma_mode: Boolean, Force DMA to use the threshold mode
+  for both tx and rx

s/_/-/ in property names.

Likewise, why can the kernel not choose.

Quoted 3 lines
+- 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.

Likewise for both points.

Quoted 1 line

+- samsung,phy-addr: Integer, Address of the PHY attached with SXGBE.

Some of these properties appear to be missing from the example. Are they required or optional?

Thanks,
Mark.

Quoted 33 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +24 -0
+
+Optional properties:
+- mac-address: 6 bytes, mac address
+
+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>;
+		mac-address = [000000000000]; /* Filled in by U-Boot */
+		phy-mode = "xaui";
+	};
Signature · 7 lines
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#2 lore raw

Mark Rutland <[email protected]> :

Quoted 3 lines

Hi,

As a general note it's helpful for devicetree to be Cc'd on the entire

series

Quoted 1 line

(though the binding document should be a separate patch) as it provides

useful

Quoted 1 line

context for reviewing the binding.

OK.

Quoted 5 lines · Byungho An
Quoted 3 lines

From: Siva Reddy <[email protected]>

This patch adds binding document for SXGBE ethernet driver via

device-tree.

Quoted 40 lines
Quoted 32 lines
---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +14 -0
new file mode 100644
index 0000000..ca27947
@@ -0,0 +1,53 @@
+* 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

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 5 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.

There's no need to abbreviate to "pbl".

Quoted 1 line

Is this a property of the hardware, or configuration that the kernel will

program

Quoted 1 line

in? If the latter, why can the kernel not choose?

Yes, this is hardware property

Quoted 6 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 6 lines

+- samsung,fixed-burst: Boolean, Program the DMA to use the fixed

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +4 -0
+burst mode
+- samsung,burst-map: Integer, Program the possible bursts supported
+by sxgbe
+  This is an interger and represents allowable DMA bursts when fixed

burst.

Quoted 5 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 3 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+  Allowable range is 0x00-0x3F. This field is valid only when fixed
+burst is
+  enabled, otherwise ignored.

If that's the case, why not have just this property and have it imply the

use of

Quoted 1 line

fixed burst mode?

OK. It will be implemented in next patch set.

Quoted 2 lines

When is it necessary to use fixed burst mode?

This is the configurable mode of DMA an used internally by hardware to fetch data from platform bus

Quoted 6 lines
Quoted 4 lines

+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced +address
mode.

When would this be selected, and why can the kernel not choose?

Kernel doesn't have the provision to find out a way to select this. So, need to pass from DT

Quoted 6 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 4 lines

+- samsung,force_thresh_dma_mode: Boolean, Force DMA to use the

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +2 -0
+threshold mode
+  for both tx and rx

s/_/-/ in property names.

OK.

Quoted 2 lines

Likewise, why can the kernel not choose.

SXGBE h/w registers can't provide information to select this. So, need to pass from DT depend on Platform

Quoted 8 lines
Quoted 6 lines

+- samsung,force_sf_dma_mode: Boolean, Force DMA to use the Store and

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+Forward
+  mode for both tx and rx. This flag is ignored if
+force_thresh_dma_mode is

set.

Likewise for both points.

Same above.

Quoted 5 lines
Quoted 2 lines

+- samsung,phy-addr: Integer, Address of the PHY attached with SXGBE.

Some of these properties appear to be missing from the example. Are they required or optional?

Those are optional depend on platform configuration.

Quoted 37 lines

Thanks,
Mark.

Quoted 33 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +24 -1
+
+Optional properties:
+- mac-address: 6 bytes, mac address
+
+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>;
+		mac-address = [000000000000]; /* Filled in by U-Boot */
+		phy-mode = "xaui";
+	};
--

1.7.10.4

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

#3 lore raw
Quoted 56 lines · Byungho An

Mark Rutland <[email protected]> :

Quoted 3 lines

Hi,

As a general note it's helpful for devicetree to be Cc'd on the entire

series

Quoted 1 line

(though the binding document should be a separate patch) as it provides

useful

Quoted 1 line

context for reviewing the binding.

OK.

Quoted 5 lines · Byungho An
Quoted 3 lines

From: Siva Reddy <[email protected]>

This patch adds binding document for SXGBE ethernet driver via

device-tree.

Quoted 40 lines
Quoted 32 lines
---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +14 -0
new file mode 100644
index 0000000..ca27947
@@ -0,0 +1,53 @@
+* 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

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 5 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.

There's no need to abbreviate to "pbl".

Quoted 4 lines
Quoted 1 line

Is this a property of the hardware, or configuration that the kernel will

program

Quoted 1 line

in? If the latter, why can the kernel not choose?

Yes, this is hardware property

Ok.

Quoted 13 lines
Quoted 7 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 7 lines

+- samsung,fixed-burst: Boolean, Program the DMA to use the fixed

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +4 -0
+burst mode
+- samsung,burst-map: Integer, Program the possible bursts supported
+by sxgbe
+  This is an interger and represents allowable DMA bursts when fixed

burst.

Quoted 5 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 3 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+  Allowable range is 0x00-0x3F. This field is valid only when fixed
+burst is
+  enabled, otherwise ignored.

If that's the case, why not have just this property and have it imply the

Quoted 8 lines

use of

Quoted 1 line

fixed burst mode?

OK. It will be implemented in next patch set.

Quoted 2 lines

When is it necessary to use fixed burst mode?

This is the configurable mode of DMA an used internally by hardware to fetch data from platform bus

Sure, but that doesn't describe when it is necessary. Is this the way the DMA was configured at integration time, or the way the kernel should configure it?

If the latter, is it absolutely necessary for correctness to use fixed-burst mode? Or is it just always sensible to use it if available?

What does the driver do if fixed burst mode is not available? Would this work in the presence of fixed-burt mode?

I'm not arguing to remove these properties. I'd just like to understand if all you're describing is the presence of a feature or that the use of the feature is absolutely necessary for correctness.

I'm perfectly happy for Linux to always decide to use these features if available.

Quoted 9 lines
Quoted 7 lines
Quoted 5 lines

+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced +address
mode.

When would this be selected, and why can the kernel not choose?

Kernel doesn't have the provision to find out a way to select this. So, need to pass from DT

Likewise, it is always absolutely necessary, or just always sensible to use enhanced address mode if present?

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

+- samsung,force_thresh_dma_mode: Boolean, Force DMA to use the

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +2 -0
+threshold mode
+  for both tx and rx
Quoted 7 lines
Quoted 1 line

s/_/-/ in property names.

OK.

Quoted 2 lines

Likewise, why can the kernel not choose.

SXGBE h/w registers can't provide information to select this. So, need to pass from DT depend on Platform

Similarly.

Quoted 10 lines
Quoted 9 lines
Quoted 7 lines

+- samsung,force_sf_dma_mode: Boolean, Force DMA to use the Store and

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+Forward
+  mode for both tx and rx. This flag is ignored if
+force_thresh_dma_mode is

set.

Likewise for both points.

Same above.

And again.

Cheers,
Mark.

author
#4 lore raw

Mark Rutland <[email protected]> :

Quoted 87 lines · Byungho An
Quoted 61 lines

Mark Rutland <[email protected]> :

Quoted 4 lines

Hi,

As a general note it's helpful for devicetree to be Cc'd on the entire

series

Quoted 2 lines

(though the binding document should be a separate patch) as it provides

useful

Quoted 1 line

context for reviewing the binding.

OK.

Quoted 5 lines · Byungho An
Quoted 3 lines

From: Siva Reddy <[email protected]>

This patch adds binding document for SXGBE ethernet driver via

device-tree.

Quoted 43 lines
Quoted 35 lines
---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 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..ca27947

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +16 -0
@@ -0,0 +1,53 @@
+* 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

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 5 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.

There's no need to abbreviate to "pbl".

Quoted 5 lines
Quoted 2 lines

Is this a property of the hardware, or configuration that the kernel will

program

Quoted 1 line

in? If the latter, why can the kernel not choose?

Yes, this is hardware property

Ok.

Quoted 17 lines
Quoted 8 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 8 lines

+- samsung,fixed-burst: Boolean, Program the DMA to use the fixed

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+burst mode
+- samsung,burst-map: Integer, Program the possible bursts
+supported by sxgbe
+  This is an interger and represents allowable DMA bursts when
+fixed

burst.

Quoted 6 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 3 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+  Allowable range is 0x00-0x3F. This field is valid only when
+fixed burst is
+  enabled, otherwise ignored.

If that's the case, why not have just this property and have it imply the

use of

Quoted 1 line

fixed burst mode?

Quoted 8 lines
Quoted 6 lines

OK. It will be implemented in next patch set.

Quoted 2 lines

When is it necessary to use fixed burst mode?

This is the configurable mode of DMA an used internally by hardware to fetch data from platform bus

Sure, but that doesn't describe when it is necessary. Is this the way the

DMA

Quoted 1 line

was configured at integration time, or the way the kernel should configure

it?
It is needed when fixed length of burst is needed.
if it is not configured, the length of burst will be variable(not fixed). Anyway, I'll add description more for it.

Quoted 2 lines

If the latter, is it absolutely necessary for correctness to use fixed-burst

mode?

Quoted 1 line

Or is it just always sensible to use it if available?

It is not absolutely necessary, as I mentioned above.

Quoted 2 lines

What does the driver do if fixed burst mode is not available? Would this

work in

Quoted 1 line

the presence of fixed-burt mode?

Fixed burst mode is always available so driver doesn't need to care about it.

Quoted 2 lines

I'm not arguing to remove these properties. I'd just like to understand if

all

Quoted 1 line

you're describing is the presence of a feature or that the use of the

feature is

Quoted 1 line

absolutely necessary for correctness.

OK

Quoted 2 lines

I'm perfectly happy for Linux to always decide to use these features if

available.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced +address
mode.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

When would this be selected, and why can the kernel not choose?

Kernel doesn't have the provision to find out a way to select this. So, need to pass from DT

Likewise, it is always absolutely necessary, or just always sensible to use enhanced address mode if present?

Not always necessary. When extended address mode is needed, it can be set in the DT.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 6 lines

+- samsung,force_thresh_dma_mode: Boolean, Force DMA to use the

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +2 -0
+threshold mode
+  for both tx and rx

s/_/-/ in property names.

Quoted 8 lines
Quoted 6 lines

OK.

Quoted 2 lines

Likewise, why can the kernel not choose.

SXGBE h/w registers can't provide information to select this. So, need to pass from DT depend on Platform

Similarly.

Not always necessary. When threshold base DMA mode is needed it can be set.

Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines

+- samsung,force_sf_dma_mode: Boolean, Force DMA to use the Store

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+and Forward
+  mode for both tx and rx. This flag is ignored if
+force_thresh_dma_mode is

set.

Likewise for both points.

Quoted 3 lines
Quoted 1 line

Same above.

And again.

Not always necessary. When threshold base DMA mode is not needed it can be set.
On the other hand, store and forward is needed for DMA, it can be set.

Thanks,

Quoted 3 lines

Cheers,
Mark.

#5 lore raw
Quoted 95 lines · Byungho An

Mark Rutland <[email protected]> :

Quoted 94 lines · Byungho An
Quoted 61 lines

Mark Rutland <[email protected]> :

Quoted 4 lines

Hi,

As a general note it's helpful for devicetree to be Cc'd on the entire

series

Quoted 2 lines

(though the binding document should be a separate patch) as it provides

useful

Quoted 1 line

context for reviewing the binding.

OK.

Quoted 5 lines · Byungho An
Quoted 3 lines

From: Siva Reddy <[email protected]>

This patch adds binding document for SXGBE ethernet driver via

device-tree.

Quoted 43 lines
Quoted 35 lines
---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 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..ca27947

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +16 -0
@@ -0,0 +1,53 @@
+* 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

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 5 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.

There's no need to abbreviate to "pbl".

Quoted 5 lines
Quoted 2 lines

Is this a property of the hardware, or configuration that the kernel will

program

Quoted 1 line

in? If the latter, why can the kernel not choose?

Yes, this is hardware property

Ok.

Quoted 23 lines
Quoted 8 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 8 lines

+- samsung,fixed-burst: Boolean, Program the DMA to use the fixed

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+burst mode
+- samsung,burst-map: Integer, Program the possible bursts
+supported by sxgbe
+  This is an interger and represents allowable DMA bursts when
+fixed

burst.

Quoted 6 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 3 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+  Allowable range is 0x00-0x3F. This field is valid only when
+fixed burst is
+  enabled, otherwise ignored.

If that's the case, why not have just this property and have it imply the

use of

Quoted 1 line

fixed burst mode?

OK. It will be implemented in next patch set.

Quoted 2 lines

When is it necessary to use fixed burst mode?

This is the configurable mode of DMA an used internally by hardware to fetch data from platform bus

Quoted 7 lines
Quoted 1 line

Sure, but that doesn't describe when it is necessary. Is this the way the

DMA

Quoted 1 line

was configured at integration time, or the way the kernel should configure

it?
It is needed when fixed length of burst is needed.
if it is not configured, the length of burst will be variable(not fixed). Anyway, I'll add description more for it.

And when is it necessary to have a fixed length of burst?

Is this a property of the system, or the conenction of the system to another?

Quoted 6 lines
Quoted 3 lines

If the latter, is it absolutely necessary for correctness to use fixed-burst

mode?

Quoted 1 line

Or is it just always sensible to use it if available?

It is not absolutely necessary, as I mentioned above.

The description above does not make this clear.

Quoted 25 lines
Quoted 3 lines

What does the driver do if fixed burst mode is not available? Would this

work in

Quoted 1 line

the presence of fixed-burt mode?

Fixed burst mode is always available so driver doesn't need to care about it.

Quoted 2 lines

I'm not arguing to remove these properties. I'd just like to understand if

all

Quoted 1 line

you're describing is the presence of a feature or that the use of the

feature is

Quoted 1 line

absolutely necessary for correctness.

OK

Quoted 2 lines

I'm perfectly happy for Linux to always decide to use these features if

available.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines

+- samsung,adv-addr-mode: Boolean, Program the DMA to use Enhanced +address
mode.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

When would this be selected, and why can the kernel not choose?

Kernel doesn't have the provision to find out a way to select this. So, need to pass from DT

Likewise, it is always absolutely necessary, or just always sensible to use enhanced address mode if present?

Not always necessary. When extended address mode is needed, it can be set in the DT.

When is this needed?

Cheers,
Mark.

A message that is not in the archive (sent off-list or not yet received): 20140321094432.GI23372-NuALmloUBlrZROr8t4l/[email protected]

#7 lore raw
Quoted 41 lines · Mark Rutland
Quoted 40 lines · Byungho An

Mark Rutland <[email protected]> :

Quoted 39 lines · Byungho An
Quoted 38 lines

Mark Rutland <[email protected]> :

Quoted 4 lines

Hi,

As a general note it's helpful for devicetree to be Cc'd on the entire

series

Quoted 2 lines

(though the binding document should be a separate patch) as it provides

useful

Quoted 1 line

context for reviewing the binding.

OK.

Quoted 5 lines · Byungho An
Quoted 3 lines

From: Siva Reddy <[email protected]>

This patch adds binding document for SXGBE ethernet driver via

device-tree.

Quoted 20 lines
Quoted 20 lines
---
 .../devicetree/bindings/net/samsung-sxgbe.txt      |   53
++++++++++++++++++++
 1 file changed, 53 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..ca27947

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
@@ -0,0 +1,53 @@
+* Samsung 10G Ethernet driver (SXGBE)
+
+Required properties:
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt line 11

Quoted 8 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +8 -0
+- 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.

Quoted 49 lines
Quoted 49 lines
Quoted 42 lines
Quoted 14 lines
Quoted 14 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 11 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  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

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+  and 1 optional lpi interrupt.
+- phy-mode: String, operation mode of the PHY interface.
+  Supported values are: "xaui", "gmii".
+- samsung,pbl: Integer, Programmable Burst Length.
+  Supported values are 1, 2, 4, 8, 16, or 32.

There's no need to abbreviate to "pbl".

Quoted 5 lines
Quoted 2 lines

Is this a property of the hardware, or configuration that the kernel will

program

Quoted 1 line

in? If the latter, why can the kernel not choose?

Yes, this is hardware property

Ok.

Quoted 20 lines
Quoted 8 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 8 lines

+- samsung,fixed-burst: Boolean, Program the DMA to use the

Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +5 -0
+fixed burst mode
+- samsung,burst-map: Integer, Program the possible bursts
+supported by sxgbe
+  This is an interger and represents allowable DMA bursts
+when fixed

burst.

Quoted 6 lines

Documentation/devicetree/bindings/net/samsung-sxgbe.txt

Quoted 3 lines
Documentation/devicetree/bindings/net/samsung-sxgbe.txt new file +3 -0
+  Allowable range is 0x00-0x3F. This field is valid only when
+fixed burst is
+  enabled, otherwise ignored.

If that's the case, why not have just this property and have it imply the

use of

Quoted 1 line

fixed burst mode?

OK. It will be implemented in next patch set.

Quoted 1 line
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

When is it necessary to use fixed burst mode?

This is the configurable mode of DMA an used internally by hardware to fetch data from platform bus

Sure, but that doesn't describe when it is necessary. Is this the way the

DMA

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

was configured at integration time, or the way the kernel should configure

it?
It is needed when fixed length of burst is needed.
if it is not configured, the length of burst will be variable(not fixed). Anyway, I'll add description more for it.

And when is it necessary to have a fixed length of burst?

It's up to situation. If most of data size have similar in size, fixed burst is better.

Quoted 2 lines

Is this a property of the system, or the conenction of the system to

another?
This is a choice given by SXGBE to configure it's burst mode. It can work in Fixed and Undefined burst mode.
SXGBE can't select the burst mode on it's own. so, to configure the burst , we need configurable parameter from DT.
if DT doesn't provide fixed burst, it means SXGBE driver will configure as Undefined burst

Do you think it should be moved to optional properties?

Quoted 18 lines
Quoted 8 lines
Quoted 5 lines

If the latter, is it absolutely necessary for correctness to use fixed-burst

mode?

Quoted 1 line

Or is it just always sensible to use it if available?

It is not absolutely necessary, as I mentioned above.

The description above does not make this clear.

Quoted 7 lines
Quoted 4 lines

What does the driver do if fixed burst mode is not available? Would this

work in

Quoted 1 line

the presence of fixed-burt mode?

Fixed burst mode is always available so driver doesn't need to care about

it.

Quoted 26 lines
Quoted 26 lines
Quoted 4 lines

I'm not arguing to remove these properties. I'd just like to understand if

all

Quoted 2 lines

you're describing is the presence of a feature or that the use of the

feature is

Quoted 1 line

absolutely necessary for correctness.

OK

Quoted 3 lines

I'm perfectly happy for Linux to always decide to use these features if

available.

Quoted 11 lines
Quoted 10 lines
Quoted 8 lines
Quoted 6 lines

+- samsung,adv-addr-mode: Boolean, Program the DMA to use +Enhanced address
mode.

When would this be selected, and why can the kernel not choose?

Kernel doesn't have the provision to find out a way to select this. So, need to pass from DT

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Likewise, it is always absolutely necessary, or just always sensible to use enhanced address mode if present?

Not always necessary. When extended address mode is needed, it can be set in the DT.

When is this needed?

It is always confusing between when and why.
It is for extended dma addressing for future.
when extended dma addressing is needed it can be selected. Anyway it will be removed this series because it is not mandatory. Should I explain about extended dma addressing?

Quoted 5 lines

Cheers,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the

body of

Quoted 2 lines

a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html

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