1 // THIS HEADER FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT 2 3 /** 4 * Copyright (c) 2024 Raspberry Pi Ltd. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 // ============================================================================= 9 // Register block : I2C 10 // Version : 1 11 // Bus type : apb 12 // Description : DW_apb_i2c address block 13 // 14 // List of configuration constants for the Synopsys I2C 15 // hardware (you may see references to these in I2C register 16 // header; these are *fixed* values, set at hardware design 17 // time): 18 // 19 // IC_ULTRA_FAST_MODE ................ 0x0 20 // IC_UFM_TBUF_CNT_DEFAULT ........... 0x8 21 // IC_UFM_SCL_LOW_COUNT .............. 0x0008 22 // IC_UFM_SCL_HIGH_COUNT ............. 0x0006 23 // IC_TX_TL .......................... 0x0 24 // IC_TX_CMD_BLOCK ................... 0x1 25 // IC_HAS_DMA ........................ 0x1 26 // IC_HAS_ASYNC_FIFO ................. 0x0 27 // IC_SMBUS_ARP ...................... 0x0 28 // IC_FIRST_DATA_BYTE_STATUS ......... 0x1 29 // IC_INTR_IO ........................ 0x1 30 // IC_MASTER_MODE .................... 0x1 31 // IC_DEFAULT_ACK_GENERAL_CALL ....... 0x1 32 // IC_INTR_POL ....................... 0x1 33 // IC_OPTIONAL_SAR ................... 0x0 34 // IC_DEFAULT_TAR_SLAVE_ADDR ......... 0x055 35 // IC_DEFAULT_SLAVE_ADDR ............. 0x055 36 // IC_DEFAULT_HS_SPKLEN .............. 0x1 37 // IC_FS_SCL_HIGH_COUNT .............. 0x0006 38 // IC_HS_SCL_LOW_COUNT ............... 0x0008 39 // IC_DEVICE_ID_VALUE ................ 0x0 40 // IC_10BITADDR_MASTER ............... 0x0 41 // IC_CLK_FREQ_OPTIMIZATION .......... 0x0 42 // IC_DEFAULT_FS_SPKLEN .............. 0x7 43 // IC_ADD_ENCODED_PARAMS ............. 0x0 44 // IC_DEFAULT_SDA_HOLD ............... 0x000001 45 // IC_DEFAULT_SDA_SETUP .............. 0x64 46 // IC_AVOID_RX_FIFO_FLUSH_ON_TX_ABRT . 0x0 47 // IC_CLOCK_PERIOD ................... 100 48 // IC_EMPTYFIFO_HOLD_MASTER_EN ....... 1 49 // IC_RESTART_EN ..................... 0x1 50 // IC_TX_CMD_BLOCK_DEFAULT ........... 0x0 51 // IC_BUS_CLEAR_FEATURE .............. 0x0 52 // IC_CAP_LOADING .................... 100 53 // IC_FS_SCL_LOW_COUNT ............... 0x000d 54 // APB_DATA_WIDTH .................... 32 55 // IC_SDA_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff 56 // IC_SLV_DATA_NACK_ONLY ............. 0x1 57 // IC_10BITADDR_SLAVE ................ 0x0 58 // IC_CLK_TYPE ....................... 0x0 59 // IC_SMBUS_UDID_MSB ................. 0x0 60 // IC_SMBUS_SUSPEND_ALERT ............ 0x0 61 // IC_HS_SCL_HIGH_COUNT .............. 0x0006 62 // IC_SLV_RESTART_DET_EN ............. 0x1 63 // IC_SMBUS .......................... 0x0 64 // IC_OPTIONAL_SAR_DEFAULT ........... 0x0 65 // IC_PERSISTANT_SLV_ADDR_DEFAULT .... 0x0 66 // IC_USE_COUNTS ..................... 0x0 67 // IC_RX_BUFFER_DEPTH ................ 16 68 // IC_SCL_STUCK_TIMEOUT_DEFAULT ...... 0xffffffff 69 // IC_RX_FULL_HLD_BUS_EN ............. 0x1 70 // IC_SLAVE_DISABLE .................. 0x1 71 // IC_RX_TL .......................... 0x0 72 // IC_DEVICE_ID ...................... 0x0 73 // IC_HC_COUNT_VALUES ................ 0x0 74 // I2C_DYNAMIC_TAR_UPDATE ............ 0 75 // IC_SMBUS_CLK_LOW_MEXT_DEFAULT ..... 0xffffffff 76 // IC_SMBUS_CLK_LOW_SEXT_DEFAULT ..... 0xffffffff 77 // IC_HS_MASTER_CODE ................. 0x1 78 // IC_SMBUS_RST_IDLE_CNT_DEFAULT ..... 0xffff 79 // IC_SMBUS_UDID_LSB_DEFAULT ......... 0xffffffff 80 // IC_SS_SCL_HIGH_COUNT .............. 0x0028 81 // IC_SS_SCL_LOW_COUNT ............... 0x002f 82 // IC_MAX_SPEED_MODE ................. 0x2 83 // IC_STAT_FOR_CLK_STRETCH ........... 0x0 84 // IC_STOP_DET_IF_MASTER_ACTIVE ...... 0x0 85 // IC_DEFAULT_UFM_SPKLEN ............. 0x1 86 // IC_TX_BUFFER_DEPTH ................ 16 87 // ============================================================================= 88 #ifndef _HARDWARE_REGS_I2C_H 89 #define _HARDWARE_REGS_I2C_H 90 // ============================================================================= 91 // Register : I2C_IC_CON 92 // Description : I2C Control Register. This register can be written only when 93 // the DW_apb_i2c is disabled, which corresponds to the 94 // IC_ENABLE[0] register being set to 0. Writes at other times 95 // have no effect. 96 // 97 // Read/Write Access: - bit 10 is read only. - bit 11 is read only 98 // - bit 16 is read only - bit 17 is read only - bits 18 and 19 99 // are read only. 100 #define I2C_IC_CON_OFFSET _u(0x00000000) 101 #define I2C_IC_CON_BITS _u(0x000007ff) 102 #define I2C_IC_CON_RESET _u(0x00000065) 103 // ----------------------------------------------------------------------------- 104 // Field : I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE 105 // Description : Master issues the STOP_DET interrupt irrespective of whether 106 // master is active or not 107 #define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_RESET _u(0x0) 108 #define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_BITS _u(0x00000400) 109 #define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_MSB _u(10) 110 #define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_LSB _u(10) 111 #define I2C_IC_CON_STOP_DET_IF_MASTER_ACTIVE_ACCESS "RO" 112 // ----------------------------------------------------------------------------- 113 // Field : I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL 114 // Description : This bit controls whether DW_apb_i2c should hold the bus when 115 // the Rx FIFO is physically full to its RX_BUFFER_DEPTH, as 116 // described in the IC_RX_FULL_HLD_BUS_EN parameter. 117 // 118 // Reset value: 0x0. 119 // 0x0 -> Overflow when RX_FIFO is full 120 // 0x1 -> Hold bus when RX_FIFO is full 121 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_RESET _u(0x0) 122 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_BITS _u(0x00000200) 123 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_MSB _u(9) 124 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_LSB _u(9) 125 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_ACCESS "RW" 126 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_VALUE_DISABLED _u(0x0) 127 #define I2C_IC_CON_RX_FIFO_FULL_HLD_CTRL_VALUE_ENABLED _u(0x1) 128 // ----------------------------------------------------------------------------- 129 // Field : I2C_IC_CON_TX_EMPTY_CTRL 130 // Description : This bit controls the generation of the TX_EMPTY interrupt, as 131 // described in the IC_RAW_INTR_STAT register. 132 // 133 // Reset value: 0x0. 134 // 0x0 -> Default behaviour of TX_EMPTY interrupt 135 // 0x1 -> Controlled generation of TX_EMPTY interrupt 136 #define I2C_IC_CON_TX_EMPTY_CTRL_RESET _u(0x0) 137 #define I2C_IC_CON_TX_EMPTY_CTRL_BITS _u(0x00000100) 138 #define I2C_IC_CON_TX_EMPTY_CTRL_MSB _u(8) 139 #define I2C_IC_CON_TX_EMPTY_CTRL_LSB _u(8) 140 #define I2C_IC_CON_TX_EMPTY_CTRL_ACCESS "RW" 141 #define I2C_IC_CON_TX_EMPTY_CTRL_VALUE_DISABLED _u(0x0) 142 #define I2C_IC_CON_TX_EMPTY_CTRL_VALUE_ENABLED _u(0x1) 143 // ----------------------------------------------------------------------------- 144 // Field : I2C_IC_CON_STOP_DET_IFADDRESSED 145 // Description : In slave mode: - 1'b1: issues the STOP_DET interrupt only when 146 // it is addressed. - 1'b0: issues the STOP_DET irrespective of 147 // whether it's addressed or not. Reset value: 0x0 148 // 149 // NOTE: During a general call address, this slave does not issue 150 // the STOP_DET interrupt if STOP_DET_IF_ADDRESSED = 1'b1, even if 151 // the slave responds to the general call address by generating 152 // ACK. The STOP_DET interrupt is generated only when the 153 // transmitted address matches the slave address (SAR). 154 // 0x0 -> slave issues STOP_DET intr always 155 // 0x1 -> slave issues STOP_DET intr only if addressed 156 #define I2C_IC_CON_STOP_DET_IFADDRESSED_RESET _u(0x0) 157 #define I2C_IC_CON_STOP_DET_IFADDRESSED_BITS _u(0x00000080) 158 #define I2C_IC_CON_STOP_DET_IFADDRESSED_MSB _u(7) 159 #define I2C_IC_CON_STOP_DET_IFADDRESSED_LSB _u(7) 160 #define I2C_IC_CON_STOP_DET_IFADDRESSED_ACCESS "RW" 161 #define I2C_IC_CON_STOP_DET_IFADDRESSED_VALUE_DISABLED _u(0x0) 162 #define I2C_IC_CON_STOP_DET_IFADDRESSED_VALUE_ENABLED _u(0x1) 163 // ----------------------------------------------------------------------------- 164 // Field : I2C_IC_CON_IC_SLAVE_DISABLE 165 // Description : This bit controls whether I2C has its slave disabled, which 166 // means once the presetn signal is applied, then this bit is set 167 // and the slave is disabled. 168 // 169 // If this bit is set (slave is disabled), DW_apb_i2c functions 170 // only as a master and does not perform any action that requires 171 // a slave. 172 // 173 // NOTE: Software should ensure that if this bit is written with 174 // 0, then bit 0 should also be written with a 0. 175 // 0x0 -> Slave mode is enabled 176 // 0x1 -> Slave mode is disabled 177 #define I2C_IC_CON_IC_SLAVE_DISABLE_RESET _u(0x1) 178 #define I2C_IC_CON_IC_SLAVE_DISABLE_BITS _u(0x00000040) 179 #define I2C_IC_CON_IC_SLAVE_DISABLE_MSB _u(6) 180 #define I2C_IC_CON_IC_SLAVE_DISABLE_LSB _u(6) 181 #define I2C_IC_CON_IC_SLAVE_DISABLE_ACCESS "RW" 182 #define I2C_IC_CON_IC_SLAVE_DISABLE_VALUE_SLAVE_ENABLED _u(0x0) 183 #define I2C_IC_CON_IC_SLAVE_DISABLE_VALUE_SLAVE_DISABLED _u(0x1) 184 // ----------------------------------------------------------------------------- 185 // Field : I2C_IC_CON_IC_RESTART_EN 186 // Description : Determines whether RESTART conditions may be sent when acting 187 // as a master. Some older slaves do not support handling RESTART 188 // conditions; however, RESTART conditions are used in several 189 // DW_apb_i2c operations. When RESTART is disabled, the master is 190 // prohibited from performing the following functions: - Sending a 191 // START BYTE - Performing any high-speed mode operation - High- 192 // speed mode operation - Performing direction changes in combined 193 // format mode - Performing a read operation with a 10-bit address 194 // By replacing RESTART condition followed by a STOP and a 195 // subsequent START condition, split operations are broken down 196 // into multiple DW_apb_i2c transfers. If the above operations are 197 // performed, it will result in setting bit 6 (TX_ABRT) of the 198 // IC_RAW_INTR_STAT register. 199 // 200 // Reset value: ENABLED 201 // 0x0 -> Master restart disabled 202 // 0x1 -> Master restart enabled 203 #define I2C_IC_CON_IC_RESTART_EN_RESET _u(0x1) 204 #define I2C_IC_CON_IC_RESTART_EN_BITS _u(0x00000020) 205 #define I2C_IC_CON_IC_RESTART_EN_MSB _u(5) 206 #define I2C_IC_CON_IC_RESTART_EN_LSB _u(5) 207 #define I2C_IC_CON_IC_RESTART_EN_ACCESS "RW" 208 #define I2C_IC_CON_IC_RESTART_EN_VALUE_DISABLED _u(0x0) 209 #define I2C_IC_CON_IC_RESTART_EN_VALUE_ENABLED _u(0x1) 210 // ----------------------------------------------------------------------------- 211 // Field : I2C_IC_CON_IC_10BITADDR_MASTER 212 // Description : Controls whether the DW_apb_i2c starts its transfers in 7- or 213 // 10-bit addressing mode when acting as a master. - 0: 7-bit 214 // addressing - 1: 10-bit addressing 215 // 0x0 -> Master 7Bit addressing mode 216 // 0x1 -> Master 10Bit addressing mode 217 #define I2C_IC_CON_IC_10BITADDR_MASTER_RESET _u(0x0) 218 #define I2C_IC_CON_IC_10BITADDR_MASTER_BITS _u(0x00000010) 219 #define I2C_IC_CON_IC_10BITADDR_MASTER_MSB _u(4) 220 #define I2C_IC_CON_IC_10BITADDR_MASTER_LSB _u(4) 221 #define I2C_IC_CON_IC_10BITADDR_MASTER_ACCESS "RW" 222 #define I2C_IC_CON_IC_10BITADDR_MASTER_VALUE_ADDR_7BITS _u(0x0) 223 #define I2C_IC_CON_IC_10BITADDR_MASTER_VALUE_ADDR_10BITS _u(0x1) 224 // ----------------------------------------------------------------------------- 225 // Field : I2C_IC_CON_IC_10BITADDR_SLAVE 226 // Description : When acting as a slave, this bit controls whether the 227 // DW_apb_i2c responds to 7- or 10-bit addresses. - 0: 7-bit 228 // addressing. The DW_apb_i2c ignores transactions that involve 229 // 10-bit addressing; for 7-bit addressing, only the lower 7 bits 230 // of the IC_SAR register are compared. - 1: 10-bit addressing. 231 // The DW_apb_i2c responds to only 10-bit addressing transfers 232 // that match the full 10 bits of the IC_SAR register. 233 // 0x0 -> Slave 7Bit addressing 234 // 0x1 -> Slave 10Bit addressing 235 #define I2C_IC_CON_IC_10BITADDR_SLAVE_RESET _u(0x0) 236 #define I2C_IC_CON_IC_10BITADDR_SLAVE_BITS _u(0x00000008) 237 #define I2C_IC_CON_IC_10BITADDR_SLAVE_MSB _u(3) 238 #define I2C_IC_CON_IC_10BITADDR_SLAVE_LSB _u(3) 239 #define I2C_IC_CON_IC_10BITADDR_SLAVE_ACCESS "RW" 240 #define I2C_IC_CON_IC_10BITADDR_SLAVE_VALUE_ADDR_7BITS _u(0x0) 241 #define I2C_IC_CON_IC_10BITADDR_SLAVE_VALUE_ADDR_10BITS _u(0x1) 242 // ----------------------------------------------------------------------------- 243 // Field : I2C_IC_CON_SPEED 244 // Description : These bits control at which speed the DW_apb_i2c operates; its 245 // setting is relevant only if one is operating the DW_apb_i2c in 246 // master mode. Hardware protects against illegal values being 247 // programmed by software. These bits must be programmed 248 // appropriately for slave mode also, as it is used to capture 249 // correct value of spike filter as per the speed mode. 250 // 251 // This register should be programmed only with a value in the 252 // range of 1 to IC_MAX_SPEED_MODE; otherwise, hardware updates 253 // this register with the value of IC_MAX_SPEED_MODE. 254 // 255 // 1: standard mode (100 kbit/s) 256 // 257 // 2: fast mode (<=400 kbit/s) or fast mode plus (<=1000Kbit/s) 258 // 259 // 3: high speed mode (3.4 Mbit/s) 260 // 261 // Note: This field is not applicable when IC_ULTRA_FAST_MODE=1 262 // 0x1 -> Standard Speed mode of operation 263 // 0x2 -> Fast or Fast Plus mode of operation 264 // 0x3 -> High Speed mode of operation 265 #define I2C_IC_CON_SPEED_RESET _u(0x2) 266 #define I2C_IC_CON_SPEED_BITS _u(0x00000006) 267 #define I2C_IC_CON_SPEED_MSB _u(2) 268 #define I2C_IC_CON_SPEED_LSB _u(1) 269 #define I2C_IC_CON_SPEED_ACCESS "RW" 270 #define I2C_IC_CON_SPEED_VALUE_STANDARD _u(0x1) 271 #define I2C_IC_CON_SPEED_VALUE_FAST _u(0x2) 272 #define I2C_IC_CON_SPEED_VALUE_HIGH _u(0x3) 273 // ----------------------------------------------------------------------------- 274 // Field : I2C_IC_CON_MASTER_MODE 275 // Description : This bit controls whether the DW_apb_i2c master is enabled. 276 // 277 // NOTE: Software should ensure that if this bit is written with 278 // '1' then bit 6 should also be written with a '1'. 279 // 0x0 -> Master mode is disabled 280 // 0x1 -> Master mode is enabled 281 #define I2C_IC_CON_MASTER_MODE_RESET _u(0x1) 282 #define I2C_IC_CON_MASTER_MODE_BITS _u(0x00000001) 283 #define I2C_IC_CON_MASTER_MODE_MSB _u(0) 284 #define I2C_IC_CON_MASTER_MODE_LSB _u(0) 285 #define I2C_IC_CON_MASTER_MODE_ACCESS "RW" 286 #define I2C_IC_CON_MASTER_MODE_VALUE_DISABLED _u(0x0) 287 #define I2C_IC_CON_MASTER_MODE_VALUE_ENABLED _u(0x1) 288 // ============================================================================= 289 // Register : I2C_IC_TAR 290 // Description : I2C Target Address Register 291 // 292 // This register is 12 bits wide, and bits 31:12 are reserved. 293 // This register can be written to only when IC_ENABLE[0] is set 294 // to 0. 295 // 296 // Note: If the software or application is aware that the 297 // DW_apb_i2c is not using the TAR address for the pending 298 // commands in the Tx FIFO, then it is possible to update the TAR 299 // address even while the Tx FIFO has entries (IC_STATUS[2]= 0). - 300 // It is not necessary to perform any write to this register if 301 // DW_apb_i2c is enabled as an I2C slave only. 302 #define I2C_IC_TAR_OFFSET _u(0x00000004) 303 #define I2C_IC_TAR_BITS _u(0x00000fff) 304 #define I2C_IC_TAR_RESET _u(0x00000055) 305 // ----------------------------------------------------------------------------- 306 // Field : I2C_IC_TAR_SPECIAL 307 // Description : This bit indicates whether software performs a Device-ID or 308 // General Call or START BYTE command. - 0: ignore bit 10 309 // GC_OR_START and use IC_TAR normally - 1: perform special I2C 310 // command as specified in Device_ID or GC_OR_START bit Reset 311 // value: 0x0 312 // 0x0 -> Disables programming of GENERAL_CALL or START_BYTE transmission 313 // 0x1 -> Enables programming of GENERAL_CALL or START_BYTE transmission 314 #define I2C_IC_TAR_SPECIAL_RESET _u(0x0) 315 #define I2C_IC_TAR_SPECIAL_BITS _u(0x00000800) 316 #define I2C_IC_TAR_SPECIAL_MSB _u(11) 317 #define I2C_IC_TAR_SPECIAL_LSB _u(11) 318 #define I2C_IC_TAR_SPECIAL_ACCESS "RW" 319 #define I2C_IC_TAR_SPECIAL_VALUE_DISABLED _u(0x0) 320 #define I2C_IC_TAR_SPECIAL_VALUE_ENABLED _u(0x1) 321 // ----------------------------------------------------------------------------- 322 // Field : I2C_IC_TAR_GC_OR_START 323 // Description : If bit 11 (SPECIAL) is set to 1 and bit 13(Device-ID) is set to 324 // 0, then this bit indicates whether a General Call or START byte 325 // command is to be performed by the DW_apb_i2c. - 0: General Call 326 // Address - after issuing a General Call, only writes may be 327 // performed. Attempting to issue a read command results in 328 // setting bit 6 (TX_ABRT) of the IC_RAW_INTR_STAT register. The 329 // DW_apb_i2c remains in General Call mode until the SPECIAL bit 330 // value (bit 11) is cleared. - 1: START BYTE Reset value: 0x0 331 // 0x0 -> GENERAL_CALL byte transmission 332 // 0x1 -> START byte transmission 333 #define I2C_IC_TAR_GC_OR_START_RESET _u(0x0) 334 #define I2C_IC_TAR_GC_OR_START_BITS _u(0x00000400) 335 #define I2C_IC_TAR_GC_OR_START_MSB _u(10) 336 #define I2C_IC_TAR_GC_OR_START_LSB _u(10) 337 #define I2C_IC_TAR_GC_OR_START_ACCESS "RW" 338 #define I2C_IC_TAR_GC_OR_START_VALUE_GENERAL_CALL _u(0x0) 339 #define I2C_IC_TAR_GC_OR_START_VALUE_START_BYTE _u(0x1) 340 // ----------------------------------------------------------------------------- 341 // Field : I2C_IC_TAR_IC_TAR 342 // Description : This is the target address for any master transaction. When 343 // transmitting a General Call, these bits are ignored. To 344 // generate a START BYTE, the CPU needs to write only once into 345 // these bits. 346 // 347 // If the IC_TAR and IC_SAR are the same, loopback exists but the 348 // FIFOs are shared between master and slave, so full loopback is 349 // not feasible. Only one direction loopback mode is supported 350 // (simplex), not duplex. A master cannot transmit to itself; it 351 // can transmit to only a slave. 352 #define I2C_IC_TAR_IC_TAR_RESET _u(0x055) 353 #define I2C_IC_TAR_IC_TAR_BITS _u(0x000003ff) 354 #define I2C_IC_TAR_IC_TAR_MSB _u(9) 355 #define I2C_IC_TAR_IC_TAR_LSB _u(0) 356 #define I2C_IC_TAR_IC_TAR_ACCESS "RW" 357 // ============================================================================= 358 // Register : I2C_IC_SAR 359 // Description : I2C Slave Address Register 360 #define I2C_IC_SAR_OFFSET _u(0x00000008) 361 #define I2C_IC_SAR_BITS _u(0x000003ff) 362 #define I2C_IC_SAR_RESET _u(0x00000055) 363 // ----------------------------------------------------------------------------- 364 // Field : I2C_IC_SAR_IC_SAR 365 // Description : The IC_SAR holds the slave address when the I2C is operating as 366 // a slave. For 7-bit addressing, only IC_SAR[6:0] is used. 367 // 368 // This register can be written only when the I2C interface is 369 // disabled, which corresponds to the IC_ENABLE[0] register being 370 // set to 0. Writes at other times have no effect. 371 // 372 // Note: The default values cannot be any of the reserved address 373 // locations: that is, 0x00 to 0x07, or 0x78 to 0x7f. The correct 374 // operation of the device is not guaranteed if you program the 375 // IC_SAR or IC_TAR to a reserved value. Refer to 376 // <<table_I2C_firstbyte_bit_defs>> for a complete list of these 377 // reserved values. 378 #define I2C_IC_SAR_IC_SAR_RESET _u(0x055) 379 #define I2C_IC_SAR_IC_SAR_BITS _u(0x000003ff) 380 #define I2C_IC_SAR_IC_SAR_MSB _u(9) 381 #define I2C_IC_SAR_IC_SAR_LSB _u(0) 382 #define I2C_IC_SAR_IC_SAR_ACCESS "RW" 383 // ============================================================================= 384 // Register : I2C_IC_DATA_CMD 385 // Description : I2C Rx/Tx Data Buffer and Command Register; this is the 386 // register the CPU writes to when filling the TX FIFO and the CPU 387 // reads from when retrieving bytes from RX FIFO. 388 // 389 // The size of the register changes as follows: 390 // 391 // Write: - 11 bits when IC_EMPTYFIFO_HOLD_MASTER_EN=1 - 9 bits 392 // when IC_EMPTYFIFO_HOLD_MASTER_EN=0 Read: - 12 bits when 393 // IC_FIRST_DATA_BYTE_STATUS = 1 - 8 bits when 394 // IC_FIRST_DATA_BYTE_STATUS = 0 Note: In order for the DW_apb_i2c 395 // to continue acknowledging reads, a read command should be 396 // written for every byte that is to be received; otherwise the 397 // DW_apb_i2c will stop acknowledging. 398 #define I2C_IC_DATA_CMD_OFFSET _u(0x00000010) 399 #define I2C_IC_DATA_CMD_BITS _u(0x00000fff) 400 #define I2C_IC_DATA_CMD_RESET _u(0x00000000) 401 // ----------------------------------------------------------------------------- 402 // Field : I2C_IC_DATA_CMD_FIRST_DATA_BYTE 403 // Description : Indicates the first data byte received after the address phase 404 // for receive transfer in Master receiver or Slave receiver mode. 405 // 406 // Reset value : 0x0 407 // 408 // NOTE: In case of APB_DATA_WIDTH=8, 409 // 410 // 1. The user has to perform two APB Reads to IC_DATA_CMD in 411 // order to get status on 11 bit. 412 // 413 // 2. In order to read the 11 bit, the user has to perform the 414 // first data byte read [7:0] (offset 0x10) and then perform the 415 // second read [15:8] (offset 0x11) in order to know the status of 416 // 11 bit (whether the data received in previous read is a first 417 // data byte or not). 418 // 419 // 3. The 11th bit is an optional read field, user can ignore 2nd 420 // byte read [15:8] (offset 0x11) if not interested in 421 // FIRST_DATA_BYTE status. 422 // 0x0 -> Sequential data byte received 423 // 0x1 -> Non sequential data byte received 424 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_RESET _u(0x0) 425 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_BITS _u(0x00000800) 426 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_MSB _u(11) 427 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_LSB _u(11) 428 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_ACCESS "RO" 429 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_VALUE_INACTIVE _u(0x0) 430 #define I2C_IC_DATA_CMD_FIRST_DATA_BYTE_VALUE_ACTIVE _u(0x1) 431 // ----------------------------------------------------------------------------- 432 // Field : I2C_IC_DATA_CMD_RESTART 433 // Description : This bit controls whether a RESTART is issued before the byte 434 // is sent or received. 435 // 436 // 1 - If IC_RESTART_EN is 1, a RESTART is issued before the data 437 // is sent/received (according to the value of CMD), regardless of 438 // whether or not the transfer direction is changing from the 439 // previous command; if IC_RESTART_EN is 0, a STOP followed by a 440 // START is issued instead. 441 // 442 // 0 - If IC_RESTART_EN is 1, a RESTART is issued only if the 443 // transfer direction is changing from the previous command; if 444 // IC_RESTART_EN is 0, a STOP followed by a START is issued 445 // instead. 446 // 447 // Reset value: 0x0 448 // 0x0 -> Don't Issue RESTART before this command 449 // 0x1 -> Issue RESTART before this command 450 #define I2C_IC_DATA_CMD_RESTART_RESET _u(0x0) 451 #define I2C_IC_DATA_CMD_RESTART_BITS _u(0x00000400) 452 #define I2C_IC_DATA_CMD_RESTART_MSB _u(10) 453 #define I2C_IC_DATA_CMD_RESTART_LSB _u(10) 454 #define I2C_IC_DATA_CMD_RESTART_ACCESS "SC" 455 #define I2C_IC_DATA_CMD_RESTART_VALUE_DISABLE _u(0x0) 456 #define I2C_IC_DATA_CMD_RESTART_VALUE_ENABLE _u(0x1) 457 // ----------------------------------------------------------------------------- 458 // Field : I2C_IC_DATA_CMD_STOP 459 // Description : This bit controls whether a STOP is issued after the byte is 460 // sent or received. 461 // 462 // - 1 - STOP is issued after this byte, regardless of whether or 463 // not the Tx FIFO is empty. If the Tx FIFO is not empty, the 464 // master immediately tries to start a new transfer by issuing a 465 // START and arbitrating for the bus. - 0 - STOP is not issued 466 // after this byte, regardless of whether or not the Tx FIFO is 467 // empty. If the Tx FIFO is not empty, the master continues the 468 // current transfer by sending/receiving data bytes according to 469 // the value of the CMD bit. If the Tx FIFO is empty, the master 470 // holds the SCL line low and stalls the bus until a new command 471 // is available in the Tx FIFO. Reset value: 0x0 472 // 0x0 -> Don't Issue STOP after this command 473 // 0x1 -> Issue STOP after this command 474 #define I2C_IC_DATA_CMD_STOP_RESET _u(0x0) 475 #define I2C_IC_DATA_CMD_STOP_BITS _u(0x00000200) 476 #define I2C_IC_DATA_CMD_STOP_MSB _u(9) 477 #define I2C_IC_DATA_CMD_STOP_LSB _u(9) 478 #define I2C_IC_DATA_CMD_STOP_ACCESS "SC" 479 #define I2C_IC_DATA_CMD_STOP_VALUE_DISABLE _u(0x0) 480 #define I2C_IC_DATA_CMD_STOP_VALUE_ENABLE _u(0x1) 481 // ----------------------------------------------------------------------------- 482 // Field : I2C_IC_DATA_CMD_CMD 483 // Description : This bit controls whether a read or a write is performed. This 484 // bit does not control the direction when the DW_apb_i2con acts 485 // as a slave. It controls only the direction when it acts as a 486 // master. 487 // 488 // When a command is entered in the TX FIFO, this bit 489 // distinguishes the write and read commands. In slave-receiver 490 // mode, this bit is a 'don't care' because writes to this 491 // register are not required. In slave-transmitter mode, a '0' 492 // indicates that the data in IC_DATA_CMD is to be transmitted. 493 // 494 // When programming this bit, you should remember the following: 495 // attempting to perform a read operation after a General Call 496 // command has been sent results in a TX_ABRT interrupt (bit 6 of 497 // the IC_RAW_INTR_STAT register), unless bit 11 (SPECIAL) in the 498 // IC_TAR register has been cleared. If a '1' is written to this 499 // bit after receiving a RD_REQ interrupt, then a TX_ABRT 500 // interrupt occurs. 501 // 502 // Reset value: 0x0 503 // 0x0 -> Master Write Command 504 // 0x1 -> Master Read Command 505 #define I2C_IC_DATA_CMD_CMD_RESET _u(0x0) 506 #define I2C_IC_DATA_CMD_CMD_BITS _u(0x00000100) 507 #define I2C_IC_DATA_CMD_CMD_MSB _u(8) 508 #define I2C_IC_DATA_CMD_CMD_LSB _u(8) 509 #define I2C_IC_DATA_CMD_CMD_ACCESS "SC" 510 #define I2C_IC_DATA_CMD_CMD_VALUE_WRITE _u(0x0) 511 #define I2C_IC_DATA_CMD_CMD_VALUE_READ _u(0x1) 512 // ----------------------------------------------------------------------------- 513 // Field : I2C_IC_DATA_CMD_DAT 514 // Description : This register contains the data to be transmitted or received 515 // on the I2C bus. If you are writing to this register and want to 516 // perform a read, bits 7:0 (DAT) are ignored by the DW_apb_i2c. 517 // However, when you read this register, these bits return the 518 // value of data received on the DW_apb_i2c interface. 519 // 520 // Reset value: 0x0 521 #define I2C_IC_DATA_CMD_DAT_RESET _u(0x00) 522 #define I2C_IC_DATA_CMD_DAT_BITS _u(0x000000ff) 523 #define I2C_IC_DATA_CMD_DAT_MSB _u(7) 524 #define I2C_IC_DATA_CMD_DAT_LSB _u(0) 525 #define I2C_IC_DATA_CMD_DAT_ACCESS "RW" 526 // ============================================================================= 527 // Register : I2C_IC_SS_SCL_HCNT 528 // Description : Standard Speed I2C Clock SCL High Count Register 529 #define I2C_IC_SS_SCL_HCNT_OFFSET _u(0x00000014) 530 #define I2C_IC_SS_SCL_HCNT_BITS _u(0x0000ffff) 531 #define I2C_IC_SS_SCL_HCNT_RESET _u(0x00000028) 532 // ----------------------------------------------------------------------------- 533 // Field : I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT 534 // Description : This register must be set before any I2C bus transaction can 535 // take place to ensure proper I/O timing. This register sets the 536 // SCL clock high-period count for standard speed. For more 537 // information, refer to 'IC_CLK Frequency Configuration'. 538 // 539 // This register can be written only when the I2C interface is 540 // disabled which corresponds to the IC_ENABLE[0] register being 541 // set to 0. Writes at other times have no effect. 542 // 543 // The minimum valid value is 6; hardware prevents values less 544 // than this being written, and if attempted results in 6 being 545 // set. For designs with APB_DATA_WIDTH = 8, the order of 546 // programming is important to ensure the correct operation of the 547 // DW_apb_i2c. The lower byte must be programmed first. Then the 548 // upper byte is programmed. 549 // 550 // NOTE: This register must not be programmed to a value higher 551 // than 65525, because DW_apb_i2c uses a 16-bit counter to flag an 552 // I2C bus idle condition when this counter reaches a value of 553 // IC_SS_SCL_HCNT + 10. 554 #define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_RESET _u(0x0028) 555 #define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_BITS _u(0x0000ffff) 556 #define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_MSB _u(15) 557 #define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_LSB _u(0) 558 #define I2C_IC_SS_SCL_HCNT_IC_SS_SCL_HCNT_ACCESS "RW" 559 // ============================================================================= 560 // Register : I2C_IC_SS_SCL_LCNT 561 // Description : Standard Speed I2C Clock SCL Low Count Register 562 #define I2C_IC_SS_SCL_LCNT_OFFSET _u(0x00000018) 563 #define I2C_IC_SS_SCL_LCNT_BITS _u(0x0000ffff) 564 #define I2C_IC_SS_SCL_LCNT_RESET _u(0x0000002f) 565 // ----------------------------------------------------------------------------- 566 // Field : I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT 567 // Description : This register must be set before any I2C bus transaction can 568 // take place to ensure proper I/O timing. This register sets the 569 // SCL clock low period count for standard speed. For more 570 // information, refer to 'IC_CLK Frequency Configuration' 571 // 572 // This register can be written only when the I2C interface is 573 // disabled which corresponds to the IC_ENABLE[0] register being 574 // set to 0. Writes at other times have no effect. 575 // 576 // The minimum valid value is 8; hardware prevents values less 577 // than this being written, and if attempted, results in 8 being 578 // set. For designs with APB_DATA_WIDTH = 8, the order of 579 // programming is important to ensure the correct operation of 580 // DW_apb_i2c. The lower byte must be programmed first, and then 581 // the upper byte is programmed. 582 #define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_RESET _u(0x002f) 583 #define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_BITS _u(0x0000ffff) 584 #define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_MSB _u(15) 585 #define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_LSB _u(0) 586 #define I2C_IC_SS_SCL_LCNT_IC_SS_SCL_LCNT_ACCESS "RW" 587 // ============================================================================= 588 // Register : I2C_IC_FS_SCL_HCNT 589 // Description : Fast Mode or Fast Mode Plus I2C Clock SCL High Count Register 590 #define I2C_IC_FS_SCL_HCNT_OFFSET _u(0x0000001c) 591 #define I2C_IC_FS_SCL_HCNT_BITS _u(0x0000ffff) 592 #define I2C_IC_FS_SCL_HCNT_RESET _u(0x00000006) 593 // ----------------------------------------------------------------------------- 594 // Field : I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT 595 // Description : This register must be set before any I2C bus transaction can 596 // take place to ensure proper I/O timing. This register sets the 597 // SCL clock high-period count for fast mode or fast mode plus. It 598 // is used in high-speed mode to send the Master Code and START 599 // BYTE or General CALL. For more information, refer to 'IC_CLK 600 // Frequency Configuration'. 601 // 602 // This register goes away and becomes read-only returning 0s if 603 // IC_MAX_SPEED_MODE = standard. This register can be written only 604 // when the I2C interface is disabled, which corresponds to the 605 // IC_ENABLE[0] register being set to 0. Writes at other times 606 // have no effect. 607 // 608 // The minimum valid value is 6; hardware prevents values less 609 // than this being written, and if attempted results in 6 being 610 // set. For designs with APB_DATA_WIDTH == 8 the order of 611 // programming is important to ensure the correct operation of the 612 // DW_apb_i2c. The lower byte must be programmed first. Then the 613 // upper byte is programmed. 614 #define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_RESET _u(0x0006) 615 #define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_BITS _u(0x0000ffff) 616 #define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_MSB _u(15) 617 #define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_LSB _u(0) 618 #define I2C_IC_FS_SCL_HCNT_IC_FS_SCL_HCNT_ACCESS "RW" 619 // ============================================================================= 620 // Register : I2C_IC_FS_SCL_LCNT 621 // Description : Fast Mode or Fast Mode Plus I2C Clock SCL Low Count Register 622 #define I2C_IC_FS_SCL_LCNT_OFFSET _u(0x00000020) 623 #define I2C_IC_FS_SCL_LCNT_BITS _u(0x0000ffff) 624 #define I2C_IC_FS_SCL_LCNT_RESET _u(0x0000000d) 625 // ----------------------------------------------------------------------------- 626 // Field : I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT 627 // Description : This register must be set before any I2C bus transaction can 628 // take place to ensure proper I/O timing. This register sets the 629 // SCL clock low period count for fast speed. It is used in high- 630 // speed mode to send the Master Code and START BYTE or General 631 // CALL. For more information, refer to 'IC_CLK Frequency 632 // Configuration'. 633 // 634 // This register goes away and becomes read-only returning 0s if 635 // IC_MAX_SPEED_MODE = standard. 636 // 637 // This register can be written only when the I2C interface is 638 // disabled, which corresponds to the IC_ENABLE[0] register being 639 // set to 0. Writes at other times have no effect. 640 // 641 // The minimum valid value is 8; hardware prevents values less 642 // than this being written, and if attempted results in 8 being 643 // set. For designs with APB_DATA_WIDTH = 8 the order of 644 // programming is important to ensure the correct operation of the 645 // DW_apb_i2c. The lower byte must be programmed first. Then the 646 // upper byte is programmed. If the value is less than 8 then the 647 // count value gets changed to 8. 648 #define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_RESET _u(0x000d) 649 #define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_BITS _u(0x0000ffff) 650 #define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_MSB _u(15) 651 #define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_LSB _u(0) 652 #define I2C_IC_FS_SCL_LCNT_IC_FS_SCL_LCNT_ACCESS "RW" 653 // ============================================================================= 654 // Register : I2C_IC_INTR_STAT 655 // Description : I2C Interrupt Status Register 656 // 657 // Each bit in this register has a corresponding mask bit in the 658 // IC_INTR_MASK register. These bits are cleared by reading the 659 // matching interrupt clear register. The unmasked raw versions of 660 // these bits are available in the IC_RAW_INTR_STAT register. 661 #define I2C_IC_INTR_STAT_OFFSET _u(0x0000002c) 662 #define I2C_IC_INTR_STAT_BITS _u(0x00001fff) 663 #define I2C_IC_INTR_STAT_RESET _u(0x00000000) 664 // ----------------------------------------------------------------------------- 665 // Field : I2C_IC_INTR_STAT_R_RESTART_DET 666 // Description : See IC_RAW_INTR_STAT for a detailed description of 667 // R_RESTART_DET bit. 668 // 669 // Reset value: 0x0 670 // 0x0 -> R_RESTART_DET interrupt is inactive 671 // 0x1 -> R_RESTART_DET interrupt is active 672 #define I2C_IC_INTR_STAT_R_RESTART_DET_RESET _u(0x0) 673 #define I2C_IC_INTR_STAT_R_RESTART_DET_BITS _u(0x00001000) 674 #define I2C_IC_INTR_STAT_R_RESTART_DET_MSB _u(12) 675 #define I2C_IC_INTR_STAT_R_RESTART_DET_LSB _u(12) 676 #define I2C_IC_INTR_STAT_R_RESTART_DET_ACCESS "RO" 677 #define I2C_IC_INTR_STAT_R_RESTART_DET_VALUE_INACTIVE _u(0x0) 678 #define I2C_IC_INTR_STAT_R_RESTART_DET_VALUE_ACTIVE _u(0x1) 679 // ----------------------------------------------------------------------------- 680 // Field : I2C_IC_INTR_STAT_R_GEN_CALL 681 // Description : See IC_RAW_INTR_STAT for a detailed description of R_GEN_CALL 682 // bit. 683 // 684 // Reset value: 0x0 685 // 0x0 -> R_GEN_CALL interrupt is inactive 686 // 0x1 -> R_GEN_CALL interrupt is active 687 #define I2C_IC_INTR_STAT_R_GEN_CALL_RESET _u(0x0) 688 #define I2C_IC_INTR_STAT_R_GEN_CALL_BITS _u(0x00000800) 689 #define I2C_IC_INTR_STAT_R_GEN_CALL_MSB _u(11) 690 #define I2C_IC_INTR_STAT_R_GEN_CALL_LSB _u(11) 691 #define I2C_IC_INTR_STAT_R_GEN_CALL_ACCESS "RO" 692 #define I2C_IC_INTR_STAT_R_GEN_CALL_VALUE_INACTIVE _u(0x0) 693 #define I2C_IC_INTR_STAT_R_GEN_CALL_VALUE_ACTIVE _u(0x1) 694 // ----------------------------------------------------------------------------- 695 // Field : I2C_IC_INTR_STAT_R_START_DET 696 // Description : See IC_RAW_INTR_STAT for a detailed description of R_START_DET 697 // bit. 698 // 699 // Reset value: 0x0 700 // 0x0 -> R_START_DET interrupt is inactive 701 // 0x1 -> R_START_DET interrupt is active 702 #define I2C_IC_INTR_STAT_R_START_DET_RESET _u(0x0) 703 #define I2C_IC_INTR_STAT_R_START_DET_BITS _u(0x00000400) 704 #define I2C_IC_INTR_STAT_R_START_DET_MSB _u(10) 705 #define I2C_IC_INTR_STAT_R_START_DET_LSB _u(10) 706 #define I2C_IC_INTR_STAT_R_START_DET_ACCESS "RO" 707 #define I2C_IC_INTR_STAT_R_START_DET_VALUE_INACTIVE _u(0x0) 708 #define I2C_IC_INTR_STAT_R_START_DET_VALUE_ACTIVE _u(0x1) 709 // ----------------------------------------------------------------------------- 710 // Field : I2C_IC_INTR_STAT_R_STOP_DET 711 // Description : See IC_RAW_INTR_STAT for a detailed description of R_STOP_DET 712 // bit. 713 // 714 // Reset value: 0x0 715 // 0x0 -> R_STOP_DET interrupt is inactive 716 // 0x1 -> R_STOP_DET interrupt is active 717 #define I2C_IC_INTR_STAT_R_STOP_DET_RESET _u(0x0) 718 #define I2C_IC_INTR_STAT_R_STOP_DET_BITS _u(0x00000200) 719 #define I2C_IC_INTR_STAT_R_STOP_DET_MSB _u(9) 720 #define I2C_IC_INTR_STAT_R_STOP_DET_LSB _u(9) 721 #define I2C_IC_INTR_STAT_R_STOP_DET_ACCESS "RO" 722 #define I2C_IC_INTR_STAT_R_STOP_DET_VALUE_INACTIVE _u(0x0) 723 #define I2C_IC_INTR_STAT_R_STOP_DET_VALUE_ACTIVE _u(0x1) 724 // ----------------------------------------------------------------------------- 725 // Field : I2C_IC_INTR_STAT_R_ACTIVITY 726 // Description : See IC_RAW_INTR_STAT for a detailed description of R_ACTIVITY 727 // bit. 728 // 729 // Reset value: 0x0 730 // 0x0 -> R_ACTIVITY interrupt is inactive 731 // 0x1 -> R_ACTIVITY interrupt is active 732 #define I2C_IC_INTR_STAT_R_ACTIVITY_RESET _u(0x0) 733 #define I2C_IC_INTR_STAT_R_ACTIVITY_BITS _u(0x00000100) 734 #define I2C_IC_INTR_STAT_R_ACTIVITY_MSB _u(8) 735 #define I2C_IC_INTR_STAT_R_ACTIVITY_LSB _u(8) 736 #define I2C_IC_INTR_STAT_R_ACTIVITY_ACCESS "RO" 737 #define I2C_IC_INTR_STAT_R_ACTIVITY_VALUE_INACTIVE _u(0x0) 738 #define I2C_IC_INTR_STAT_R_ACTIVITY_VALUE_ACTIVE _u(0x1) 739 // ----------------------------------------------------------------------------- 740 // Field : I2C_IC_INTR_STAT_R_RX_DONE 741 // Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_DONE 742 // bit. 743 // 744 // Reset value: 0x0 745 // 0x0 -> R_RX_DONE interrupt is inactive 746 // 0x1 -> R_RX_DONE interrupt is active 747 #define I2C_IC_INTR_STAT_R_RX_DONE_RESET _u(0x0) 748 #define I2C_IC_INTR_STAT_R_RX_DONE_BITS _u(0x00000080) 749 #define I2C_IC_INTR_STAT_R_RX_DONE_MSB _u(7) 750 #define I2C_IC_INTR_STAT_R_RX_DONE_LSB _u(7) 751 #define I2C_IC_INTR_STAT_R_RX_DONE_ACCESS "RO" 752 #define I2C_IC_INTR_STAT_R_RX_DONE_VALUE_INACTIVE _u(0x0) 753 #define I2C_IC_INTR_STAT_R_RX_DONE_VALUE_ACTIVE _u(0x1) 754 // ----------------------------------------------------------------------------- 755 // Field : I2C_IC_INTR_STAT_R_TX_ABRT 756 // Description : See IC_RAW_INTR_STAT for a detailed description of R_TX_ABRT 757 // bit. 758 // 759 // Reset value: 0x0 760 // 0x0 -> R_TX_ABRT interrupt is inactive 761 // 0x1 -> R_TX_ABRT interrupt is active 762 #define I2C_IC_INTR_STAT_R_TX_ABRT_RESET _u(0x0) 763 #define I2C_IC_INTR_STAT_R_TX_ABRT_BITS _u(0x00000040) 764 #define I2C_IC_INTR_STAT_R_TX_ABRT_MSB _u(6) 765 #define I2C_IC_INTR_STAT_R_TX_ABRT_LSB _u(6) 766 #define I2C_IC_INTR_STAT_R_TX_ABRT_ACCESS "RO" 767 #define I2C_IC_INTR_STAT_R_TX_ABRT_VALUE_INACTIVE _u(0x0) 768 #define I2C_IC_INTR_STAT_R_TX_ABRT_VALUE_ACTIVE _u(0x1) 769 // ----------------------------------------------------------------------------- 770 // Field : I2C_IC_INTR_STAT_R_RD_REQ 771 // Description : See IC_RAW_INTR_STAT for a detailed description of R_RD_REQ 772 // bit. 773 // 774 // Reset value: 0x0 775 // 0x0 -> R_RD_REQ interrupt is inactive 776 // 0x1 -> R_RD_REQ interrupt is active 777 #define I2C_IC_INTR_STAT_R_RD_REQ_RESET _u(0x0) 778 #define I2C_IC_INTR_STAT_R_RD_REQ_BITS _u(0x00000020) 779 #define I2C_IC_INTR_STAT_R_RD_REQ_MSB _u(5) 780 #define I2C_IC_INTR_STAT_R_RD_REQ_LSB _u(5) 781 #define I2C_IC_INTR_STAT_R_RD_REQ_ACCESS "RO" 782 #define I2C_IC_INTR_STAT_R_RD_REQ_VALUE_INACTIVE _u(0x0) 783 #define I2C_IC_INTR_STAT_R_RD_REQ_VALUE_ACTIVE _u(0x1) 784 // ----------------------------------------------------------------------------- 785 // Field : I2C_IC_INTR_STAT_R_TX_EMPTY 786 // Description : See IC_RAW_INTR_STAT for a detailed description of R_TX_EMPTY 787 // bit. 788 // 789 // Reset value: 0x0 790 // 0x0 -> R_TX_EMPTY interrupt is inactive 791 // 0x1 -> R_TX_EMPTY interrupt is active 792 #define I2C_IC_INTR_STAT_R_TX_EMPTY_RESET _u(0x0) 793 #define I2C_IC_INTR_STAT_R_TX_EMPTY_BITS _u(0x00000010) 794 #define I2C_IC_INTR_STAT_R_TX_EMPTY_MSB _u(4) 795 #define I2C_IC_INTR_STAT_R_TX_EMPTY_LSB _u(4) 796 #define I2C_IC_INTR_STAT_R_TX_EMPTY_ACCESS "RO" 797 #define I2C_IC_INTR_STAT_R_TX_EMPTY_VALUE_INACTIVE _u(0x0) 798 #define I2C_IC_INTR_STAT_R_TX_EMPTY_VALUE_ACTIVE _u(0x1) 799 // ----------------------------------------------------------------------------- 800 // Field : I2C_IC_INTR_STAT_R_TX_OVER 801 // Description : See IC_RAW_INTR_STAT for a detailed description of R_TX_OVER 802 // bit. 803 // 804 // Reset value: 0x0 805 // 0x0 -> R_TX_OVER interrupt is inactive 806 // 0x1 -> R_TX_OVER interrupt is active 807 #define I2C_IC_INTR_STAT_R_TX_OVER_RESET _u(0x0) 808 #define I2C_IC_INTR_STAT_R_TX_OVER_BITS _u(0x00000008) 809 #define I2C_IC_INTR_STAT_R_TX_OVER_MSB _u(3) 810 #define I2C_IC_INTR_STAT_R_TX_OVER_LSB _u(3) 811 #define I2C_IC_INTR_STAT_R_TX_OVER_ACCESS "RO" 812 #define I2C_IC_INTR_STAT_R_TX_OVER_VALUE_INACTIVE _u(0x0) 813 #define I2C_IC_INTR_STAT_R_TX_OVER_VALUE_ACTIVE _u(0x1) 814 // ----------------------------------------------------------------------------- 815 // Field : I2C_IC_INTR_STAT_R_RX_FULL 816 // Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_FULL 817 // bit. 818 // 819 // Reset value: 0x0 820 // 0x0 -> R_RX_FULL interrupt is inactive 821 // 0x1 -> R_RX_FULL interrupt is active 822 #define I2C_IC_INTR_STAT_R_RX_FULL_RESET _u(0x0) 823 #define I2C_IC_INTR_STAT_R_RX_FULL_BITS _u(0x00000004) 824 #define I2C_IC_INTR_STAT_R_RX_FULL_MSB _u(2) 825 #define I2C_IC_INTR_STAT_R_RX_FULL_LSB _u(2) 826 #define I2C_IC_INTR_STAT_R_RX_FULL_ACCESS "RO" 827 #define I2C_IC_INTR_STAT_R_RX_FULL_VALUE_INACTIVE _u(0x0) 828 #define I2C_IC_INTR_STAT_R_RX_FULL_VALUE_ACTIVE _u(0x1) 829 // ----------------------------------------------------------------------------- 830 // Field : I2C_IC_INTR_STAT_R_RX_OVER 831 // Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_OVER 832 // bit. 833 // 834 // Reset value: 0x0 835 // 0x0 -> R_RX_OVER interrupt is inactive 836 // 0x1 -> R_RX_OVER interrupt is active 837 #define I2C_IC_INTR_STAT_R_RX_OVER_RESET _u(0x0) 838 #define I2C_IC_INTR_STAT_R_RX_OVER_BITS _u(0x00000002) 839 #define I2C_IC_INTR_STAT_R_RX_OVER_MSB _u(1) 840 #define I2C_IC_INTR_STAT_R_RX_OVER_LSB _u(1) 841 #define I2C_IC_INTR_STAT_R_RX_OVER_ACCESS "RO" 842 #define I2C_IC_INTR_STAT_R_RX_OVER_VALUE_INACTIVE _u(0x0) 843 #define I2C_IC_INTR_STAT_R_RX_OVER_VALUE_ACTIVE _u(0x1) 844 // ----------------------------------------------------------------------------- 845 // Field : I2C_IC_INTR_STAT_R_RX_UNDER 846 // Description : See IC_RAW_INTR_STAT for a detailed description of R_RX_UNDER 847 // bit. 848 // 849 // Reset value: 0x0 850 // 0x0 -> RX_UNDER interrupt is inactive 851 // 0x1 -> RX_UNDER interrupt is active 852 #define I2C_IC_INTR_STAT_R_RX_UNDER_RESET _u(0x0) 853 #define I2C_IC_INTR_STAT_R_RX_UNDER_BITS _u(0x00000001) 854 #define I2C_IC_INTR_STAT_R_RX_UNDER_MSB _u(0) 855 #define I2C_IC_INTR_STAT_R_RX_UNDER_LSB _u(0) 856 #define I2C_IC_INTR_STAT_R_RX_UNDER_ACCESS "RO" 857 #define I2C_IC_INTR_STAT_R_RX_UNDER_VALUE_INACTIVE _u(0x0) 858 #define I2C_IC_INTR_STAT_R_RX_UNDER_VALUE_ACTIVE _u(0x1) 859 // ============================================================================= 860 // Register : I2C_IC_INTR_MASK 861 // Description : I2C Interrupt Mask Register. 862 // 863 // These bits mask their corresponding interrupt status bits. This 864 // register is active low; a value of 0 masks the interrupt, 865 // whereas a value of 1 unmasks the interrupt. 866 #define I2C_IC_INTR_MASK_OFFSET _u(0x00000030) 867 #define I2C_IC_INTR_MASK_BITS _u(0x00001fff) 868 #define I2C_IC_INTR_MASK_RESET _u(0x000008ff) 869 // ----------------------------------------------------------------------------- 870 // Field : I2C_IC_INTR_MASK_M_RESTART_DET 871 // Description : This bit masks the R_RESTART_DET interrupt in IC_INTR_STAT 872 // register. 873 // 874 // Reset value: 0x0 875 // 0x0 -> RESTART_DET interrupt is masked 876 // 0x1 -> RESTART_DET interrupt is unmasked 877 #define I2C_IC_INTR_MASK_M_RESTART_DET_RESET _u(0x0) 878 #define I2C_IC_INTR_MASK_M_RESTART_DET_BITS _u(0x00001000) 879 #define I2C_IC_INTR_MASK_M_RESTART_DET_MSB _u(12) 880 #define I2C_IC_INTR_MASK_M_RESTART_DET_LSB _u(12) 881 #define I2C_IC_INTR_MASK_M_RESTART_DET_ACCESS "RW" 882 #define I2C_IC_INTR_MASK_M_RESTART_DET_VALUE_ENABLED _u(0x0) 883 #define I2C_IC_INTR_MASK_M_RESTART_DET_VALUE_DISABLED _u(0x1) 884 // ----------------------------------------------------------------------------- 885 // Field : I2C_IC_INTR_MASK_M_GEN_CALL 886 // Description : This bit masks the R_GEN_CALL interrupt in IC_INTR_STAT 887 // register. 888 // 889 // Reset value: 0x1 890 // 0x0 -> GEN_CALL interrupt is masked 891 // 0x1 -> GEN_CALL interrupt is unmasked 892 #define I2C_IC_INTR_MASK_M_GEN_CALL_RESET _u(0x1) 893 #define I2C_IC_INTR_MASK_M_GEN_CALL_BITS _u(0x00000800) 894 #define I2C_IC_INTR_MASK_M_GEN_CALL_MSB _u(11) 895 #define I2C_IC_INTR_MASK_M_GEN_CALL_LSB _u(11) 896 #define I2C_IC_INTR_MASK_M_GEN_CALL_ACCESS "RW" 897 #define I2C_IC_INTR_MASK_M_GEN_CALL_VALUE_ENABLED _u(0x0) 898 #define I2C_IC_INTR_MASK_M_GEN_CALL_VALUE_DISABLED _u(0x1) 899 // ----------------------------------------------------------------------------- 900 // Field : I2C_IC_INTR_MASK_M_START_DET 901 // Description : This bit masks the R_START_DET interrupt in IC_INTR_STAT 902 // register. 903 // 904 // Reset value: 0x0 905 // 0x0 -> START_DET interrupt is masked 906 // 0x1 -> START_DET interrupt is unmasked 907 #define I2C_IC_INTR_MASK_M_START_DET_RESET _u(0x0) 908 #define I2C_IC_INTR_MASK_M_START_DET_BITS _u(0x00000400) 909 #define I2C_IC_INTR_MASK_M_START_DET_MSB _u(10) 910 #define I2C_IC_INTR_MASK_M_START_DET_LSB _u(10) 911 #define I2C_IC_INTR_MASK_M_START_DET_ACCESS "RW" 912 #define I2C_IC_INTR_MASK_M_START_DET_VALUE_ENABLED _u(0x0) 913 #define I2C_IC_INTR_MASK_M_START_DET_VALUE_DISABLED _u(0x1) 914 // ----------------------------------------------------------------------------- 915 // Field : I2C_IC_INTR_MASK_M_STOP_DET 916 // Description : This bit masks the R_STOP_DET interrupt in IC_INTR_STAT 917 // register. 918 // 919 // Reset value: 0x0 920 // 0x0 -> STOP_DET interrupt is masked 921 // 0x1 -> STOP_DET interrupt is unmasked 922 #define I2C_IC_INTR_MASK_M_STOP_DET_RESET _u(0x0) 923 #define I2C_IC_INTR_MASK_M_STOP_DET_BITS _u(0x00000200) 924 #define I2C_IC_INTR_MASK_M_STOP_DET_MSB _u(9) 925 #define I2C_IC_INTR_MASK_M_STOP_DET_LSB _u(9) 926 #define I2C_IC_INTR_MASK_M_STOP_DET_ACCESS "RW" 927 #define I2C_IC_INTR_MASK_M_STOP_DET_VALUE_ENABLED _u(0x0) 928 #define I2C_IC_INTR_MASK_M_STOP_DET_VALUE_DISABLED _u(0x1) 929 // ----------------------------------------------------------------------------- 930 // Field : I2C_IC_INTR_MASK_M_ACTIVITY 931 // Description : This bit masks the R_ACTIVITY interrupt in IC_INTR_STAT 932 // register. 933 // 934 // Reset value: 0x0 935 // 0x0 -> ACTIVITY interrupt is masked 936 // 0x1 -> ACTIVITY interrupt is unmasked 937 #define I2C_IC_INTR_MASK_M_ACTIVITY_RESET _u(0x0) 938 #define I2C_IC_INTR_MASK_M_ACTIVITY_BITS _u(0x00000100) 939 #define I2C_IC_INTR_MASK_M_ACTIVITY_MSB _u(8) 940 #define I2C_IC_INTR_MASK_M_ACTIVITY_LSB _u(8) 941 #define I2C_IC_INTR_MASK_M_ACTIVITY_ACCESS "RW" 942 #define I2C_IC_INTR_MASK_M_ACTIVITY_VALUE_ENABLED _u(0x0) 943 #define I2C_IC_INTR_MASK_M_ACTIVITY_VALUE_DISABLED _u(0x1) 944 // ----------------------------------------------------------------------------- 945 // Field : I2C_IC_INTR_MASK_M_RX_DONE 946 // Description : This bit masks the R_RX_DONE interrupt in IC_INTR_STAT 947 // register. 948 // 949 // Reset value: 0x1 950 // 0x0 -> RX_DONE interrupt is masked 951 // 0x1 -> RX_DONE interrupt is unmasked 952 #define I2C_IC_INTR_MASK_M_RX_DONE_RESET _u(0x1) 953 #define I2C_IC_INTR_MASK_M_RX_DONE_BITS _u(0x00000080) 954 #define I2C_IC_INTR_MASK_M_RX_DONE_MSB _u(7) 955 #define I2C_IC_INTR_MASK_M_RX_DONE_LSB _u(7) 956 #define I2C_IC_INTR_MASK_M_RX_DONE_ACCESS "RW" 957 #define I2C_IC_INTR_MASK_M_RX_DONE_VALUE_ENABLED _u(0x0) 958 #define I2C_IC_INTR_MASK_M_RX_DONE_VALUE_DISABLED _u(0x1) 959 // ----------------------------------------------------------------------------- 960 // Field : I2C_IC_INTR_MASK_M_TX_ABRT 961 // Description : This bit masks the R_TX_ABRT interrupt in IC_INTR_STAT 962 // register. 963 // 964 // Reset value: 0x1 965 // 0x0 -> TX_ABORT interrupt is masked 966 // 0x1 -> TX_ABORT interrupt is unmasked 967 #define I2C_IC_INTR_MASK_M_TX_ABRT_RESET _u(0x1) 968 #define I2C_IC_INTR_MASK_M_TX_ABRT_BITS _u(0x00000040) 969 #define I2C_IC_INTR_MASK_M_TX_ABRT_MSB _u(6) 970 #define I2C_IC_INTR_MASK_M_TX_ABRT_LSB _u(6) 971 #define I2C_IC_INTR_MASK_M_TX_ABRT_ACCESS "RW" 972 #define I2C_IC_INTR_MASK_M_TX_ABRT_VALUE_ENABLED _u(0x0) 973 #define I2C_IC_INTR_MASK_M_TX_ABRT_VALUE_DISABLED _u(0x1) 974 // ----------------------------------------------------------------------------- 975 // Field : I2C_IC_INTR_MASK_M_RD_REQ 976 // Description : This bit masks the R_RD_REQ interrupt in IC_INTR_STAT register. 977 // 978 // Reset value: 0x1 979 // 0x0 -> RD_REQ interrupt is masked 980 // 0x1 -> RD_REQ interrupt is unmasked 981 #define I2C_IC_INTR_MASK_M_RD_REQ_RESET _u(0x1) 982 #define I2C_IC_INTR_MASK_M_RD_REQ_BITS _u(0x00000020) 983 #define I2C_IC_INTR_MASK_M_RD_REQ_MSB _u(5) 984 #define I2C_IC_INTR_MASK_M_RD_REQ_LSB _u(5) 985 #define I2C_IC_INTR_MASK_M_RD_REQ_ACCESS "RW" 986 #define I2C_IC_INTR_MASK_M_RD_REQ_VALUE_ENABLED _u(0x0) 987 #define I2C_IC_INTR_MASK_M_RD_REQ_VALUE_DISABLED _u(0x1) 988 // ----------------------------------------------------------------------------- 989 // Field : I2C_IC_INTR_MASK_M_TX_EMPTY 990 // Description : This bit masks the R_TX_EMPTY interrupt in IC_INTR_STAT 991 // register. 992 // 993 // Reset value: 0x1 994 // 0x0 -> TX_EMPTY interrupt is masked 995 // 0x1 -> TX_EMPTY interrupt is unmasked 996 #define I2C_IC_INTR_MASK_M_TX_EMPTY_RESET _u(0x1) 997 #define I2C_IC_INTR_MASK_M_TX_EMPTY_BITS _u(0x00000010) 998 #define I2C_IC_INTR_MASK_M_TX_EMPTY_MSB _u(4) 999 #define I2C_IC_INTR_MASK_M_TX_EMPTY_LSB _u(4) 1000 #define I2C_IC_INTR_MASK_M_TX_EMPTY_ACCESS "RW" 1001 #define I2C_IC_INTR_MASK_M_TX_EMPTY_VALUE_ENABLED _u(0x0) 1002 #define I2C_IC_INTR_MASK_M_TX_EMPTY_VALUE_DISABLED _u(0x1) 1003 // ----------------------------------------------------------------------------- 1004 // Field : I2C_IC_INTR_MASK_M_TX_OVER 1005 // Description : This bit masks the R_TX_OVER interrupt in IC_INTR_STAT 1006 // register. 1007 // 1008 // Reset value: 0x1 1009 // 0x0 -> TX_OVER interrupt is masked 1010 // 0x1 -> TX_OVER interrupt is unmasked 1011 #define I2C_IC_INTR_MASK_M_TX_OVER_RESET _u(0x1) 1012 #define I2C_IC_INTR_MASK_M_TX_OVER_BITS _u(0x00000008) 1013 #define I2C_IC_INTR_MASK_M_TX_OVER_MSB _u(3) 1014 #define I2C_IC_INTR_MASK_M_TX_OVER_LSB _u(3) 1015 #define I2C_IC_INTR_MASK_M_TX_OVER_ACCESS "RW" 1016 #define I2C_IC_INTR_MASK_M_TX_OVER_VALUE_ENABLED _u(0x0) 1017 #define I2C_IC_INTR_MASK_M_TX_OVER_VALUE_DISABLED _u(0x1) 1018 // ----------------------------------------------------------------------------- 1019 // Field : I2C_IC_INTR_MASK_M_RX_FULL 1020 // Description : This bit masks the R_RX_FULL interrupt in IC_INTR_STAT 1021 // register. 1022 // 1023 // Reset value: 0x1 1024 // 0x0 -> RX_FULL interrupt is masked 1025 // 0x1 -> RX_FULL interrupt is unmasked 1026 #define I2C_IC_INTR_MASK_M_RX_FULL_RESET _u(0x1) 1027 #define I2C_IC_INTR_MASK_M_RX_FULL_BITS _u(0x00000004) 1028 #define I2C_IC_INTR_MASK_M_RX_FULL_MSB _u(2) 1029 #define I2C_IC_INTR_MASK_M_RX_FULL_LSB _u(2) 1030 #define I2C_IC_INTR_MASK_M_RX_FULL_ACCESS "RW" 1031 #define I2C_IC_INTR_MASK_M_RX_FULL_VALUE_ENABLED _u(0x0) 1032 #define I2C_IC_INTR_MASK_M_RX_FULL_VALUE_DISABLED _u(0x1) 1033 // ----------------------------------------------------------------------------- 1034 // Field : I2C_IC_INTR_MASK_M_RX_OVER 1035 // Description : This bit masks the R_RX_OVER interrupt in IC_INTR_STAT 1036 // register. 1037 // 1038 // Reset value: 0x1 1039 // 0x0 -> RX_OVER interrupt is masked 1040 // 0x1 -> RX_OVER interrupt is unmasked 1041 #define I2C_IC_INTR_MASK_M_RX_OVER_RESET _u(0x1) 1042 #define I2C_IC_INTR_MASK_M_RX_OVER_BITS _u(0x00000002) 1043 #define I2C_IC_INTR_MASK_M_RX_OVER_MSB _u(1) 1044 #define I2C_IC_INTR_MASK_M_RX_OVER_LSB _u(1) 1045 #define I2C_IC_INTR_MASK_M_RX_OVER_ACCESS "RW" 1046 #define I2C_IC_INTR_MASK_M_RX_OVER_VALUE_ENABLED _u(0x0) 1047 #define I2C_IC_INTR_MASK_M_RX_OVER_VALUE_DISABLED _u(0x1) 1048 // ----------------------------------------------------------------------------- 1049 // Field : I2C_IC_INTR_MASK_M_RX_UNDER 1050 // Description : This bit masks the R_RX_UNDER interrupt in IC_INTR_STAT 1051 // register. 1052 // 1053 // Reset value: 0x1 1054 // 0x0 -> RX_UNDER interrupt is masked 1055 // 0x1 -> RX_UNDER interrupt is unmasked 1056 #define I2C_IC_INTR_MASK_M_RX_UNDER_RESET _u(0x1) 1057 #define I2C_IC_INTR_MASK_M_RX_UNDER_BITS _u(0x00000001) 1058 #define I2C_IC_INTR_MASK_M_RX_UNDER_MSB _u(0) 1059 #define I2C_IC_INTR_MASK_M_RX_UNDER_LSB _u(0) 1060 #define I2C_IC_INTR_MASK_M_RX_UNDER_ACCESS "RW" 1061 #define I2C_IC_INTR_MASK_M_RX_UNDER_VALUE_ENABLED _u(0x0) 1062 #define I2C_IC_INTR_MASK_M_RX_UNDER_VALUE_DISABLED _u(0x1) 1063 // ============================================================================= 1064 // Register : I2C_IC_RAW_INTR_STAT 1065 // Description : I2C Raw Interrupt Status Register 1066 // 1067 // Unlike the IC_INTR_STAT register, these bits are not masked so 1068 // they always show the true status of the DW_apb_i2c. 1069 #define I2C_IC_RAW_INTR_STAT_OFFSET _u(0x00000034) 1070 #define I2C_IC_RAW_INTR_STAT_BITS _u(0x00001fff) 1071 #define I2C_IC_RAW_INTR_STAT_RESET _u(0x00000000) 1072 // ----------------------------------------------------------------------------- 1073 // Field : I2C_IC_RAW_INTR_STAT_RESTART_DET 1074 // Description : Indicates whether a RESTART condition has occurred on the I2C 1075 // interface when DW_apb_i2c is operating in Slave mode and the 1076 // slave is being addressed. Enabled only when 1077 // IC_SLV_RESTART_DET_EN=1. 1078 // 1079 // Note: However, in high-speed mode or during a START BYTE 1080 // transfer, the RESTART comes before the address field as per the 1081 // I2C protocol. In this case, the slave is not the addressed 1082 // slave when the RESTART is issued, therefore DW_apb_i2c does not 1083 // generate the RESTART_DET interrupt. 1084 // 1085 // Reset value: 0x0 1086 // 0x0 -> RESTART_DET interrupt is inactive 1087 // 0x1 -> RESTART_DET interrupt is active 1088 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_RESET _u(0x0) 1089 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_BITS _u(0x00001000) 1090 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_MSB _u(12) 1091 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_LSB _u(12) 1092 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_ACCESS "RO" 1093 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_VALUE_INACTIVE _u(0x0) 1094 #define I2C_IC_RAW_INTR_STAT_RESTART_DET_VALUE_ACTIVE _u(0x1) 1095 // ----------------------------------------------------------------------------- 1096 // Field : I2C_IC_RAW_INTR_STAT_GEN_CALL 1097 // Description : Set only when a General Call address is received and it is 1098 // acknowledged. It stays set until it is cleared either by 1099 // disabling DW_apb_i2c or when the CPU reads bit 0 of the 1100 // IC_CLR_GEN_CALL register. DW_apb_i2c stores the received data 1101 // in the Rx buffer. 1102 // 1103 // Reset value: 0x0 1104 // 0x0 -> GEN_CALL interrupt is inactive 1105 // 0x1 -> GEN_CALL interrupt is active 1106 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_RESET _u(0x0) 1107 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_BITS _u(0x00000800) 1108 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_MSB _u(11) 1109 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_LSB _u(11) 1110 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_ACCESS "RO" 1111 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_VALUE_INACTIVE _u(0x0) 1112 #define I2C_IC_RAW_INTR_STAT_GEN_CALL_VALUE_ACTIVE _u(0x1) 1113 // ----------------------------------------------------------------------------- 1114 // Field : I2C_IC_RAW_INTR_STAT_START_DET 1115 // Description : Indicates whether a START or RESTART condition has occurred on 1116 // the I2C interface regardless of whether DW_apb_i2c is operating 1117 // in slave or master mode. 1118 // 1119 // Reset value: 0x0 1120 // 0x0 -> START_DET interrupt is inactive 1121 // 0x1 -> START_DET interrupt is active 1122 #define I2C_IC_RAW_INTR_STAT_START_DET_RESET _u(0x0) 1123 #define I2C_IC_RAW_INTR_STAT_START_DET_BITS _u(0x00000400) 1124 #define I2C_IC_RAW_INTR_STAT_START_DET_MSB _u(10) 1125 #define I2C_IC_RAW_INTR_STAT_START_DET_LSB _u(10) 1126 #define I2C_IC_RAW_INTR_STAT_START_DET_ACCESS "RO" 1127 #define I2C_IC_RAW_INTR_STAT_START_DET_VALUE_INACTIVE _u(0x0) 1128 #define I2C_IC_RAW_INTR_STAT_START_DET_VALUE_ACTIVE _u(0x1) 1129 // ----------------------------------------------------------------------------- 1130 // Field : I2C_IC_RAW_INTR_STAT_STOP_DET 1131 // Description : Indicates whether a STOP condition has occurred on the I2C 1132 // interface regardless of whether DW_apb_i2c is operating in 1133 // slave or master mode. 1134 // 1135 // In Slave Mode: - If IC_CON[7]=1'b1 (STOP_DET_IFADDRESSED), the 1136 // STOP_DET interrupt will be issued only if slave is addressed. 1137 // Note: During a general call address, this slave does not issue 1138 // a STOP_DET interrupt if STOP_DET_IF_ADDRESSED=1'b1, even if the 1139 // slave responds to the general call address by generating ACK. 1140 // The STOP_DET interrupt is generated only when the transmitted 1141 // address matches the slave address (SAR). - If IC_CON[7]=1'b0 1142 // (STOP_DET_IFADDRESSED), the STOP_DET interrupt is issued 1143 // irrespective of whether it is being addressed. In Master Mode: 1144 // - If IC_CON[10]=1'b1 (STOP_DET_IF_MASTER_ACTIVE),the STOP_DET 1145 // interrupt will be issued only if Master is active. - If 1146 // IC_CON[10]=1'b0 (STOP_DET_IFADDRESSED),the STOP_DET interrupt 1147 // will be issued irrespective of whether master is active or not. 1148 // Reset value: 0x0 1149 // 0x0 -> STOP_DET interrupt is inactive 1150 // 0x1 -> STOP_DET interrupt is active 1151 #define I2C_IC_RAW_INTR_STAT_STOP_DET_RESET _u(0x0) 1152 #define I2C_IC_RAW_INTR_STAT_STOP_DET_BITS _u(0x00000200) 1153 #define I2C_IC_RAW_INTR_STAT_STOP_DET_MSB _u(9) 1154 #define I2C_IC_RAW_INTR_STAT_STOP_DET_LSB _u(9) 1155 #define I2C_IC_RAW_INTR_STAT_STOP_DET_ACCESS "RO" 1156 #define I2C_IC_RAW_INTR_STAT_STOP_DET_VALUE_INACTIVE _u(0x0) 1157 #define I2C_IC_RAW_INTR_STAT_STOP_DET_VALUE_ACTIVE _u(0x1) 1158 // ----------------------------------------------------------------------------- 1159 // Field : I2C_IC_RAW_INTR_STAT_ACTIVITY 1160 // Description : This bit captures DW_apb_i2c activity and stays set until it is 1161 // cleared. There are four ways to clear it: - Disabling the 1162 // DW_apb_i2c - Reading the IC_CLR_ACTIVITY register - Reading the 1163 // IC_CLR_INTR register - System reset Once this bit is set, it 1164 // stays set unless one of the four methods is used to clear it. 1165 // Even if the DW_apb_i2c module is idle, this bit remains set 1166 // until cleared, indicating that there was activity on the bus. 1167 // 1168 // Reset value: 0x0 1169 // 0x0 -> RAW_INTR_ACTIVITY interrupt is inactive 1170 // 0x1 -> RAW_INTR_ACTIVITY interrupt is active 1171 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_RESET _u(0x0) 1172 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_BITS _u(0x00000100) 1173 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_MSB _u(8) 1174 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_LSB _u(8) 1175 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_ACCESS "RO" 1176 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_VALUE_INACTIVE _u(0x0) 1177 #define I2C_IC_RAW_INTR_STAT_ACTIVITY_VALUE_ACTIVE _u(0x1) 1178 // ----------------------------------------------------------------------------- 1179 // Field : I2C_IC_RAW_INTR_STAT_RX_DONE 1180 // Description : When the DW_apb_i2c is acting as a slave-transmitter, this bit 1181 // is set to 1 if the master does not acknowledge a transmitted 1182 // byte. This occurs on the last byte of the transmission, 1183 // indicating that the transmission is done. 1184 // 1185 // Reset value: 0x0 1186 // 0x0 -> RX_DONE interrupt is inactive 1187 // 0x1 -> RX_DONE interrupt is active 1188 #define I2C_IC_RAW_INTR_STAT_RX_DONE_RESET _u(0x0) 1189 #define I2C_IC_RAW_INTR_STAT_RX_DONE_BITS _u(0x00000080) 1190 #define I2C_IC_RAW_INTR_STAT_RX_DONE_MSB _u(7) 1191 #define I2C_IC_RAW_INTR_STAT_RX_DONE_LSB _u(7) 1192 #define I2C_IC_RAW_INTR_STAT_RX_DONE_ACCESS "RO" 1193 #define I2C_IC_RAW_INTR_STAT_RX_DONE_VALUE_INACTIVE _u(0x0) 1194 #define I2C_IC_RAW_INTR_STAT_RX_DONE_VALUE_ACTIVE _u(0x1) 1195 // ----------------------------------------------------------------------------- 1196 // Field : I2C_IC_RAW_INTR_STAT_TX_ABRT 1197 // Description : This bit indicates if DW_apb_i2c, as an I2C transmitter, is 1198 // unable to complete the intended actions on the contents of the 1199 // transmit FIFO. This situation can occur both as an I2C master 1200 // or an I2C slave, and is referred to as a 'transmit abort'. When 1201 // this bit is set to 1, the IC_TX_ABRT_SOURCE register indicates 1202 // the reason why the transmit abort takes places. 1203 // 1204 // Note: The DW_apb_i2c flushes/resets/empties the TX_FIFO and 1205 // RX_FIFO whenever there is a transmit abort caused by any of the 1206 // events tracked by the IC_TX_ABRT_SOURCE register. The FIFOs 1207 // remains in this flushed state until the register IC_CLR_TX_ABRT 1208 // is read. Once this read is performed, the Tx FIFO is then ready 1209 // to accept more data bytes from the APB interface. 1210 // 1211 // Reset value: 0x0 1212 // 0x0 -> TX_ABRT interrupt is inactive 1213 // 0x1 -> TX_ABRT interrupt is active 1214 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_RESET _u(0x0) 1215 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_BITS _u(0x00000040) 1216 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_MSB _u(6) 1217 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_LSB _u(6) 1218 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_ACCESS "RO" 1219 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_VALUE_INACTIVE _u(0x0) 1220 #define I2C_IC_RAW_INTR_STAT_TX_ABRT_VALUE_ACTIVE _u(0x1) 1221 // ----------------------------------------------------------------------------- 1222 // Field : I2C_IC_RAW_INTR_STAT_RD_REQ 1223 // Description : This bit is set to 1 when DW_apb_i2c is acting as a slave and 1224 // another I2C master is attempting to read data from DW_apb_i2c. 1225 // The DW_apb_i2c holds the I2C bus in a wait state (SCL=0) until 1226 // this interrupt is serviced, which means that the slave has been 1227 // addressed by a remote master that is asking for data to be 1228 // transferred. The processor must respond to this interrupt and 1229 // then write the requested data to the IC_DATA_CMD register. This 1230 // bit is set to 0 just after the processor reads the 1231 // IC_CLR_RD_REQ register. 1232 // 1233 // Reset value: 0x0 1234 // 0x0 -> RD_REQ interrupt is inactive 1235 // 0x1 -> RD_REQ interrupt is active 1236 #define I2C_IC_RAW_INTR_STAT_RD_REQ_RESET _u(0x0) 1237 #define I2C_IC_RAW_INTR_STAT_RD_REQ_BITS _u(0x00000020) 1238 #define I2C_IC_RAW_INTR_STAT_RD_REQ_MSB _u(5) 1239 #define I2C_IC_RAW_INTR_STAT_RD_REQ_LSB _u(5) 1240 #define I2C_IC_RAW_INTR_STAT_RD_REQ_ACCESS "RO" 1241 #define I2C_IC_RAW_INTR_STAT_RD_REQ_VALUE_INACTIVE _u(0x0) 1242 #define I2C_IC_RAW_INTR_STAT_RD_REQ_VALUE_ACTIVE _u(0x1) 1243 // ----------------------------------------------------------------------------- 1244 // Field : I2C_IC_RAW_INTR_STAT_TX_EMPTY 1245 // Description : The behavior of the TX_EMPTY interrupt status differs based on 1246 // the TX_EMPTY_CTRL selection in the IC_CON register. - When 1247 // TX_EMPTY_CTRL = 0: This bit is set to 1 when the transmit 1248 // buffer is at or below the threshold value set in the IC_TX_TL 1249 // register. - When TX_EMPTY_CTRL = 1: This bit is set to 1 when 1250 // the transmit buffer is at or below the threshold value set in 1251 // the IC_TX_TL register and the transmission of the address/data 1252 // from the internal shift register for the most recently popped 1253 // command is completed. It is automatically cleared by hardware 1254 // when the buffer level goes above the threshold. When 1255 // IC_ENABLE[0] is set to 0, the TX FIFO is flushed and held in 1256 // reset. There the TX FIFO looks like it has no data within it, 1257 // so this bit is set to 1, provided there is activity in the 1258 // master or slave state machines. When there is no longer any 1259 // activity, then with ic_en=0, this bit is set to 0. 1260 // 1261 // Reset value: 0x0. 1262 // 0x0 -> TX_EMPTY interrupt is inactive 1263 // 0x1 -> TX_EMPTY interrupt is active 1264 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_RESET _u(0x0) 1265 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_BITS _u(0x00000010) 1266 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_MSB _u(4) 1267 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_LSB _u(4) 1268 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_ACCESS "RO" 1269 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_VALUE_INACTIVE _u(0x0) 1270 #define I2C_IC_RAW_INTR_STAT_TX_EMPTY_VALUE_ACTIVE _u(0x1) 1271 // ----------------------------------------------------------------------------- 1272 // Field : I2C_IC_RAW_INTR_STAT_TX_OVER 1273 // Description : Set during transmit if the transmit buffer is filled to 1274 // IC_TX_BUFFER_DEPTH and the processor attempts to issue another 1275 // I2C command by writing to the IC_DATA_CMD register. When the 1276 // module is disabled, this bit keeps its level until the master 1277 // or slave state machines go into idle, and when ic_en goes to 0, 1278 // this interrupt is cleared. 1279 // 1280 // Reset value: 0x0 1281 // 0x0 -> TX_OVER interrupt is inactive 1282 // 0x1 -> TX_OVER interrupt is active 1283 #define I2C_IC_RAW_INTR_STAT_TX_OVER_RESET _u(0x0) 1284 #define I2C_IC_RAW_INTR_STAT_TX_OVER_BITS _u(0x00000008) 1285 #define I2C_IC_RAW_INTR_STAT_TX_OVER_MSB _u(3) 1286 #define I2C_IC_RAW_INTR_STAT_TX_OVER_LSB _u(3) 1287 #define I2C_IC_RAW_INTR_STAT_TX_OVER_ACCESS "RO" 1288 #define I2C_IC_RAW_INTR_STAT_TX_OVER_VALUE_INACTIVE _u(0x0) 1289 #define I2C_IC_RAW_INTR_STAT_TX_OVER_VALUE_ACTIVE _u(0x1) 1290 // ----------------------------------------------------------------------------- 1291 // Field : I2C_IC_RAW_INTR_STAT_RX_FULL 1292 // Description : Set when the receive buffer reaches or goes above the RX_TL 1293 // threshold in the IC_RX_TL register. It is automatically cleared 1294 // by hardware when buffer level goes below the threshold. If the 1295 // module is disabled (IC_ENABLE[0]=0), the RX FIFO is flushed and 1296 // held in reset; therefore the RX FIFO is not full. So this bit 1297 // is cleared once the IC_ENABLE bit 0 is programmed with a 0, 1298 // regardless of the activity that continues. 1299 // 1300 // Reset value: 0x0 1301 // 0x0 -> RX_FULL interrupt is inactive 1302 // 0x1 -> RX_FULL interrupt is active 1303 #define I2C_IC_RAW_INTR_STAT_RX_FULL_RESET _u(0x0) 1304 #define I2C_IC_RAW_INTR_STAT_RX_FULL_BITS _u(0x00000004) 1305 #define I2C_IC_RAW_INTR_STAT_RX_FULL_MSB _u(2) 1306 #define I2C_IC_RAW_INTR_STAT_RX_FULL_LSB _u(2) 1307 #define I2C_IC_RAW_INTR_STAT_RX_FULL_ACCESS "RO" 1308 #define I2C_IC_RAW_INTR_STAT_RX_FULL_VALUE_INACTIVE _u(0x0) 1309 #define I2C_IC_RAW_INTR_STAT_RX_FULL_VALUE_ACTIVE _u(0x1) 1310 // ----------------------------------------------------------------------------- 1311 // Field : I2C_IC_RAW_INTR_STAT_RX_OVER 1312 // Description : Set if the receive buffer is completely filled to 1313 // IC_RX_BUFFER_DEPTH and an additional byte is received from an 1314 // external I2C device. The DW_apb_i2c acknowledges this, but any 1315 // data bytes received after the FIFO is full are lost. If the 1316 // module is disabled (IC_ENABLE[0]=0), this bit keeps its level 1317 // until the master or slave state machines go into idle, and when 1318 // ic_en goes to 0, this interrupt is cleared. 1319 // 1320 // Note: If bit 9 of the IC_CON register (RX_FIFO_FULL_HLD_CTRL) 1321 // is programmed to HIGH, then the RX_OVER interrupt never occurs, 1322 // because the Rx FIFO never overflows. 1323 // 1324 // Reset value: 0x0 1325 // 0x0 -> RX_OVER interrupt is inactive 1326 // 0x1 -> RX_OVER interrupt is active 1327 #define I2C_IC_RAW_INTR_STAT_RX_OVER_RESET _u(0x0) 1328 #define I2C_IC_RAW_INTR_STAT_RX_OVER_BITS _u(0x00000002) 1329 #define I2C_IC_RAW_INTR_STAT_RX_OVER_MSB _u(1) 1330 #define I2C_IC_RAW_INTR_STAT_RX_OVER_LSB _u(1) 1331 #define I2C_IC_RAW_INTR_STAT_RX_OVER_ACCESS "RO" 1332 #define I2C_IC_RAW_INTR_STAT_RX_OVER_VALUE_INACTIVE _u(0x0) 1333 #define I2C_IC_RAW_INTR_STAT_RX_OVER_VALUE_ACTIVE _u(0x1) 1334 // ----------------------------------------------------------------------------- 1335 // Field : I2C_IC_RAW_INTR_STAT_RX_UNDER 1336 // Description : Set if the processor attempts to read the receive buffer when 1337 // it is empty by reading from the IC_DATA_CMD register. If the 1338 // module is disabled (IC_ENABLE[0]=0), this bit keeps its level 1339 // until the master or slave state machines go into idle, and when 1340 // ic_en goes to 0, this interrupt is cleared. 1341 // 1342 // Reset value: 0x0 1343 // 0x0 -> RX_UNDER interrupt is inactive 1344 // 0x1 -> RX_UNDER interrupt is active 1345 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_RESET _u(0x0) 1346 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_BITS _u(0x00000001) 1347 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_MSB _u(0) 1348 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_LSB _u(0) 1349 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_ACCESS "RO" 1350 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_VALUE_INACTIVE _u(0x0) 1351 #define I2C_IC_RAW_INTR_STAT_RX_UNDER_VALUE_ACTIVE _u(0x1) 1352 // ============================================================================= 1353 // Register : I2C_IC_RX_TL 1354 // Description : I2C Receive FIFO Threshold Register 1355 #define I2C_IC_RX_TL_OFFSET _u(0x00000038) 1356 #define I2C_IC_RX_TL_BITS _u(0x000000ff) 1357 #define I2C_IC_RX_TL_RESET _u(0x00000000) 1358 // ----------------------------------------------------------------------------- 1359 // Field : I2C_IC_RX_TL_RX_TL 1360 // Description : Receive FIFO Threshold Level. 1361 // 1362 // Controls the level of entries (or above) that triggers the 1363 // RX_FULL interrupt (bit 2 in IC_RAW_INTR_STAT register). The 1364 // valid range is 0-255, with the additional restriction that 1365 // hardware does not allow this value to be set to a value larger 1366 // than the depth of the buffer. If an attempt is made to do that, 1367 // the actual value set will be the maximum depth of the buffer. A 1368 // value of 0 sets the threshold for 1 entry, and a value of 255 1369 // sets the threshold for 256 entries. 1370 #define I2C_IC_RX_TL_RX_TL_RESET _u(0x00) 1371 #define I2C_IC_RX_TL_RX_TL_BITS _u(0x000000ff) 1372 #define I2C_IC_RX_TL_RX_TL_MSB _u(7) 1373 #define I2C_IC_RX_TL_RX_TL_LSB _u(0) 1374 #define I2C_IC_RX_TL_RX_TL_ACCESS "RW" 1375 // ============================================================================= 1376 // Register : I2C_IC_TX_TL 1377 // Description : I2C Transmit FIFO Threshold Register 1378 #define I2C_IC_TX_TL_OFFSET _u(0x0000003c) 1379 #define I2C_IC_TX_TL_BITS _u(0x000000ff) 1380 #define I2C_IC_TX_TL_RESET _u(0x00000000) 1381 // ----------------------------------------------------------------------------- 1382 // Field : I2C_IC_TX_TL_TX_TL 1383 // Description : Transmit FIFO Threshold Level. 1384 // 1385 // Controls the level of entries (or below) that trigger the 1386 // TX_EMPTY interrupt (bit 4 in IC_RAW_INTR_STAT register). The 1387 // valid range is 0-255, with the additional restriction that it 1388 // may not be set to value larger than the depth of the buffer. If 1389 // an attempt is made to do that, the actual value set will be the 1390 // maximum depth of the buffer. A value of 0 sets the threshold 1391 // for 0 entries, and a value of 255 sets the threshold for 255 1392 // entries. 1393 #define I2C_IC_TX_TL_TX_TL_RESET _u(0x00) 1394 #define I2C_IC_TX_TL_TX_TL_BITS _u(0x000000ff) 1395 #define I2C_IC_TX_TL_TX_TL_MSB _u(7) 1396 #define I2C_IC_TX_TL_TX_TL_LSB _u(0) 1397 #define I2C_IC_TX_TL_TX_TL_ACCESS "RW" 1398 // ============================================================================= 1399 // Register : I2C_IC_CLR_INTR 1400 // Description : Clear Combined and Individual Interrupt Register 1401 #define I2C_IC_CLR_INTR_OFFSET _u(0x00000040) 1402 #define I2C_IC_CLR_INTR_BITS _u(0x00000001) 1403 #define I2C_IC_CLR_INTR_RESET _u(0x00000000) 1404 // ----------------------------------------------------------------------------- 1405 // Field : I2C_IC_CLR_INTR_CLR_INTR 1406 // Description : Read this register to clear the combined interrupt, all 1407 // individual interrupts, and the IC_TX_ABRT_SOURCE register. This 1408 // bit does not clear hardware clearable interrupts but software 1409 // clearable interrupts. Refer to Bit 9 of the IC_TX_ABRT_SOURCE 1410 // register for an exception to clearing IC_TX_ABRT_SOURCE. 1411 // 1412 // Reset value: 0x0 1413 #define I2C_IC_CLR_INTR_CLR_INTR_RESET _u(0x0) 1414 #define I2C_IC_CLR_INTR_CLR_INTR_BITS _u(0x00000001) 1415 #define I2C_IC_CLR_INTR_CLR_INTR_MSB _u(0) 1416 #define I2C_IC_CLR_INTR_CLR_INTR_LSB _u(0) 1417 #define I2C_IC_CLR_INTR_CLR_INTR_ACCESS "RO" 1418 // ============================================================================= 1419 // Register : I2C_IC_CLR_RX_UNDER 1420 // Description : Clear RX_UNDER Interrupt Register 1421 #define I2C_IC_CLR_RX_UNDER_OFFSET _u(0x00000044) 1422 #define I2C_IC_CLR_RX_UNDER_BITS _u(0x00000001) 1423 #define I2C_IC_CLR_RX_UNDER_RESET _u(0x00000000) 1424 // ----------------------------------------------------------------------------- 1425 // Field : I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER 1426 // Description : Read this register to clear the RX_UNDER interrupt (bit 0) of 1427 // the IC_RAW_INTR_STAT register. 1428 // 1429 // Reset value: 0x0 1430 #define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_RESET _u(0x0) 1431 #define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_BITS _u(0x00000001) 1432 #define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_MSB _u(0) 1433 #define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_LSB _u(0) 1434 #define I2C_IC_CLR_RX_UNDER_CLR_RX_UNDER_ACCESS "RO" 1435 // ============================================================================= 1436 // Register : I2C_IC_CLR_RX_OVER 1437 // Description : Clear RX_OVER Interrupt Register 1438 #define I2C_IC_CLR_RX_OVER_OFFSET _u(0x00000048) 1439 #define I2C_IC_CLR_RX_OVER_BITS _u(0x00000001) 1440 #define I2C_IC_CLR_RX_OVER_RESET _u(0x00000000) 1441 // ----------------------------------------------------------------------------- 1442 // Field : I2C_IC_CLR_RX_OVER_CLR_RX_OVER 1443 // Description : Read this register to clear the RX_OVER interrupt (bit 1) of 1444 // the IC_RAW_INTR_STAT register. 1445 // 1446 // Reset value: 0x0 1447 #define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_RESET _u(0x0) 1448 #define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_BITS _u(0x00000001) 1449 #define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_MSB _u(0) 1450 #define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_LSB _u(0) 1451 #define I2C_IC_CLR_RX_OVER_CLR_RX_OVER_ACCESS "RO" 1452 // ============================================================================= 1453 // Register : I2C_IC_CLR_TX_OVER 1454 // Description : Clear TX_OVER Interrupt Register 1455 #define I2C_IC_CLR_TX_OVER_OFFSET _u(0x0000004c) 1456 #define I2C_IC_CLR_TX_OVER_BITS _u(0x00000001) 1457 #define I2C_IC_CLR_TX_OVER_RESET _u(0x00000000) 1458 // ----------------------------------------------------------------------------- 1459 // Field : I2C_IC_CLR_TX_OVER_CLR_TX_OVER 1460 // Description : Read this register to clear the TX_OVER interrupt (bit 3) of 1461 // the IC_RAW_INTR_STAT register. 1462 // 1463 // Reset value: 0x0 1464 #define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_RESET _u(0x0) 1465 #define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_BITS _u(0x00000001) 1466 #define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_MSB _u(0) 1467 #define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_LSB _u(0) 1468 #define I2C_IC_CLR_TX_OVER_CLR_TX_OVER_ACCESS "RO" 1469 // ============================================================================= 1470 // Register : I2C_IC_CLR_RD_REQ 1471 // Description : Clear RD_REQ Interrupt Register 1472 #define I2C_IC_CLR_RD_REQ_OFFSET _u(0x00000050) 1473 #define I2C_IC_CLR_RD_REQ_BITS _u(0x00000001) 1474 #define I2C_IC_CLR_RD_REQ_RESET _u(0x00000000) 1475 // ----------------------------------------------------------------------------- 1476 // Field : I2C_IC_CLR_RD_REQ_CLR_RD_REQ 1477 // Description : Read this register to clear the RD_REQ interrupt (bit 5) of the 1478 // IC_RAW_INTR_STAT register. 1479 // 1480 // Reset value: 0x0 1481 #define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_RESET _u(0x0) 1482 #define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_BITS _u(0x00000001) 1483 #define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_MSB _u(0) 1484 #define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_LSB _u(0) 1485 #define I2C_IC_CLR_RD_REQ_CLR_RD_REQ_ACCESS "RO" 1486 // ============================================================================= 1487 // Register : I2C_IC_CLR_TX_ABRT 1488 // Description : Clear TX_ABRT Interrupt Register 1489 #define I2C_IC_CLR_TX_ABRT_OFFSET _u(0x00000054) 1490 #define I2C_IC_CLR_TX_ABRT_BITS _u(0x00000001) 1491 #define I2C_IC_CLR_TX_ABRT_RESET _u(0x00000000) 1492 // ----------------------------------------------------------------------------- 1493 // Field : I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT 1494 // Description : Read this register to clear the TX_ABRT interrupt (bit 6) of 1495 // the IC_RAW_INTR_STAT register, and the IC_TX_ABRT_SOURCE 1496 // register. This also releases the TX FIFO from the flushed/reset 1497 // state, allowing more writes to the TX FIFO. Refer to Bit 9 of 1498 // the IC_TX_ABRT_SOURCE register for an exception to clearing 1499 // IC_TX_ABRT_SOURCE. 1500 // 1501 // Reset value: 0x0 1502 #define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_RESET _u(0x0) 1503 #define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_BITS _u(0x00000001) 1504 #define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_MSB _u(0) 1505 #define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_LSB _u(0) 1506 #define I2C_IC_CLR_TX_ABRT_CLR_TX_ABRT_ACCESS "RO" 1507 // ============================================================================= 1508 // Register : I2C_IC_CLR_RX_DONE 1509 // Description : Clear RX_DONE Interrupt Register 1510 #define I2C_IC_CLR_RX_DONE_OFFSET _u(0x00000058) 1511 #define I2C_IC_CLR_RX_DONE_BITS _u(0x00000001) 1512 #define I2C_IC_CLR_RX_DONE_RESET _u(0x00000000) 1513 // ----------------------------------------------------------------------------- 1514 // Field : I2C_IC_CLR_RX_DONE_CLR_RX_DONE 1515 // Description : Read this register to clear the RX_DONE interrupt (bit 7) of 1516 // the IC_RAW_INTR_STAT register. 1517 // 1518 // Reset value: 0x0 1519 #define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_RESET _u(0x0) 1520 #define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_BITS _u(0x00000001) 1521 #define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_MSB _u(0) 1522 #define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_LSB _u(0) 1523 #define I2C_IC_CLR_RX_DONE_CLR_RX_DONE_ACCESS "RO" 1524 // ============================================================================= 1525 // Register : I2C_IC_CLR_ACTIVITY 1526 // Description : Clear ACTIVITY Interrupt Register 1527 #define I2C_IC_CLR_ACTIVITY_OFFSET _u(0x0000005c) 1528 #define I2C_IC_CLR_ACTIVITY_BITS _u(0x00000001) 1529 #define I2C_IC_CLR_ACTIVITY_RESET _u(0x00000000) 1530 // ----------------------------------------------------------------------------- 1531 // Field : I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY 1532 // Description : Reading this register clears the ACTIVITY interrupt if the I2C 1533 // is not active anymore. If the I2C module is still active on the 1534 // bus, the ACTIVITY interrupt bit continues to be set. It is 1535 // automatically cleared by hardware if the module is disabled and 1536 // if there is no further activity on the bus. The value read from 1537 // this register to get status of the ACTIVITY interrupt (bit 8) 1538 // of the IC_RAW_INTR_STAT register. 1539 // 1540 // Reset value: 0x0 1541 #define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_RESET _u(0x0) 1542 #define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_BITS _u(0x00000001) 1543 #define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_MSB _u(0) 1544 #define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_LSB _u(0) 1545 #define I2C_IC_CLR_ACTIVITY_CLR_ACTIVITY_ACCESS "RO" 1546 // ============================================================================= 1547 // Register : I2C_IC_CLR_STOP_DET 1548 // Description : Clear STOP_DET Interrupt Register 1549 #define I2C_IC_CLR_STOP_DET_OFFSET _u(0x00000060) 1550 #define I2C_IC_CLR_STOP_DET_BITS _u(0x00000001) 1551 #define I2C_IC_CLR_STOP_DET_RESET _u(0x00000000) 1552 // ----------------------------------------------------------------------------- 1553 // Field : I2C_IC_CLR_STOP_DET_CLR_STOP_DET 1554 // Description : Read this register to clear the STOP_DET interrupt (bit 9) of 1555 // the IC_RAW_INTR_STAT register. 1556 // 1557 // Reset value: 0x0 1558 #define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_RESET _u(0x0) 1559 #define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_BITS _u(0x00000001) 1560 #define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_MSB _u(0) 1561 #define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_LSB _u(0) 1562 #define I2C_IC_CLR_STOP_DET_CLR_STOP_DET_ACCESS "RO" 1563 // ============================================================================= 1564 // Register : I2C_IC_CLR_START_DET 1565 // Description : Clear START_DET Interrupt Register 1566 #define I2C_IC_CLR_START_DET_OFFSET _u(0x00000064) 1567 #define I2C_IC_CLR_START_DET_BITS _u(0x00000001) 1568 #define I2C_IC_CLR_START_DET_RESET _u(0x00000000) 1569 // ----------------------------------------------------------------------------- 1570 // Field : I2C_IC_CLR_START_DET_CLR_START_DET 1571 // Description : Read this register to clear the START_DET interrupt (bit 10) of 1572 // the IC_RAW_INTR_STAT register. 1573 // 1574 // Reset value: 0x0 1575 #define I2C_IC_CLR_START_DET_CLR_START_DET_RESET _u(0x0) 1576 #define I2C_IC_CLR_START_DET_CLR_START_DET_BITS _u(0x00000001) 1577 #define I2C_IC_CLR_START_DET_CLR_START_DET_MSB _u(0) 1578 #define I2C_IC_CLR_START_DET_CLR_START_DET_LSB _u(0) 1579 #define I2C_IC_CLR_START_DET_CLR_START_DET_ACCESS "RO" 1580 // ============================================================================= 1581 // Register : I2C_IC_CLR_GEN_CALL 1582 // Description : Clear GEN_CALL Interrupt Register 1583 #define I2C_IC_CLR_GEN_CALL_OFFSET _u(0x00000068) 1584 #define I2C_IC_CLR_GEN_CALL_BITS _u(0x00000001) 1585 #define I2C_IC_CLR_GEN_CALL_RESET _u(0x00000000) 1586 // ----------------------------------------------------------------------------- 1587 // Field : I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL 1588 // Description : Read this register to clear the GEN_CALL interrupt (bit 11) of 1589 // IC_RAW_INTR_STAT register. 1590 // 1591 // Reset value: 0x0 1592 #define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_RESET _u(0x0) 1593 #define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_BITS _u(0x00000001) 1594 #define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_MSB _u(0) 1595 #define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_LSB _u(0) 1596 #define I2C_IC_CLR_GEN_CALL_CLR_GEN_CALL_ACCESS "RO" 1597 // ============================================================================= 1598 // Register : I2C_IC_ENABLE 1599 // Description : I2C Enable Register 1600 #define I2C_IC_ENABLE_OFFSET _u(0x0000006c) 1601 #define I2C_IC_ENABLE_BITS _u(0x00000007) 1602 #define I2C_IC_ENABLE_RESET _u(0x00000000) 1603 // ----------------------------------------------------------------------------- 1604 // Field : I2C_IC_ENABLE_TX_CMD_BLOCK 1605 // Description : In Master mode: - 1'b1: Blocks the transmission of data on I2C 1606 // bus even if Tx FIFO has data to transmit. - 1'b0: The 1607 // transmission of data starts on I2C bus automatically, as soon 1608 // as the first data is available in the Tx FIFO. Note: To block 1609 // the execution of Master commands, set the TX_CMD_BLOCK bit only 1610 // when Tx FIFO is empty (IC_STATUS[2]==1) and Master is in Idle 1611 // state (IC_STATUS[5] == 0). Any further commands put in the Tx 1612 // FIFO are not executed until TX_CMD_BLOCK bit is unset. Reset 1613 // value: IC_TX_CMD_BLOCK_DEFAULT 1614 // 0x0 -> Tx Command execution not blocked 1615 // 0x1 -> Tx Command execution blocked 1616 #define I2C_IC_ENABLE_TX_CMD_BLOCK_RESET _u(0x0) 1617 #define I2C_IC_ENABLE_TX_CMD_BLOCK_BITS _u(0x00000004) 1618 #define I2C_IC_ENABLE_TX_CMD_BLOCK_MSB _u(2) 1619 #define I2C_IC_ENABLE_TX_CMD_BLOCK_LSB _u(2) 1620 #define I2C_IC_ENABLE_TX_CMD_BLOCK_ACCESS "RW" 1621 #define I2C_IC_ENABLE_TX_CMD_BLOCK_VALUE_NOT_BLOCKED _u(0x0) 1622 #define I2C_IC_ENABLE_TX_CMD_BLOCK_VALUE_BLOCKED _u(0x1) 1623 // ----------------------------------------------------------------------------- 1624 // Field : I2C_IC_ENABLE_ABORT 1625 // Description : When set, the controller initiates the transfer abort. - 0: 1626 // ABORT not initiated or ABORT done - 1: ABORT operation in 1627 // progress The software can abort the I2C transfer in master mode 1628 // by setting this bit. The software can set this bit only when 1629 // ENABLE is already set; otherwise, the controller ignores any 1630 // write to ABORT bit. The software cannot clear the ABORT bit 1631 // once set. In response to an ABORT, the controller issues a STOP 1632 // and flushes the Tx FIFO after completing the current transfer, 1633 // then sets the TX_ABORT interrupt after the abort operation. The 1634 // ABORT bit is cleared automatically after the abort operation. 1635 // 1636 // For a detailed description on how to abort I2C transfers, refer 1637 // to 'Aborting I2C Transfers'. 1638 // 1639 // Reset value: 0x0 1640 // 0x0 -> ABORT operation not in progress 1641 // 0x1 -> ABORT operation in progress 1642 #define I2C_IC_ENABLE_ABORT_RESET _u(0x0) 1643 #define I2C_IC_ENABLE_ABORT_BITS _u(0x00000002) 1644 #define I2C_IC_ENABLE_ABORT_MSB _u(1) 1645 #define I2C_IC_ENABLE_ABORT_LSB _u(1) 1646 #define I2C_IC_ENABLE_ABORT_ACCESS "RW" 1647 #define I2C_IC_ENABLE_ABORT_VALUE_DISABLE _u(0x0) 1648 #define I2C_IC_ENABLE_ABORT_VALUE_ENABLED _u(0x1) 1649 // ----------------------------------------------------------------------------- 1650 // Field : I2C_IC_ENABLE_ENABLE 1651 // Description : Controls whether the DW_apb_i2c is enabled. - 0: Disables 1652 // DW_apb_i2c (TX and RX FIFOs are held in an erased state) - 1: 1653 // Enables DW_apb_i2c Software can disable DW_apb_i2c while it is 1654 // active. However, it is important that care be taken to ensure 1655 // that DW_apb_i2c is disabled properly. A recommended procedure 1656 // is described in 'Disabling DW_apb_i2c'. 1657 // 1658 // When DW_apb_i2c is disabled, the following occurs: - The TX 1659 // FIFO and RX FIFO get flushed. - Status bits in the IC_INTR_STAT 1660 // register are still active until DW_apb_i2c goes into IDLE 1661 // state. If the module is transmitting, it stops as well as 1662 // deletes the contents of the transmit buffer after the current 1663 // transfer is complete. If the module is receiving, the 1664 // DW_apb_i2c stops the current transfer at the end of the current 1665 // byte and does not acknowledge the transfer. 1666 // 1667 // In systems with asynchronous pclk and ic_clk when IC_CLK_TYPE 1668 // parameter set to asynchronous (1), there is a two ic_clk delay 1669 // when enabling or disabling the DW_apb_i2c. For a detailed 1670 // description on how to disable DW_apb_i2c, refer to 'Disabling 1671 // DW_apb_i2c' 1672 // 1673 // Reset value: 0x0 1674 // 0x0 -> I2C is disabled 1675 // 0x1 -> I2C is enabled 1676 #define I2C_IC_ENABLE_ENABLE_RESET _u(0x0) 1677 #define I2C_IC_ENABLE_ENABLE_BITS _u(0x00000001) 1678 #define I2C_IC_ENABLE_ENABLE_MSB _u(0) 1679 #define I2C_IC_ENABLE_ENABLE_LSB _u(0) 1680 #define I2C_IC_ENABLE_ENABLE_ACCESS "RW" 1681 #define I2C_IC_ENABLE_ENABLE_VALUE_DISABLED _u(0x0) 1682 #define I2C_IC_ENABLE_ENABLE_VALUE_ENABLED _u(0x1) 1683 // ============================================================================= 1684 // Register : I2C_IC_STATUS 1685 // Description : I2C Status Register 1686 // 1687 // This is a read-only register used to indicate the current 1688 // transfer status and FIFO status. The status register may be 1689 // read at any time. None of the bits in this register request an 1690 // interrupt. 1691 // 1692 // When the I2C is disabled by writing 0 in bit 0 of the IC_ENABLE 1693 // register: - Bits 1 and 2 are set to 1 - Bits 3 and 10 are set 1694 // to 0 When the master or slave state machines goes to idle and 1695 // ic_en=0: - Bits 5 and 6 are set to 0 1696 #define I2C_IC_STATUS_OFFSET _u(0x00000070) 1697 #define I2C_IC_STATUS_BITS _u(0x0000007f) 1698 #define I2C_IC_STATUS_RESET _u(0x00000006) 1699 // ----------------------------------------------------------------------------- 1700 // Field : I2C_IC_STATUS_SLV_ACTIVITY 1701 // Description : Slave FSM Activity Status. When the Slave Finite State Machine 1702 // (FSM) is not in the IDLE state, this bit is set. - 0: Slave FSM 1703 // is in IDLE state so the Slave part of DW_apb_i2c is not Active 1704 // - 1: Slave FSM is not in IDLE state so the Slave part of 1705 // DW_apb_i2c is Active Reset value: 0x0 1706 // 0x0 -> Slave is idle 1707 // 0x1 -> Slave not idle 1708 #define I2C_IC_STATUS_SLV_ACTIVITY_RESET _u(0x0) 1709 #define I2C_IC_STATUS_SLV_ACTIVITY_BITS _u(0x00000040) 1710 #define I2C_IC_STATUS_SLV_ACTIVITY_MSB _u(6) 1711 #define I2C_IC_STATUS_SLV_ACTIVITY_LSB _u(6) 1712 #define I2C_IC_STATUS_SLV_ACTIVITY_ACCESS "RO" 1713 #define I2C_IC_STATUS_SLV_ACTIVITY_VALUE_IDLE _u(0x0) 1714 #define I2C_IC_STATUS_SLV_ACTIVITY_VALUE_ACTIVE _u(0x1) 1715 // ----------------------------------------------------------------------------- 1716 // Field : I2C_IC_STATUS_MST_ACTIVITY 1717 // Description : Master FSM Activity Status. When the Master Finite State 1718 // Machine (FSM) is not in the IDLE state, this bit is set. - 0: 1719 // Master FSM is in IDLE state so the Master part of DW_apb_i2c is 1720 // not Active - 1: Master FSM is not in IDLE state so the Master 1721 // part of DW_apb_i2c is Active Note: IC_STATUS[0]-that is, 1722 // ACTIVITY bit-is the OR of SLV_ACTIVITY and MST_ACTIVITY bits. 1723 // 1724 // Reset value: 0x0 1725 // 0x0 -> Master is idle 1726 // 0x1 -> Master not idle 1727 #define I2C_IC_STATUS_MST_ACTIVITY_RESET _u(0x0) 1728 #define I2C_IC_STATUS_MST_ACTIVITY_BITS _u(0x00000020) 1729 #define I2C_IC_STATUS_MST_ACTIVITY_MSB _u(5) 1730 #define I2C_IC_STATUS_MST_ACTIVITY_LSB _u(5) 1731 #define I2C_IC_STATUS_MST_ACTIVITY_ACCESS "RO" 1732 #define I2C_IC_STATUS_MST_ACTIVITY_VALUE_IDLE _u(0x0) 1733 #define I2C_IC_STATUS_MST_ACTIVITY_VALUE_ACTIVE _u(0x1) 1734 // ----------------------------------------------------------------------------- 1735 // Field : I2C_IC_STATUS_RFF 1736 // Description : Receive FIFO Completely Full. When the receive FIFO is 1737 // completely full, this bit is set. When the receive FIFO 1738 // contains one or more empty location, this bit is cleared. - 0: 1739 // Receive FIFO is not full - 1: Receive FIFO is full Reset value: 1740 // 0x0 1741 // 0x0 -> Rx FIFO not full 1742 // 0x1 -> Rx FIFO is full 1743 #define I2C_IC_STATUS_RFF_RESET _u(0x0) 1744 #define I2C_IC_STATUS_RFF_BITS _u(0x00000010) 1745 #define I2C_IC_STATUS_RFF_MSB _u(4) 1746 #define I2C_IC_STATUS_RFF_LSB _u(4) 1747 #define I2C_IC_STATUS_RFF_ACCESS "RO" 1748 #define I2C_IC_STATUS_RFF_VALUE_NOT_FULL _u(0x0) 1749 #define I2C_IC_STATUS_RFF_VALUE_FULL _u(0x1) 1750 // ----------------------------------------------------------------------------- 1751 // Field : I2C_IC_STATUS_RFNE 1752 // Description : Receive FIFO Not Empty. This bit is set when the receive FIFO 1753 // contains one or more entries; it is cleared when the receive 1754 // FIFO is empty. - 0: Receive FIFO is empty - 1: Receive FIFO is 1755 // not empty Reset value: 0x0 1756 // 0x0 -> Rx FIFO is empty 1757 // 0x1 -> Rx FIFO not empty 1758 #define I2C_IC_STATUS_RFNE_RESET _u(0x0) 1759 #define I2C_IC_STATUS_RFNE_BITS _u(0x00000008) 1760 #define I2C_IC_STATUS_RFNE_MSB _u(3) 1761 #define I2C_IC_STATUS_RFNE_LSB _u(3) 1762 #define I2C_IC_STATUS_RFNE_ACCESS "RO" 1763 #define I2C_IC_STATUS_RFNE_VALUE_EMPTY _u(0x0) 1764 #define I2C_IC_STATUS_RFNE_VALUE_NOT_EMPTY _u(0x1) 1765 // ----------------------------------------------------------------------------- 1766 // Field : I2C_IC_STATUS_TFE 1767 // Description : Transmit FIFO Completely Empty. When the transmit FIFO is 1768 // completely empty, this bit is set. When it contains one or more 1769 // valid entries, this bit is cleared. This bit field does not 1770 // request an interrupt. - 0: Transmit FIFO is not empty - 1: 1771 // Transmit FIFO is empty Reset value: 0x1 1772 // 0x0 -> Tx FIFO not empty 1773 // 0x1 -> Tx FIFO is empty 1774 #define I2C_IC_STATUS_TFE_RESET _u(0x1) 1775 #define I2C_IC_STATUS_TFE_BITS _u(0x00000004) 1776 #define I2C_IC_STATUS_TFE_MSB _u(2) 1777 #define I2C_IC_STATUS_TFE_LSB _u(2) 1778 #define I2C_IC_STATUS_TFE_ACCESS "RO" 1779 #define I2C_IC_STATUS_TFE_VALUE_NON_EMPTY _u(0x0) 1780 #define I2C_IC_STATUS_TFE_VALUE_EMPTY _u(0x1) 1781 // ----------------------------------------------------------------------------- 1782 // Field : I2C_IC_STATUS_TFNF 1783 // Description : Transmit FIFO Not Full. Set when the transmit FIFO contains one 1784 // or more empty locations, and is cleared when the FIFO is full. 1785 // - 0: Transmit FIFO is full - 1: Transmit FIFO is not full Reset 1786 // value: 0x1 1787 // 0x0 -> Tx FIFO is full 1788 // 0x1 -> Tx FIFO not full 1789 #define I2C_IC_STATUS_TFNF_RESET _u(0x1) 1790 #define I2C_IC_STATUS_TFNF_BITS _u(0x00000002) 1791 #define I2C_IC_STATUS_TFNF_MSB _u(1) 1792 #define I2C_IC_STATUS_TFNF_LSB _u(1) 1793 #define I2C_IC_STATUS_TFNF_ACCESS "RO" 1794 #define I2C_IC_STATUS_TFNF_VALUE_FULL _u(0x0) 1795 #define I2C_IC_STATUS_TFNF_VALUE_NOT_FULL _u(0x1) 1796 // ----------------------------------------------------------------------------- 1797 // Field : I2C_IC_STATUS_ACTIVITY 1798 // Description : I2C Activity Status. Reset value: 0x0 1799 // 0x0 -> I2C is idle 1800 // 0x1 -> I2C is active 1801 #define I2C_IC_STATUS_ACTIVITY_RESET _u(0x0) 1802 #define I2C_IC_STATUS_ACTIVITY_BITS _u(0x00000001) 1803 #define I2C_IC_STATUS_ACTIVITY_MSB _u(0) 1804 #define I2C_IC_STATUS_ACTIVITY_LSB _u(0) 1805 #define I2C_IC_STATUS_ACTIVITY_ACCESS "RO" 1806 #define I2C_IC_STATUS_ACTIVITY_VALUE_INACTIVE _u(0x0) 1807 #define I2C_IC_STATUS_ACTIVITY_VALUE_ACTIVE _u(0x1) 1808 // ============================================================================= 1809 // Register : I2C_IC_TXFLR 1810 // Description : I2C Transmit FIFO Level Register This register contains the 1811 // number of valid data entries in the transmit FIFO buffer. It is 1812 // cleared whenever: - The I2C is disabled - There is a transmit 1813 // abort - that is, TX_ABRT bit is set in the IC_RAW_INTR_STAT 1814 // register - The slave bulk transmit mode is aborted The register 1815 // increments whenever data is placed into the transmit FIFO and 1816 // decrements when data is taken from the transmit FIFO. 1817 #define I2C_IC_TXFLR_OFFSET _u(0x00000074) 1818 #define I2C_IC_TXFLR_BITS _u(0x0000001f) 1819 #define I2C_IC_TXFLR_RESET _u(0x00000000) 1820 // ----------------------------------------------------------------------------- 1821 // Field : I2C_IC_TXFLR_TXFLR 1822 // Description : Transmit FIFO Level. Contains the number of valid data entries 1823 // in the transmit FIFO. 1824 // 1825 // Reset value: 0x0 1826 #define I2C_IC_TXFLR_TXFLR_RESET _u(0x00) 1827 #define I2C_IC_TXFLR_TXFLR_BITS _u(0x0000001f) 1828 #define I2C_IC_TXFLR_TXFLR_MSB _u(4) 1829 #define I2C_IC_TXFLR_TXFLR_LSB _u(0) 1830 #define I2C_IC_TXFLR_TXFLR_ACCESS "RO" 1831 // ============================================================================= 1832 // Register : I2C_IC_RXFLR 1833 // Description : I2C Receive FIFO Level Register This register contains the 1834 // number of valid data entries in the receive FIFO buffer. It is 1835 // cleared whenever: - The I2C is disabled - Whenever there is a 1836 // transmit abort caused by any of the events tracked in 1837 // IC_TX_ABRT_SOURCE The register increments whenever data is 1838 // placed into the receive FIFO and decrements when data is taken 1839 // from the receive FIFO. 1840 #define I2C_IC_RXFLR_OFFSET _u(0x00000078) 1841 #define I2C_IC_RXFLR_BITS _u(0x0000001f) 1842 #define I2C_IC_RXFLR_RESET _u(0x00000000) 1843 // ----------------------------------------------------------------------------- 1844 // Field : I2C_IC_RXFLR_RXFLR 1845 // Description : Receive FIFO Level. Contains the number of valid data entries 1846 // in the receive FIFO. 1847 // 1848 // Reset value: 0x0 1849 #define I2C_IC_RXFLR_RXFLR_RESET _u(0x00) 1850 #define I2C_IC_RXFLR_RXFLR_BITS _u(0x0000001f) 1851 #define I2C_IC_RXFLR_RXFLR_MSB _u(4) 1852 #define I2C_IC_RXFLR_RXFLR_LSB _u(0) 1853 #define I2C_IC_RXFLR_RXFLR_ACCESS "RO" 1854 // ============================================================================= 1855 // Register : I2C_IC_SDA_HOLD 1856 // Description : I2C SDA Hold Time Length Register 1857 // 1858 // The bits [15:0] of this register are used to control the hold 1859 // time of SDA during transmit in both slave and master mode 1860 // (after SCL goes from HIGH to LOW). 1861 // 1862 // The bits [23:16] of this register are used to extend the SDA 1863 // transition (if any) whenever SCL is HIGH in the receiver in 1864 // either master or slave mode. 1865 // 1866 // Writes to this register succeed only when IC_ENABLE[0]=0. 1867 // 1868 // The values in this register are in units of ic_clk period. The 1869 // value programmed in IC_SDA_TX_HOLD must be greater than the 1870 // minimum hold time in each mode (one cycle in master mode, seven 1871 // cycles in slave mode) for the value to be implemented. 1872 // 1873 // The programmed SDA hold time during transmit (IC_SDA_TX_HOLD) 1874 // cannot exceed at any time the duration of the low part of scl. 1875 // Therefore the programmed value cannot be larger than 1876 // N_SCL_LOW-2, where N_SCL_LOW is the duration of the low part of 1877 // the scl period measured in ic_clk cycles. 1878 #define I2C_IC_SDA_HOLD_OFFSET _u(0x0000007c) 1879 #define I2C_IC_SDA_HOLD_BITS _u(0x00ffffff) 1880 #define I2C_IC_SDA_HOLD_RESET _u(0x00000001) 1881 // ----------------------------------------------------------------------------- 1882 // Field : I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD 1883 // Description : Sets the required SDA hold time in units of ic_clk period, when 1884 // DW_apb_i2c acts as a receiver. 1885 // 1886 // Reset value: IC_DEFAULT_SDA_HOLD[23:16]. 1887 #define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_RESET _u(0x00) 1888 #define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_BITS _u(0x00ff0000) 1889 #define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_MSB _u(23) 1890 #define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_LSB _u(16) 1891 #define I2C_IC_SDA_HOLD_IC_SDA_RX_HOLD_ACCESS "RW" 1892 // ----------------------------------------------------------------------------- 1893 // Field : I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD 1894 // Description : Sets the required SDA hold time in units of ic_clk period, when 1895 // DW_apb_i2c acts as a transmitter. 1896 // 1897 // Reset value: IC_DEFAULT_SDA_HOLD[15:0]. 1898 #define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_RESET _u(0x0001) 1899 #define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_BITS _u(0x0000ffff) 1900 #define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_MSB _u(15) 1901 #define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_LSB _u(0) 1902 #define I2C_IC_SDA_HOLD_IC_SDA_TX_HOLD_ACCESS "RW" 1903 // ============================================================================= 1904 // Register : I2C_IC_TX_ABRT_SOURCE 1905 // Description : I2C Transmit Abort Source Register 1906 // 1907 // This register has 32 bits that indicate the source of the 1908 // TX_ABRT bit. Except for Bit 9, this register is cleared 1909 // whenever the IC_CLR_TX_ABRT register or the IC_CLR_INTR 1910 // register is read. To clear Bit 9, the source of the 1911 // ABRT_SBYTE_NORSTRT must be fixed first; RESTART must be enabled 1912 // (IC_CON[5]=1), the SPECIAL bit must be cleared (IC_TAR[11]), or 1913 // the GC_OR_START bit must be cleared (IC_TAR[10]). 1914 // 1915 // Once the source of the ABRT_SBYTE_NORSTRT is fixed, then this 1916 // bit can be cleared in the same manner as other bits in this 1917 // register. If the source of the ABRT_SBYTE_NORSTRT is not fixed 1918 // before attempting to clear this bit, Bit 9 clears for one cycle 1919 // and is then re-asserted. 1920 #define I2C_IC_TX_ABRT_SOURCE_OFFSET _u(0x00000080) 1921 #define I2C_IC_TX_ABRT_SOURCE_BITS _u(0xff81ffff) 1922 #define I2C_IC_TX_ABRT_SOURCE_RESET _u(0x00000000) 1923 // ----------------------------------------------------------------------------- 1924 // Field : I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT 1925 // Description : This field indicates the number of Tx FIFO Data Commands which 1926 // are flushed due to TX_ABRT interrupt. It is cleared whenever 1927 // I2C is disabled. 1928 // 1929 // Reset value: 0x0 1930 // 1931 // Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter 1932 #define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_RESET _u(0x000) 1933 #define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_BITS _u(0xff800000) 1934 #define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_MSB _u(31) 1935 #define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_LSB _u(23) 1936 #define I2C_IC_TX_ABRT_SOURCE_TX_FLUSH_CNT_ACCESS "RO" 1937 // ----------------------------------------------------------------------------- 1938 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT 1939 // Description : This is a master-mode-only bit. Master has detected the 1940 // transfer abort (IC_ENABLE[1]) 1941 // 1942 // Reset value: 0x0 1943 // 1944 // Role of DW_apb_i2c: Master-Transmitter 1945 // 0x0 -> Transfer abort detected by master- scenario not present 1946 // 0x1 -> Transfer abort detected by master 1947 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_RESET _u(0x0) 1948 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_BITS _u(0x00010000) 1949 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_MSB _u(16) 1950 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_LSB _u(16) 1951 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_ACCESS "RO" 1952 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_VALUE_ABRT_USER_ABRT_VOID _u(0x0) 1953 #define I2C_IC_TX_ABRT_SOURCE_ABRT_USER_ABRT_VALUE_ABRT_USER_ABRT_GENERATED _u(0x1) 1954 // ----------------------------------------------------------------------------- 1955 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX 1956 // Description : 1: When the processor side responds to a slave mode request for 1957 // data to be transmitted to a remote master and user writes a 1 1958 // in CMD (bit 8) of IC_DATA_CMD register. 1959 // 1960 // Reset value: 0x0 1961 // 1962 // Role of DW_apb_i2c: Slave-Transmitter 1963 // 0x0 -> Slave trying to transmit to remote master in read mode- scenario not present 1964 // 0x1 -> Slave trying to transmit to remote master in read mode 1965 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_RESET _u(0x0) 1966 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_BITS _u(0x00008000) 1967 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_MSB _u(15) 1968 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_LSB _u(15) 1969 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_ACCESS "RO" 1970 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_VALUE_ABRT_SLVRD_INTX_VOID _u(0x0) 1971 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVRD_INTX_VALUE_ABRT_SLVRD_INTX_GENERATED _u(0x1) 1972 // ----------------------------------------------------------------------------- 1973 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST 1974 // Description : This field indicates that a Slave has lost the bus while 1975 // transmitting data to a remote master. IC_TX_ABRT_SOURCE[12] is 1976 // set at the same time. Note: Even though the slave never 'owns' 1977 // the bus, something could go wrong on the bus. This is a fail 1978 // safe check. For instance, during a data transmission at the 1979 // low-to-high transition of SCL, if what is on the data bus is 1980 // not what is supposed to be transmitted, then DW_apb_i2c no 1981 // longer own the bus. 1982 // 1983 // Reset value: 0x0 1984 // 1985 // Role of DW_apb_i2c: Slave-Transmitter 1986 // 0x0 -> Slave lost arbitration to remote master- scenario not present 1987 // 0x1 -> Slave lost arbitration to remote master 1988 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_RESET _u(0x0) 1989 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_BITS _u(0x00004000) 1990 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_MSB _u(14) 1991 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_LSB _u(14) 1992 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_ACCESS "RO" 1993 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_VALUE_ABRT_SLV_ARBLOST_VOID _u(0x0) 1994 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLV_ARBLOST_VALUE_ABRT_SLV_ARBLOST_GENERATED _u(0x1) 1995 // ----------------------------------------------------------------------------- 1996 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO 1997 // Description : This field specifies that the Slave has received a read command 1998 // and some data exists in the TX FIFO, so the slave issues a 1999 // TX_ABRT interrupt to flush old data in TX FIFO. 2000 // 2001 // Reset value: 0x0 2002 // 2003 // Role of DW_apb_i2c: Slave-Transmitter 2004 // 0x0 -> Slave flushes existing data in TX-FIFO upon getting read command- scenario not present 2005 // 0x1 -> Slave flushes existing data in TX-FIFO upon getting read command 2006 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_RESET _u(0x0) 2007 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_BITS _u(0x00002000) 2008 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_MSB _u(13) 2009 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_LSB _u(13) 2010 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_ACCESS "RO" 2011 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_VALUE_ABRT_SLVFLUSH_TXFIFO_VOID _u(0x0) 2012 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SLVFLUSH_TXFIFO_VALUE_ABRT_SLVFLUSH_TXFIFO_GENERATED _u(0x1) 2013 // ----------------------------------------------------------------------------- 2014 // Field : I2C_IC_TX_ABRT_SOURCE_ARB_LOST 2015 // Description : This field specifies that the Master has lost arbitration, or 2016 // if IC_TX_ABRT_SOURCE[14] is also set, then the slave 2017 // transmitter has lost arbitration. 2018 // 2019 // Reset value: 0x0 2020 // 2021 // Role of DW_apb_i2c: Master-Transmitter or Slave-Transmitter 2022 // 0x0 -> Master or Slave-Transmitter lost arbitration- scenario not present 2023 // 0x1 -> Master or Slave-Transmitter lost arbitration 2024 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_RESET _u(0x0) 2025 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_BITS _u(0x00001000) 2026 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_MSB _u(12) 2027 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_LSB _u(12) 2028 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_ACCESS "RO" 2029 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_VALUE_ABRT_LOST_VOID _u(0x0) 2030 #define I2C_IC_TX_ABRT_SOURCE_ARB_LOST_VALUE_ABRT_LOST_GENERATED _u(0x1) 2031 // ----------------------------------------------------------------------------- 2032 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS 2033 // Description : This field indicates that the User tries to initiate a Master 2034 // operation with the Master mode disabled. 2035 // 2036 // Reset value: 0x0 2037 // 2038 // Role of DW_apb_i2c: Master-Transmitter or Master-Receiver 2039 // 0x0 -> User initiating master operation when MASTER disabled- scenario not present 2040 // 0x1 -> User initiating master operation when MASTER disabled 2041 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_RESET _u(0x0) 2042 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_BITS _u(0x00000800) 2043 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_MSB _u(11) 2044 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_LSB _u(11) 2045 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_ACCESS "RO" 2046 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_VALUE_ABRT_MASTER_DIS_VOID _u(0x0) 2047 #define I2C_IC_TX_ABRT_SOURCE_ABRT_MASTER_DIS_VALUE_ABRT_MASTER_DIS_GENERATED _u(0x1) 2048 // ----------------------------------------------------------------------------- 2049 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT 2050 // Description : This field indicates that the restart is disabled 2051 // (IC_RESTART_EN bit (IC_CON[5]) =0) and the master sends a read 2052 // command in 10-bit addressing mode. 2053 // 2054 // Reset value: 0x0 2055 // 2056 // Role of DW_apb_i2c: Master-Receiver 2057 // 0x0 -> Master not trying to read in 10Bit addressing mode when RESTART disabled 2058 // 0x1 -> Master trying to read in 10Bit addressing mode when RESTART disabled 2059 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_RESET _u(0x0) 2060 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_BITS _u(0x00000400) 2061 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_MSB _u(10) 2062 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_LSB _u(10) 2063 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_ACCESS "RO" 2064 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_VALUE_ABRT_10B_RD_VOID _u(0x0) 2065 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10B_RD_NORSTRT_VALUE_ABRT_10B_RD_GENERATED _u(0x1) 2066 // ----------------------------------------------------------------------------- 2067 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT 2068 // Description : To clear Bit 9, the source of the ABRT_SBYTE_NORSTRT must be 2069 // fixed first; restart must be enabled (IC_CON[5]=1), the SPECIAL 2070 // bit must be cleared (IC_TAR[11]), or the GC_OR_START bit must 2071 // be cleared (IC_TAR[10]). Once the source of the 2072 // ABRT_SBYTE_NORSTRT is fixed, then this bit can be cleared in 2073 // the same manner as other bits in this register. If the source 2074 // of the ABRT_SBYTE_NORSTRT is not fixed before attempting to 2075 // clear this bit, bit 9 clears for one cycle and then gets 2076 // reasserted. When this field is set to 1, the restart is 2077 // disabled (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is 2078 // trying to send a START Byte. 2079 // 2080 // Reset value: 0x0 2081 // 2082 // Role of DW_apb_i2c: Master 2083 // 0x0 -> User trying to send START byte when RESTART disabled- scenario not present 2084 // 0x1 -> User trying to send START byte when RESTART disabled 2085 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_RESET _u(0x0) 2086 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_BITS _u(0x00000200) 2087 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_MSB _u(9) 2088 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_LSB _u(9) 2089 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_ACCESS "RO" 2090 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_VALUE_ABRT_SBYTE_NORSTRT_VOID _u(0x0) 2091 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_NORSTRT_VALUE_ABRT_SBYTE_NORSTRT_GENERATED _u(0x1) 2092 // ----------------------------------------------------------------------------- 2093 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT 2094 // Description : This field indicates that the restart is disabled 2095 // (IC_RESTART_EN bit (IC_CON[5]) =0) and the user is trying to 2096 // use the master to transfer data in High Speed mode. 2097 // 2098 // Reset value: 0x0 2099 // 2100 // Role of DW_apb_i2c: Master-Transmitter or Master-Receiver 2101 // 0x0 -> User trying to switch Master to HS mode when RESTART disabled- scenario not present 2102 // 0x1 -> User trying to switch Master to HS mode when RESTART disabled 2103 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_RESET _u(0x0) 2104 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_BITS _u(0x00000100) 2105 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_MSB _u(8) 2106 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_LSB _u(8) 2107 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_ACCESS "RO" 2108 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_VALUE_ABRT_HS_NORSTRT_VOID _u(0x0) 2109 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_NORSTRT_VALUE_ABRT_HS_NORSTRT_GENERATED _u(0x1) 2110 // ----------------------------------------------------------------------------- 2111 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET 2112 // Description : This field indicates that the Master has sent a START Byte and 2113 // the START Byte was acknowledged (wrong behavior). 2114 // 2115 // Reset value: 0x0 2116 // 2117 // Role of DW_apb_i2c: Master 2118 // 0x0 -> ACK detected for START byte- scenario not present 2119 // 0x1 -> ACK detected for START byte 2120 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_RESET _u(0x0) 2121 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_BITS _u(0x00000080) 2122 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_MSB _u(7) 2123 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_LSB _u(7) 2124 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_ACCESS "RO" 2125 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_VALUE_ABRT_SBYTE_ACKDET_VOID _u(0x0) 2126 #define I2C_IC_TX_ABRT_SOURCE_ABRT_SBYTE_ACKDET_VALUE_ABRT_SBYTE_ACKDET_GENERATED _u(0x1) 2127 // ----------------------------------------------------------------------------- 2128 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET 2129 // Description : This field indicates that the Master is in High Speed mode and 2130 // the High Speed Master code was acknowledged (wrong behavior). 2131 // 2132 // Reset value: 0x0 2133 // 2134 // Role of DW_apb_i2c: Master 2135 // 0x0 -> HS Master code ACKed in HS Mode- scenario not present 2136 // 0x1 -> HS Master code ACKed in HS Mode 2137 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_RESET _u(0x0) 2138 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_BITS _u(0x00000040) 2139 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_MSB _u(6) 2140 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_LSB _u(6) 2141 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_ACCESS "RO" 2142 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_VALUE_ABRT_HS_ACK_VOID _u(0x0) 2143 #define I2C_IC_TX_ABRT_SOURCE_ABRT_HS_ACKDET_VALUE_ABRT_HS_ACK_GENERATED _u(0x1) 2144 // ----------------------------------------------------------------------------- 2145 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ 2146 // Description : This field indicates that DW_apb_i2c in the master mode has 2147 // sent a General Call but the user programmed the byte following 2148 // the General Call to be a read from the bus (IC_DATA_CMD[9] is 2149 // set to 1). 2150 // 2151 // Reset value: 0x0 2152 // 2153 // Role of DW_apb_i2c: Master-Transmitter 2154 // 0x0 -> GCALL is followed by read from bus-scenario not present 2155 // 0x1 -> GCALL is followed by read from bus 2156 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_RESET _u(0x0) 2157 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_BITS _u(0x00000020) 2158 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_MSB _u(5) 2159 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_LSB _u(5) 2160 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_ACCESS "RO" 2161 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_VALUE_ABRT_GCALL_READ_VOID _u(0x0) 2162 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_READ_VALUE_ABRT_GCALL_READ_GENERATED _u(0x1) 2163 // ----------------------------------------------------------------------------- 2164 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK 2165 // Description : This field indicates that DW_apb_i2c in master mode has sent a 2166 // General Call and no slave on the bus acknowledged the General 2167 // Call. 2168 // 2169 // Reset value: 0x0 2170 // 2171 // Role of DW_apb_i2c: Master-Transmitter 2172 // 0x0 -> GCALL not ACKed by any slave-scenario not present 2173 // 0x1 -> GCALL not ACKed by any slave 2174 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_RESET _u(0x0) 2175 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_BITS _u(0x00000010) 2176 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_MSB _u(4) 2177 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_LSB _u(4) 2178 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_ACCESS "RO" 2179 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_VALUE_ABRT_GCALL_NOACK_VOID _u(0x0) 2180 #define I2C_IC_TX_ABRT_SOURCE_ABRT_GCALL_NOACK_VALUE_ABRT_GCALL_NOACK_GENERATED _u(0x1) 2181 // ----------------------------------------------------------------------------- 2182 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK 2183 // Description : This field indicates the master-mode only bit. When the master 2184 // receives an acknowledgement for the address, but when it sends 2185 // data byte(s) following the address, it did not receive an 2186 // acknowledge from the remote slave(s). 2187 // 2188 // Reset value: 0x0 2189 // 2190 // Role of DW_apb_i2c: Master-Transmitter 2191 // 0x0 -> Transmitted data non-ACKed by addressed slave-scenario not present 2192 // 0x1 -> Transmitted data not ACKed by addressed slave 2193 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_RESET _u(0x0) 2194 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_BITS _u(0x00000008) 2195 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_MSB _u(3) 2196 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_LSB _u(3) 2197 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_ACCESS "RO" 2198 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_VALUE_ABRT_TXDATA_NOACK_VOID _u(0x0) 2199 #define I2C_IC_TX_ABRT_SOURCE_ABRT_TXDATA_NOACK_VALUE_ABRT_TXDATA_NOACK_GENERATED _u(0x1) 2200 // ----------------------------------------------------------------------------- 2201 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK 2202 // Description : This field indicates that the Master is in 10-bit address mode 2203 // and that the second address byte of the 10-bit address was not 2204 // acknowledged by any slave. 2205 // 2206 // Reset value: 0x0 2207 // 2208 // Role of DW_apb_i2c: Master-Transmitter or Master-Receiver 2209 // 0x0 -> This abort is not generated 2210 // 0x1 -> Byte 2 of 10Bit Address not ACKed by any slave 2211 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_RESET _u(0x0) 2212 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_BITS _u(0x00000004) 2213 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_MSB _u(2) 2214 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_LSB _u(2) 2215 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_ACCESS "RO" 2216 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_VALUE_INACTIVE _u(0x0) 2217 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR2_NOACK_VALUE_ACTIVE _u(0x1) 2218 // ----------------------------------------------------------------------------- 2219 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK 2220 // Description : This field indicates that the Master is in 10-bit address mode 2221 // and the first 10-bit address byte was not acknowledged by any 2222 // slave. 2223 // 2224 // Reset value: 0x0 2225 // 2226 // Role of DW_apb_i2c: Master-Transmitter or Master-Receiver 2227 // 0x0 -> This abort is not generated 2228 // 0x1 -> Byte 1 of 10Bit Address not ACKed by any slave 2229 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_RESET _u(0x0) 2230 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_BITS _u(0x00000002) 2231 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_MSB _u(1) 2232 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_LSB _u(1) 2233 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_ACCESS "RO" 2234 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_VALUE_INACTIVE _u(0x0) 2235 #define I2C_IC_TX_ABRT_SOURCE_ABRT_10ADDR1_NOACK_VALUE_ACTIVE _u(0x1) 2236 // ----------------------------------------------------------------------------- 2237 // Field : I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK 2238 // Description : This field indicates that the Master is in 7-bit addressing 2239 // mode and the address sent was not acknowledged by any slave. 2240 // 2241 // Reset value: 0x0 2242 // 2243 // Role of DW_apb_i2c: Master-Transmitter or Master-Receiver 2244 // 0x0 -> This abort is not generated 2245 // 0x1 -> This abort is generated because of NOACK for 7-bit address 2246 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_RESET _u(0x0) 2247 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_BITS _u(0x00000001) 2248 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_MSB _u(0) 2249 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_LSB _u(0) 2250 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_ACCESS "RO" 2251 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_VALUE_INACTIVE _u(0x0) 2252 #define I2C_IC_TX_ABRT_SOURCE_ABRT_7B_ADDR_NOACK_VALUE_ACTIVE _u(0x1) 2253 // ============================================================================= 2254 // Register : I2C_IC_SLV_DATA_NACK_ONLY 2255 // Description : Generate Slave Data NACK Register 2256 // 2257 // The register is used to generate a NACK for the data part of a 2258 // transfer when DW_apb_i2c is acting as a slave-receiver. This 2259 // register only exists when the IC_SLV_DATA_NACK_ONLY parameter 2260 // is set to 1. When this parameter disabled, this register does 2261 // not exist and writing to the register's address has no effect. 2262 // 2263 // A write can occur on this register if both of the following 2264 // conditions are met: - DW_apb_i2c is disabled (IC_ENABLE[0] = 0) 2265 // - Slave part is inactive (IC_STATUS[6] = 0) Note: The 2266 // IC_STATUS[6] is a register read-back location for the internal 2267 // slv_activity signal; the user should poll this before writing 2268 // the ic_slv_data_nack_only bit. 2269 #define I2C_IC_SLV_DATA_NACK_ONLY_OFFSET _u(0x00000084) 2270 #define I2C_IC_SLV_DATA_NACK_ONLY_BITS _u(0x00000001) 2271 #define I2C_IC_SLV_DATA_NACK_ONLY_RESET _u(0x00000000) 2272 // ----------------------------------------------------------------------------- 2273 // Field : I2C_IC_SLV_DATA_NACK_ONLY_NACK 2274 // Description : Generate NACK. This NACK generation only occurs when DW_apb_i2c 2275 // is a slave-receiver. If this register is set to a value of 1, 2276 // it can only generate a NACK after a data byte is received; 2277 // hence, the data transfer is aborted and the data received is 2278 // not pushed to the receive buffer. 2279 // 2280 // When the register is set to a value of 0, it generates 2281 // NACK/ACK, depending on normal criteria. - 1: generate NACK 2282 // after data byte received - 0: generate NACK/ACK normally Reset 2283 // value: 0x0 2284 // 0x0 -> Slave receiver generates NACK normally 2285 // 0x1 -> Slave receiver generates NACK upon data reception only 2286 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_RESET _u(0x0) 2287 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_BITS _u(0x00000001) 2288 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_MSB _u(0) 2289 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_LSB _u(0) 2290 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_ACCESS "RW" 2291 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_VALUE_DISABLED _u(0x0) 2292 #define I2C_IC_SLV_DATA_NACK_ONLY_NACK_VALUE_ENABLED _u(0x1) 2293 // ============================================================================= 2294 // Register : I2C_IC_DMA_CR 2295 // Description : DMA Control Register 2296 // 2297 // The register is used to enable the DMA Controller interface 2298 // operation. There is a separate bit for transmit and receive. 2299 // This can be programmed regardless of the state of IC_ENABLE. 2300 #define I2C_IC_DMA_CR_OFFSET _u(0x00000088) 2301 #define I2C_IC_DMA_CR_BITS _u(0x00000003) 2302 #define I2C_IC_DMA_CR_RESET _u(0x00000000) 2303 // ----------------------------------------------------------------------------- 2304 // Field : I2C_IC_DMA_CR_TDMAE 2305 // Description : Transmit DMA Enable. This bit enables/disables the transmit 2306 // FIFO DMA channel. Reset value: 0x0 2307 // 0x0 -> transmit FIFO DMA channel disabled 2308 // 0x1 -> Transmit FIFO DMA channel enabled 2309 #define I2C_IC_DMA_CR_TDMAE_RESET _u(0x0) 2310 #define I2C_IC_DMA_CR_TDMAE_BITS _u(0x00000002) 2311 #define I2C_IC_DMA_CR_TDMAE_MSB _u(1) 2312 #define I2C_IC_DMA_CR_TDMAE_LSB _u(1) 2313 #define I2C_IC_DMA_CR_TDMAE_ACCESS "RW" 2314 #define I2C_IC_DMA_CR_TDMAE_VALUE_DISABLED _u(0x0) 2315 #define I2C_IC_DMA_CR_TDMAE_VALUE_ENABLED _u(0x1) 2316 // ----------------------------------------------------------------------------- 2317 // Field : I2C_IC_DMA_CR_RDMAE 2318 // Description : Receive DMA Enable. This bit enables/disables the receive FIFO 2319 // DMA channel. Reset value: 0x0 2320 // 0x0 -> Receive FIFO DMA channel disabled 2321 // 0x1 -> Receive FIFO DMA channel enabled 2322 #define I2C_IC_DMA_CR_RDMAE_RESET _u(0x0) 2323 #define I2C_IC_DMA_CR_RDMAE_BITS _u(0x00000001) 2324 #define I2C_IC_DMA_CR_RDMAE_MSB _u(0) 2325 #define I2C_IC_DMA_CR_RDMAE_LSB _u(0) 2326 #define I2C_IC_DMA_CR_RDMAE_ACCESS "RW" 2327 #define I2C_IC_DMA_CR_RDMAE_VALUE_DISABLED _u(0x0) 2328 #define I2C_IC_DMA_CR_RDMAE_VALUE_ENABLED _u(0x1) 2329 // ============================================================================= 2330 // Register : I2C_IC_DMA_TDLR 2331 // Description : DMA Transmit Data Level Register 2332 #define I2C_IC_DMA_TDLR_OFFSET _u(0x0000008c) 2333 #define I2C_IC_DMA_TDLR_BITS _u(0x0000000f) 2334 #define I2C_IC_DMA_TDLR_RESET _u(0x00000000) 2335 // ----------------------------------------------------------------------------- 2336 // Field : I2C_IC_DMA_TDLR_DMATDL 2337 // Description : Transmit Data Level. This bit field controls the level at which 2338 // a DMA request is made by the transmit logic. It is equal to the 2339 // watermark level; that is, the dma_tx_req signal is generated 2340 // when the number of valid data entries in the transmit FIFO is 2341 // equal to or below this field value, and TDMAE = 1. 2342 // 2343 // Reset value: 0x0 2344 #define I2C_IC_DMA_TDLR_DMATDL_RESET _u(0x0) 2345 #define I2C_IC_DMA_TDLR_DMATDL_BITS _u(0x0000000f) 2346 #define I2C_IC_DMA_TDLR_DMATDL_MSB _u(3) 2347 #define I2C_IC_DMA_TDLR_DMATDL_LSB _u(0) 2348 #define I2C_IC_DMA_TDLR_DMATDL_ACCESS "RW" 2349 // ============================================================================= 2350 // Register : I2C_IC_DMA_RDLR 2351 // Description : I2C Receive Data Level Register 2352 #define I2C_IC_DMA_RDLR_OFFSET _u(0x00000090) 2353 #define I2C_IC_DMA_RDLR_BITS _u(0x0000000f) 2354 #define I2C_IC_DMA_RDLR_RESET _u(0x00000000) 2355 // ----------------------------------------------------------------------------- 2356 // Field : I2C_IC_DMA_RDLR_DMARDL 2357 // Description : Receive Data Level. This bit field controls the level at which 2358 // a DMA request is made by the receive logic. The watermark level 2359 // = DMARDL+1; that is, dma_rx_req is generated when the number of 2360 // valid data entries in the receive FIFO is equal to or more than 2361 // this field value + 1, and RDMAE =1. For instance, when DMARDL 2362 // is 0, then dma_rx_req is asserted when 1 or more data entries 2363 // are present in the receive FIFO. 2364 // 2365 // Reset value: 0x0 2366 #define I2C_IC_DMA_RDLR_DMARDL_RESET _u(0x0) 2367 #define I2C_IC_DMA_RDLR_DMARDL_BITS _u(0x0000000f) 2368 #define I2C_IC_DMA_RDLR_DMARDL_MSB _u(3) 2369 #define I2C_IC_DMA_RDLR_DMARDL_LSB _u(0) 2370 #define I2C_IC_DMA_RDLR_DMARDL_ACCESS "RW" 2371 // ============================================================================= 2372 // Register : I2C_IC_SDA_SETUP 2373 // Description : I2C SDA Setup Register 2374 // 2375 // This register controls the amount of time delay (in terms of 2376 // number of ic_clk clock periods) introduced in the rising edge 2377 // of SCL - relative to SDA changing - when DW_apb_i2c services a 2378 // read request in a slave-transmitter operation. The relevant I2C 2379 // requirement is tSU:DAT (note 4) as detailed in the I2C Bus 2380 // Specification. This register must be programmed with a value 2381 // equal to or greater than 2. 2382 // 2383 // Writes to this register succeed only when IC_ENABLE[0] = 0. 2384 // 2385 // Note: The length of setup time is calculated using 2386 // [(IC_SDA_SETUP - 1) * (ic_clk_period)], so if the user requires 2387 // 10 ic_clk periods of setup time, they should program a value of 2388 // 11. The IC_SDA_SETUP register is only used by the DW_apb_i2c 2389 // when operating as a slave transmitter. 2390 #define I2C_IC_SDA_SETUP_OFFSET _u(0x00000094) 2391 #define I2C_IC_SDA_SETUP_BITS _u(0x000000ff) 2392 #define I2C_IC_SDA_SETUP_RESET _u(0x00000064) 2393 // ----------------------------------------------------------------------------- 2394 // Field : I2C_IC_SDA_SETUP_SDA_SETUP 2395 // Description : SDA Setup. It is recommended that if the required delay is 2396 // 1000ns, then for an ic_clk frequency of 10 MHz, IC_SDA_SETUP 2397 // should be programmed to a value of 11. IC_SDA_SETUP must be 2398 // programmed with a minimum value of 2. 2399 #define I2C_IC_SDA_SETUP_SDA_SETUP_RESET _u(0x64) 2400 #define I2C_IC_SDA_SETUP_SDA_SETUP_BITS _u(0x000000ff) 2401 #define I2C_IC_SDA_SETUP_SDA_SETUP_MSB _u(7) 2402 #define I2C_IC_SDA_SETUP_SDA_SETUP_LSB _u(0) 2403 #define I2C_IC_SDA_SETUP_SDA_SETUP_ACCESS "RW" 2404 // ============================================================================= 2405 // Register : I2C_IC_ACK_GENERAL_CALL 2406 // Description : I2C ACK General Call Register 2407 // 2408 // The register controls whether DW_apb_i2c responds with a ACK or 2409 // NACK when it receives an I2C General Call address. 2410 // 2411 // This register is applicable only when the DW_apb_i2c is in 2412 // slave mode. 2413 #define I2C_IC_ACK_GENERAL_CALL_OFFSET _u(0x00000098) 2414 #define I2C_IC_ACK_GENERAL_CALL_BITS _u(0x00000001) 2415 #define I2C_IC_ACK_GENERAL_CALL_RESET _u(0x00000001) 2416 // ----------------------------------------------------------------------------- 2417 // Field : I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL 2418 // Description : ACK General Call. When set to 1, DW_apb_i2c responds with a ACK 2419 // (by asserting ic_data_oe) when it receives a General Call. 2420 // Otherwise, DW_apb_i2c responds with a NACK (by negating 2421 // ic_data_oe). 2422 // 0x0 -> Generate NACK for a General Call 2423 // 0x1 -> Generate ACK for a General Call 2424 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_RESET _u(0x1) 2425 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_BITS _u(0x00000001) 2426 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_MSB _u(0) 2427 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_LSB _u(0) 2428 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_ACCESS "RW" 2429 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_VALUE_DISABLED _u(0x0) 2430 #define I2C_IC_ACK_GENERAL_CALL_ACK_GEN_CALL_VALUE_ENABLED _u(0x1) 2431 // ============================================================================= 2432 // Register : I2C_IC_ENABLE_STATUS 2433 // Description : I2C Enable Status Register 2434 // 2435 // The register is used to report the DW_apb_i2c hardware status 2436 // when the IC_ENABLE[0] register is set from 1 to 0; that is, 2437 // when DW_apb_i2c is disabled. 2438 // 2439 // If IC_ENABLE[0] has been set to 1, bits 2:1 are forced to 0, 2440 // and bit 0 is forced to 1. 2441 // 2442 // If IC_ENABLE[0] has been set to 0, bits 2:1 is only be valid as 2443 // soon as bit 0 is read as '0'. 2444 // 2445 // Note: When IC_ENABLE[0] has been set to 0, a delay occurs for 2446 // bit 0 to be read as 0 because disabling the DW_apb_i2c depends 2447 // on I2C bus activities. 2448 #define I2C_IC_ENABLE_STATUS_OFFSET _u(0x0000009c) 2449 #define I2C_IC_ENABLE_STATUS_BITS _u(0x00000007) 2450 #define I2C_IC_ENABLE_STATUS_RESET _u(0x00000000) 2451 // ----------------------------------------------------------------------------- 2452 // Field : I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST 2453 // Description : Slave Received Data Lost. This bit indicates if a Slave- 2454 // Receiver operation has been aborted with at least one data byte 2455 // received from an I2C transfer due to the setting bit 0 of 2456 // IC_ENABLE from 1 to 0. When read as 1, DW_apb_i2c is deemed to 2457 // have been actively engaged in an aborted I2C transfer (with 2458 // matching address) and the data phase of the I2C transfer has 2459 // been entered, even though a data byte has been responded with a 2460 // NACK. 2461 // 2462 // Note: If the remote I2C master terminates the transfer with a 2463 // STOP condition before the DW_apb_i2c has a chance to NACK a 2464 // transfer, and IC_ENABLE[0] has been set to 0, then this bit is 2465 // also set to 1. 2466 // 2467 // When read as 0, DW_apb_i2c is deemed to have been disabled 2468 // without being actively involved in the data phase of a Slave- 2469 // Receiver transfer. 2470 // 2471 // Note: The CPU can safely read this bit when IC_EN (bit 0) is 2472 // read as 0. 2473 // 2474 // Reset value: 0x0 2475 // 0x0 -> Slave RX Data is not lost 2476 // 0x1 -> Slave RX Data is lost 2477 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_RESET _u(0x0) 2478 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_BITS _u(0x00000004) 2479 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_MSB _u(2) 2480 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_LSB _u(2) 2481 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_ACCESS "RO" 2482 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_VALUE_INACTIVE _u(0x0) 2483 #define I2C_IC_ENABLE_STATUS_SLV_RX_DATA_LOST_VALUE_ACTIVE _u(0x1) 2484 // ----------------------------------------------------------------------------- 2485 // Field : I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY 2486 // Description : Slave Disabled While Busy (Transmit, Receive). This bit 2487 // indicates if a potential or active Slave operation has been 2488 // aborted due to the setting bit 0 of the IC_ENABLE register from 2489 // 1 to 0. This bit is set when the CPU writes a 0 to the 2490 // IC_ENABLE register while: 2491 // 2492 // (a) DW_apb_i2c is receiving the address byte of the Slave- 2493 // Transmitter operation from a remote master; 2494 // 2495 // OR, 2496 // 2497 // (b) address and data bytes of the Slave-Receiver operation from 2498 // a remote master. 2499 // 2500 // When read as 1, DW_apb_i2c is deemed to have forced a NACK 2501 // during any part of an I2C transfer, irrespective of whether the 2502 // I2C address matches the slave address set in DW_apb_i2c (IC_SAR 2503 // register) OR if the transfer is completed before IC_ENABLE is 2504 // set to 0 but has not taken effect. 2505 // 2506 // Note: If the remote I2C master terminates the transfer with a 2507 // STOP condition before the DW_apb_i2c has a chance to NACK a 2508 // transfer, and IC_ENABLE[0] has been set to 0, then this bit 2509 // will also be set to 1. 2510 // 2511 // When read as 0, DW_apb_i2c is deemed to have been disabled when 2512 // there is master activity, or when the I2C bus is idle. 2513 // 2514 // Note: The CPU can safely read this bit when IC_EN (bit 0) is 2515 // read as 0. 2516 // 2517 // Reset value: 0x0 2518 // 0x0 -> Slave is disabled when it is idle 2519 // 0x1 -> Slave is disabled when it is active 2520 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_RESET _u(0x0) 2521 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_BITS _u(0x00000002) 2522 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_MSB _u(1) 2523 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_LSB _u(1) 2524 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_ACCESS "RO" 2525 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_VALUE_INACTIVE _u(0x0) 2526 #define I2C_IC_ENABLE_STATUS_SLV_DISABLED_WHILE_BUSY_VALUE_ACTIVE _u(0x1) 2527 // ----------------------------------------------------------------------------- 2528 // Field : I2C_IC_ENABLE_STATUS_IC_EN 2529 // Description : ic_en Status. This bit always reflects the value driven on the 2530 // output port ic_en. - When read as 1, DW_apb_i2c is deemed to be 2531 // in an enabled state. - When read as 0, DW_apb_i2c is deemed 2532 // completely inactive. Note: The CPU can safely read this bit 2533 // anytime. When this bit is read as 0, the CPU can safely read 2534 // SLV_RX_DATA_LOST (bit 2) and SLV_DISABLED_WHILE_BUSY (bit 1). 2535 // 2536 // Reset value: 0x0 2537 // 0x0 -> I2C disabled 2538 // 0x1 -> I2C enabled 2539 #define I2C_IC_ENABLE_STATUS_IC_EN_RESET _u(0x0) 2540 #define I2C_IC_ENABLE_STATUS_IC_EN_BITS _u(0x00000001) 2541 #define I2C_IC_ENABLE_STATUS_IC_EN_MSB _u(0) 2542 #define I2C_IC_ENABLE_STATUS_IC_EN_LSB _u(0) 2543 #define I2C_IC_ENABLE_STATUS_IC_EN_ACCESS "RO" 2544 #define I2C_IC_ENABLE_STATUS_IC_EN_VALUE_DISABLED _u(0x0) 2545 #define I2C_IC_ENABLE_STATUS_IC_EN_VALUE_ENABLED _u(0x1) 2546 // ============================================================================= 2547 // Register : I2C_IC_FS_SPKLEN 2548 // Description : I2C SS, FS or FM+ spike suppression limit 2549 // 2550 // This register is used to store the duration, measured in ic_clk 2551 // cycles, of the longest spike that is filtered out by the spike 2552 // suppression logic when the component is operating in SS, FS or 2553 // FM+ modes. The relevant I2C requirement is tSP (table 4) as 2554 // detailed in the I2C Bus Specification. This register must be 2555 // programmed with a minimum value of 1. 2556 #define I2C_IC_FS_SPKLEN_OFFSET _u(0x000000a0) 2557 #define I2C_IC_FS_SPKLEN_BITS _u(0x000000ff) 2558 #define I2C_IC_FS_SPKLEN_RESET _u(0x00000007) 2559 // ----------------------------------------------------------------------------- 2560 // Field : I2C_IC_FS_SPKLEN_IC_FS_SPKLEN 2561 // Description : This register must be set before any I2C bus transaction can 2562 // take place to ensure stable operation. This register sets the 2563 // duration, measured in ic_clk cycles, of the longest spike in 2564 // the SCL or SDA lines that will be filtered out by the spike 2565 // suppression logic. This register can be written only when the 2566 // I2C interface is disabled which corresponds to the IC_ENABLE[0] 2567 // register being set to 0. Writes at other times have no effect. 2568 // The minimum valid value is 1; hardware prevents values less 2569 // than this being written, and if attempted results in 1 being 2570 // set. or more information, refer to 'Spike Suppression'. 2571 #define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_RESET _u(0x07) 2572 #define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_BITS _u(0x000000ff) 2573 #define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_MSB _u(7) 2574 #define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_LSB _u(0) 2575 #define I2C_IC_FS_SPKLEN_IC_FS_SPKLEN_ACCESS "RW" 2576 // ============================================================================= 2577 // Register : I2C_IC_CLR_RESTART_DET 2578 // Description : Clear RESTART_DET Interrupt Register 2579 #define I2C_IC_CLR_RESTART_DET_OFFSET _u(0x000000a8) 2580 #define I2C_IC_CLR_RESTART_DET_BITS _u(0x00000001) 2581 #define I2C_IC_CLR_RESTART_DET_RESET _u(0x00000000) 2582 // ----------------------------------------------------------------------------- 2583 // Field : I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET 2584 // Description : Read this register to clear the RESTART_DET interrupt (bit 12) 2585 // of IC_RAW_INTR_STAT register. 2586 // 2587 // Reset value: 0x0 2588 #define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_RESET _u(0x0) 2589 #define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_BITS _u(0x00000001) 2590 #define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_MSB _u(0) 2591 #define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_LSB _u(0) 2592 #define I2C_IC_CLR_RESTART_DET_CLR_RESTART_DET_ACCESS "RO" 2593 // ============================================================================= 2594 // Register : I2C_IC_COMP_PARAM_1 2595 // Description : Component Parameter Register 1 2596 // 2597 // Note This register is not implemented and therefore reads as 0. 2598 // If it was implemented it would be a constant read-only register 2599 // that contains encoded information about the component's 2600 // parameter settings. Fields shown below are the settings for 2601 // those parameters 2602 #define I2C_IC_COMP_PARAM_1_OFFSET _u(0x000000f4) 2603 #define I2C_IC_COMP_PARAM_1_BITS _u(0x00ffffff) 2604 #define I2C_IC_COMP_PARAM_1_RESET _u(0x00000000) 2605 // ----------------------------------------------------------------------------- 2606 // Field : I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH 2607 // Description : TX Buffer Depth = 16 2608 #define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_RESET _u(0x00) 2609 #define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_BITS _u(0x00ff0000) 2610 #define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_MSB _u(23) 2611 #define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_LSB _u(16) 2612 #define I2C_IC_COMP_PARAM_1_TX_BUFFER_DEPTH_ACCESS "RO" 2613 // ----------------------------------------------------------------------------- 2614 // Field : I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH 2615 // Description : RX Buffer Depth = 16 2616 #define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_RESET _u(0x00) 2617 #define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_BITS _u(0x0000ff00) 2618 #define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_MSB _u(15) 2619 #define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_LSB _u(8) 2620 #define I2C_IC_COMP_PARAM_1_RX_BUFFER_DEPTH_ACCESS "RO" 2621 // ----------------------------------------------------------------------------- 2622 // Field : I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS 2623 // Description : Encoded parameters not visible 2624 #define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_RESET _u(0x0) 2625 #define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_BITS _u(0x00000080) 2626 #define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_MSB _u(7) 2627 #define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_LSB _u(7) 2628 #define I2C_IC_COMP_PARAM_1_ADD_ENCODED_PARAMS_ACCESS "RO" 2629 // ----------------------------------------------------------------------------- 2630 // Field : I2C_IC_COMP_PARAM_1_HAS_DMA 2631 // Description : DMA handshaking signals are enabled 2632 #define I2C_IC_COMP_PARAM_1_HAS_DMA_RESET _u(0x0) 2633 #define I2C_IC_COMP_PARAM_1_HAS_DMA_BITS _u(0x00000040) 2634 #define I2C_IC_COMP_PARAM_1_HAS_DMA_MSB _u(6) 2635 #define I2C_IC_COMP_PARAM_1_HAS_DMA_LSB _u(6) 2636 #define I2C_IC_COMP_PARAM_1_HAS_DMA_ACCESS "RO" 2637 // ----------------------------------------------------------------------------- 2638 // Field : I2C_IC_COMP_PARAM_1_INTR_IO 2639 // Description : COMBINED Interrupt outputs 2640 #define I2C_IC_COMP_PARAM_1_INTR_IO_RESET _u(0x0) 2641 #define I2C_IC_COMP_PARAM_1_INTR_IO_BITS _u(0x00000020) 2642 #define I2C_IC_COMP_PARAM_1_INTR_IO_MSB _u(5) 2643 #define I2C_IC_COMP_PARAM_1_INTR_IO_LSB _u(5) 2644 #define I2C_IC_COMP_PARAM_1_INTR_IO_ACCESS "RO" 2645 // ----------------------------------------------------------------------------- 2646 // Field : I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES 2647 // Description : Programmable count values for each mode. 2648 #define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_RESET _u(0x0) 2649 #define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_BITS _u(0x00000010) 2650 #define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_MSB _u(4) 2651 #define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_LSB _u(4) 2652 #define I2C_IC_COMP_PARAM_1_HC_COUNT_VALUES_ACCESS "RO" 2653 // ----------------------------------------------------------------------------- 2654 // Field : I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE 2655 // Description : MAX SPEED MODE = FAST MODE 2656 #define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_RESET _u(0x0) 2657 #define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_BITS _u(0x0000000c) 2658 #define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_MSB _u(3) 2659 #define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_LSB _u(2) 2660 #define I2C_IC_COMP_PARAM_1_MAX_SPEED_MODE_ACCESS "RO" 2661 // ----------------------------------------------------------------------------- 2662 // Field : I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH 2663 // Description : APB data bus width is 32 bits 2664 #define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_RESET _u(0x0) 2665 #define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_BITS _u(0x00000003) 2666 #define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_MSB _u(1) 2667 #define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_LSB _u(0) 2668 #define I2C_IC_COMP_PARAM_1_APB_DATA_WIDTH_ACCESS "RO" 2669 // ============================================================================= 2670 // Register : I2C_IC_COMP_VERSION 2671 // Description : I2C Component Version Register 2672 #define I2C_IC_COMP_VERSION_OFFSET _u(0x000000f8) 2673 #define I2C_IC_COMP_VERSION_BITS _u(0xffffffff) 2674 #define I2C_IC_COMP_VERSION_RESET _u(0x3230312a) 2675 // ----------------------------------------------------------------------------- 2676 // Field : I2C_IC_COMP_VERSION_IC_COMP_VERSION 2677 #define I2C_IC_COMP_VERSION_IC_COMP_VERSION_RESET _u(0x3230312a) 2678 #define I2C_IC_COMP_VERSION_IC_COMP_VERSION_BITS _u(0xffffffff) 2679 #define I2C_IC_COMP_VERSION_IC_COMP_VERSION_MSB _u(31) 2680 #define I2C_IC_COMP_VERSION_IC_COMP_VERSION_LSB _u(0) 2681 #define I2C_IC_COMP_VERSION_IC_COMP_VERSION_ACCESS "RO" 2682 // ============================================================================= 2683 // Register : I2C_IC_COMP_TYPE 2684 // Description : I2C Component Type Register 2685 #define I2C_IC_COMP_TYPE_OFFSET _u(0x000000fc) 2686 #define I2C_IC_COMP_TYPE_BITS _u(0xffffffff) 2687 #define I2C_IC_COMP_TYPE_RESET _u(0x44570140) 2688 // ----------------------------------------------------------------------------- 2689 // Field : I2C_IC_COMP_TYPE_IC_COMP_TYPE 2690 // Description : Designware Component Type number = 0x44_57_01_40. This assigned 2691 // unique hex value is constant and is derived from the two ASCII 2692 // letters 'DW' followed by a 16-bit unsigned number. 2693 #define I2C_IC_COMP_TYPE_IC_COMP_TYPE_RESET _u(0x44570140) 2694 #define I2C_IC_COMP_TYPE_IC_COMP_TYPE_BITS _u(0xffffffff) 2695 #define I2C_IC_COMP_TYPE_IC_COMP_TYPE_MSB _u(31) 2696 #define I2C_IC_COMP_TYPE_IC_COMP_TYPE_LSB _u(0) 2697 #define I2C_IC_COMP_TYPE_IC_COMP_TYPE_ACCESS "RO" 2698 // ============================================================================= 2699 #endif // _HARDWARE_REGS_I2C_H 2700 2701