xref: /netbsd-src/sys/arch/hpcarm/dev/wzero3_reg.h (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1 /*	$NetBSD: wzero3_reg.h,v 1.6 2010/05/30 10:00:27 nonaka Exp $	*/
2 
3 /*
4  * Copyright (c) 2008, 2009, 2010 NONAKA Kimihiro <nonaka@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_TOUCH_PANEL	11	/* In */
39 #define	GPIO_WS003SH_SLIDE		12	/* In */
40 #define	GPIO_WS003SH_FULLKEY_LED	17	/* Out: H:ON, L:OFF */
41 #define	GPIO_WS003SH_ANTENNA_LED	37	/* Out: H:ON, L:OFF */
42 #define	GPIO_WS003SH_MAX1233_CS		48	/* Out */
43 #define	GPIO_WS003SH_RESET		89	/* Out */
44 #define	GPIO_WS003SH_POWER_BUTTON	95	/* In */
45 #define	GPIO_WS003SH_VIB		97	/* Out */
46 #define	GPIO_WS003SH_USB_CLIENT_DETECT	103	/* In */
47 #define	GPIO_WS003SH_SD_POWER		107	/* Out: H:ON, L:OFF */
48 #define	GPIO_WS003SH_CHARGE		114	/* Out: H:ON, L:OFF */
49 #define	GPIO_WS003SH_AC_DETECT		115	/* In */
50 
51 /* WS003SH: GPIO OUT pin
52  * CLR: 10,16,18,19,20,21,23,33,40,56,87,90,91,104,119,120
53  * SET: 39,54,57
54  */
55 
56 /*
57  * WS007SH specific parameter
58  */
59 #define	GPIO_WS007SH_RESET_BUTTON	1	/* In: L: press, H: release */
60 #define	GPIO_WS007SH_POWER_BUTTON	9	/* In */
61 #define	GPIO_WS007SH_TOUCH_PANEL	21	/* In */
62 #define	GPIO_WS007SH_ADS7846_CS		33	/* Out */
63 #define	GPIO_WS007SH_USB_CLIENT_DETECT	35	/* In */
64 #define	GPIO_WS007SH_USB_HOST_POWER	37	/* Out */
65 #define	GPIO_WS007SH_USB_HOST_DETECT	41	/* In */
66 #define	GPIO_WS007SH_SD_DETECT		48	/* In */
67 #define	GPIO_WS007SH_HSYNC		75	/* In */
68 #define	GPIO_WS007SH_SLIDE		104	/* In */
69 #define	GPIO_WS007SH_SD_POWER		107	/* Out: H:ON, L:OFF */
70 
71 /*
72  * WS011SH specific parameter
73  */
74 /*
75 port	I/O(Active)	name 	desc
76 1	I(?)		RESET_BTN button detect: reset (on: release, off:press)
77 9	I(?)		PWR_BTN button detect: power-on (on: press, off:release)
78 21	I(?)		TPANEL touch panel (on: release, off: press)
79 37	O		USBH_PWR USB Host power (H: enable, L: disable)
80 41	I(L)		USBH_DET USB Host cable detect (on: remove, off: insert)
81 48	I(L)		SD_DET microSD card detect (on: remove, off: insert)
82 51	I(?)		SLIDE LCD slider (on: open, off: close)
83 52	I(?)		KEYLOCK key lock slider (on: unlock, off:lock)
84 57	I(?)		EXCRWAL_DET
85 81	I(L)		EPDET earphone adapter detect (on: remove, off: insert)
86 91	I(?)		FULLKEYBOARD?
87 96	I(?)		JACKET_DET jacket detect (on: close, off: open)
88 ?105	I(?)		WSIM_DET W-SIM detect (on: insert, off: remove)
89 ?106	I(?)		WSIM? (same as GPIO#105?)
90 107	O(?)		SD_PWR: SD Card power (on: on, off: off)
91 115	I(H)		ACDET AC adapter detect (on: insert, off: remove)
92 116	I(?)		USBC_DET USB Client cable detect (on: insert, off: remove)
93  */
94 #define	GPIO_WS011SH_RESET_BUTTON	1	/* In */
95 #define	GPIO_WS011SH_POWER_BUTTON	9	/* In */
96 #define	GPIO_WS011SH_KEYPAD		14	/* In */
97 #define	GPIO_WS011SH_TOUCH_PANEL	21	/* In */
98 #define	GPIO_WS011SH_AK4184_CS		33	/* Out */
99 #define	GPIO_WS011SH_USB_HOST_POWER	37	/* Out */
100 #define	GPIO_WS011SH_USB_HOST_DETECT	41	/* In */
101 #define	GPIO_WS011SH_SD_DETECT		48	/* In */
102 #define	GPIO_WS011SH_SLIDE		51	/* In */
103 #define	GPIO_WS011SH_KEY_LOCK		52	/* In */
104 #define	GPIO_WS011SH_HSYNC		75	/* In */
105 #define	GPIO_WS011SH_SD_POWER		107	/* Out */
106 #define	GPIO_WS011SH_USB_CLIENT_DETECT	116	/* In */
107 
108 /*
109  * WS020SH specific parameter
110  */
111 #define	GPIO_WS020SH_RESET_BUTTON	1	/* In */
112 #define	GPIO_WS020SH_TOUCH_PANEL	21	/* In */
113 #define	GPIO_WS020SH_USB_HOST_DETECT	41	/* In */
114 #define	GPIO_WS020SH_SD_DETECT		48	/* In */
115 #define	GPIO_WS020SH_SLIDE		51	/* In */
116 #define	GPIO_WS020SH_KEY_LOCK		52	/* In */
117 #define	GPIO_WS020SH_POWER_BUTTON	55	/* In */
118 #define	GPIO_WS020SH_SD_POWER		107	/* Out */
119 #define	GPIO_WS020SH_USB_CLIENT_DETECT	116	/* In */
120 
121 #endif	/* _HPCARM_DEV_WZERO3_REG_H_ */
122