]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dts: sunxi: Bring in Ethernet device tree bindings
authorSimon Glass <sjg@chromium.org>
Sun, 5 Apr 2015 22:07:35 +0000 (16:07 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:11:36 +0000 (11:11 -0600)
Since we will use these bindings on sunxi, bring them in from Linux
4.0-rc1.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
doc/device-tree-bindings/net/allwinner,sun4i-emac.txt [new file with mode: 0644]
doc/device-tree-bindings/net/allwinner,sun4i-mdio.txt [new file with mode: 0644]
doc/device-tree-bindings/net/allwinner,sun7i-a20-gmac.txt [new file with mode: 0644]
doc/device-tree-bindings/net/ethernet.txt [new file with mode: 0644]
doc/device-tree-bindings/net/stmmac.txt [new file with mode: 0644]

diff --git a/doc/device-tree-bindings/net/allwinner,sun4i-emac.txt b/doc/device-tree-bindings/net/allwinner,sun4i-emac.txt
new file mode 100644 (file)
index 0000000..10640b1
--- /dev/null
@@ -0,0 +1,19 @@
+* Allwinner EMAC ethernet controller
+
+Required properties:
+- compatible: should be "allwinner,sun4i-a10-emac" (Deprecated:
+              "allwinner,sun4i-emac")
+- reg: address and length of the register set for the device.
+- interrupts: interrupt for the device
+- phy: see ethernet.txt file in the same directory.
+- clocks: A phandle to the reference clock for this device
+
+Example:
+
+emac: ethernet@01c0b000 {
+       compatible = "allwinner,sun4i-a10-emac";
+       reg = <0x01c0b000 0x1000>;
+       interrupts = <55>;
+       clocks = <&ahb_gates 17>;
+       phy = <&phy0>;
+};
diff --git a/doc/device-tree-bindings/net/allwinner,sun4i-mdio.txt b/doc/device-tree-bindings/net/allwinner,sun4i-mdio.txt
new file mode 100644 (file)
index 0000000..4ec5641
--- /dev/null
@@ -0,0 +1,27 @@
+* Allwinner A10 MDIO Ethernet Controller interface
+
+Required properties:
+- compatible: should be "allwinner,sun4i-a10-mdio"
+              (Deprecated: "allwinner,sun4i-mdio").
+- reg: address and length of the register set for the device.
+
+Optional properties:
+- phy-supply: phandle to a regulator if the PHY needs one
+
+Example at the SoC level:
+mdio@01c0b080 {
+       compatible = "allwinner,sun4i-a10-mdio";
+       reg = <0x01c0b080 0x14>;
+       #address-cells = <1>;
+       #size-cells = <0>;
+};
+
+And at the board level:
+
+mdio@01c0b080 {
+       phy-supply = <&reg_emac_3v3>;
+
+       phy0: ethernet-phy@0 {
+               reg = <0>;
+       };
+};
diff --git a/doc/device-tree-bindings/net/allwinner,sun7i-a20-gmac.txt b/doc/device-tree-bindings/net/allwinner,sun7i-a20-gmac.txt
new file mode 100644 (file)
index 0000000..ea4d752
--- /dev/null
@@ -0,0 +1,27 @@
+* Allwinner GMAC ethernet controller
+
+This device is a platform glue layer for stmmac.
+Please see stmmac.txt for the other unchanged properties.
+
+Required properties:
+ - compatible:  Should be "allwinner,sun7i-a20-gmac"
+ - clocks: Should contain the GMAC main clock, and tx clock
+   The tx clock type should be "allwinner,sun7i-a20-gmac-clk"
+ - clock-names: Should contain the clock names "stmmaceth",
+   and "allwinner_gmac_tx"
+
+Optional properties:
+- phy-supply: phandle to a regulator if the PHY needs one
+
+Examples:
+
+       gmac: ethernet@01c50000 {
+               compatible = "allwinner,sun7i-a20-gmac";
+               reg = <0x01c50000 0x10000>,
+                     <0x01c20164 0x4>;
+               interrupts = <0 85 1>;
+               interrupt-names = "macirq";
+               clocks = <&ahb_gates 49>, <&gmac_tx>;
+               clock-names = "stmmaceth", "allwinner_gmac_tx";
+               phy-mode = "mii";
+       };
diff --git a/doc/device-tree-bindings/net/ethernet.txt b/doc/device-tree-bindings/net/ethernet.txt
new file mode 100644 (file)
index 0000000..3fc3605
--- /dev/null
@@ -0,0 +1,25 @@
+The following properties are common to the Ethernet controllers:
+
+- local-mac-address: array of 6 bytes, specifies the MAC address that was
+  assigned to the network device;
+- mac-address: array of 6 bytes, specifies the MAC address that was last used by
+  the boot program; should be used in cases where the MAC address assigned to
+  the device by the boot program is different from the "local-mac-address"
+  property;
+- max-speed: number, specifies maximum speed in Mbit/s supported by the device;
+- max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than
+  the maximum frame size (there's contradiction in ePAPR).
+- phy-mode: string, operation mode of the PHY interface; supported values are
+  "mii", "gmii", "sgmii", "qsgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id",
+  "rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii"; this is now a de-facto
+  standard property;
+- phy-connection-type: the same as "phy-mode" property but described in ePAPR;
+- phy-handle: phandle, specifies a reference to a node representing a PHY
+  device; this property is described in ePAPR and so preferred;
+- phy: the same as "phy-handle" property, not recommended for new bindings.
+- phy-device: the same as "phy-handle" property, not recommended for new
+  bindings.
+
+Child nodes of the Ethernet controller are typically the individual PHY devices
+connected via the MDIO bus (sometimes the MDIO bus controller is separate).
+They are described in the phy.txt file in this same directory.
diff --git a/doc/device-tree-bindings/net/stmmac.txt b/doc/device-tree-bindings/net/stmmac.txt
new file mode 100644 (file)
index 0000000..5f02517
--- /dev/null
@@ -0,0 +1,63 @@
+* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
+
+Required properties:
+- compatible: Should be "snps,dwmac-<ip_version>" "snps,dwmac"
+       For backwards compatibility: "st,spear600-gmac" is also supported.
+- 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 STMMAC interrupts
+- interrupt-names: Should contain the interrupt names "macirq"
+  "eth_wake_irq" if this interrupt is supported in the "interrupts"
+  property
+- phy-mode: See ethernet.txt file in the same directory.
+- snps,reset-gpio      gpio number for phy reset.
+- snps,reset-active-low boolean flag to indicate if phy reset is active low.
+- snps,reset-delays-us  is triplet of delays
+       The 1st cell is reset pre-delay in micro seconds.
+       The 2nd cell is reset pulse in micro seconds.
+       The 3rd cell is reset post-delay in micro seconds.
+- snps,pbl             Programmable Burst Length
+- snps,fixed-burst     Program the DMA to use the fixed burst mode
+- snps,mixed-burst     Program the DMA to use the mixed burst mode
+- snps,force_thresh_dma_mode   Force DMA to use the threshold mode for
+                               both tx and rx
+- snps,force_sf_dma_mode       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.
+- snps,multicast-filter-bins:  Number of multicast filter hash bins
+                               supported by this device instance
+- snps,perfect-filter-entries: Number of perfect filter entries supported
+                               by this device instance
+
+Optional properties:
+- resets: Should contain a phandle to the STMMAC reset signal, if any
+- reset-names: Should contain the reset signal name "stmmaceth", if a
+       reset phandle is given
+- max-frame-size: See ethernet.txt file in the same directory
+- clocks: If present, the first clock should be the GMAC main clock,
+  further clocks may be specified in derived bindings.
+- clock-names: One name for each entry in the clocks property, the
+  first one should be "stmmaceth".
+- clk_ptp_ref: this is the PTP reference clock; in case of the PTP is
+  available this clock is used for programming the Timestamp Addend Register.
+  If not passed then the system clock will be used and this is fine on some
+  platforms.
+- snps,burst_len: The AXI burst lenth value of the AXI BUS MODE register.
+
+Examples:
+
+       gmac0: ethernet@e0800000 {
+               compatible = "st,spear600-gmac";
+               reg = <0xe0800000 0x8000>;
+               interrupt-parent = <&vic1>;
+               interrupts = <24 23>;
+               interrupt-names = "macirq", "eth_wake_irq";
+               mac-address = [000000000000]; /* Filled in by U-Boot */
+               max-frame-size = <3800>;
+               phy-mode = "gmii";
+               snps,multicast-filter-bins = <256>;
+               snps,perfect-filter-entries = <128>;
+               clocks = <&clock>;
+               clock-names = "stmmaceth";
+       };