1.1 --- a/include/nanonote.h Tue Jul 11 18:45:08 2017 +0200
1.2 +++ b/include/nanonote.h Wed Jul 12 15:46:53 2017 +0200
1.3 @@ -26,33 +26,68 @@
1.4 * GPIO definition
1.5 * See: http://en.qi-hardware.com/wiki/Hardware_basics
1.6 */
1.7 -#define GPIO_LCD_CS (2 * 32 + 21)
1.8 -#define GPIO_AMP_EN (3 * 32 + 4)
1.9 +
1.10 +#define GPIO_PORT_AUDIO 1
1.11 +
1.12 +#define GPIO_AUDIO_EN 29 /* audio output enable */
1.13 +#define GPIO_COB_TEST 30 /* test point TP5 */
1.14 +
1.15 +/* LCD */
1.16 +
1.17 +#define GPIO_PORT_LCD 2
1.18
1.19 -#define GPIO_SDPW_EN (3 * 32 + 2)
1.20 -#define GPIO_SD_DETECT (3 * 32 + 0)
1.21 +#define GPIO_LCD_CS 21
1.22 +#define SPEN GPIO_LCD_CS /* serial command enable */
1.23 +#define SPDA 22 /* serial command data */
1.24 +#define SPCK 23 /* serial command clock */
1.25 +
1.26 +#define GPIO_SLCD8_MASK 0x003c00ff /* SLCD 8-bit pins */
1.27 +
1.28 +/* JTAG */
1.29 +
1.30 +#define GPIO_PORT_JTAG 2
1.31 +
1.32 +#define GPIO_JTAG_UART_EN 31 /* select UART on pad 147 */
1.33 +
1.34 +/* Sound/noise */
1.35 +
1.36 +#define GPIO_PORT_AMP 3
1.37 +#define GPIO_PORT_BUZZ 3
1.38
1.39 -#define GPIO_BUZZ_PWM (3 * 32 + 27)
1.40 -#define GPIO_USB_DETECT (3 * 32 + 28)
1.41 +#define GPIO_AMP_EN 4 /* speaker enable */
1.42 +#define GPIO_BUZZ_PWM 27 /* buzzer (PWM4) */
1.43 +
1.44 +/* USB */
1.45 +
1.46 +#define GPIO_PORT_USB 3
1.47 +
1.48 +#define GPIO_USB_DETECT 28
1.49 +
1.50 +/* Power */
1.51 +
1.52 +#define GPIO_PORT_POWER 3
1.53
1.54 -#define GPIO_AUDIO_POP (1 * 32 + 29)
1.55 -#define GPIO_COB_TEST (1 * 32 + 30)
1.56 +#define GPIO_POWER 29 /* power button */
1.57 +
1.58 +/* SD/MMC */
1.59 +
1.60 +#define GPIO_PORT_MSC 3
1.61 +#define GPIO_PORT_SD 3
1.62 +
1.63 +#define GPIO_SD_DETECT 0
1.64 +#define GPIO_SD_CD_N GPIO_SD_DETECT /* SD Card insert detect */
1.65 +#define GPIO_SDPW_EN 2
1.66 +#define GPIO_SD_VCC_EN_N GPIO_SDPW_EN /* SD Card Power Enable */
1.67 +#define GPIO_SD_CMD 8
1.68 +#define GPIO_MSC_MASK 0x00003f00
1.69 +
1.70 +/* Other details. */
1.71
1.72 #define GPIO_KEYIN_COUNT 8
1.73 #define GPIO_KEYOUT_COUNT 8
1.74
1.75 -#define GPIO_POWER (3 * 32 + 29)
1.76 -
1.77 -#define GPIO_SD_CD_N GPIO_SD_DETECT /* SD Card insert detect */
1.78 -#define GPIO_SD_VCC_EN_N GPIO_SDPW_EN /* SD Card Power Enable */
1.79 -
1.80 -#define GPIO_SD_CMD (3 * 32 + 8)
1.81 -
1.82 -#define SPEN GPIO_LCD_CS /* LCDCS :Serial command enable */
1.83 -#define SPDA (2 * 32 + 22) /* LCDSCL:Serial command clock input */
1.84 -#define SPCK (2 * 32 + 23) /* LCDSDA:Serial command data input */
1.85 -
1.86 -#define GPIO_IRQ IRQ_GPIO3
1.87 +#define GPIO_IRQ2 IRQ_GPIO2 /* IRQ for keyboard */
1.88 +#define GPIO_IRQ3 IRQ_GPIO3 /* IRQ for power button */
1.89
1.90 #define GPIO_REGION_SIZE 0x10000
1.91