1 /* 2 * Ben NanoNote configuration parameters. 3 * 4 * Copyright (C) 2009 Qi Hardware Inc. 5 * Authors: Xiangfu Liu <xiangfu@openmobilefree.net> 6 * Copyright (C) 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk> 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef __NANONOTE_H__ 23 #define __NANONOTE_H__ 24 25 /* 26 * GPIO definition 27 * See: http://en.qi-hardware.com/wiki/Hardware_basics 28 */ 29 30 #define GPIO_PORT_AUDIO 1 31 32 #define GPIO_AUDIO_EN 29 /* audio output enable */ 33 #define GPIO_COB_TEST 30 /* test point TP5 */ 34 35 /* LCD */ 36 37 #define GPIO_PORT_LCD 2 38 39 #define GPIO_LCD_CS 21 40 #define SPEN GPIO_LCD_CS /* serial command enable */ 41 #define SPDA 22 /* serial command data */ 42 #define SPCK 23 /* serial command clock */ 43 44 #define GPIO_SLCD8_MASK 0x003c00ff /* SLCD 8-bit pins */ 45 46 /* JTAG */ 47 48 #define GPIO_PORT_JTAG 2 49 50 #define GPIO_JTAG_UART_EN 31 /* select UART on pad 147 */ 51 52 /* Sound/noise */ 53 54 #define GPIO_PORT_AMP 3 55 #define GPIO_PORT_BUZZ 3 56 57 #define GPIO_AMP_EN 4 /* speaker enable */ 58 #define GPIO_BUZZ_PWM 27 /* buzzer (PWM4) */ 59 60 /* USB */ 61 62 #define GPIO_PORT_USB 3 63 64 #define GPIO_USB_DETECT 28 65 66 /* Power */ 67 68 #define GPIO_PORT_POWER 3 69 70 #define GPIO_POWER 29 /* power button */ 71 72 /* SD/MMC */ 73 74 #define GPIO_PORT_MSC 3 75 #define GPIO_PORT_SD 3 76 77 #define GPIO_SD_DETECT 0 78 #define GPIO_SD_CD_N GPIO_SD_DETECT /* SD Card insert detect */ 79 #define GPIO_SDPW_EN 2 80 #define GPIO_SD_VCC_EN_N GPIO_SDPW_EN /* SD Card Power Enable */ 81 #define GPIO_SD_CMD 8 82 #define GPIO_MSC_MASK 0x00003f00 83 84 /* Other details. */ 85 86 #define GPIO_KEYIN_COUNT 8 87 #define GPIO_KEYOUT_COUNT 8 88 89 #define GPIO_IRQ2 IRQ_GPIO2 /* IRQ for keyboard */ 90 #define GPIO_IRQ3 IRQ_GPIO3 /* IRQ for power button */ 91 92 #define GPIO_REGION_SIZE 0x10000 93 94 #endif /* __NANONOTE_H__ */