Home | History | Annotate | Line # | Download | only in dev
wzero3_reg.h revision 1.1.2.2
      1 /*	$NetBSD: wzero3_reg.h,v 1.1.2.2 2010/04/30 14:39:25 uebayasi Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 2008, 2009 NONAKA Kimihiro <nonaka (at) netbsd.org>
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  *
     16  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  * SUCH DAMAGE.
     27  */
     28 
     29 #ifndef	_HPCARM_DEV_WZERO3_REG_H_
     30 #define	_HPCARM_DEV_WZERO3_REG_H_
     31 
     32 /* GPIO --------------------------------------------------------------------- */
     33 
     34 /*
     35  * WS003SH/WS004SH specific parameter
     36  */
     37 #define	GPIO_WS003SH_SD_DETECT		9	/* In */
     38 #define	GPIO_WS003SH_SLIDE		12	/* In */
     39 #define	GPIO_WS003SH_FULLKEY_LED	17	/* Out: H:ON, L:OFF */
     40 #define	GPIO_WS003SH_ANTENNA_LED	37	/* Out: H:ON, L:OFF */
     41 //	DONT_TOUCH(RESET?)		89	/* Out */
     42 #define	GPIO_WS003SH_POWER_BUTTON	95	/* In */
     43 #define	GPIO_WS003SH_VIB		97	/* Out */
     44 #define	GPIO_WS003SH_USB_CLIENT_DETECT	103	/* In */
     45 #define	GPIO_WS003SH_SD_POWER		107	/* Out: H:ON, L:OFF */
     46 #define	GPIO_WS003SH_LCD_POWER		114	/* Out: H:ON, L:OFF XXX */
     47 #define	GPIO_WS003SH_AC_DETECT		115	/* In */
     48 
     49 /*
     50  * WS007SH specific parameter
     51  */
     52 #define	GPIO_WS007SH_RESET_BUTTON	1	/* In: L: press, H: release */
     53 #define	GPIO_WS007SH_POWER_BUTTON	9	/* In */
     54 #define	GPIO_WS007SH_TOUCH_PANEL	21	/* In */
     55 #define	GPIO_WS007SH_USB_CLIENT_DETECT	35	/* In */
     56 #define	GPIO_WS007SH_USB_HOST_POWER	37	/* Out */
     57 #define	GPIO_WS007SH_USB_HOST_DETECT	41	/* In */
     58 #define	GPIO_WS007SH_SD_DETECT		48	/* In */
     59 #define	GPIO_WS007SH_SLIDE		104	/* In */
     60 #define	GPIO_WS007SH_SD_POWER		107	/* Out: H:ON, L:OFF */
     61 
     62 /*
     63  * WS011SH specific parameter
     64  */
     65 /*
     66 port	I/O(Active)	name 	desc
     67 1	I(?)		RESET_BTN button detect: reset (on: release, off:press)
     68 9	I(?)		PWR_BTN button detect: power-on (on: press, off:release)
     69 21	I(?)		TPANEL touch panel (on: release, off: press)
     70 37	O		USBH_PWR USB Host power (H: enable, L: disable)
     71 41	I(L)		USBH_DET USB Host cable detect (on: remove, off: insert)
     72 48	I(L)		SD_DET microSD card detect (on: remove, off: insert)
     73 51	I(?)		SLIDE LCD slider (on: open, off: close)
     74 52	I(?)		KEYLOCK key lock slider (on: unlock, off:lock)
     75 57	I(?)		EXCRWAL_DET
     76 81	I(L)		EPDET earphone adapter detect (on: remove, off: insert)
     77 91	I(?)		FULLKEYBOARD?
     78 96	I(?)		JACKET_DET jacket detect (on: close, off: open)
     79 ?105	I(?)		WSIM_DET W-SIM detect (on: insert, off: remove)
     80 ?106	I(?)		WSIM? (same as GPIO#105?)
     81 107	O(?)		SD_PWR: SD Card power (on: on, off: off)
     82 115	I(H)		ACDET AC adapter detect (on: insert, off: remove)
     83 116	I(?)		USBC_DET USB Client cable detect (on: insert, off: remove)
     84  */
     85 #define	GPIO_WS011SH_RESET_BUTTON	1	/* In */
     86 #define	GPIO_WS011SH_POWER_BUTTON	9	/* In */
     87 #define	GPIO_WS011SH_TOUCH_PANEL	21	/* In */
     88 #define	GPIO_WS011SH_USB_HOST_POWER	37	/* Out */
     89 #define	GPIO_WS011SH_USB_HOST_DETECT	41	/* In */
     90 #define	GPIO_WS011SH_SD_DETECT		48	/* In */
     91 #define	GPIO_WS011SH_SLIDE		51	/* In */
     92 #define	GPIO_WS011SH_KEY_LOCK		52	/* In */
     93 #define	GPIO_WS011SH_SD_POWER		107	/* Out */
     94 #define	GPIO_WS011SH_USB_CLIENT_DETECT	116	/* In */
     95 
     96 #endif	/* _HPCARM_DEV_WZERO3_REG_H_ */
     97