Jagan Teki | 15cd581 | 2022-12-14 23:21:02 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * (C) Copyright 2019 Rockchip Electronics Co., Ltd. |
| 4 | */ |
| 5 | |
| 6 | #ifndef _ASM_ARCH_GRF_RV1126_H |
| 7 | #define _ASM_ARCH_GRF_RV1126_H |
| 8 | |
| 9 | struct rv1126_grf { |
| 10 | unsigned int soc_con0; |
| 11 | unsigned int soc_con1; |
| 12 | unsigned int soc_con2; |
| 13 | unsigned int reserved0[1]; |
| 14 | unsigned int soc_status0; |
| 15 | unsigned int soc_status1; |
| 16 | unsigned int reserved1[2]; |
| 17 | unsigned int cpu_con0; |
| 18 | unsigned int cpu_con1; |
| 19 | unsigned int reserved2[2]; |
| 20 | unsigned int cpu_status0; |
| 21 | unsigned int reserved3[3]; |
| 22 | unsigned int noc_con0; |
| 23 | unsigned int noc_con1; |
| 24 | unsigned int noc_con2; |
| 25 | unsigned int noc_con3; |
| 26 | unsigned int usbhost_con0; |
| 27 | unsigned int usbhost_con1; |
| 28 | unsigned int usbhost_status0; |
| 29 | unsigned int usbotg_con0; |
| 30 | unsigned int usbotg_con1; |
| 31 | unsigned int usbotg_status0; |
| 32 | unsigned int usbotg_status1; |
| 33 | unsigned int usbotg_status2; |
| 34 | unsigned int mac_con0; |
| 35 | unsigned int mac_con1; |
| 36 | unsigned int mac_con2; |
| 37 | unsigned int reserved4[2]; |
| 38 | unsigned int mac_status0; |
| 39 | unsigned int mac_status1; |
| 40 | unsigned int mac_status2; |
| 41 | unsigned int mem_con0; |
| 42 | unsigned int mem_con1; |
| 43 | unsigned int mem_con2; |
| 44 | unsigned int mem_con3; |
| 45 | unsigned int reserved5[(0x100 - 0x09c) / 4 - 1]; |
| 46 | unsigned int tsadc_con0; |
| 47 | unsigned int reserved6[3]; |
| 48 | unsigned int chip_id; |
| 49 | unsigned int reserved7[(0x10000 - 0x110) / 4 - 1]; |
| 50 | unsigned int gpio0c_iomux_h; |
| 51 | unsigned int gpio0d_iomux_l; |
| 52 | unsigned int gpio0d_iomux_h; |
| 53 | unsigned int reserved8[1]; |
| 54 | unsigned int gpio1a_iomux_l; |
| 55 | unsigned int gpio1a_iomux_h; |
| 56 | unsigned int gpio1b_iomux_l; |
| 57 | unsigned int gpio1b_iomux_h; |
| 58 | unsigned int gpio1c_iomux_l; |
| 59 | unsigned int gpio1c_iomux_h; |
| 60 | unsigned int gpio1d_iomux_l; |
| 61 | unsigned int gpio1d_iomux_h; |
| 62 | unsigned int gpio2a_iomux_l; |
| 63 | unsigned int gpio2a_iomux_h; |
| 64 | unsigned int gpio2b_iomux_l; |
| 65 | unsigned int gpio2b_iomux_h; |
| 66 | unsigned int gpio2c_iomux_l; |
| 67 | unsigned int gpio2c_iomux_h; |
| 68 | unsigned int gpio2d_iomux_l; |
| 69 | unsigned int gpio2d_iomux_h; |
| 70 | unsigned int gpio3a_iomux_l; |
| 71 | unsigned int gpio3a_iomux_h; |
| 72 | unsigned int gpio3b_iomux_l; |
| 73 | unsigned int gpio3b_iomux_h; |
| 74 | unsigned int gpio3c_iomux_l; |
| 75 | unsigned int gpio3c_iomux_h; |
| 76 | unsigned int gpio3d_iomux_l; |
| 77 | unsigned int gpio3d_iomux_h; |
| 78 | unsigned int gpio4a_iomux_l; |
| 79 | unsigned int reserved9[3]; |
| 80 | unsigned int gpio0c_ds_h; |
| 81 | unsigned int gpio0d_ds_l; |
| 82 | unsigned int gpio0d_ds_h; |
| 83 | unsigned int reserved10[1]; |
| 84 | unsigned int gpio1a_ds_l; |
| 85 | unsigned int gpio1a_ds_h; |
| 86 | unsigned int gpio1b_ds_l; |
| 87 | unsigned int gpio1b_ds_h; |
| 88 | unsigned int gpio1c_ds_l; |
| 89 | unsigned int gpio1c_ds_h; |
| 90 | unsigned int gpio1d_ds_l; |
| 91 | unsigned int gpio1d_ds_h; |
| 92 | unsigned int gpio2a_ds_l; |
| 93 | unsigned int gpio2a_ds_h; |
| 94 | unsigned int gpio2b_ds_l; |
| 95 | unsigned int gpio2b_ds_h; |
| 96 | unsigned int gpio2c_ds_l; |
| 97 | unsigned int gpio2c_ds_h; |
| 98 | unsigned int gpio2d_ds_l; |
| 99 | unsigned int gpio2d_ds_h; |
| 100 | unsigned int gpio3a_ds_l; |
| 101 | unsigned int gpio3a_ds_h; |
| 102 | unsigned int gpio3b_ds_l; |
| 103 | unsigned int gpio3b_ds_h; |
| 104 | unsigned int gpio3c_ds_l; |
| 105 | unsigned int gpio3c_ds_h; |
| 106 | unsigned int gpio3d_ds_l; |
| 107 | unsigned int gpio3d_ds_h; |
| 108 | unsigned int gpio4a_ds_l; |
| 109 | unsigned int reserved12[3]; |
| 110 | unsigned int gpio0c_p_h; |
| 111 | unsigned int gpio0d_p; |
| 112 | unsigned int gpio1a_p; |
| 113 | unsigned int gpio1b_p; |
| 114 | unsigned int gpio1c_p; |
| 115 | unsigned int gpio1d_p; |
| 116 | unsigned int gpio2a_p; |
| 117 | unsigned int gpio2b_p; |
| 118 | unsigned int gpio2c_p; |
| 119 | unsigned int gpio2d_p; |
| 120 | unsigned int gpio3a_p; |
| 121 | unsigned int gpio3b_p; |
| 122 | unsigned int gpio3c_p; |
| 123 | unsigned int gpio3d_p; |
| 124 | unsigned int gpio4a_p; |
| 125 | unsigned int reserved13[1]; |
| 126 | unsigned int gpio0c_ie_h; |
| 127 | unsigned int gpio0d_ie; |
| 128 | unsigned int gpio1a_ie; |
| 129 | unsigned int gpio1b_ie; |
| 130 | unsigned int gpio1c_ie; |
| 131 | unsigned int gpio1d_ie; |
| 132 | unsigned int gpio2a_ie; |
| 133 | unsigned int gpio2b_ie; |
| 134 | unsigned int gpio2c_ie; |
| 135 | unsigned int gpio2d_ie; |
| 136 | unsigned int gpio3a_ie; |
| 137 | unsigned int gpio3b_ie; |
| 138 | unsigned int gpio3c_ie; |
| 139 | unsigned int gpio3d_ie; |
| 140 | unsigned int gpio4a_ie; |
| 141 | unsigned int reserved14[1]; |
| 142 | unsigned int gpio0c_smt_h; |
| 143 | unsigned int gpio0d_smt; |
| 144 | unsigned int gpio1a_smt; |
| 145 | unsigned int gpio1b_smt; |
| 146 | unsigned int gpio1c_smt; |
| 147 | unsigned int gpio1d_smt; |
| 148 | unsigned int gpio2a_smt; |
| 149 | unsigned int gpio2b_smt; |
| 150 | unsigned int gpio2c_smt; |
| 151 | unsigned int gpio2d_smt; |
| 152 | unsigned int gpio3a_smt; |
| 153 | unsigned int gpio3b_smt; |
| 154 | unsigned int gpio3c_smt; |
| 155 | unsigned int gpio3d_smt; |
| 156 | unsigned int gpio4a_smt; |
| 157 | unsigned int reserved15[(0x10200 - 0x101b8) / 4 - 1]; |
| 158 | unsigned int csiphy0_con; |
| 159 | unsigned int reserved16[1]; |
| 160 | unsigned int csiphy0_status; |
| 161 | unsigned int reserved17[1]; |
| 162 | unsigned int csiphy1_con; |
| 163 | unsigned int reserved18[1]; |
| 164 | unsigned int csiphy1_status; |
| 165 | unsigned int reserved19[1]; |
| 166 | unsigned int dsiphy_con; |
| 167 | unsigned int reserved20[3]; |
| 168 | unsigned int usbphy_con0; |
| 169 | unsigned int usbphy_con1; |
| 170 | unsigned int usbphy_con2; |
| 171 | unsigned int reserved21[3]; |
| 172 | unsigned int usbphy_status; |
| 173 | unsigned int reserved22[1]; |
| 174 | unsigned int cifio_con; |
| 175 | unsigned int sddetflt_con; |
| 176 | unsigned int uart2rx_low_con; |
| 177 | unsigned int reserved23[1]; |
| 178 | unsigned int iofunc_con0; |
| 179 | unsigned int iofunc_con1; |
| 180 | unsigned int iofunc_con2; |
| 181 | unsigned int iofunc_con3; |
| 182 | unsigned int usbphy0_cfg_con; |
| 183 | unsigned int usbphy0_cfg_addrin; |
| 184 | unsigned int usbphy0_cfg_addrout; |
| 185 | unsigned int usbphy0_cfg_dly_con; |
| 186 | unsigned int usbphy1_cfg_con; |
| 187 | unsigned int usbphy1_cfg_addrin; |
| 188 | unsigned int usbphy1_cfg_addrout; |
| 189 | unsigned int usbphy1_cfg_dly_con; |
| 190 | unsigned int reserved24[(0x10300 - 0x1028c) / 4 - 1]; |
| 191 | unsigned int usb_sig_detect_con; |
| 192 | unsigned int usb_sig_detect_status; |
| 193 | unsigned int usb_sig_detect_clr; |
| 194 | unsigned int reserved25[1]; |
| 195 | unsigned int usb_linestate_con; |
| 196 | unsigned int usb_disconnect_con; |
| 197 | unsigned int usb_bvalid_con; |
| 198 | unsigned int usb_id_con; |
| 199 | }; |
| 200 | |
| 201 | check_member(rv1126_grf, usb_id_con, 0x1031c); |
| 202 | |
| 203 | struct rv1126_pmugrf { |
| 204 | unsigned int gpio0a_iomux_l; |
| 205 | unsigned int gpio0a_iomux_h; |
| 206 | unsigned int gpio0b_iomux_l; |
| 207 | unsigned int gpio0b_iomux_h; |
| 208 | unsigned int gpio0c_iomux_l; |
| 209 | unsigned int reserved0[3]; |
| 210 | unsigned int gpio0a_ds_l; |
| 211 | unsigned int gpio0a_ds_h; |
| 212 | unsigned int gpio0b_ds_l; |
| 213 | unsigned int gpio0b_ds_h; |
| 214 | unsigned int gpio0c_ds_l; |
| 215 | unsigned int osc_ds; |
| 216 | unsigned int reserved1[2]; |
| 217 | unsigned int gpio0a_p; |
| 218 | unsigned int gpio0b_p; |
| 219 | unsigned int gpio0c_p_l; |
| 220 | unsigned int reserved2[1]; |
| 221 | unsigned int gpio0a_ie; |
| 222 | unsigned int gpio0b_ie; |
| 223 | unsigned int gpio0c_ie_l; |
| 224 | unsigned int reserved3[1]; |
| 225 | unsigned int gpio0a_smt; |
| 226 | unsigned int gpio0b_smt; |
| 227 | unsigned int gpio0c_smt_l; |
| 228 | unsigned int reserved4[(0x100 - 0x68) / 4 - 1]; |
| 229 | unsigned int soc_con[7]; |
| 230 | unsigned int reserved5[(0x140 - 0x118) / 4 - 1]; |
| 231 | unsigned int io_vsel; |
| 232 | unsigned int io_vret; |
| 233 | unsigned int reserved6[(0x180 - 0x144) / 4 - 1]; |
| 234 | unsigned int pmupvtm_clkdiv; |
| 235 | unsigned int reserved7[(0x200 - 0x180) / 4 - 1]; |
| 236 | unsigned int os_reg[12]; |
| 237 | unsigned int rstfunc_status; |
| 238 | unsigned int rstfunc_clr; |
| 239 | unsigned int reserved8[(0x380 - 0x234) / 4 - 1]; |
| 240 | unsigned int sd_detect_con; |
| 241 | unsigned int reserved9[3]; |
| 242 | unsigned int sd_detect_status; |
| 243 | unsigned int reserved10[3]; |
| 244 | unsigned int sd_detect_clr; |
| 245 | unsigned int reserved11[3]; |
| 246 | unsigned int sd_det_count; |
| 247 | }; |
| 248 | |
| 249 | check_member(rv1126_pmugrf, sd_det_count, 0x3b0); |
| 250 | |
| 251 | #endif |