[BACK]Return to wbsioreg.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / isa

Annotation of src/sys/dev/isa/wbsioreg.h, Revision 1.8

1.8     ! msaitoh     1: /* $NetBSD: wbsioreg.h,v 1.7 2017/12/13 00:27:53 knakahara Exp $ */
1.4       msaitoh     2:
1.1       msaitoh     3: /* $OpenBSD: wbsioreg.h,v 1.4 2015/01/02 23:02:54 chris Exp $ */
                      4: /*
                      5:  * Copyright (c) 2008 Mark Kettenis <kettenis@openbsd.org>
                      6:  *
                      7:  * Permission to use, copy, modify, and distribute this software for any
                      8:  * purpose with or without fee is hereby granted, provided that the above
                      9:  * copyright notice and this permission notice appear in all copies.
                     10:  *
                     11:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
                     12:  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
                     13:  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
                     14:  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
                     15:  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
                     16:  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
                     17:  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
                     18:  */
                     19:
                     20: /*
                     21:  * Winbond LPC Super I/O driver registers
                     22:  */
                     23:
                     24: /* ISA bus registers */
                     25: #define WBSIO_INDEX            0x00    /* Configuration Index Register */
                     26: #define WBSIO_DATA             0x01    /* Configuration Data Register */
                     27:
                     28: #define WBSIO_IOSIZE           0x02    /* ISA I/O space size */
                     29:
                     30: #define WBSIO_CONF_EN_MAGIC    0x87    /* enable configuration mode */
                     31: #define WBSIO_CONF_DS_MAGIC    0xaa    /* disable configuration mode */
                     32:
                     33: /* Configuration Space Registers */
                     34: #define WBSIO_LDN              0x07    /* Logical Device Number */
1.6       knakahar   35: #define WBSIO_MFS0             0x1A    /* Multi Function Selection 0 */
                     36: #define WBSIO_MFS1             0x1B    /* Multi Function Selection 1 */
                     37: #define WBSIO_MFS2             0x1C    /* Multi Function Selection 2 */
                     38: #define WBSIO_MFS3             0x1D    /* Multi Function Selection 3 */
1.1       msaitoh    39: #define WBSIO_ID               0x20    /* Device ID */
                     40: #define WBSIO_REV              0x21    /* Device Revision */
1.6       knakahar   41: #define WBSIO_GOPT0            0x24    /* Global Option 0 */
                     42: #define WBSIO_GOPT1            0x26    /* Global Option 1 */
                     43: #define WBSIO_GOPT2            0x27    /* Global Option 2 */
                     44: #define WBSIO_GOPT3            0x28    /* Global Option 3 */
                     45: #define WBSIO_MFS4             0x2A    /* Multi Function Selection 4 */
                     46: #define WBSIO_MFS5             0x2B    /* Multi Function Selection 5 */
                     47: #define WBSIO_MFS6             0x2C    /* Multi Function Selection 6 */
                     48: #define WBSIO_SFR              0x2F    /* Strapping Function Result */
                     49:
1.1       msaitoh    50:
                     51: #define WBSIO_ID_W83627HF      0x52
                     52: #define WBSIO_ID_W83697HF      0x60
                     53: #define WBSIO_ID_W83637HF      0x70
                     54: #define WBSIO_ID_W83627THF     0x82
                     55: #define WBSIO_ID_W83687THF     0x85
1.3       msaitoh    56: #define WBSIO_ID_W83627SF      0x595
                     57: #define WBSIO_ID_W83697UG      0x681
                     58: #define WBSIO_ID_W83627EHF_A   0x885
                     59: #define WBSIO_ID_W83627EHF     0x886
                     60: #define WBSIO_ID_W83627DHG     0xa02
                     61: #define WBSIO_ID_W83627UHG     0xa23
                     62: #define WBSIO_ID_W83667HG      0xa51
                     63: #define WBSIO_ID_W83627DHGP    0xb07
                     64: #define WBSIO_ID_W83667HGB     0xb35
                     65: #define WBSIO_ID_NCT6775F      0xb47
                     66: #define WBSIO_ID_NCT6776F      0xc33
                     67: #define WBSIO_ID_NCT5104D      0xc45   /* 610[246]D */
                     68: #define WBSIO_ID_NCT6779D      0xc56
                     69: #define WBSIO_ID_NCT6791D      0xc80
                     70: #define WBSIO_ID_NCT6792D      0xc91
                     71: #define WBSIO_ID_NCT6793D      0xd12
                     72: #define WBSIO_ID_NCT6795D      0xd35
