Skip to content

Commit c64daf3

Browse files
khayash1bebarino
authored andcommitted
clk: uniphier: Add SoC-glue clock source selector support for Pro4
Add SoC-glue clock source selector for ahci controller on UniPhier SoCs. Currently this supports Pro4 only. Signed-off-by: Kunihiko Hayashi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent d911ed9 commit c64daf3

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

drivers/clk/uniphier/clk-uniphier-core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ static const struct of_device_id uniphier_clk_match[] = {
210210
.compatible = "socionext,uniphier-nx1-peri-clock",
211211
.data = uniphier_pro4_peri_clk_data,
212212
},
213+
/* SoC-glue clock */
214+
{
215+
.compatible = "socionext,uniphier-pro4-sg-clock",
216+
.data = uniphier_pro4_sg_clk_data,
217+
},
213218
{ /* sentinel */ }
214219
};
215220

drivers/clk/uniphier/clk-uniphier-sys.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,20 @@ const struct uniphier_clk_data uniphier_nx1_sys_clk_data[] = {
330330
"cpll/32"),
331331
{ /* sentinel */ }
332332
};
333+
334+
const struct uniphier_clk_data uniphier_pro4_sg_clk_data[] = {
335+
UNIPHIER_CLK_DIV("gpll", 4),
336+
{
337+
.name = "sata-ref",
338+
.type = UNIPHIER_CLK_TYPE_MUX,
339+
.idx = 0,
340+
.data.mux = {
341+
.parent_names = { "gpll/4", "ref", },
342+
.num_parents = 2,
343+
.reg = 0x1a28,
344+
.masks = { 0x1, 0x1, },
345+
.vals = { 0x0, 0x1, },
346+
},
347+
},
348+
{ /* sentinel */ }
349+
};

drivers/clk/uniphier/clk-uniphier.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,6 @@ extern const struct uniphier_clk_data uniphier_ld4_mio_clk_data[];
155155
extern const struct uniphier_clk_data uniphier_pro5_sd_clk_data[];
156156
extern const struct uniphier_clk_data uniphier_ld4_peri_clk_data[];
157157
extern const struct uniphier_clk_data uniphier_pro4_peri_clk_data[];
158+
extern const struct uniphier_clk_data uniphier_pro4_sg_clk_data[];
158159

159160
#endif /* __CLK_UNIPHIER_H__ */

0 commit comments

Comments
 (0)