1*8426404fSX512 /* 2*8426404fSX512 * Copyright 2020, Jérôme Duval, jerome.duval@gmail.com. 3*8426404fSX512 * 4*8426404fSX512 * Distributed under the terms of the MIT License. 5*8426404fSX512 */ 6*8426404fSX512 #ifndef _PCH_I2C_HARDWARE_H 7*8426404fSX512 #define _PCH_I2C_HARDWARE_H 8*8426404fSX512 9*8426404fSX512 10*8426404fSX512 #define PCH_IC_CON 0x00 11*8426404fSX512 #define PCH_IC_CON_MASTER 0x1 12*8426404fSX512 #define PCH_IC_CON_SPEED_STD 0x2 13*8426404fSX512 #define PCH_IC_CON_SPEED_FAST 0x4 14*8426404fSX512 #define PCH_IC_CON_SPEED_HIGH 0x6 15*8426404fSX512 #define PCH_IC_CON_10BIT_ADDR_MASTER 0x10 16*8426404fSX512 #define PCH_IC_CON_RESTART_EN 0x20 17*8426404fSX512 #define PCH_IC_CON_SLAVE_DISABLE 0x40 18*8426404fSX512 #define PCH_IC_CON_TX_EMPTY_CTRL 0x100 19*8426404fSX512 #define PCH_IC_TAR 0x04 20*8426404fSX512 #define PCH_IC_HS_MADDR 0x08 21*8426404fSX512 #define PCH_IC_DATA_CMD 0x10 22*8426404fSX512 #define PCH_IC_DATA_CMD_READ (1 << 8) 23*8426404fSX512 #define PCH_IC_DATA_CMD_STOP (1 << 9) 24*8426404fSX512 #define PCH_IC_DATA_CMD_RESTART (1 << 10) 25*8426404fSX512 #define PCH_IC_SS_SCL_HCNT 0x14 26*8426404fSX512 #define PCH_IC_SS_SCL_LCNT 0x18 27*8426404fSX512 #define PCH_IC_FS_SCL_HCNT 0x1c 28*8426404fSX512 #define PCH_IC_FS_SCL_LCNT 0x20 29*8426404fSX512 #define PCH_IC_HS_SCL_HCNT 0x24 30*8426404fSX512 #define PCH_IC_HS_SCL_LCNT 0x28 31*8426404fSX512 #define PCH_IC_INTR_STAT 0x2c 32*8426404fSX512 #define PCH_IC_INTR_STAT_RX_UNDER (1 << 0) 33*8426404fSX512 #define PCH_IC_INTR_STAT_RX_OVER (1 << 1) 34*8426404fSX512 #define PCH_IC_INTR_STAT_RX_FULL (1 << 2) 35*8426404fSX512 #define PCH_IC_INTR_STAT_TX_OVER (1 << 3) 36*8426404fSX512 #define PCH_IC_INTR_STAT_TX_EMPTY (1 << 4) 37*8426404fSX512 #define PCH_IC_INTR_STAT_RD_REQ (1 << 5) 38*8426404fSX512 #define PCH_IC_INTR_STAT_TX_ABRT (1 << 6) 39*8426404fSX512 #define PCH_IC_INTR_STAT_RX_DONE (1 << 7) 40*8426404fSX512 #define PCH_IC_INTR_STAT_ACTIVITY (1 << 8) 41*8426404fSX512 #define PCH_IC_INTR_STAT_STOP_DET (1 << 9) 42*8426404fSX512 #define PCH_IC_INTR_STAT_START_DET (1 << 10) 43*8426404fSX512 #define PCH_IC_INTR_STAT_GEN_CALL (1 << 11) 44*8426404fSX512 #define PCH_IC_INTR_STAT_MST_ON_HOLD (1 << 13) 45*8426404fSX512 46*8426404fSX512 #define PCH_IC_INTR_MASK 0x30 47*8426404fSX512 #define PCH_IC_RAW_INTR_STAT 0x34 48*8426404fSX512 #define PCH_IC_RX_TL 0x38 49*8426404fSX512 #define PCH_IC_TX_TL 0x3c 50*8426404fSX512 #define PCH_IC_CLR_INTR 0x40 51*8426404fSX512 #define PCH_IC_CLR_RX_UNDER 0x44 52*8426404fSX512 #define PCH_IC_CLR_RX_OVER 0x48 53*8426404fSX512 #define PCH_IC_CLR_TX_OVER 0x4c 54*8426404fSX512 #define PCH_IC_CLR_RD_REQ 0x50 55*8426404fSX512 #define PCH_IC_CLR_TX_ABRT 0x54 56*8426404fSX512 #define PCH_IC_CLR_RX_DONE 0x58 57*8426404fSX512 #define PCH_IC_CLR_ACTIVITY 0x5c 58*8426404fSX512 #define PCH_IC_CLR_STOP_DET 0x60 59*8426404fSX512 #define PCH_IC_CLR_START_DET 0x64 60*8426404fSX512 #define PCH_IC_CLR_GEN_CALL 0x68 61*8426404fSX512 #define PCH_IC_ENABLE 0x6c 62*8426404fSX512 #define PCH_IC_STATUS 0x70 63*8426404fSX512 #define PCH_IC_STATUS_ACTIVITY 0x1 64*8426404fSX512 #define PCH_IC_TXFLR 0x74 65*8426404fSX512 #define PCH_IC_RXFLR 0x78 66*8426404fSX512 #define PCH_IC_SDA_HOLD 0x7c 67*8426404fSX512 #define PCH_IC_TX_ABRT_SOURCE 0x80 68*8426404fSX512 #define PCH_IC_DMA_CR 0x88 69*8426404fSX512 #define PCH_IC_DMA_TDLR 0x8c 70*8426404fSX512 #define PCH_IC_DMA_RDLR 0x90 71*8426404fSX512 #define PCH_IC_ACK_GENERAL_CALL 0x98 72*8426404fSX512 #define PCH_IC_ENABLE_STATUS 0x9c 73*8426404fSX512 #define PCH_IC_FS_SPKLEN 0xa0 74*8426404fSX512 #define PCH_IC_CLR_RESTRART_DET 0xa8 75*8426404fSX512 #define PCH_IC_COMP_PARAM1 0xf4 76*8426404fSX512 #define PCH_IC_COMP_PARAM1_RX(x) (1 + (((x) >> 8) & 0xff)) 77*8426404fSX512 #define PCH_IC_COMP_PARAM1_TX(x) (1 + (((x) >> 16) & 0xff)) 78*8426404fSX512 #define PCH_IC_COMP_VERSION 0xf8 79*8426404fSX512 #define PCH_IC_COMP_VERSION_MIN 0x3131312a 80*8426404fSX512 81*8426404fSX512 #define PCH_SUP_RESETS 0x204 82*8426404fSX512 #define PCH_SUP_RESETS_FUNC 0x3 83*8426404fSX512 #define PCH_SUP_RESETS_IDMA 0x4 84*8426404fSX512 #define PCH_SUP_ACTIVELTR_VALUE 0x210 85*8426404fSX512 #define PCH_SUP_IDLELTR_VALUE 0x214 86*8426404fSX512 #define PCH_SUP_TX_ACK_COUNT 0x218 87*8426404fSX512 #define PCH_SUP_RX_BYTE_COUNT 0x21c 88*8426404fSX512 #define PCH_SUP_TX_COMPLETE_INTR_STAT 0x220 89*8426404fSX512 #define PCH_SUP_TX_COMPLETE_INTR_CLR 0x224 90*8426404fSX512 #define PCH_SUP_SW_SCRATCH_0 0x228 91*8426404fSX512 #define PCH_SUP_SW_SCRATCH_1 0x22c 92*8426404fSX512 #define PCH_SUP_SW_SCRATCH_2 0x230 93*8426404fSX512 #define PCH_SUP_SW_SCRATCH_3 0x234 94*8426404fSX512 #define PCH_SUP_CLOCK_GATE 0x238 95*8426404fSX512 #define PCH_SUP_REMAP_ADDR_LO 0x240 96*8426404fSX512 #define PCH_SUP_REMAP_ADDR_HI 0x244 97*8426404fSX512 #define PCH_SUP_DEVIDLE_CONTROL 0x24c 98*8426404fSX512 #define PCH_SUP_CAPABLITIES 0x2fc 99*8426404fSX512 #define PCH_SUP_CAPABLITIES_TYPE_MASK 0xf 100*8426404fSX512 #define PCH_SUP_CAPABLITIES_TYPE_SHIFT 4 101*8426404fSX512 102*8426404fSX512 103*8426404fSX512 #endif // _PCH_I2C_HARDWARE_H 104