xref: /openbmc/linux/drivers/gpu/drm/msm/dsi/mmss_cc.xml.h (revision 4f3db074)
1 #ifndef MMSS_CC_XML
2 #define MMSS_CC_XML
3 
4 /* Autogenerated file, DO NOT EDIT manually!
5 
6 This file was generated by the rules-ng-ng headergen tool in this git repository:
7 http://github.com/freedreno/envytools/
8 git clone https://github.com/freedreno/envytools.git
9 
10 The rules-ng-ng source files this header was generated from are:
11 - /home/robclark/src/freedreno/envytools/rnndb/msm.xml                 (    676 bytes, from 2014-12-05 15:34:49)
12 - /home/robclark/src/freedreno/envytools/rnndb/freedreno_copyright.xml (   1453 bytes, from 2013-03-31 16:51:27)
13 - /home/robclark/src/freedreno/envytools/rnndb/mdp/mdp4.xml            (  20908 bytes, from 2014-12-08 16:13:00)
14 - /home/robclark/src/freedreno/envytools/rnndb/mdp/mdp_common.xml      (   2357 bytes, from 2014-12-08 16:13:00)
15 - /home/robclark/src/freedreno/envytools/rnndb/mdp/mdp5.xml            (  27208 bytes, from 2015-01-13 23:56:11)
16 - /home/robclark/src/freedreno/envytools/rnndb/dsi/dsi.xml             (  11712 bytes, from 2013-08-17 17:13:43)
17 - /home/robclark/src/freedreno/envytools/rnndb/dsi/sfpb.xml            (    344 bytes, from 2013-08-11 19:26:32)
18 - /home/robclark/src/freedreno/envytools/rnndb/dsi/mmss_cc.xml         (   1686 bytes, from 2014-10-31 16:48:57)
19 - /home/robclark/src/freedreno/envytools/rnndb/hdmi/qfprom.xml         (    600 bytes, from 2013-07-05 19:21:12)
20 - /home/robclark/src/freedreno/envytools/rnndb/hdmi/hdmi.xml           (  26848 bytes, from 2015-01-13 23:55:57)
21 - /home/robclark/src/freedreno/envytools/rnndb/edp/edp.xml             (   8253 bytes, from 2014-12-08 16:13:00)
22 
23 Copyright (C) 2013-2014 by the following authors:
24 - Rob Clark <robdclark@gmail.com> (robclark)
25 
26 Permission is hereby granted, free of charge, to any person obtaining
27 a copy of this software and associated documentation files (the
28 "Software"), to deal in the Software without restriction, including
29 without limitation the rights to use, copy, modify, merge, publish,
30 distribute, sublicense, and/or sell copies of the Software, and to
31 permit persons to whom the Software is furnished to do so, subject to
32 the following conditions:
33 
34 The above copyright notice and this permission notice (including the
35 next paragraph) shall be included in all copies or substantial
36 portions of the Software.
37 
38 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
40 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41 IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
42 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
43 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
44 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45 */
46 
47 
48 enum mmss_cc_clk {
49 	CLK = 0,
50 	PCLK = 1,
51 };
52 
53 #define REG_MMSS_CC_AHB						0x00000008
54 
55 static inline uint32_t __offset_CLK(enum mmss_cc_clk idx)
56 {
57 	switch (idx) {
58 		case CLK: return 0x0000004c;
59 		case PCLK: return 0x00000130;
60 		default: return INVALID_IDX(idx);
61 	}
62 }
63 static inline uint32_t REG_MMSS_CC_CLK(enum mmss_cc_clk i0) { return 0x00000000 + __offset_CLK(i0); }
64 
65 static inline uint32_t REG_MMSS_CC_CLK_CC(enum mmss_cc_clk i0) { return 0x00000000 + __offset_CLK(i0); }
66 #define MMSS_CC_CLK_CC_CLK_EN					0x00000001
67 #define MMSS_CC_CLK_CC_ROOT_EN					0x00000004
68 #define MMSS_CC_CLK_CC_MND_EN					0x00000020
69 #define MMSS_CC_CLK_CC_MND_MODE__MASK				0x000000c0
70 #define MMSS_CC_CLK_CC_MND_MODE__SHIFT				6
71 static inline uint32_t MMSS_CC_CLK_CC_MND_MODE(uint32_t val)
72 {
73 	return ((val) << MMSS_CC_CLK_CC_MND_MODE__SHIFT) & MMSS_CC_CLK_CC_MND_MODE__MASK;
74 }
75 #define MMSS_CC_CLK_CC_PMXO_SEL__MASK				0x00000300
76 #define MMSS_CC_CLK_CC_PMXO_SEL__SHIFT				8
77 static inline uint32_t MMSS_CC_CLK_CC_PMXO_SEL(uint32_t val)
78 {
79 	return ((val) << MMSS_CC_CLK_CC_PMXO_SEL__SHIFT) & MMSS_CC_CLK_CC_PMXO_SEL__MASK;
80 }
81 
82 static inline uint32_t REG_MMSS_CC_CLK_MD(enum mmss_cc_clk i0) { return 0x00000004 + __offset_CLK(i0); }
83 #define MMSS_CC_CLK_MD_D__MASK					0x000000ff
84 #define MMSS_CC_CLK_MD_D__SHIFT					0
85 static inline uint32_t MMSS_CC_CLK_MD_D(uint32_t val)
86 {
87 	return ((val) << MMSS_CC_CLK_MD_D__SHIFT) & MMSS_CC_CLK_MD_D__MASK;
88 }
89 #define MMSS_CC_CLK_MD_M__MASK					0x0000ff00
90 #define MMSS_CC_CLK_MD_M__SHIFT					8
91 static inline uint32_t MMSS_CC_CLK_MD_M(uint32_t val)
92 {
93 	return ((val) << MMSS_CC_CLK_MD_M__SHIFT) & MMSS_CC_CLK_MD_M__MASK;
94 }
95 
96 static inline uint32_t REG_MMSS_CC_CLK_NS(enum mmss_cc_clk i0) { return 0x00000008 + __offset_CLK(i0); }
97 #define MMSS_CC_CLK_NS_SRC__MASK				0x0000000f
98 #define MMSS_CC_CLK_NS_SRC__SHIFT				0
99 static inline uint32_t MMSS_CC_CLK_NS_SRC(uint32_t val)
100 {
101 	return ((val) << MMSS_CC_CLK_NS_SRC__SHIFT) & MMSS_CC_CLK_NS_SRC__MASK;
102 }
103 #define MMSS_CC_CLK_NS_PRE_DIV_FUNC__MASK			0x00fff000
104 #define MMSS_CC_CLK_NS_PRE_DIV_FUNC__SHIFT			12
105 static inline uint32_t MMSS_CC_CLK_NS_PRE_DIV_FUNC(uint32_t val)
106 {
107 	return ((val) << MMSS_CC_CLK_NS_PRE_DIV_FUNC__SHIFT) & MMSS_CC_CLK_NS_PRE_DIV_FUNC__MASK;
108 }
109 #define MMSS_CC_CLK_NS_VAL__MASK				0xff000000
110 #define MMSS_CC_CLK_NS_VAL__SHIFT				24
111 static inline uint32_t MMSS_CC_CLK_NS_VAL(uint32_t val)
112 {
113 	return ((val) << MMSS_CC_CLK_NS_VAL__SHIFT) & MMSS_CC_CLK_NS_VAL__MASK;
114 }
115 
116 #define REG_MMSS_CC_DSI2_PIXEL_CC				0x00000094
117 
118 #define REG_MMSS_CC_DSI2_PIXEL_NS				0x000000e4
119 
120 #define REG_MMSS_CC_DSI2_PIXEL_CC2				0x00000264
121 
122 
123 #endif /* MMSS_CC_XML */
124