Home | History | Annotate | Line # | Download | only in dev
      1  1.8  andvar /*	$NetBSD: ipaq_gpioreg.h,v 1.8 2025/09/07 21:31:20 andvar Exp $	*/
      2  1.1  ichiro 
      3  1.1  ichiro /*-
      4  1.1  ichiro  * Copyright (c) 2001 The NetBSD Foundation, Inc.  All rights reserved.
      5  1.1  ichiro  *
      6  1.1  ichiro  * This code is derived from software contributed to The NetBSD Foundation
      7  1.1  ichiro  * by Ichiro FUKUHARA (ichiro (at) ichiro.org).
      8  1.1  ichiro  *
      9  1.1  ichiro  * Redistribution and use in source and binary forms, with or without
     10  1.1  ichiro  * modification, are permitted provided that the following conditions
     11  1.1  ichiro  * are met:
     12  1.1  ichiro  * 1. Redistributions of source code must retain the above copyright
     13  1.1  ichiro  *    notice, this list of conditions and the following disclaimer.
     14  1.1  ichiro  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.1  ichiro  *    notice, this list of conditions and the following disclaimer in the
     16  1.1  ichiro  *    documentation and/or other materials provided with the distribution.
     17  1.1  ichiro  *
     18  1.1  ichiro  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     19  1.1  ichiro  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     20  1.1  ichiro  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     21  1.1  ichiro  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     22  1.1  ichiro  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23  1.1  ichiro  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24  1.1  ichiro  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25  1.1  ichiro  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26  1.1  ichiro  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27  1.1  ichiro  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28  1.1  ichiro  * POSSIBILITY OF SUCH DAMAGE.
     29  1.1  ichiro  */
     30  1.1  ichiro 
     31  1.1  ichiro /*
     32  1.1  ichiro  * iPAQ H3600 specific parameter
     33  1.1  ichiro  */
     34  1.1  ichiro /*
     35  1.1  ichiro port	I/O(Active)	name 	desc
     36  1.1  ichiro 0	I(L)	PWR_ON#		button detect: power-on
     37  1.1  ichiro 1	I(L)	IP_IRQ#		cpu-interrupt
     38  1.1  ichiro 2...9	O	LDD{8..15}	LCD DATA(8-15)
     39  1.1  ichiro 10	I(L)	CARD_IND1#	PCMCIA Socket1 inserted detection
     40  1.1  ichiro 11	I(L)	CARD_IRQ1#	PCMCIA slot1 IRQ
     41  1.1  ichiro 12	O	CLK_SET0	clock select 0 for audio codec
     42  1.1  ichiro 13	O	CLK_SET1	clock select 1 for audio codec
     43  1.1  ichiro 14	I/O	L3_SDA		UDA1341 L3DATA
     44  1.1  ichiro 15	O	L3_MODE		UDA1341 L3MODE
     45  1.1  ichiro 16	O	L3_SCLK		UDA1341 L3SCLK
     46  1.1  ichiro 17	I(L)	CARD_IND0#	PCMCIA Socket0 inserted detection
     47  1.1  ichiro 18	I(L)	KEY_ACT#	button detect: center button
     48  1.1  ichiro 19	I	SYS_CLK		Stereo audio codev external clock
     49  1.1  ichiro 20	I(H)	BAT_FAULT	Battery fault
     50  1.1  ichiro 21	I(L)	CARD_IRQ0#	PCMCIA slot0 IRQ
     51  1.1  ichiro 22	I(L)	LOCK#		expansion pack lock/unlock signal
     52  1.1  ichiro 23	I(H)	COM_DCD		RS-232 DCD
     53  1.8  andvar 24	I(H)	OPT_IRQ		expansion pack shared IRQ
     54  1.1  ichiro 25	I(H)	COM_CTS		RS-232 CTS
     55  1.1  ichiro 26	O(H)	COM_RTS		RS-232 RTS
     56  1.1  ichiro 27	O(L)	OPT_DETECT#	Indicates presence of expansion pack inserted
     57  1.1  ichiro 
     58  1.1  ichiro Extended GPIO
     59  1.1  ichiro 0	O(H)	VPEN		Enables programming and erasing of Flash
     60  1.1  ichiro 1	O(H)	CARD_RESET	CF/PCMCIA card reset signal
     61  1.1  ichiro 2	O(H)	OPT_RESET	Expansion pack reset signal
     62  1.1  ichiro 3	O(L)	CODEC_RESET#	onboard codec reset signal
     63  1.1  ichiro 4	O(H)	OPT_NVRAM_ON	Enables power supply to the NVRAM of the
     64  1.1  ichiro 				Expansion pack.(=OPT_ON)
     65  1.1  ichiro 5	O(H)	OPT_ON		Enables full power supply to the Expansion pack.
     66  1.1  ichiro 6	O(H)	LCD_ON		Enables LCD 3.3V power supply
     67  1.1  ichiro 7	O(H)	RS232_ON	Enables RS232
     68  1.1  ichiro 8	O(H)	LCD_PCI		Enables power to LCD control IC
     69  1.1  ichiro 9	O(H)	IR_ON		Enables power to IR module
     70  1.1  ichiro 10	O(H)	AUD_ON		Enables power to audio output amp.
     71  1.1  ichiro 11	O(H)	AUD_PWR_ON	Enables power to all audio modules.
     72  1.7  andvar 12	O(H)	QMUTE		Mutes the onboard audio codec
     73  1.1  ichiro 13	O	IR_FSEL		FIR mode selection:H=FIR,L=SIR
     74  1.1  ichiro 14	O(H)	LCD_5V_ON	Enables 5V to the LCD module
     75  1.1  ichiro 15	O(H)	LVDD_ON		Enables 9V and -6.5V to the LCD module
     76  1.1  ichiro  */
     77  1.1  ichiro 
     78  1.1  ichiro #define GPIO_H3600_POWER_BUTTON	GPIO (0)
     79  1.5  ichiro #define GPIO_H3600_CLK_SET0	GPIO (12)
     80  1.5  ichiro #define GPIO_H3600_CLK_SET1	GPIO (13)
     81  1.1  ichiro #define GPIO_H3600_PCMCIA_CD0	GPIO (17)
     82  1.1  ichiro #define GPIO_H3600_PCMCIA_CD1	GPIO (10)
     83  1.1  ichiro #define GPIO_H3600_PCMCIA_IRQ0	GPIO (21)
     84  1.1  ichiro #define GPIO_H3600_PCMCIA_IRQ1	GPIO (11)
     85  1.4  ichiro #define GPIO_H3600_L3_DATA	GPIO (14)
     86  1.4  ichiro #define GPIO_H3600_L3_MODE	GPIO (15)
     87  1.4  ichiro #define GPIO_H3600_L3_CLK	GPIO (16)
     88  1.1  ichiro #define GPIO_H3600_OPT_LOCK	GPIO (22)
     89  1.1  ichiro #define GPIO_H3600_OPT_IRQ	GPIO (24)
     90  1.1  ichiro #define GPIO_H3600_OPT_DETECT	GPIO (27)
     91  1.1  ichiro 
     92  1.1  ichiro #define EGPIO_H3600_VPEN		GPIO (0)
     93  1.1  ichiro #define EGPIO_H3600_CARD_RESET		GPIO (1)
     94  1.1  ichiro #define EGPIO_H3600_OPT_RESET		GPIO (2)
     95  1.1  ichiro #define EGPIO_H3600_CODEC_RESET		GPIO (3)
     96  1.1  ichiro #define EGPIO_H3600_OPT_NVRAM_ON	GPIO (4)
     97  1.1  ichiro #define EGPIO_H3600_OPT_ON		GPIO (5)
     98  1.1  ichiro #define EGPIO_H3600_LCD33_ON		GPIO (6)
     99  1.1  ichiro #define EGPIO_H3600_RS232_ON		GPIO (7)
    100  1.1  ichiro #define EGPIO_H3600_LCD_PCI		GPIO (8)
    101  1.1  ichiro #define EGPIO_H3600_IR_ON		GPIO (9)
    102  1.1  ichiro #define EGPIO_H3600_AUD_ON		GPIO (10)
    103  1.1  ichiro #define EGPIO_H3600_AUD_PWRON		GPIO (11)
    104  1.1  ichiro #define EGPIO_H3600_QMUTE		GPIO (12)
    105  1.1  ichiro #define EGPIO_H3600_IR_FSEL		GPIO (13)
    106  1.1  ichiro #define EGPIO_H3600_LCD5_ON		GPIO (14)
    107  1.1  ichiro #define EGPIO_H3600_LVDD_ON		GPIO (15)
    108  1.1  ichiro 
    109  1.3  ichiro #define EGPIO_INIT	EGPIO_H3600_RS232_ON| \
    110  1.3  ichiro 			EGPIO_H3600_AUD_PWRON| \
    111  1.3  ichiro 			EGPIO_H3600_QMUTE| \
    112  1.3  ichiro 			EGPIO_H3600_AUD_ON
    113  1.1  ichiro 
    114  1.1  ichiro #define EGPIO_LCD_INIT	EGPIO_H3600_LCD33_ON| \
    115  1.1  ichiro 			EGPIO_H3600_LCD_PCI| \
    116  1.1  ichiro 			EGPIO_H3600_LCD5_ON| \
    117  1.1  ichiro 			EGPIO_H3600_LVDD_ON
    118