Part Number: AM4376
Tool/software: Linux
Hi, I hope if there’s someone who can solve my problem:
When I configured 2 phy chips KSZ9031 under “dual_emac” mode, one was connectted to RGMII1, the other was RGMII2, I could acquire IP address and got connected to the internet. However, as I could ONLY connect the phy chip to Pin RGMII2 (Pin RGMII1 needed to be saved for other functions), I couldn’t configure it successfully. No matter how many times I had tried!!!
Below is the configuration I think that’s getting close (still failed though)...
cpsw_default: cpsw_default {
pinctrl-single,pins = <
/* Slave 1 */
0x040 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a0.rgmii2_tctl */
0x044 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a1.rgmii2_rctl */
0x048 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a2.rgmii2_td3 */
0x04c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a3.rgmii2_td2 */
0x050 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a4.rgmii2_td1 */
0x054 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a5.rgmii2_td0 */
0x058 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* gpmc_a6.rgmii2_tclk */
0x05c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a7.rgmii2_rclk */
0x060 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a8.rgmii2_rd3 */
0x064 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a9.rgmii2_rd2 */
0x068 (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a10.rgmii2_rd1 */
0X06c (PIN_INPUT_PULLDOWN | MUX_MODE2) /* gpmc_a11.rgmii2_rd0 */
>;
};
cpsw_sleep: cpsw_sleep {
pinctrl-single,pins = <
0x040 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x044 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x048 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x04c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x050 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x054 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x058 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x05c (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x060 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x064 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x068 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0X06c (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
&mac {
slaves = <1>;//
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
// dual_emac = <0>;
active_slave = <1>;
status = "okay";
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <1>;//emdoor
phy-mode = "rgmii";
};
Below is the kernel log:
libphy: 4a101000.mdio: probed
davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
Detected MACID = c4:be:84:cb:62:f0
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 344K (c086b000 - c08c1000)
Starting logging: OK
Calculating module dependencies ...
Loading modules: cryptodev dwc3 dwc3-omap
Populating /dev using udev: udevd[929]: starting version 1.5.3
done
Initializing random number generator... done.
Starting network...
net eth0: initializing cpsw version 1.15 (0)
net eth0: phy found : id is : 0x221622
udhcpc (v1.22.1) started
Sending discover...
libphy: 4a101000.mdio:01 - Link is Up - 100/Full
Sending discover...
Sending discover...
No lease, failing
When I run “ifconfig”, I can get “eth0”
eth0 Link encap:Ethernet HWaddr C4:BE:84:CB:62:F0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:684 (684.0 B)
Interrupt:72
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)