1.8     ! msaitoh    73: #define WBSIO_ID_NCT6796D      0xd42
1.1       msaitoh    74:
1.6       knakahar   75: /* Strapping Function Result */
                     76: #define WBSIO_SFR_24M48M       0x01
                     77: #define WBSIO_SFR_LPT          0x02
                     78: #define WBSIO_SFR_TEST         0x04
                     79: #define WBSIO_SFR_DSW          0x08
                     80: #define WBSIO_SFR_AMDPWR       0x20
                     81: #define WBSIO_SFR_UARTP80      0x40
                     82:
1.1       msaitoh    83: /* Logical Device Number (LDN) Assignments */
                     84: #define WBSIO_LDN_HM           0x0b
1.6       knakahar   85: #define WBSIO_LDN_GPIO0                0x08    /* WDT, GPIO 0 */
                     86: #define WBSIO_LDN_GPIO1                0x09    /* GPIO 1 to GPIO 8 */
1.1       msaitoh    87:
                     88: /* Hardware Monitor Control Registers (LDN B) */
                     89: #define WBSIO_HM_ADDR_MSB      0x60    /* Address [15:8] */
                     90: #define WBSIO_HM_ADDR_LSB      0x61    /* Address [7:0] */
1.6       knakahar   91: #define WBSIO_HM_CONF          0xE4    /* Configuration Register */
                     92: #define WBSIO_HM_CONF_RSTOUT4  0x02    /* RSTOUT4# bit */
                     93: #define WBSIO_HM_CONF_RSTOUT3  0x04    /* RSTOUT3# bit */
                     94: #define WBSIO_HM_CONF_PWROK    0x08    /* Power OK Bit */
                     95:
                     96: /* GPIO Registers */
                     97: #define WBSIO_GPIO_ADDR_MSB    0x60    /* Address [15:8] */
                     98: #define WBSIO_GPIO_ADDR_LSB    0x61    /* Address [7:0] */
                     99: #define WBSIO_GPIO_CONF                0x30    /* GPIO0, WDT1 config */
1.7       knakahar  100: #define WBSIO_WDT_MODE         0xF5    /* WDT1 Control Mode */
                    101: #define WBSIO_WDT_CNTR         0xF6    /* WDT1 Counter */
                    102: #define WBSIO_WDT_STAT         0xF7    /* WDT1 Control & Status */
                    103: #define WBSIO_GPIO4_MFS                0xEE    /* GPIO4 Multi-Function Select */
1.6       knakahar  104:
1.7       knakahar  105: #define WBSIO_GPIO0_WDT1       __BIT(0)
1.6       knakahar  106: #define WBSIO_GPIO0_ENABLE     __BIT(1)
1.7       knakahar  107:
                    108:                                                /* Reserved */
1.6       knakahar  109: #define WBSIO_GPIO_BASEADDR    __BIT(3)        /* Base address mode */
                    110: #define WBSIO_GPIO1_ENABLE     __BIT(1)
                    111: #define WBSIO_GPIO2_ENABLE     __BIT(2)
                    112: #define WBSIO_GPIO3_ENABLE     __BIT(3)
                    113: #define WBSIO_GPIO4_ENABLE     __BIT(4)
                    114: #define WBSIO_GPIO5_ENABLE     __BIT(5)
                    115: #define WBSIO_GPIO6_ENABLE     __BIT(6)
                    116: #define WBSIO_GPIO7_ENABLE     __BIT(7)
                    117: #define WBSIO_GPIO8_ENABLE     __BIT(0)
                    118:
                    119: #define WBSIO_GPIO_NPINS       64
                    120: #define WBSIO_GPIO_IOSIZE      0x06    /* GPIO register table size */
                    121:
                    122: #define WBSIO_GPIO_GSR         0x00    /* GPIO Select Register */
                    123: #define WBSIO_GPIO_IOR         0x01    /* I/O direction */
                    124: #define WBSIO_GPIO_DAT         0x02    /* Data */
                    125: #define WBSIO_GPIO_INV         0x03    /* Inversion */
                    126: #define WBSIO_GPIO_DST         0x04    /* Event Status */
