Other Parts Discussed in Thread: DP83822I
Hi
I've created a custom board, based on BeagleBone Black. I'm using am3352.
I have 1 Ethernet, just like BBB, but I'm using rmii instead of mii.
I've created the configuration according to this tutorial.
I have based the .dts and _defconfig files on BBB files
I've changed the mux.c and .dts files according to PINMUX TOOL:
mux.c
static struct module_pin_mux rmii1_pin_mux[] = { {OFFSET(mdio_clk), MODE(0) | PULLUP_EN}, /* MDIO_CLK */ {OFFSET(mdio_data), MODE(0) | RXACTIVE | PULLUP_EN}, /* MDIO_DATA */ {OFFSET(mii1_crs), MODE(3) | RXACTIVE}, /* MII1_CRS */ {OFFSET(mii1_rxerr), MODE(3) | RXACTIVE}, /* MII1_RXERR */ {OFFSET(mii1_txen), MODE(3)}, /* MII1_TXEN */ {OFFSET(mii1_txd1), MODE(3)}, /* MII1_TXD1 */ {OFFSET(mii1_txd0), MODE(3)}, /* MII1_TXD0 */ {OFFSET(mii1_rxd1), MODE(3) | RXACTIVE}, /* MII1_RXD1 */ {OFFSET(mii1_rxd0), MODE(3) | RXACTIVE}, /* MII1_RXD0 */ {OFFSET(rmii1_refclk), MODE(1) | RXACTIVE}, /* RMII1_REFCLK */ {-1}, };
.dts
cpsw_default: cpsw_default { pinctrl-single,pins = < /* Slave 1 */ AM33XX_IOPAD(0x90c, PIN_INPUT_PULLUP | MUX_MODE1) /* (H17) gmii1_crs.rmii1_crs_dv */ AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE1) /* (J15) gmii1_rxer.rmii1_rxer */ AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (J16) gmii1_txen.rmii1_txen */ AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K17) gmii1_txd0.rmii1_txd0 */ AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (K16) gmii1_txd1.rmii1_txd1 */ AM33XX_IOPAD(0x940, PIN_INPUT_PULLUP | MUX_MODE1) /* (M16) gmii1_rxd0.rmii1_rxd0 */ AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE1) /* (L15) gmii1_rxd1.rmii1_rxd1 */ AM33XX_IOPAD(0x944, PIN_INPUT_PULLUP | MUX_MODE0) /* (H18) rmii1_refclk.rmii1_refclk */ >; };
I'm using DP83822I, and refering to this documentation link, I've changed the 0x17 register to "enable RMII mode of operation".
The u-boot is recognizing the device
=> mii device MII devices: 'ethernet@4a100000' Current device: 'ethernet@4a100000' => mii info 1 PHY 0x01: OUI = 0x80028, Model = 0x24, Rev = 0x00, 100baseT, FDX => mii read 1 0x17 0065 => mii dump 1 0 0. (3100) -- PHY control register -- (8000:0000) 0.15 = 0 reset (4000:0000) 0.14 = 0 loopback (2040:2000) 0. 6,13 = b01 speed selection = 100 Mbps (1000:1000) 0.12 = 1 A/N enable (0800:0000) 0.11 = 0 power-down (0400:0000) 0.10 = 0 isolate (0200:0000) 0. 9 = 0 restart A/N (0100:0100) 0. 8 = 1 duplex = full (0080:0000) 0. 7 = 0 collision test enable (003f:0000) 0. 5- 0 = 0 (reserved) => mii dump 1 1 1. (786d) -- PHY status register -- (8000:0000) 1.15 = 0 100BASE-T4 able (4000:4000) 1.14 = 1 100BASE-X full duplex able (2000:2000) 1.13 = 1 100BASE-X half duplex able (1000:1000) 1.12 = 1 10 Mbps full duplex able (0800:0800) 1.11 = 1 10 Mbps half duplex able (0400:0000) 1.10 = 0 100BASE-T2 full duplex able (0200:0000) 1. 9 = 0 100BASE-T2 half duplex able (0100:0000) 1. 8 = 0 extended status (0080:0000) 1. 7 = 0 (reserved) (0040:0040) 1. 6 = 1 MF preamble suppression (0020:0020) 1. 5 = 1 A/N complete (0010:0000) 1. 4 = 0 remote fault (0008:0008) 1. 3 = 1 A/N able (0004:0004) 1. 2 = 1 link status (0002:0000) 1. 1 = 0 jabber detect (0001:0001) 1. 0 = 1 extended capabilities
The u-boot is recognizing if Ethernet cable is plugged or is not plugged.
When I try to use "dhcp" command, the u-boot is trying a couple times but with no success.
Using Wireshark I can't see any traffic regarding ARP protocol.
What else should I do to make rmii work?