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