Skip to content

Commit bea3ce7

Browse files
mranostayvinodkoul
authored andcommitted
phy: ti: phy-j721e-wiz: add j721s2-wiz-10g module support
Add support for j721s2-wiz-10g device which is similar to j721e-wiz-10g but uses clock-names interface versus explicitly defining clock nodes within device tree node. Signed-off-by: Matt Ranostay <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent f12faa3 commit bea3ce7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

drivers/phy/ti/phy-j721e-wiz.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ enum wiz_type {
322322
AM64_WIZ_10G,
323323
J7200_WIZ_10G, /* J7200 SR2.0 */
324324
J784S4_WIZ_10G,
325+
J721S2_WIZ_10G,
325326
};
326327

327328
struct wiz_data {
@@ -1000,6 +1001,7 @@ static void wiz_clock_cleanup(struct wiz *wiz, struct device_node *node)
10001001
case AM64_WIZ_10G:
10011002
case J7200_WIZ_10G:
10021003
case J784S4_WIZ_10G:
1004+
case J721S2_WIZ_10G:
10031005
of_clk_del_provider(dev->of_node);
10041006
return;
10051007
default:
@@ -1132,6 +1134,7 @@ static int wiz_clock_init(struct wiz *wiz, struct device_node *node)
11321134
case AM64_WIZ_10G:
11331135
case J7200_WIZ_10G:
11341136
case J784S4_WIZ_10G:
1137+
case J721S2_WIZ_10G:
11351138
ret = wiz_clock_register(wiz);
11361139
if (ret)
11371140
dev_err(dev, "Failed to register wiz clocks\n");
@@ -1214,6 +1217,7 @@ static int wiz_phy_fullrt_div(struct wiz *wiz, int lane)
12141217
break;
12151218
case J721E_WIZ_10G:
12161219
case J7200_WIZ_10G:
1220+
case J721S2_WIZ_10G:
12171221
if (wiz->lane_phy_type[lane] == PHY_TYPE_SGMII)
12181222
return regmap_field_write(wiz->p0_fullrt_div[lane], 0x2);
12191223
break;
@@ -1318,6 +1322,15 @@ static struct wiz_data j784s4_10g_data = {
13181322
.clk_div_sel_num = WIZ_DIV_NUM_CLOCKS_10G,
13191323
};
13201324

1325+
static struct wiz_data j721s2_10g_data = {
1326+
.type = J721S2_WIZ_10G,
1327+
.pll0_refclk_mux_sel = &pll0_refclk_mux_sel,
1328+
.pll1_refclk_mux_sel = &pll1_refclk_mux_sel,
1329+
.refclk_dig_sel = &refclk_dig_sel_10g,
1330+
.clk_mux_sel = clk_mux_sel_10g,
1331+
.clk_div_sel_num = WIZ_DIV_NUM_CLOCKS_10G,
1332+
};
1333+
13211334
static const struct of_device_id wiz_id_table[] = {
13221335
{
13231336
.compatible = "ti,j721e-wiz-16g", .data = &j721e_16g_data,
@@ -1334,6 +1347,9 @@ static const struct of_device_id wiz_id_table[] = {
13341347
{
13351348
.compatible = "ti,j784s4-wiz-10g", .data = &j784s4_10g_data,
13361349
},
1350+
{
1351+
.compatible = "ti,j721s2-wiz-10g", .data = &j721s2_10g_data,
1352+
},
13371353
{}
13381354
};
13391355
MODULE_DEVICE_TABLE(of, wiz_id_table);

0 commit comments

Comments
 (0)