summaryrefslogtreecommitdiff
path: root/sys/dev/fdt/rkclock.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-04-08 21:32:28 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-04-08 21:32:28 +0000
commitcd56ef8be5f639e9b0c1646f091e326d98ed4605 (patch)
treeddbf4c9a5c536902f7bd4abad215cc170721ae2d /sys/dev/fdt/rkclock.c
parent460cc77ae8bf78c849943836f3e10af2cbc95209 (diff)
Add RK3328 Crypto/RNG clocks.
Diffstat (limited to 'sys/dev/fdt/rkclock.c')
-rw-r--r--sys/dev/fdt/rkclock.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/fdt/rkclock.c b/sys/dev/fdt/rkclock.c
index 1d72db6b7f3..ffd18eda634 100644
--- a/sys/dev/fdt/rkclock.c
+++ b/sys/dev/fdt/rkclock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rkclock.c,v 1.51 2020/03/01 17:57:33 kettenis Exp $ */
+/* $OpenBSD: rkclock.c,v 1.52 2020/04/08 21:32:27 kettenis Exp $ */
/*
* Copyright (c) 2017, 2018 Mark Kettenis <kettenis@openbsd.org>
*
@@ -883,6 +883,11 @@ struct rkclock rk3328_clocks[] = {
{ RK3328_PLL_CPLL, RK3328_PLL_GPLL }
},
{
+ RK3328_CLK_CRYPTO, RK3328_CRU_CLKSEL_CON(20),
+ SEL(7, 7), DIV(4, 0),
+ { RK3328_PLL_CPLL, RK3328_PLL_GPLL }
+ },
+ {
RK3328_CLK_PDM, RK3328_CRU_CLKSEL_CON(20),
SEL(15, 14), DIV(12, 8),
{ RK3328_PLL_CPLL, RK3328_PLL_GPLL, RK3328_PLL_APLL },
@@ -1422,6 +1427,9 @@ rk3328_set_frequency(void *cookie, uint32_t *cells, uint32_t freq)
RK3328_CRU_VOP_DCLK_SRC_SEL_SHIFT;
idx = (mux == 0) ? RK3328_HDMIPHY : RK3328_DCLK_LCDC_SRC;
return rk3328_set_frequency(sc, &idx, freq);
+ case RK3328_HCLK_CRYPTO_SLV:
+ idx = RK3328_HCLK_BUS_PRE;
+ return rk3328_set_frequency(sc, &idx, freq);
default:
break;
}