phy: ti: gmii-sel: retrieve ports number and base offset from dt
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 28 Aug 2020 20:19:43 +0000 (23:19 +0300)
committerVinod Koul <vkoul@kernel.org>
Tue, 8 Sep 2020 10:23:10 +0000 (15:53 +0530)
commit7f78322cdd67c7b01b0f0723b140a04ad8fcec7b
tree8e1e4e10b66bb075a6ab0ea07e1fc5a5026c3b83
parentd3fa20b97c779e1dfd341e65a3b84eb1ad650ae7
phy: ti: gmii-sel: retrieve ports number and base offset from dt

On K3 AM654x/J721E platforms the Port MII mode selection register(s) have
similar format and placed in the System Control Module (SCM) module
sequentially as one register per port, but, depending SOC and CPSW
instance, the base offset and number of ports can be different.

Hence, add possibility to retrieve number of ports and base registers
offset from DT and support for max possible number of ports supported by K3
SoCs like J721E.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Link: https://lore.kernel.org/r/20200828201943.29155-4-grygorii.strashko@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/ti/phy-gmii-sel.c