1
2
3
4
5
6
7
8
9
10 #ifndef FIMC_IS_REG_H_
11 #define FIMC_IS_REG_H_
12
13
14 #define REG_WDT_ISP 0x00170000
15
16
17 #define MCUCTL_BASE 0x00180000
18
19
20 #define MCUCTL_REG_MCUCTRL (MCUCTL_BASE + 0x00)
21 #define MCUCTRL_MSWRST (1 << 0)
22
23
24 #define MCUCTL_REG_BBOAR (MCUCTL_BASE + 0x04)
25
26
27 #define MCUCTL_REG_INTGR0 (MCUCTL_BASE + 0x08)
28
29 #define INTGR0_INTGC(__n) (1 << ((__n) + 16))
30
31 #define INTGR0_INTGD(__n) (1 << (__n))
32
33
34 #define MCUCTL_REG_INTCR0 (MCUCTL_BASE + 0x0c)
35
36 #define INTCR0_INTGC(__n) (1 << ((__n) + 16))
37
38 #define INTCR0_INTCD(__n) (1 << ((__n) + 16))
39
40
41 #define MCUCTL_REG_INTMR0 (MCUCTL_BASE + 0x10)
42
43 #define INTMR0_INTMC(__n) (1 << ((__n) + 16))
44
45 #define INTMR0_INTMD(__n) (1 << (__n))
46
47
48 #define MCUCTL_REG_INTSR0 (MCUCTL_BASE + 0x14)
49
50 #define INTSR0_GET_INTSD(x, __n) (((x) >> (__n)) & 0x1)
51
52 #define INTSR0_GET_INTSC(x, __n) (((x) >> ((__n) + 16)) & 0x1)
53
54
55 #define MCUCTL_REG_INTMSR0 (MCUCTL_BASE + 0x18)
56
57 #define INTMSR0_GET_INTMSD(x, __n) (((x) >> (__n)) & 0x1)
58
59 #define INTMSR0_GET_INTMSC(x, __n) (((x) >> ((__n) + 16)) & 0x1)
60
61
62 #define MCUCTL_REG_INTGR1 (MCUCTL_BASE + 0x1c)
63
64 #define INTGR1_INTGC(__n) (1 << (__n))
65
66
67 #define MCUCTL_REG_INTCR1 (MCUCTL_BASE + 0x20)
68
69 #define INTCR1_INTCC(__n) (1 << (__n))
70
71
72 #define MCUCTL_REG_INTMR1 (MCUCTL_BASE + 0x24)
73
74 #define INTMR1_INTMC(__n) (1 << (__n))
75
76
77 #define MCUCTL_REG_INTSR1 (MCUCTL_BASE + 0x28)
78
79 #define MCUCTL_REG_INTMSR1 (MCUCTL_BASE + 0x2c)
80
81
82 #define MCUCTL_REG_INTCR2 (MCUCTL_BASE + 0x30)
83
84 #define INTCR2_INTCC(__n) (1 << ((__n) + 16))
85
86
87 #define MCUCTL_REG_INTMR2 (MCUCTL_BASE + 0x34)
88
89 #define INTMR2_INTMCIS(__n) (1 << (__n))
90
91
92 #define MCUCTL_REG_INTSR2 (MCUCTL_BASE + 0x38)
93
94 #define MCUCTL_REG_INTMSR2 (MCUCTL_BASE + 0x3c)
95
96
97 #define MCUCTL_REG_GPOCTLR (MCUCTL_BASE + 0x40)
98
99 #define GPOCTLR_GPOG(__n) (1 << (__n))
100
101
102 #define MCUCTL_REG_GPOENCTLR (MCUCTL_BASE + 0x44)
103
104 #define GPOENCTLR_GPOEN(__n) (1 << (__n))
105
106
107 #define MCUCTL_REG_GPICTLR (MCUCTL_BASE + 0x48)
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130 #define MCUCTL_REG_ISSR(__n) (MCUCTL_BASE + 0x80 + ((__n) * 4))
131
132
133 #define REG_CMU_RESET_ISP_SYS_PWR_REG 0x1174
134 #define REG_CMU_SYSCLK_ISP_SYS_PWR_REG 0x13b8
135 #define REG_PMU_ISP_ARM_SYS 0x1050
136 #define REG_PMU_ISP_ARM_CONFIGURATION 0x2280
137 #define REG_PMU_ISP_ARM_STATUS 0x2284
138 #define REG_PMU_ISP_ARM_OPTION 0x2288
139
140 void fimc_is_fw_clear_irq1(struct fimc_is *is, unsigned int bit);
141 void fimc_is_fw_clear_irq2(struct fimc_is *is);
142 int fimc_is_hw_get_params(struct fimc_is *is, unsigned int num);
143
144 void fimc_is_hw_set_intgr0_gd0(struct fimc_is *is);
145 int fimc_is_hw_wait_intmsr0_intmsd0(struct fimc_is *is);
146 void fimc_is_hw_set_sensor_num(struct fimc_is *is);
147 void fimc_is_hw_set_isp_buf_mask(struct fimc_is *is, unsigned int mask);
148 void fimc_is_hw_stream_on(struct fimc_is *is);
149 void fimc_is_hw_stream_off(struct fimc_is *is);
150 int fimc_is_hw_set_param(struct fimc_is *is);
151 int fimc_is_hw_change_mode(struct fimc_is *is);
152
153 void fimc_is_hw_close_sensor(struct fimc_is *is, unsigned int index);
154 void fimc_is_hw_get_setfile_addr(struct fimc_is *is);
155 void fimc_is_hw_load_setfile(struct fimc_is *is);
156 void fimc_is_hw_subip_power_off(struct fimc_is *is);
157
158 int fimc_is_itf_s_param(struct fimc_is *is, bool update);
159 int fimc_is_itf_mode_change(struct fimc_is *is);
160
161 #endif