diff options
Diffstat (limited to 'firmware/export/pp5002.h')
-rw-r--r-- | firmware/export/pp5002.h | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/firmware/export/pp5002.h b/firmware/export/pp5002.h index b235a2154b..9fab86bf21 100644 --- a/firmware/export/pp5002.h +++ b/firmware/export/pp5002.h | |||
@@ -34,19 +34,64 @@ | |||
34 | #define LCD1_BUSY_MASK 0x8000 | 34 | #define LCD1_BUSY_MASK 0x8000 |
35 | 35 | ||
36 | /* I2S controller */ | 36 | /* I2S controller */ |
37 | |||
38 | /* FIFO slot bits 7-0 are not implemented and so use of packed samples | ||
39 | * appears to be impossible. */ | ||
37 | #define IISCONFIG (*(volatile unsigned long *)(0xc0002500)) | 40 | #define IISCONFIG (*(volatile unsigned long *)(0xc0002500)) |
38 | #define IISFIFO_CFG (*(volatile unsigned long *)(0xc000251c)) | 41 | #define IISFIFO_CFG (*(volatile unsigned long *)(0xc000251c)) |
39 | #define IISFIFO_WR (*(volatile unsigned long *)(0xc0002540)) | 42 | #define IISFIFO_WR (*(volatile unsigned long *)(0xc0002540)) |
40 | #define IISFIFO_RD (*(volatile unsigned long *)(0xc0002580)) | 43 | #define IISFIFO_RD (*(volatile unsigned long *)(0xc0002580)) |
41 | 44 | ||
42 | /* IISCONFIG bits: */ | 45 | /** |
46 | * IISCONFIG bits: | ||
47 | * | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | | ||
48 | * | | | | | | | | | | ||
49 | * | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | | ||
50 | * | | | | | | | | | | ||
51 | * | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | | ||
52 | * | | | | | | | | | | ||
53 | * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | | ||
54 | * | rw | rw | rw | MS | rw |TXFENB# | rw | ENB | | ||
55 | * | ||
56 | * # No effect observed on iPod 3g | ||
57 | */ | ||
58 | #define IIS_ENABLE (1 << 0) | ||
43 | #define IIS_TXFIFOEN (1 << 2) | 59 | #define IIS_TXFIFOEN (1 << 2) |
44 | #define IIS_TX_FREE_MASK (0xf << 23) | 60 | #define IIS_MASTER (1 << 4) |
61 | |||
62 | /** | ||
63 | * IISFIFO_CFG bits: | ||
64 | * | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | | ||
65 | * | | RXFull[3:0]$ | TXFree[3:1] > | ||
66 | * | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | | ||
67 | * >TXFre[0]| | | | | | RXCLR | TXCLR | | ||
68 | * | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | | ||
69 | * | rw | rw | rw | rw | rw | rw | IRQTX | rw | | ||
70 | * | 7* | 6* | 5* | 4* | 3 | 2 | 1 | 0 | | ||
71 | * |RXEMPTY | RXSAFE | RXDNGR | RXFULL | TXFULL | TXSAFE | TXDNGR |TXEMPTY | | ||
72 | * | ||
73 | * $Could be RXFree | ||
74 | * *Meaning isn't certain yet. | ||
75 | * More concerted recording work will reveal. | ||
76 | */ | ||
77 | #define IIS_IRQTX_REG IISFIFO_CFG | ||
78 | #define IIS_IRQRX_REG IISFIFO_CFG | ||
79 | |||
80 | #define IIS_RX_FULL_MASK (0xf << 27) | ||
81 | #define IIS_RX_FULL_COUNT ((IISFIFO_CFG & IIS_RX_FULL_MASK) >> 27) | ||
82 | #define IIS_TX_FREE_MASK (0xf << 23) /* 0xf = 16 or 15 free */ | ||
45 | #define IIS_TX_FREE_COUNT ((IISFIFO_CFG & IIS_TX_FREE_MASK) >> 23) | 83 | #define IIS_TX_FREE_COUNT ((IISFIFO_CFG & IIS_TX_FREE_MASK) >> 23) |
84 | #define IIS_TX_IS_EMPTY ((IISFIFO_CFG & IIS_TXEMPTY) != 0) | ||
85 | |||
86 | #define IIS_RXCLR (1 << 17) /* Resets *could* be reversed */ | ||
87 | #define IIS_TXCLR (1 << 16) | ||
88 | #define IIS_IRQTX (1 << 9) | ||
89 | #define IIS_TXFULL (1 << 3) /* All slots occupied */ | ||
90 | #define IIS_TXSAFE (1 << 2) /* FIFO >= 3/4 full */ | ||
91 | #define IIS_TXDANGER (1 << 1) /* FIFO <= 1/4 full */ | ||
92 | #define IIS_TXEMPTY (1 << 0) /* No samples in FIFO */ | ||
46 | 93 | ||
47 | /* IISFIFO_CFG bits: */ | 94 | #define IIS_RXEMPTY (1 << 4) /* FIFO is empty */ |
48 | #define IIS_IRQTX_REG IISFIFO_CFG | ||
49 | #define IIS_IRQTX (1 << 9) | ||
50 | 95 | ||
51 | #define IDE_BASE 0xc0003000 | 96 | #define IDE_BASE 0xc0003000 |
52 | 97 | ||
@@ -184,6 +229,7 @@ | |||
184 | #define DEV_RS (*(volatile unsigned long *)(0xcf005030)) | 229 | #define DEV_RS (*(volatile unsigned long *)(0xcf005030)) |
185 | 230 | ||
186 | #define DEV_I2C (1<<8) | 231 | #define DEV_I2C (1<<8) |
232 | #define DEV_I2S (1<<7) | ||
187 | #define DEV_USB 0x400000 | 233 | #define DEV_USB 0x400000 |
188 | 234 | ||
189 | #define CLOCK_ENABLE (*(volatile unsigned long *)(0xcf005008)) | 235 | #define CLOCK_ENABLE (*(volatile unsigned long *)(0xcf005008)) |