1*22f65a38SJerome Brunet /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ 2738f66d3SMichael Turquette /* 3738f66d3SMichael Turquette * Copyright (c) 2016 AmLogic, Inc. 4738f66d3SMichael Turquette * Author: Michael Turquette <mturquette@baylibre.com> 5738f66d3SMichael Turquette */ 6738f66d3SMichael Turquette 7738f66d3SMichael Turquette #ifndef __GXBB_H 8738f66d3SMichael Turquette #define __GXBB_H 9738f66d3SMichael Turquette 10738f66d3SMichael Turquette /* 11738f66d3SMichael Turquette * Clock controller register offsets 12738f66d3SMichael Turquette * 13738f66d3SMichael Turquette * Register offsets from the data sheet are listed in comment blocks below. 14738f66d3SMichael Turquette * Those offsets must be multiplied by 4 before adding them to the base address 15738f66d3SMichael Turquette * to get the right value 16738f66d3SMichael Turquette */ 17738f66d3SMichael Turquette #define SCR 0x2C /* 0x0b offset in data sheet */ 18738f66d3SMichael Turquette #define TIMEOUT_VALUE 0x3c /* 0x0f offset in data sheet */ 19738f66d3SMichael Turquette 20738f66d3SMichael Turquette #define HHI_GP0_PLL_CNTL 0x40 /* 0x10 offset in data sheet */ 21738f66d3SMichael Turquette #define HHI_GP0_PLL_CNTL2 0x44 /* 0x11 offset in data sheet */ 22738f66d3SMichael Turquette #define HHI_GP0_PLL_CNTL3 0x48 /* 0x12 offset in data sheet */ 23738f66d3SMichael Turquette #define HHI_GP0_PLL_CNTL4 0x4c /* 0x13 offset in data sheet */ 240d48fc55SNeil Armstrong #define HHI_GP0_PLL_CNTL5 0x50 /* 0x14 offset in data sheet */ 250d48fc55SNeil Armstrong #define HHI_GP0_PLL_CNTL1 0x58 /* 0x16 offset in data sheet */ 26738f66d3SMichael Turquette 27738f66d3SMichael Turquette #define HHI_XTAL_DIVN_CNTL 0xbc /* 0x2f offset in data sheet */ 28738f66d3SMichael Turquette #define HHI_TIMER90K 0xec /* 0x3b offset in data sheet */ 29738f66d3SMichael Turquette 30738f66d3SMichael Turquette #define HHI_MEM_PD_REG0 0x100 /* 0x40 offset in data sheet */ 31738f66d3SMichael Turquette #define HHI_MEM_PD_REG1 0x104 /* 0x41 offset in data sheet */ 32738f66d3SMichael Turquette #define HHI_VPU_MEM_PD_REG1 0x108 /* 0x42 offset in data sheet */ 33738f66d3SMichael Turquette #define HHI_VIID_CLK_DIV 0x128 /* 0x4a offset in data sheet */ 34738f66d3SMichael Turquette #define HHI_VIID_CLK_CNTL 0x12c /* 0x4b offset in data sheet */ 35738f66d3SMichael Turquette 36738f66d3SMichael Turquette #define HHI_GCLK_MPEG0 0x140 /* 0x50 offset in data sheet */ 37738f66d3SMichael Turquette #define HHI_GCLK_MPEG1 0x144 /* 0x51 offset in data sheet */ 38738f66d3SMichael Turquette #define HHI_GCLK_MPEG2 0x148 /* 0x52 offset in data sheet */ 39738f66d3SMichael Turquette #define HHI_GCLK_OTHER 0x150 /* 0x54 offset in data sheet */ 40738f66d3SMichael Turquette #define HHI_GCLK_AO 0x154 /* 0x55 offset in data sheet */ 41738f66d3SMichael Turquette #define HHI_SYS_OSCIN_CNTL 0x158 /* 0x56 offset in data sheet */ 42738f66d3SMichael Turquette #define HHI_SYS_CPU_CLK_CNTL1 0x15c /* 0x57 offset in data sheet */ 43738f66d3SMichael Turquette #define HHI_SYS_CPU_RESET_CNTL 0x160 /* 0x58 offset in data sheet */ 44738f66d3SMichael Turquette #define HHI_VID_CLK_DIV 0x164 /* 0x59 offset in data sheet */ 45738f66d3SMichael Turquette 46738f66d3SMichael Turquette #define HHI_MPEG_CLK_CNTL 0x174 /* 0x5d offset in data sheet */ 47738f66d3SMichael Turquette #define HHI_AUD_CLK_CNTL 0x178 /* 0x5e offset in data sheet */ 48738f66d3SMichael Turquette #define HHI_VID_CLK_CNTL 0x17c /* 0x5f offset in data sheet */ 49738f66d3SMichael Turquette #define HHI_AUD_CLK_CNTL2 0x190 /* 0x64 offset in data sheet */ 50738f66d3SMichael Turquette #define HHI_VID_CLK_CNTL2 0x194 /* 0x65 offset in data sheet */ 51738f66d3SMichael Turquette #define HHI_SYS_CPU_CLK_CNTL0 0x19c /* 0x67 offset in data sheet */ 52738f66d3SMichael Turquette #define HHI_VID_PLL_CLK_DIV 0x1a0 /* 0x68 offset in data sheet */ 53738f66d3SMichael Turquette #define HHI_AUD_CLK_CNTL3 0x1a4 /* 0x69 offset in data sheet */ 54738f66d3SMichael Turquette #define HHI_MALI_CLK_CNTL 0x1b0 /* 0x6c offset in data sheet */ 55738f66d3SMichael Turquette #define HHI_VPU_CLK_CNTL 0x1bC /* 0x6f offset in data sheet */ 56738f66d3SMichael Turquette 57738f66d3SMichael Turquette #define HHI_HDMI_CLK_CNTL 0x1CC /* 0x73 offset in data sheet */ 58738f66d3SMichael Turquette #define HHI_VDEC_CLK_CNTL 0x1E0 /* 0x78 offset in data sheet */ 59738f66d3SMichael Turquette #define HHI_VDEC2_CLK_CNTL 0x1E4 /* 0x79 offset in data sheet */ 60738f66d3SMichael Turquette #define HHI_VDEC3_CLK_CNTL 0x1E8 /* 0x7a offset in data sheet */ 61738f66d3SMichael Turquette #define HHI_VDEC4_CLK_CNTL 0x1EC /* 0x7b offset in data sheet */ 62738f66d3SMichael Turquette #define HHI_HDCP22_CLK_CNTL 0x1F0 /* 0x7c offset in data sheet */ 63738f66d3SMichael Turquette #define HHI_VAPBCLK_CNTL 0x1F4 /* 0x7d offset in data sheet */ 64738f66d3SMichael Turquette 65738f66d3SMichael Turquette #define HHI_VPU_CLKB_CNTL 0x20C /* 0x83 offset in data sheet */ 66738f66d3SMichael Turquette #define HHI_USB_CLK_CNTL 0x220 /* 0x88 offset in data sheet */ 67738f66d3SMichael Turquette #define HHI_32K_CLK_CNTL 0x224 /* 0x89 offset in data sheet */ 68738f66d3SMichael Turquette #define HHI_GEN_CLK_CNTL 0x228 /* 0x8a offset in data sheet */ 69738f66d3SMichael Turquette 70738f66d3SMichael Turquette #define HHI_PCM_CLK_CNTL 0x258 /* 0x96 offset in data sheet */ 71738f66d3SMichael Turquette #define HHI_NAND_CLK_CNTL 0x25C /* 0x97 offset in data sheet */ 72738f66d3SMichael Turquette #define HHI_SD_EMMC_CLK_CNTL 0x264 /* 0x99 offset in data sheet */ 73738f66d3SMichael Turquette 74738f66d3SMichael Turquette #define HHI_MPLL_CNTL 0x280 /* 0xa0 offset in data sheet */ 75738f66d3SMichael Turquette #define HHI_MPLL_CNTL2 0x284 /* 0xa1 offset in data sheet */ 76738f66d3SMichael Turquette #define HHI_MPLL_CNTL3 0x288 /* 0xa2 offset in data sheet */ 77738f66d3SMichael Turquette #define HHI_MPLL_CNTL4 0x28C /* 0xa3 offset in data sheet */ 78738f66d3SMichael Turquette #define HHI_MPLL_CNTL5 0x290 /* 0xa4 offset in data sheet */ 79738f66d3SMichael Turquette #define HHI_MPLL_CNTL6 0x294 /* 0xa5 offset in data sheet */ 80738f66d3SMichael Turquette #define HHI_MPLL_CNTL7 0x298 /* MP0, 0xa6 offset in data sheet */ 81738f66d3SMichael Turquette #define HHI_MPLL_CNTL8 0x29C /* MP1, 0xa7 offset in data sheet */ 82738f66d3SMichael Turquette #define HHI_MPLL_CNTL9 0x2A0 /* MP2, 0xa8 offset in data sheet */ 83738f66d3SMichael Turquette #define HHI_MPLL_CNTL10 0x2A4 /* MP2, 0xa9 offset in data sheet */ 84738f66d3SMichael Turquette 85738f66d3SMichael Turquette #define HHI_MPLL3_CNTL0 0x2E0 /* 0xb8 offset in data sheet */ 86738f66d3SMichael Turquette #define HHI_MPLL3_CNTL1 0x2E4 /* 0xb9 offset in data sheet */ 87738f66d3SMichael Turquette #define HHI_VDAC_CNTL0 0x2F4 /* 0xbd offset in data sheet */ 88738f66d3SMichael Turquette #define HHI_VDAC_CNTL1 0x2F8 /* 0xbe offset in data sheet */ 89738f66d3SMichael Turquette 90738f66d3SMichael Turquette #define HHI_SYS_PLL_CNTL 0x300 /* 0xc0 offset in data sheet */ 91738f66d3SMichael Turquette #define HHI_SYS_PLL_CNTL2 0x304 /* 0xc1 offset in data sheet */ 92738f66d3SMichael Turquette #define HHI_SYS_PLL_CNTL3 0x308 /* 0xc2 offset in data sheet */ 93738f66d3SMichael Turquette #define HHI_SYS_PLL_CNTL4 0x30c /* 0xc3 offset in data sheet */ 94738f66d3SMichael Turquette #define HHI_SYS_PLL_CNTL5 0x310 /* 0xc4 offset in data sheet */ 95738f66d3SMichael Turquette #define HHI_DPLL_TOP_I 0x318 /* 0xc6 offset in data sheet */ 96738f66d3SMichael Turquette #define HHI_DPLL_TOP2_I 0x31C /* 0xc7 offset in data sheet */ 97738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL 0x320 /* 0xc8 offset in data sheet */ 98738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL2 0x324 /* 0xc9 offset in data sheet */ 99738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL3 0x328 /* 0xca offset in data sheet */ 100738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL4 0x32C /* 0xcb offset in data sheet */ 101738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL5 0x330 /* 0xcc offset in data sheet */ 102738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL6 0x334 /* 0xcd offset in data sheet */ 103738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL_I 0x338 /* 0xce offset in data sheet */ 104738f66d3SMichael Turquette #define HHI_HDMI_PLL_CNTL7 0x33C /* 0xcf offset in data sheet */ 105738f66d3SMichael Turquette 106738f66d3SMichael Turquette #define HHI_HDMI_PHY_CNTL0 0x3A0 /* 0xe8 offset in data sheet */ 107738f66d3SMichael Turquette #define HHI_HDMI_PHY_CNTL1 0x3A4 /* 0xe9 offset in data sheet */ 108738f66d3SMichael Turquette #define HHI_HDMI_PHY_CNTL2 0x3A8 /* 0xea offset in data sheet */ 109738f66d3SMichael Turquette #define HHI_HDMI_PHY_CNTL3 0x3AC /* 0xeb offset in data sheet */ 110738f66d3SMichael Turquette 111738f66d3SMichael Turquette #define HHI_VID_LOCK_CLK_CNTL 0x3C8 /* 0xf2 offset in data sheet */ 112738f66d3SMichael Turquette #define HHI_BT656_CLK_CNTL 0x3D4 /* 0xf5 offset in data sheet */ 113738f66d3SMichael Turquette #define HHI_SAR_CLK_CNTL 0x3D8 /* 0xf6 offset in data sheet */ 114738f66d3SMichael Turquette 115738f66d3SMichael Turquette #endif /* __GXBB_H */ 116