1.7       knakahar  127:                                        /* WDT1 Control Mode */
                    128:                                        /* WDT1 control */
                    129: #define WBSIO_WDT_MODE_LEVEL   __BIT(0)
                    130:                                        /* enable/disable KBRST */
                    131: #define WBSIO_WDT_MODE_KBCRST  __BIT(2)
                    132: #define WBSIO_WDT_MODE_MINUTES __BIT(3)
                    133: #define WBSIO_WDT_MODE_FASTER  __BIT(4)
                    134:
                    135: #define WBSIO_WDT_CNTR_STOP    0
                    136: #define WBSIO_WDT_CNTR_MAX     255
                    137:
                    138: #define WBSIO_WDT_STAT_TIMEOUT __BIT(4)
                    139: #define WBSIO_WDT_STAT_EVENT   __BIT(5)
                    140:
1.6       knakahar  141:
                    142: /* NCT6779D */
                    143: #define WBSIO_NCT6779D_MFS2_GP00       __BIT(0)
                    144: #define WBSIO_NCT6779D_MFS2_GP01       __BIT(1)
                    145: #define WBSIO_NCT6779D_MFS2_GP02       __BIT(2)
                    146: #define WBSIO_NCT6779D_MFS2_GP03_MASK  (__BIT(3)|__BIT(4))
                    147: #define WBSIO_NCT6779D_MFS2_GP04       __BIT(5)
                    148: #define WBSIO_NCT6779D_MFS2_GP05       __BIT(6)
                    149: #define WBSIO_NCT6779D_MFS2_GP06       __BIT(7)
                    150: #define WBSIO_NCT6779D_MFS3_GP07_MASK  __BIT(0)
                    151: #define WBSIO_NCT6779D_MFS4_GP10_GP17  __BIT(6)
                    152: #define WBSIO_NCT6779D_MFS4_GP20_GP21  __BIT(0)
                    153: #define WBSIO_NCT6779D_MFS4_GP22_GP23  __BIT(1)
                    154: #define WBSIO_NCT6779D_MFS1_GP24_MASK  __BIT(4)
                    155: #define WBSIO_NCT6779D_GOPT2_GP24_MASK __BIT(3)
                    156: #define WBSIO_NCT6779D_MFS4_GP25_MASK  __BIT(3)
                    157: #define WBSIO_NCT6779D_GOPT2_GP25_MASK __BIT(3)
                    158: #define WBSIO_NCT6779D_MFS6_GP26       __BIT(0)
                    159: #define WBSIO_NCT6779D_MFS6_GP27_MASK  (__BIT(3)|__BIT(4))
                    160: #define WBSIO_NCT6779D_MFS0_GP30       __BIT(6)
                    161: #define WBSIO_NCT6779D_MFS0_GP30_MASK  __BIT(7)
                    162: #define WBSIO_NCT6779D_MFS0_GP31       __BIT(5)
                    163: #define WBSIO_NCT6779D_MFS1_GP31_MASK  __BIT(0)
                    164: #define WBSIO_NCT6779D_MFS0_GP32       __BIT(4)
                    165: #define WBSIO_NCT6779D_MFS1_GP32_MASK  __BIT(0)
                    166: #define WBSIO_NCT6779D_MFS6_GP33       __BIT(7)
                    167: #define WBSIO_NCT6779D_MFS6_GP33_MASK  __BIT(6)
                    168: #define WBSIO_NCT6779D_MFS1_GP40       __BIT(3)
                    169: #define WBSIO_NCT6779D_MFS0_GP41       __BIT(3)
                    170: #define WBSIO_NCT6779D_MFS0_GP41_MASK  __BIT(2)
                    171: #define WBSIO_NCT6779D_MFS1_GP42       (__BIT(1)|__BIT(2))
                    172: #define WBSIO_NCT6779D_GOPT2_GP43      __BIT(4)
                    173: #define WBSIO_NCT6779D_MFS1_GP44_GP45_MASK     __BIT(6)
                    174: #define WBSIO_NCT6779D_GOPT2_GP46_MASK __BIT(5)
                    175: #define WBSIO_NCT6779D_MFS1_GP47       __BIT(7)
                    176: #define WBSIO_NCT6779D_HM_GP50_MASK    __BIT(2)
                    177: #define WBSIO_NCT6779D_HM_GP52_MASK    __BIT(1)
                    178: #define WBSIO_NCT6779D_HM_GP55_MASK    __BIT(3)
                    179: #define WBSIO_NCT6779D_MFS5_GP74       __BIT(5)
                    180: #define WBSIO_NCT6779D_MFS5_GP75       __BIT(6)
                    181: #define WBSIO_NCT6779D_MFS5_GP76       __BIT(7)
1.7       knakahar  182: #define WBSIO_NCT6779D_GPIO4_WDTO      __BIT(4)

CVSweb <webmaster@jp.NetBSD.org>