Android 10
Apalis IMX8QM V1.1B
We have a custom board using an Apalis i.mx8 Quad Max running official Android 10.
We are trying to use both eth0 and eth1 ports. We have a 2nd KSZ9131 phy on our custom board. We can bring up each phy individually OK (ping etc) but cannot bring up and use both phy’s.
We have the 2nd phy RGMII pins set to 2.5 volts and the LDO on Apalis board set to 2.5 volts. This all works OK.
(1)
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth0
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n eth0
class main
disabled
oneshot
Works OK.
(2)
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth1
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n eth1
class main
disabled
oneshot
Works OK.
(3)
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth0 eth1
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n eth0 eth1
class main
disabled
oneshot
Does NOT work OK.
The issues appears to be -
(1) Bringing up second ethernet port automatically
(2) The ipv4 address of the 2nd port
apalis_8qm:/ # ifconfig eth1 up
[ 281.500581] Microchip KSZ9131 Gigabit PHY 5b050000.ethernet-2:07: attached PHY driver [Microchip KSZ9131 Gigabit PHY] (mii_bus:phy_addr=5b050000.ethernet-2:07, irq=POLL)
apalis_8qm:/ # [ 284.592335] fec 5b050000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
[ 284.600353] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
apalis_8qm:/ $ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:14:2d:67:d5:03 Driver fec
inet addr:192.168.0.92 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c7fe:c946:c301:ef9f/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:912 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:143444 TX bytes:5459
apalis_8qm:/ # ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:14:2d:77:d5:03 Driver fec
inet6 addr: fe80::214:2dff:fe77:d503/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16389 TX bytes:746
apalis_8qm:/ # ping -I eth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.0.92 eth0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=49.1 ms
apalis_8qm:/ # ping -I eth1 8.8.8.8
ping: Warning: source address might be selected on device other than eth1.
PING 8.8.8.8 (8.8.8.8) from 0.0.0.0 eth1: 56(84) bytes of data.
From 127.0.0.1: icmp_seq=1 Destination Host Unreachable
&fec1 {
pinctrl-names = “default”, “sleep”;
pinctrl-0 = <&pinctrl_fec1>;
pinctrl-1 = <&pinctrl_fec1_sleep>;
fsl,magic-packet;
fsl,mii-exclusive;
fsl,rgmii_txc_dly;
phy-handle = <ðphy0>;
phy-mode = “rgmii-rxid”;
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c22";
interrupt-parent = <&lsio_gpio1>;
interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
micrel,led-mode = <0>;
power-domains = <&pd IMX_SC_R_BOARD_R0>;
reg = <7>;
};
};
};
&fec2 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_fec2>;
fsl,magic-packet;
nvmem-cells = <&fec_mac1>;
nvmem-cell-names = “mac-address”;
fsl,mii-exclusive;
fsl,rgmii_txc_dly;
phy-handle = <ðphy1>;
phy-mode = “rgmii-id”;
phy-reset-duration = <100>;
phy-reset-gpios = <&pca9535_1 10 GPIO_ACTIVE_LOW>; // PCA9535 gpio pin 10
phy-reset-post-delay = <100>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy1: ethernet-phy@7 {
compatible = "ethernet-phy-ieee802.3-c22";
micrel,led-mode = <0>;
power-domains = <&pd IMX_SC_R_BOARD_R0>;
reg = <7>;
};
};
};