Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * GPIO and IRQ definitions for HP iPAQ hx4700
0004  *
0005  * Copyright (c) 2008 Philipp Zabel
0006  */
0007 
0008 #ifndef _HX4700_H_
0009 #define _HX4700_H_
0010 
0011 #include <linux/gpio.h>
0012 #include <linux/mfd/asic3.h>
0013 #include "irqs.h" /* PXA_NR_BUILTIN_GPIO */
0014 
0015 #define HX4700_ASIC3_GPIO_BASE  PXA_NR_BUILTIN_GPIO
0016 #define HX4700_EGPIO_BASE   (HX4700_ASIC3_GPIO_BASE + ASIC3_NUM_GPIOS)
0017 #define HX4700_NR_IRQS      (IRQ_BOARD_START + 70)
0018 
0019 /*
0020  * PXA GPIOs
0021  */
0022 
0023 #define GPIO0_HX4700_nKEY_POWER         0
0024 #define GPIO12_HX4700_ASIC3_IRQ         12
0025 #define GPIO13_HX4700_W3220_IRQ         13
0026 #define GPIO14_HX4700_nWLAN_IRQ         14
0027 #define GPIO18_HX4700_RDY           18
0028 #define GPIO22_HX4700_LCD_RL            22
0029 #define GPIO27_HX4700_CODEC_ON          27
0030 #define GPIO32_HX4700_RS232_ON          32
0031 #define GPIO52_HX4700_CPU_nBATT_FAULT       52
0032 #define GPIO58_HX4700_TSC2046_nPENIRQ       58
0033 #define GPIO59_HX4700_LCD_PC1           59
0034 #define GPIO60_HX4700_CF_RNB            60
0035 #define GPIO61_HX4700_W3220_nRESET      61
0036 #define GPIO62_HX4700_LCD_nRESET        62
0037 #define GPIO63_HX4700_CPU_SS_nRESET     63
0038 #define GPIO65_HX4700_TSC2046_PEN_PU        65
0039 #define GPIO66_HX4700_ASIC3_nSDIO_IRQ       66
0040 #define GPIO67_HX4700_EUART_PS          67
0041 #define GPIO70_HX4700_LCD_SLIN1         70
0042 #define GPIO71_HX4700_ASIC3_nRESET      71
0043 #define GPIO72_HX4700_BQ24022_nCHARGE_EN    72
0044 #define GPIO73_HX4700_LCD_UD_1          73
0045 #define GPIO75_HX4700_EARPHONE_nDET     75
0046 #define GPIO76_HX4700_USBC_PUEN         76
0047 #define GPIO81_HX4700_CPU_GP_nRESET     81
0048 #define GPIO82_HX4700_EUART_RESET       82
0049 #define GPIO83_HX4700_WLAN_nRESET       83
0050 #define GPIO84_HX4700_LCD_SQN           84
0051 #define GPIO85_HX4700_nPCE1         85
0052 #define GPIO88_HX4700_TSC2046_CS        88
0053 #define GPIO91_HX4700_FLASH_VPEN        91
0054 #define GPIO92_HX4700_HP_DRIVER         92
0055 #define GPIO93_HX4700_EUART_INT         93
0056 #define GPIO94_HX4700_KEY_MAIL          94
0057 #define GPIO95_HX4700_BATT_OFF          95
0058 #define GPIO96_HX4700_BQ24022_ISET2     96
0059 #define GPIO97_HX4700_nBL_DETECT        97
0060 #define GPIO99_HX4700_KEY_CONTACTS      99
0061 #define GPIO100_HX4700_AUTO_SENSE       100 /* BL auto brightness */
0062 #define GPIO102_HX4700_SYNAPTICS_POWER_ON   102
0063 #define GPIO103_HX4700_SYNAPTICS_INT        103
0064 #define GPIO105_HX4700_nIR_ON           105
0065 #define GPIO106_HX4700_CPU_BT_nRESET        106
0066 #define GPIO107_HX4700_SPK_nSD          107
0067 #define GPIO109_HX4700_CODEC_nPDN       109
0068 #define GPIO110_HX4700_LCD_LVDD_3V3_ON      110
0069 #define GPIO111_HX4700_LCD_AVDD_3V3_ON      111
0070 #define GPIO112_HX4700_LCD_N2V7_7V3_ON      112
0071 #define GPIO114_HX4700_CF_RESET         114
0072 #define GPIO116_HX4700_CPU_HW_nRESET        116
0073 
0074 /*
0075  * ASIC3 GPIOs
0076  */
0077 
0078 #define GPIOC_BASE      (HX4700_ASIC3_GPIO_BASE + 32)
0079 #define GPIOD_BASE      (HX4700_ASIC3_GPIO_BASE + 48)
0080 
0081 #define GPIOC0_LED_RED      (GPIOC_BASE + 0)
0082 #define GPIOC1_LED_GREEN    (GPIOC_BASE + 1)
0083 #define GPIOC2_LED_BLUE     (GPIOC_BASE + 2)
0084 #define GPIOC3_nSD_CS       (GPIOC_BASE + 3)
0085 #define GPIOC4_CF_nCD       (GPIOC_BASE + 4)    /* Input */
0086 #define GPIOC5_nCIOW        (GPIOC_BASE + 5)    /* Output, to CF */
0087 #define GPIOC6_nCIOR        (GPIOC_BASE + 6)    /* Output, to CF */
0088 #define GPIOC7_nPCE1        (GPIOC_BASE + 7)    /* Input, from CPU */
0089 #define GPIOC8_nPCE2        (GPIOC_BASE + 8)    /* Input, from CPU */
0090 #define GPIOC9_nPOE     (GPIOC_BASE + 9)    /* Input, from CPU */
0091 #define GPIOC10_CF_nPWE     (GPIOC_BASE + 10)   /* Input */
0092 #define GPIOC11_PSKTSEL     (GPIOC_BASE + 11)   /* Input, from CPU */
0093 #define GPIOC12_nPREG       (GPIOC_BASE + 12)   /* Input, from CPU */
0094 #define GPIOC13_nPWAIT      (GPIOC_BASE + 13)   /* Output, to CPU */
0095 #define GPIOC14_nPIOIS16    (GPIOC_BASE + 14)   /* Output, to CPU */
0096 #define GPIOC15_nPIOR       (GPIOC_BASE + 15)   /* Input, from CPU */
0097 
0098 #define GPIOD0_CPU_SS_INT   (GPIOD_BASE + 0)    /* Input */
0099 #define GPIOD1_nKEY_CALENDAR    (GPIOD_BASE + 1)
0100 #define GPIOD2_BLUETOOTH_WAKEUP (GPIOD_BASE + 2)
0101 #define GPIOD3_nKEY_HOME    (GPIOD_BASE + 3)
0102 #define GPIOD4_CF_nCD       (GPIOD_BASE + 4)    /* Input, from CF */
0103 #define GPIOD5_nPIO     (GPIOD_BASE + 5)    /* Input */
0104 #define GPIOD6_nKEY_RECORD  (GPIOD_BASE + 6)
0105 #define GPIOD7_nSDIO_DETECT (GPIOD_BASE + 7)
0106 #define GPIOD8_COM_DCD      (GPIOD_BASE + 8)    /* Input */
0107 #define GPIOD9_nAC_IN       (GPIOD_BASE + 9)
0108 #define GPIOD10_nSDIO_IRQ   (GPIOD_BASE + 10)   /* Input */
0109 #define GPIOD11_nCIOIS16    (GPIOD_BASE + 11)   /* Input, from CF */
0110 #define GPIOD12_nCWAIT      (GPIOD_BASE + 12)   /* Input, from CF */
0111 #define GPIOD13_CF_RNB      (GPIOD_BASE + 13)   /* Input */
0112 #define GPIOD14_nUSBC_DETECT    (GPIOD_BASE + 14)
0113 #define GPIOD15_nPIOW       (GPIOD_BASE + 15)   /* Input, from CPU */
0114 
0115 /*
0116  * EGPIOs
0117  */
0118 
0119 #define EGPIO0_VCC_3V3_EN   (HX4700_EGPIO_BASE + 0) /* WLAN support chip */
0120 #define EGPIO1_WL_VREG_EN   (HX4700_EGPIO_BASE + 1) /* WLAN power */
0121 #define EGPIO2_VCC_2V1_WL_EN    (HX4700_EGPIO_BASE + 2) /* unused */
0122 #define EGPIO3_SS_PWR_ON    (HX4700_EGPIO_BASE + 3) /* smart slot power */
0123 #define EGPIO4_CF_3V3_ON    (HX4700_EGPIO_BASE + 4) /* CF 3.3V enable */
0124 #define EGPIO5_BT_3V3_ON    (HX4700_EGPIO_BASE + 5) /* BT 3.3V enable */
0125 #define EGPIO6_WL1V8_EN     (HX4700_EGPIO_BASE + 6) /* WLAN 1.8V enable */
0126 #define EGPIO7_VCC_3V3_WL_EN    (HX4700_EGPIO_BASE + 7) /* WLAN 3.3V enable */
0127 #define EGPIO8_USB_3V3_ON   (HX4700_EGPIO_BASE + 8) /* unused */
0128 
0129 #endif /* _HX4700_H_ */