net: stmmac: starfive_dmac: Add phy interface settings
authorSamin Guo <samin.guo@starfivetech.com>
Thu, 2 Mar 2023 11:52:37 +0000 (19:52 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 28 Mar 2023 03:23:11 +0000 (12:23 +0900)
commiteccd72f29a83ef44a2dda233981728dae02a67af
tree5df3318639a59e117bfc29daa5e4ecc1f6f6a8a0
parent8b7fce6c6957878bb70aca19810880d2f2099e02
net: stmmac: starfive_dmac: 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>

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