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

phy: ti: phy-j721e-wiz: add j784s4-wiz-10g module support

Add support for j784s4-wiz-10g device which has two core reference
clocks (e.g core_ref_clk, core_ref1_clk) which requires an additional
mux selection option.

Acked-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Matt Ranostay <mranostay@ti.com>
Link: https://lore.kernel.org/r/20221015201123.195477-3-mranostay@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Matt Ranostay and committed by
Vinod Koul
e27ecef8 cbdbe312

+22
+22
drivers/phy/ti/phy-j721e-wiz.c
··· 81 81 static const struct reg_field phy_en_refclk = REG_FIELD(WIZ_SERDES_RST, 30, 30); 82 82 static const struct reg_field pll1_refclk_mux_sel = 83 83 REG_FIELD(WIZ_SERDES_RST, 29, 29); 84 + static const struct reg_field pll1_refclk_mux_sel_2 = 85 + REG_FIELD(WIZ_SERDES_RST, 22, 23); 84 86 static const struct reg_field pll0_refclk_mux_sel = 85 87 REG_FIELD(WIZ_SERDES_RST, 28, 28); 88 + static const struct reg_field pll0_refclk_mux_sel_2 = 89 + REG_FIELD(WIZ_SERDES_RST, 28, 29); 86 90 static const struct reg_field refclk_dig_sel_16g = 87 91 REG_FIELD(WIZ_SERDES_RST, 24, 25); 88 92 static const struct reg_field refclk_dig_sel_10g = 89 93 REG_FIELD(WIZ_SERDES_RST, 24, 24); 90 94 static const struct reg_field pma_cmn_refclk_int_mode = 91 95 REG_FIELD(WIZ_SERDES_TOP_CTRL, 28, 29); 96 + static const struct reg_field pma_cmn_refclk1_int_mode = 97 + REG_FIELD(WIZ_SERDES_TOP_CTRL, 20, 21); 92 98 static const struct reg_field pma_cmn_refclk_mode = 93 99 REG_FIELD(WIZ_SERDES_TOP_CTRL, 30, 31); 94 100 static const struct reg_field pma_cmn_refclk_dig_div = ··· 321 315 J721E_WIZ_10G, /* Also for J7200 SR1.0 */ 322 316 AM64_WIZ_10G, 323 317 J7200_WIZ_10G, /* J7200 SR2.0 */ 318 + J784S4_WIZ_10G, 324 319 }; 325 320 326 321 struct wiz_data { ··· 999 992 switch (wiz->type) { 1000 993 case AM64_WIZ_10G: 1001 994 case J7200_WIZ_10G: 995 + case J784S4_WIZ_10G: 1002 996 of_clk_del_provider(dev->of_node); 1003 997 return; 1004 998 default: ··· 1131 1123 switch (wiz->type) { 1132 1124 case AM64_WIZ_10G: 1133 1125 case J7200_WIZ_10G: 1126 + case J784S4_WIZ_10G: 1134 1127 ret = wiz_clock_register(wiz); 1135 1128 if (ret) 1136 1129 dev_err(dev, "Failed to register wiz clocks\n"); ··· 1308 1299 .clk_div_sel_num = WIZ_DIV_NUM_CLOCKS_10G, 1309 1300 }; 1310 1301 1302 + static struct wiz_data j784s4_10g_data = { 1303 + .type = J784S4_WIZ_10G, 1304 + .pll0_refclk_mux_sel = &pll0_refclk_mux_sel_2, 1305 + .pll1_refclk_mux_sel = &pll1_refclk_mux_sel_2, 1306 + .refclk_dig_sel = &refclk_dig_sel_16g, 1307 + .pma_cmn_refclk1_int_mode = &pma_cmn_refclk1_int_mode, 1308 + .clk_mux_sel = clk_mux_sel_10g_2_refclk, 1309 + .clk_div_sel_num = WIZ_DIV_NUM_CLOCKS_10G, 1310 + }; 1311 + 1311 1312 static const struct of_device_id wiz_id_table[] = { 1312 1313 { 1313 1314 .compatible = "ti,j721e-wiz-16g", .data = &j721e_16g_data, ··· 1330 1311 }, 1331 1312 { 1332 1313 .compatible = "ti,j7200-wiz-10g", .data = &j7200_pg2_10g_data, 1314 + }, 1315 + { 1316 + .compatible = "ti,j784s4-wiz-10g", .data = &j784s4_10g_data, 1333 1317 }, 1334 1318 {} 1335 1319 };