DART-6UL Ethernet: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{PageHeader|DART-6UL - Ethernet}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__
{{PageHeader|DART-6UL - Ethernet}} {{DocImage|category1=DART-6UL|category2=Yocto}} __toc__
= Testing =
There are 2 100B/s ports on the kit. eth0, eth1.
There are 2 100B/s ports on the kit. eth0, eth1.
Make sure you don't connect both of them to the same network.
Make sure you don't connect both of them to the same network.
Line 10: Line 11:
<pre>$ iperf -c 192.168.1.189 -u -b90M
<pre>$ iperf -c 192.168.1.189 -u -b90M
</pre>
</pre>
= Using only one Ethernet port =
Apply the following patch to the Linux kernel source, for removing the second Ethernet port, in case your own custom carrier board only has one and doesn't have the second Ethernet phy:
<pre>
diff --git a/arch/arm/boot/dts/imx6ul-var-dart.dtsi b/arch/arm/boot/dts/imx6ul-var-dart.dtsi
index 6ccbca1..6931f79 100644
--- a/arch/arm/boot/dts/imx6ul-var-dart.dtsi
+++ b/arch/arm/boot/dts/imx6ul-var-dart.dtsi
@@ -163,16 +163,6 @@
        phy-reset-duration=<100>;
        phy-handle = <&ethphy0>;
        status = "okay";
-};
-
-&fec2 {
-      pinctrl-names = "default";
-      pinctrl-0 = <&pinctrl_enet2>;
-      phy-mode = "rmii";
-      phy-handle = <&ethphy1>;
-      phy-reset-gpios=<&gpio1 10 1>;
-      phy-reset-duration=<100>;
-      status = "okay";
        mdio {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -184,14 +174,6 @@
                        clock-names = "rmii-ref";
                        reg = <1>;
                };
-
-              ethphy1: ethernet-phy@3 {
-                      compatible = "ethernet-phy-ieee802.3-c22";
-                      micrel,rmii-reference-clock-select-25-mhz;
-                      clocks = <&rmii_ref_clk>;
-                      clock-names = "rmii-ref";
-                      reg = <3>;
-              };
        };
};
@@ -463,8 +445,8 @@
                                MX6UL_PAD_CSI_HSYNC__GPIO4_IO20        0x1b0b0 /* LED 1 */
                                MX6UL_PAD_CSI_DATA00__GPIO4_IO21        0x1b0b0 /* LED 2 */
                                MX6UL_PAD_GPIO1_IO00__GPIO1_IO00        0x17059 /* User Button */
-                              MX6UL_PAD_GPIO1_IO07__ENET2_MDC        0x1b0b0
-                              MX6UL_PAD_GPIO1_IO06__ENET2_MDIO        0x1b0b0
+                              MX6UL_PAD_GPIO1_IO07__ENET1_MDC        0x1b0b0
+                              MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b0b0
                                MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04      0x1b0b0 /* BT Enable */
                                MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00      0x1b0b0
                        >;
@@ -483,20 +465,6 @@
                        >;
                };
-              pinctrl_enet2: enet2grp {
-                      fsl,pins = <
-                              MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN      0x1b0b0
-                              MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER      0x1b0b0
-                              MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0
-                              MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0
-                              MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN      0x1b0b0
-                              MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0
-                              MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0
-                              MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2  0x4001b031
-                              MX6UL_PAD_JTAG_MOD__GPIO1_IO10          0x1b0b0
-                      >;
-              };
-
                pinctrl_flexcan1: flexcan1grp{
                        fsl,pins = <
                                MX6UL_PAD_LCD_DATA09__FLEXCAN1_RX      0x1b020
</pre>
Note: You can follow the [[DART-6UL_Yocto_Jethro_Build_Linux_out_of_tree|Build Linux from source code]] guide to get the Linux kernel source, apply the above patch, build ''only'' the device tree and copy it to your SD card.

Revision as of 17:21, 14 November 2016

DART-6UL - Ethernet

Testing

There are 2 100B/s ports on the kit. eth0, eth1. Make sure you don't connect both of them to the same network.

On Target:

$ ifconfig
$ iperf -s -u

On Host:

$ iperf -c 192.168.1.189 -u -b90M

Using only one Ethernet port

Apply the following patch to the Linux kernel source, for removing the second Ethernet port, in case your own custom carrier board only has one and doesn't have the second Ethernet phy:

diff --git a/arch/arm/boot/dts/imx6ul-var-dart.dtsi b/arch/arm/boot/dts/imx6ul-var-dart.dtsi
index 6ccbca1..6931f79 100644
--- a/arch/arm/boot/dts/imx6ul-var-dart.dtsi
+++ b/arch/arm/boot/dts/imx6ul-var-dart.dtsi
@@ -163,16 +163,6 @@
        phy-reset-duration=<100>;
        phy-handle = <&ethphy0>;
        status = "okay";
-};
-
-&fec2 {
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_enet2>;
-       phy-mode = "rmii";
-       phy-handle = <&ethphy1>;
-       phy-reset-gpios=<&gpio1 10 1>;
-       phy-reset-duration=<100>;
-       status = "okay";
        mdio {
                #address-cells = <1>;
                #size-cells = <0>;
@@ -184,14 +174,6 @@
                        clock-names = "rmii-ref";
                        reg = <1>;
                };
-
-               ethphy1: ethernet-phy@3 {
-                       compatible = "ethernet-phy-ieee802.3-c22";
-                       micrel,rmii-reference-clock-select-25-mhz;
-                       clocks = <&rmii_ref_clk>;
-                       clock-names = "rmii-ref";
-                       reg = <3>;
-               };
        };
 };

@@ -463,8 +445,8 @@
                                MX6UL_PAD_CSI_HSYNC__GPIO4_IO20         0x1b0b0 /* LED 1 */
                                MX6UL_PAD_CSI_DATA00__GPIO4_IO21        0x1b0b0 /* LED 2 */
                                MX6UL_PAD_GPIO1_IO00__GPIO1_IO00        0x17059 /* User Button */
-                               MX6UL_PAD_GPIO1_IO07__ENET2_MDC         0x1b0b0
-                               MX6UL_PAD_GPIO1_IO06__ENET2_MDIO        0x1b0b0
+                               MX6UL_PAD_GPIO1_IO07__ENET1_MDC         0x1b0b0
+                               MX6UL_PAD_GPIO1_IO06__ENET1_MDIO        0x1b0b0
                                MX6UL_PAD_SNVS_TAMPER4__GPIO5_IO04      0x1b0b0 /* BT Enable */
                                MX6UL_PAD_SNVS_TAMPER0__GPIO5_IO00      0x1b0b0
                        >;
@@ -483,20 +465,6 @@
                        >;
                };

-               pinctrl_enet2: enet2grp {
-                       fsl,pins = <
-                               MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN      0x1b0b0
-                               MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER      0x1b0b0
-                               MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0
-                               MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0
-                               MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN      0x1b0b0
-                               MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0
-                               MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0
-                               MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2  0x4001b031
-                               MX6UL_PAD_JTAG_MOD__GPIO1_IO10          0x1b0b0
-                       >;
-               };
-
                pinctrl_flexcan1: flexcan1grp{
                        fsl,pins = <
                                MX6UL_PAD_LCD_DATA09__FLEXCAN1_RX       0x1b020

Note: You can follow the Build Linux from source code guide to get the Linux kernel source, apply the above patch, build only the device tree and copy it to your SD card.