aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2018-04-26 21:40:05 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2018-04-26 21:40:05 +0000
commitd40a1b91c0f111f277680038b189f7da4367f5c1 (patch)
tree1e3abc33a47785b2d1e3ece0227f7181c37e1176 /sys/arm64
parenta59a485e79cdf236e0d6ce5d3e9296fd958c7b38 (diff)
downloadsrc-d40a1b91c0f111f277680038b189f7da4367f5c1.tar.gz
src-d40a1b91c0f111f277680038b189f7da4367f5c1.zip
arm64: rockchip: RK3328 CRU Add gpio gates
Add the gates for the gpio controller in order to properly support them.
Notes
Notes: svn path=/head/; revision=333040
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/rockchip/clk/rk3328_cru.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/arm64/rockchip/clk/rk3328_cru.c b/sys/arm64/rockchip/clk/rk3328_cru.c
index 701b66edc912..a7cdaf3679c9 100644
--- a/sys/arm64/rockchip/clk/rk3328_cru.c
+++ b/sys/arm64/rockchip/clk/rk3328_cru.c
@@ -52,11 +52,15 @@ __FBSDID("$FreeBSD$");
/* GATES */
-#define ACLK_PERI 153
-#define HCLK_SDMMC 317
-#define HCLK_SDIO 318
-#define HCLK_EMMC 319
-#define HCLK_SDMMC_EXT 320
+#define ACLK_PERI 153
+#define PCLK_GPIO0 200
+#define PCLK_GPIO1 201
+#define PCLK_GPIO2 202
+#define PCLK_GPIO3 203
+#define HCLK_SDMMC 317
+#define HCLK_SDIO 318
+#define HCLK_EMMC 319
+#define HCLK_SDMMC_EXT 320
static struct rk_cru_gate rk3328_gates[] = {
/* CRU_CLKGATE_CON0 */
@@ -76,6 +80,12 @@ static struct rk_cru_gate rk3328_gates[] = {
/* CRU_CLKGATE_CON10 */
CRU_GATE(ACLK_PERI, "aclk_peri", "aclk_peri_pre", 0x228, 0)
+ /* CRU_CLKGATE_CON16 */
+ CRU_GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_bus", 0x240, 7)
+ CRU_GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_bus", 0x240, 8)
+ CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 0x240, 9)
+ CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_bus", 0x240, 10)
+
/* CRU_CLKGATE_CON19 */
CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0x24C, 0)
CRU_GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0x24C, 1)