Hello,
I have a custom design which uses an Octavo SIP and it is interfaced to a Marvell 88E1215,to magnetics to RJ45. I can read and set phy registers over mdio, bring the eth interface up and set ip address but thats about it. I cannot seems to send data in or out. I can detect link activity on the port.
My pinmux is as follows, as the phy is connected to the second emac via RGMII2.
rgmii_switch_pins_default: rgmii_switch_pins_default { pinctrl-single,pins = < AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE2) /* (R13) gpmc_a0.rgmii2_tctl */ AM33XX_IOPAD(0x844, PIN_INPUT | MUX_MODE2) /* (V14) gpmc_a1.rgmii2_rctl */ AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE2) /* (U15) gpmc_a6.rgmii2_tclk */ AM33XX_IOPAD(0x85c, PIN_INPUT | MUX_MODE2) /* (T15) gpmc_a7.rgmii2_rclk */ AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE2) /* (V15) gpmc_a5.rgmii2_td0 */ AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE2) /* (R14) gpmc_a4.rgmii2_td1 */ AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE2) /* (T14) gpmc_a3.rgmii2_td2 */ AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE2) /* (U14) gpmc_a2.rgmii2_td3 */ AM33XX_IOPAD(0x86c, PIN_INPUT | MUX_MODE2) /* (V17) gpmc_a11.rgmii2_rd0 */ AM33XX_IOPAD(0x868, PIN_INPUT | MUX_MODE2) /* (T16) gpmc_a10.rgmii2_rd1 */ AM33XX_IOPAD(0x864, PIN_INPUT | MUX_MODE2) /* (U16) gpmc_a9.rgmii2_rd2 */ AM33XX_IOPAD(0x860, PIN_INPUT | MUX_MODE2) /* (V16) gpmc_a8.rgmii2_rd3 */ >; }; /* Optional sleep pin settings. Must manually enter values in the below skeleton. */ rgmii_switch_pins_sleep: rgmii_switch_pins_sleep { pinctrl-single,pins = < AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE2) /* (R13) gpmc_a0.rgmii2_tctl */ AM33XX_IOPAD(0x844, PIN_INPUT | MUX_MODE2) /* (V14) gpmc_a1.rgmii2_rctl */ AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE2) /* (U15) gpmc_a6.rgmii2_tclk */ AM33XX_IOPAD(0x85c, PIN_INPUT | MUX_MODE2) /* (T15) gpmc_a7.rgmii2_rclk */ AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE2) /* (V15) gpmc_a5.rgmii2_td0 */ AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE2) /* (R14) gpmc_a4.rgmii2_td1 */ AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE2) /* (T14) gpmc_a3.rgmii2_td2 */ AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE2) /* (U14) gpmc_a2.rgmii2_td3 */ AM33XX_IOPAD(0x86c, PIN_INPUT | MUX_MODE2) /* (V17) gpmc_a11.rgmii2_rd0 */ AM33XX_IOPAD(0x868, PIN_INPUT | MUX_MODE2) /* (T16) gpmc_a10.rgmii2_rd1 */ AM33XX_IOPAD(0x864, PIN_INPUT | MUX_MODE2) /* (U16) gpmc_a9.rgmii2_rd2 */ AM33XX_IOPAD(0x860, PIN_INPUT | MUX_MODE2) /* (V16) gpmc_a8.rgmii2_rd3 */ >; };
I have the following entries in my device tree (dts)
&davinci_mdio { pinctrl-names = "default", "sleep"; pinctrl-0 = <&davinci_mdio_default>; pinctrl-1 = <&davinci_mdio_sleep>; status = "okay"; /* The expander comes up long after mdio probe */ reset-gpios = <&tca6424 3 GPIO_ACTIVE_LOW>; reset-delay-us = <10000>; }; &cpsw_emac0 { status = "disabled"; phy_id = <&davinci_mdio>, <0>; phy-mode = "rgmii-id"; dual_emac_res_vlan = <1>; }; /*1788 connected to port 1 (RGMII2)*/ &cpsw_emac1 { status = "okay"; phy_id = <&davinci_mdio>, <1>; phy-mode = "rgmii-id"; dual_emac_res_vlan = <2>; }; &mac { status = "okay"; pinctrl-names = "default", "sleep"; pinctrl-0 = <&rgmii_switch_pins_default>; pinctrl-1 = <&rgmii_switch_pins_sleep>; active_slave = <1>; /* This shouldnt be needed but i get odd issues without it...*/ dual_emac = <1>; };
During startup I have the following output.
[ 8.218342] mdio_bus 4a101000.mdio: GPIO lookup for consumer reset [ 8.218363] mdio_bus 4a101000.mdio: using lookup tables for GPIO lookup [ 8.218379] mdio_bus 4a101000.mdio: lookup for GPIO reset failed [ 8.276467] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000 [ 8.284518] davinci_mdio 4a101000.mdio: detected phy mask fffffffd [ 8.309085] libphy: 4a101000.mdio: probed [ 8.313321] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver Marvell 88E1510 [ 8.323832] cpsw 4a100000.ethernet: Detected MACID = 60:b6:e1:66:94:11 [ 8.333132] cpsw 4a100000.ethernet: cpsw: Random MACID = da:fc:6a:49:c2:e5 [ 8.739230] net eth0: initializing cpsw version 1.12 (0) [ 8.744807] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4 [ 8.751584] cpsw 4a100000.ethernet: ALE Table size 1024 [ 8.858112] Marvell 88E1510 4a101000.mdio:01: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
I've put the phy in loopback and run the loopback test (from octavo) and that appears to work. However no ping, etc. Not sure what is going on and hoping someone has some tips.
One thing I had issues with was when I didn't configure the mac in dual mode, I get the initial probe to work but then it seemed confused when ever i tried to communicate with the phy; so after that so I set it to dual mac mode.
Anyway any help appreciated!
Thanks!
Jeff