Skip to content
This repository was archived by the owner on Oct 5, 2018. It is now read-only.

Commit 01e6922

Browse files
gtucker-gmailldts
authored andcommitted
drivers/gpu/arm/utgard: add Hi6220 register definitions
Add mali_hikey_hi6220_registers_gpu.h with the list of Hi6220 SoC registers that are needed to use the Mali Utgard GPU. Signed-off-by: Guillaume Tucker <guillaume.tucker@arm.com>
1 parent 1cbfbc1 commit 01e6922

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* Copyright (C) 2014 Hisilicon Co. Ltd.
3+
* Copyright (C) 2015 ARM Ltd.
4+
*
5+
* Author: Xuzixin <Xuzixin@hisilicon.com>
6+
*
7+
* This program is free software; you can redistribute it and/or modify it
8+
* under the terms of the GNU General Public License as published by the
9+
* Free Software Foundation; either version 2 of the License, or (at your
10+
* option) any later version.
11+
*
12+
*/
13+
14+
#ifndef MALI_HIKEY_HI6220_REGISTERS_GPU_H
15+
#define MALI_HIKEY_HI6220_REGISTERS_GPU_H 1
16+
17+
#include <linux/mm.h>
18+
19+
#define SOC_G3D_S_BASE_ADDR 0xF4080000 /* G3D ctrl base addr */
20+
#define SOC_MEDIA_SCTRL_BASE_ADDR 0xF4410000 /* media ctrl base addr */
21+
#define REG_MEDIA_SC_IOSIZE PAGE_ALIGN(SZ_4K)
22+
#define SOC_PMCTRL_BASE_ADDR 0xF7032000 /* pm ctrl base addr */
23+
#define REG_PMCTRL_IOSIZE PAGE_ALIGN(SZ_4K)
24+
#define SOC_AO_SCTRL_BASE_ADDR 0xF7800000 /* ao ctrl base addr */
25+
#define SOC_PERI_SCTRL_BASE_ADDR 0xF7030000 /* peri ctrl base addr */
26+
#define REG_SC_ON_IOSIZE PAGE_ALIGN(SZ_8K)
27+
#define REG_SC_OFF_IOSIZE PAGE_ALIGN(SZ_4K)
28+
29+
/* ----------------------------------------------------------------------------
30+
* MEDIA SCTRL
31+
*/
32+
33+
#define SOC_MEDIA_SCTRL_SC_MEDIA_SUBSYS_CTRL5_ADDR(base) ((base) + (0x51C))
34+
#define SOC_MEDIA_SCTRL_SC_MEDIA_CLKCFG0_ADDR(base) ((base) + (0xCBC))
35+
#define SOC_MEDIA_SCTRL_SC_MEDIA_CLKCFG2_ADDR(base) ((base) + (0xCC4))
36+
#define SOC_MEDIA_SCTRL_SC_MEDIA_CLKEN_ADDR(base) ((base) + (0x520))
37+
#define SOC_MEDIA_SCTRL_SC_MEDIA_CLKDIS_ADDR(base) ((base) + (0x524))
38+
#define SOC_MEDIA_SCTRL_SC_MEDIA_RSTEN_ADDR(base) ((base) + (0x52C))
39+
#define SOC_MEDIA_SCTRL_SC_MEDIA_RSTDIS_ADDR(base) ((base) + (0x530))
40+
#define SOC_MEDIA_SCTRL_SC_MEDIA_RST_STAT_ADDR(base) ((base) + (0x534))
41+
42+
/* ----------------------------------------------------------------------------
43+
* AO SCTRL,only bit 1 is necessary for GPU.
44+
*/
45+
46+
#define SOC_AO_SCTRL_SC_PW_CLKEN0_ADDR(base) ((base) + (0x800))
47+
#define SOC_AO_SCTRL_SC_PW_CLKDIS0_ADDR(base) ((base) + (0x804))
48+
#define SOC_AO_SCTRL_SC_PW_CLK_STAT0_ADDR(base) ((base) + (0x808))
49+
#define SOC_AO_SCTRL_SC_PW_RSTEN0_ADDR(base) ((base) + (0x810))
50+
#define SOC_AO_SCTRL_SC_PW_RSTDIS0_ADDR(base) ((base) + (0x814))
51+
#define SOC_AO_SCTRL_SC_PW_RST_STAT0_ADDR(base) ((base) + (0x818))
52+
#define SOC_AO_SCTRL_SC_PW_ISOEN0_ADDR(base) ((base) + (0x820))
53+
#define SOC_AO_SCTRL_SC_PW_ISODIS0_ADDR(base) ((base) + (0x824))
54+
#define SOC_AO_SCTRL_SC_PW_ISO_STAT0_ADDR(base) ((base) + (0x828))
55+
#define SOC_AO_SCTRL_SC_PW_MTCMOS_EN0_ADDR(base) ((base) + (0x830))
56+
#define SOC_AO_SCTRL_SC_PW_MTCMOS_DIS0_ADDR(base) ((base) + (0x834))
57+
#define SOC_AO_SCTRL_SC_PW_MTCMOS_STAT0_ADDR(base) ((base) + (0x838))
58+
59+
/* ----------------------------------------------------------------------------
60+
* PERI SCTRL,only bit 10 is necessary for GPU.
61+
*/
62+
63+
#define SOC_PERI_SCTRL_SC_PERIPH_CLKEN12_ADDR(base) ((base) + (0x270))
64+
#define SOC_PERI_SCTRL_SC_PERIPH_CLKSTAT12_ADDR(base) ((base) + (0x278))
65+
66+
#endif /* MALI_HIKEY_HI6220_REGISTERS_GPU_H */

0 commit comments

Comments
 (0)