Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: ti: gmii-sel: add support for am654x/j721e soc

TI AM654x/J721E SoCs have the same PHY interface selection mechanism for
CPSWx subsystem as TI SoCs (AM3/4/5/DRA7), but registers and bit-fields
placement is different.

This patch adds corresponding support for TI AM654x/J721E SoCs PHY
interface selection.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>

authored by

Grygorii Strashko and committed by
Kishon Vijay Abraham I
d9aa91df 74e29703

+19
+19
drivers/phy/ti/phy-gmii-sel.c
··· 170 170 .regfields = phy_gmii_sel_fields_am33xx, 171 171 }; 172 172 173 + static const 174 + struct reg_field phy_gmii_sel_fields_am654[][PHY_GMII_SEL_LAST] = { 175 + { 176 + [PHY_GMII_SEL_PORT_MODE] = REG_FIELD(0x4040, 0, 1), 177 + [PHY_GMII_SEL_RGMII_ID_MODE] = REG_FIELD((~0), 0, 0), 178 + [PHY_GMII_SEL_RMII_IO_CLK_EN] = REG_FIELD((~0), 0, 0), 179 + }, 180 + }; 181 + 182 + static const 183 + struct phy_gmii_sel_soc_data phy_gmii_sel_soc_am654 = { 184 + .num_ports = 1, 185 + .regfields = phy_gmii_sel_fields_am654, 186 + }; 187 + 173 188 static const struct of_device_id phy_gmii_sel_id_table[] = { 174 189 { 175 190 .compatible = "ti,am3352-phy-gmii-sel", ··· 201 186 { 202 187 .compatible = "ti,dm814-phy-gmii-sel", 203 188 .data = &phy_gmii_sel_soc_dm814, 189 + }, 190 + { 191 + .compatible = "ti,am654-phy-gmii-sel", 192 + .data = &phy_gmii_sel_soc_am654, 204 193 }, 205 194 {} 206 195 };