2021-04-23 02:09 AM
Hello,
we want to bring up our own board with stm32mp157c. Processor is connected to a Microchip LAN8720 through RMII.
I configured device tree as described here:
Actual device tree configuration:
ðernet0{
pinctrl-names = "default", "sleep";
pinctrl-0 = <ð1_pins_mx>;
pinctrl-1 = <ð1_sleep_pins_mx>;
status = "okay";
phy-mode = "rmii";
max-speed = <100>;
phy-handle = <&phy0>;
mdio0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@1 {
reg = <1>;
};
};
So far so good. Controller is booting and during boot up it seems that PHY driver is loaded (Output is very equal to eval board we have). So I think it's ok.
~# dmesg | grep ethernet
[ 2.902084] stm32-dwmac 5800a000.ethernet: IRQ eth_lpi not found
[ 2.906916] stm32-dwmac 5800a000.ethernet: PTP uses main clock
[ 2.912451] stm32-dwmac 5800a000.ethernet: no reset control found
[ 2.918606] stm32-dwmac 5800a000.ethernet: No phy clock provided...
[ 2.925447] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42
[ 2.931812] stm32-dwmac 5800a000.ethernet: DWMAC4/5
[ 2.936716] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported
[ 2.943976] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported
[ 2.951296] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported
[ 2.958155] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported
[ 2.964388] stm32-dwmac 5800a000.ethernet: TSO supported
[ 2.969711] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.977541] stm32-dwmac 5800a000.ethernet: device MAC address a6:2c:4f:75:42:86
[ 2.984804] stm32-dwmac 5800a000.ethernet: TSO feature enabled
[ 16.160688] using random self ethernet address
[ 16.163690] using random host ethernet address
[ 16.966833] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:01] driver [SMSC LAN8710/LAN8720]
[ 17.029274] stm32-dwmac 5800a000.ethernet eth0: No Safety Features support found
[ 17.048939] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[ 17.074152] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock
[ 17.097033] stm32-dwmac 5800a000.ethernet eth0: configuring for phy/rmii link mode
[ 19.209137] stm32-dwmac 5800a000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
Now problem is that controller do not get a IP address.
eth0 Link encap:Ethernet HWaddr BA:C6:C4:06:6B:E4
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:242 errors:0 dropped:0 overruns:0 frame:0
TX packets:427 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17388 (16.9 KiB) TX bytes:72326 (70.6 KiB)
Interrupt:50 Base address:0x4000
Also tried with static IP. But I cannot ping my router.
Hardware is ok. I can measure data on RXD0 and RXD1 on PHY chip. I can also measure signals on TX_EN, TXD0 or TXD1 of PHY.
But seems that PHY is not sending on TX_P and TX_N pins.
Do I have to configure something else in mdio node of device tree to be able to sent via LAN8720?
Or something wrong with my device tree config?
Any help would be appreciated. Thanks!
Kind regards
Dmn
2021-04-23 03:45 AM
Do you have a DHCP sever in your network running? Does it give out IP number to unknown hardware, otherwise make the MAC known.
2021-04-26 02:58 AM
Dear @Uwe Bonnes
yes, dhcp server is active. I have also eval board which gets an ip address.
How do I make MAC known?
Never heard about that.
Thought that the processor used its own MAC as soon as it recognized the driver?!