summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-07-28 13:04:47 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-07-28 13:04:47 +0000
commit0dfff33969dd566a8c025b172225596852257062 (patch)
tree2a526678bd5b6bb1effd78add498cffd917561c0
parent3a67208c2553a0d85d1ed0aedba91fd829a53cd5 (diff)
Add RK3399 Type-C PHY clocks.
ok kettenis@
-rw-r--r--sys/dev/fdt/rkclock.c14
-rw-r--r--sys/dev/fdt/rkclock_clocks.h2
2 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/fdt/rkclock.c b/sys/dev/fdt/rkclock.c
index 4e4ea6a819d..43f985fe641 100644
--- a/sys/dev/fdt/rkclock.c
+++ b/sys/dev/fdt/rkclock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rkclock.c,v 1.55 2021/04/07 16:35:02 kettenis Exp $ */
+/* $OpenBSD: rkclock.c,v 1.56 2021/07/28 13:04:46 patrick Exp $ */
/*
* Copyright (c) 2017, 2018 Mark Kettenis <kettenis@openbsd.org>
*
@@ -2194,6 +2194,18 @@ struct rkclock rk3399_clocks[] = {
{ RK3399_PLL_CPLL, RK3399_PLL_GPLL, RK3399_PLL_NPLL }
},
{
+ RK3399_CLK_UPHY0_TCPDCORE, RK3399_CRU_CLKSEL_CON(64),
+ SEL(7, 6), DIV(4, 0),
+ { RK3399_XIN24M, RK3399_CLK_32K, RK3399_PLL_CPLL,
+ RK3399_PLL_GPLL }
+ },
+ {
+ RK3399_CLK_UPHY1_TCPDCORE, RK3399_CRU_CLKSEL_CON(65),
+ SEL(7, 6), DIV(4, 0),
+ { RK3399_XIN24M, RK3399_CLK_32K, RK3399_PLL_CPLL,
+ RK3399_PLL_GPLL }
+ },
+ {
RK3399_DCLK_VOP0, RK3399_CRU_CLKSEL_CON(49),
SEL(11, 11), 0,
{ RK3399_DCLK_VOP0_DIV, RK3399_DCLK_VOP0_FRAC },
diff --git a/sys/dev/fdt/rkclock_clocks.h b/sys/dev/fdt/rkclock_clocks.h
index 4885a61c5ab..f75afb51f8d 100644
--- a/sys/dev/fdt/rkclock_clocks.h
+++ b/sys/dev/fdt/rkclock_clocks.h
@@ -187,6 +187,8 @@
#define RK3399_CLK_MAC_RX 103
#define RK3399_CLK_MAC_TX 104
#define RK3399_CLK_MAC 105
+#define RK3399_CLK_UPHY0_TCPDCORE 126
+#define RK3399_CLK_UPHY1_TCPDCORE 128
#define RK3399_CLK_USB3OTG0_REF 129
#define RK3399_CLK_USB3OTG1_REF 130
#define RK3399_CLK_USB3OTG0_SUSPEND 131