summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
diff options
context:
space:
mode:
authorKlaus Goger <klaus.goger@theobroma-systems.com>2016-09-12 10:47:09 +0200
committerKlaus Goger <klaus.goger@theobroma-systems.com>2016-09-18 20:22:03 +0200
commit4a47429be7548de690e18ded7e4399798054d83d (patch)
treeacf61a047321ea1de7edcb8e42beaa0ed3f3bc0c /arch/arm/include/asm/arch-sunxi/clock_sun9i.h
parent5f17348aa8898bfc4051d58ad64450a7d0b2f319 (diff)
sun9i: armadillo: set CLKB_OUT and reset USB hubs
set CLKB_OUT to 12MHz output and reset the onboard USB, HSIC hub and GL830 USB to SATA bridge.
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi/clock_sun9i.h')
-rw-r--r--arch/arm/include/asm/arch-sunxi/clock_sun9i.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
index f9ec294aea..bdcbbe9fc5 100644
--- a/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
+++ b/arch/arm/include/asm/arch-sunxi/clock_sun9i.h
@@ -250,6 +250,15 @@ struct sunxi_sysctl_reg {
#define CCM_GMAC_CTRL_RX_CLK_DELAY(x) ((x) << 5)
#define CCM_GMAC_CTRL_TX_CLK_DELAY(x) ((x) << 10)
+#define CLK_OUTPUT_ENABLE (1 << 31)
+#define CLK_OUTPUT_SRC_SELECT_SHIFT 24
+#define CLK_OUTPUT_SRC_MASK (0b11 << CLK_OUTPUT_SRC_SELECT_SHIFT)
+#define CLK_OUTPUT_SRC_OSC24M_750 (0b00 << CLK_OUTPUT_SRC_SELECT_SHIFT)
+#define CLK_OUTPUT_SRC_X32KI (0b01 << CLK_OUTPUT_SRC_SELECT_SHIFT)
+#define CLK_OUTPUT_SRC_OSC24M (0b10 << CLK_OUTPUT_SRC_SELECT_SHIFT)
+#define CLK_OUTPUT_DIV_N_RATIO(n) (((n - 1) & 0x3) << 20)
+#define CLK_OUTPUT_DIV_M_RATIO(n) (((n - 1) & 0x1f) << 8)
+
#ifndef __ASSEMBLY__
void clock_set_pll1(unsigned int clk);
void clock_set_pll2(unsigned int clk);