Hi,
I am trying to configure the Gigabit Ethernet on Linux kernel on my board using P1012 microprocessor, it seems that the configuration is correctly done but I keep getting “ifconfig: SIOCSIFFLAGS: Cannot assign requested address” when trying to configure ips for eth0 or eth1.
My configuration is:
And my device tree:
mdio@24000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
compatible = "fsl,etsec2-mdio";
reg = <0x00024000 0x00001000 0x000b0030 0x00000004>;
phy0: ethernet-phy@0 {
interrupts = <0x00000001 0x00000001 0x00000000 0x00000000>;
reg = <0x00000000>;
device_type= "ethernet-phy";
};
phy1: ethernet-phy@1 {
interrupts = <0x00000002 0x00000001 0x00000000 0x00000000>;
reg = <0x00000001>;
device_type= "ethernet-phy";
};
tbi0: tbi-phy@1E {
device_type = "tbi-phy";
reg = <0x0000001E>;
};
};
mdio@25000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
compatible = "fsl,etsec2-tbi";
reg = <0x00025000 0x00001000 0x000b1030 0x00000004>;
tbi1: tbi-phy@1D {
reg = <0x0000001D>;
device_type = "tbi-phy";
};
};
mdio@26000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
compatible = "fsl,etsec2-tbi";
reg = <0x00026000 0x00001000 0x000b2030 0x00000004>;
tbi2: tbi-phy@1C {
reg = <0x0000001C>;
device_type = "tbi-phy";
};
};
ethernet@b1000 {
phy-handle = <&phy0>;
tbi-handle = <&tbi1>;
phy-connection-type = "sgmii";
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0xb1000 0x1000>;
ranges = <>;
device_type = "network";
model = "eTSEC";
compatible = "fsl,etsec2";
fsl,num_rx_queues = <0x00000008>;
fsl,num_tx_queues = <0x00000008>;
fsl,magic-packet;
local-mac-address = [00 00 00 00 00 00];
queue-group@b1000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0x000b1000 0x00001000>;
interrupts = <0x0000001d 0x00000002 0x00000000 0x00000000 0x0000001e 0x00000002 0x00000000 0x00000000 0x0000001c 0x00000002 0x00000000 0x00000000>;
};
queue-group@b5000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0x000b5000 0x00001000>;
interrupts = <0x0000001e 0x00000002 0x00000000 0x00000000 0x0000001d 0x00000002 0x00000000 0x00000000 0x0000001c 0x00000002 0x00000000 0x00000000>;
};
};
ethernet@b2000 {
phy-handle = <&phy1>;
tbi-handle = <&tbi2>;
phy-connection-type = "sgmii";
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0xb2000 0x1000>;
ranges = <>;
device_type = "network";
model = "eTSEC";
compatible = "fsl,etsec2";
fsl,num_rx_queues = <0x00000008>;
fsl,num_tx_queues = <0x00000008>;
fsl,magic-packet;
local-mac-address = [00 00 00 00 00 00];
queue-group@b2000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0x000b2000 0x00001000>;
interrupts = <0x00000023 0x00000002 0x00000000 0x00000000 0x00000024 0x00000002 0x00000000 0x00000000 0x00000028 0x00000002 0x00000000 0x00000000>;
};
queue-group@b6000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0x000b6000 0x00001000>;
interrupts = <0x00000033 0x00000002 0x00000000 0x00000000 0x00000034 0x00000002 0x00000000 0x00000000 0x00000043 0x00000002 0x00000000 0x00000000>;
};
};
And this is the console output I get related to SGMII configuration:
libphy: Freescale PowerQUICC MII Bus: probed
mdio_bus mdio@ff724000: read 0141 from address 0/2
fsl_pq_mdio_read-miimadd:00000002
mdio_bus mdio@ff724000: read 0dd1 from address 0/3
mdio_bus mdio@ff724000: registered phy ethernet-phy at address 00000000
fsl_pq_mdio_read-miimadd:00000003
mdio_bus mdio@ff724000: read 0141 from address 1/2
fsl_pq_mdio_read-miimadd:00000102
mdio_bus mdio@ff724000: read 0dd1 from address 1/3
mdio_bus mdio@ff724000: registered phy ethernet-phy at address 00000001
fsl_pq_mdio_read-miimadd:00000103
mdio_bus mdio@ff724000: read 0000 from address 1e/2
fsl_pq_mdio_read-miimadd:00001E02
mdio_bus mdio@ff724000: read 0000 from address 1e/3
mdio_bus mdio@ff724000: registered phy tbi-phy at address 0000001E
libphy: Freescale PowerQUICC MII Bus: probed
fsl_pq_mdio_read-miimadd:00001D00
mdio_bus mdio@ff725000: read 0000 from address 1d/2
fsl_pq_mdio_read-miimadd:00001D02
mdio_bus mdio@ff725000: read 0000 from address 1d/3
mdio_bus mdio@ff725000: registered phy tbi-phy at address 0000001D
libphy: Freescale PowerQUICC MII Bus: probed
fsl_pq_mdio_read-miimadd:00001C00
mdio_bus mdio@ff726000: read 0000 from address 1c/2
fsl_pq_mdio_read-miimadd:00001C02
mdio_bus mdio@ff726000: read 0000 from address 1c/3
mdio_bus mdio@ff726000: registered phy tbi-phy at address 0000001C
fsl-gianfar ff7b1000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar ff7b1000.ethernet eth0: mac: 00:00:00:00:00:00
fsl-gianfar ff7b1000.ethernet eth0: Running with NAPI enabled
fsl-gianfar ff7b1000.ethernet eth0: RX BD ring size for Q[0]: 256
fsl-gianfar ff7b1000.ethernet eth0: RX BD ring size for Q[1]: 256
fsl-gianfar ff7b1000.ethernet eth0: TX BD ring size for Q[0]: 256
fsl-gianfar ff7b1000.ethernet eth0: TX BD ring size for Q[1]: 256
fsl-gianfar ff7b2000.ethernet: enabled errata workarounds, flags: 0x4
fsl-gianfar ff7b2000.ethernet eth1: mac: 00:00:00:00:00:00
fsl-gianfar ff7b2000.ethernet eth1: Running with NAPI enabled
fsl-gianfar ff7b2000.ethernet eth1: RX BD ring size for Q[0]: 256
fsl-gianfar ff7b2000.ethernet eth1: RX BD ring size for Q[1]: 256
fsl-gianfar ff7b2000.ethernet eth1: TX BD ring size for Q[0]: 256
fsl-gianfar ff7b2000.ethernet eth1: TX BD ring size for Q[1]: 256
OF: no ranges; cannot translate
fsl-gianfar: probe of soc@ff700000:ethernet@b0000 failed with error -12
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
I have also checked TBI and PHY status registers and both have the auto negotiation complete bit set to 1. Can anybody help me with this problem?
Thanks in advance,
Regards,
Maria
Solved! Go to Solution.
Hello Maria Saiz,
I found an obvious problem in your Kernel boot log, you didn't specify MAC addresses for eth0 and eth1.
Please configure MAC addresses for them in u-boot, here is an example.
eth10addr=00:E0:0C:00:24:0a
eth11addr=00:E0:0C:00:24:0b
eth12addr=00:E0:0C:00:24:0c
eth13addr=00:E0:0C:00:24:0d
eth14addr=00:E0:0C:00:24:0e
eth15addr=00:E0:0C:00:24:0f
eth1addr=00:E0:0C:00:24:01
eth2addr=00:E0:0C:00:24:02
eth3addr=00:E0:0C:00:24:03
eth4addr=00:E0:0C:00:24:04
eth5addr=00:E0:0C:00:24:05
eth6addr=00:E0:0C:00:24:06
eth7addr=00:E0:0C:00:24:07
eth8addr=00:E0:0C:00:24:08
eth9addr=00:E0:0C:00:24:09
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Maria Saiz,
I found an obvious problem in your Kernel boot log, you didn't specify MAC addresses for eth0 and eth1.
Please configure MAC addresses for them in u-boot, here is an example.
eth10addr=00:E0:0C:00:24:0a
eth11addr=00:E0:0C:00:24:0b
eth12addr=00:E0:0C:00:24:0c
eth13addr=00:E0:0C:00:24:0d
eth14addr=00:E0:0C:00:24:0e
eth15addr=00:E0:0C:00:24:0f
eth1addr=00:E0:0C:00:24:01
eth2addr=00:E0:0C:00:24:02
eth3addr=00:E0:0C:00:24:03
eth4addr=00:E0:0C:00:24:04
eth5addr=00:E0:0C:00:24:05
eth6addr=00:E0:0C:00:24:06
eth7addr=00:E0:0C:00:24:07
eth8addr=00:E0:0C:00:24:08
eth9addr=00:E0:0C:00:24:09
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Thank you for your help!!
I was configuring MAC address through Device Tree but did not take into account that whatever I write on the dtb file, the u-boot always rewrites Device Tree MAC addresses with the ones it has been configured with.
I changed uboot MAC addresses and everything worked fine.
Thanks again!