net: stmmac: dwmac-starfive: Add phy interface settings
authorSamin Guo <samin.guo@starfivetech.com>
Mon, 17 Apr 2023 10:02:51 +0000 (18:02 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Apr 2023 11:13:41 +0000 (13:13 +0200)
commitb4a5afa51ceecab128b301da3896f0d0110ec347
tree4872f70d131b0af71b608ff2a38a1a21209591f6
parent4bd3bb7b452690a939c3f327104a557e1b9876b7
net: stmmac: dwmac-starfive: Add phy interface settings

dwmac supports multiple modess. When working under rmii and rgmii,
you need to set different phy interfaces.

According to the dwmac document, when working in rmii, it needs to be
set to 0x4, and rgmii needs to be set to 0x1.

The phy interface needs to be set in syscon, the format is as follows:
starfive,syscon: <&syscon, offset, shift>

Tested-by: Tommaso Merciai <tomm.merciai@gmail.com>
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c