gpio
GPIO
The gamepad has registers in the F0005xxx space that allow direct control over the SoC's I/O lines.
Here is a list of the known GPIO registers, as well as the values the stock firmware initializes them to.
Address | Init. | Desc. |
---|---|---|
0xF000502C | 0x8000 | ? |
0xF0005038 | 0x8000 | ? |
0xF000503C | 0x0001 | ? |
0xF0005040 | 0x0001 | ? |
0xF0005044 | 0x0001 | ? |
0xF0005048 | 0x8000 | ? |
0xF000504C | 0x0001 | ? |
0xF0005050 | 0x0001 | ? |
0xF0005054 | 0x0001 | ? |
0xF0005058 | 0x0001 | ? |
0xF000505C | 0x0001 | ? |
0xF0005060 | 0x0001 | ? |
0xF0005064 | 0x0001 | ? |
0xF0005068 | 0x0001 | ? |
0xF000506C | 0x0001 | ? |
0xF0005070 | 0x0001 | ? |
0xF0005074 | 0x8001 | ? |
0xF0005078 | 0x0001 | ? |
0xF0005080 | 0x0000 | ? |
0xF0005084 | 0x0000 | ? |
0xF0005088 | 0x0000 | ? |
0xF000508C | 0x0000 | ? |
0xF0005090 | 0x0000 | ? |
0xF0005094 | 0x0000 | ? |
0xF0005098 | 0xC000 | ? |
0xF000509C | 0x8001 | ? |
0xF00050A0 | 0x8001 | ? |
0xF00050AC | 0xC001 | ? |
0xF00050B0 | 0xC001 | ? |
0xF00050B4 | 0xC001 | ? |
0xF00050B8 | 0xC001 | ? |
0xF00050BC | 0xC001 | ? |
0xF00050C0 | 0xC001 | ? |
0xF00050C4 | 0x0000 | ? |
0xF00050C8 | 0x0000 | ? |
0xF00050CC | 0x0000 | ? |
0xF00050D0 | 0x0000 | ? |
0xF00050D4 | 0x8001 | ? |
0xF00050D8 | 0x0001 | ? |
0xF00050DC | 0x8001 | ? |
0xF00050E0 | 0x8001 | ? |
0xF00050E4 | 0x0001 | ? |
0xF00050E8 | 0x0001 | ? |
0xF00050EC | 0x8001 | SPI - clock |
0xF00050F0 | 0x0001 | SPI - MISO |
0xF00050F4 | 0x8001 | SPI - MOSI |
0xF00050F8 | 0xC300 | SPI - Flash chipselect |
0xF00050FC | 0xC300 | SPI - UIC chipselect |
0xF0005100 | 0xC200 | LCD - ?? toggled before I2C comm. |
0xF0005104 | 0xC300 | SPI - chipselect for mystery 3rd device |
0xF0005108 | 0x8000 | ? |
0xF000510C | 0xD800 | ? - NFC related |
0xF0005110 | 0xF200 | ? - NFC related |
0xF0005114 | 0x8000 | Rumble motor |
0xF0005118 | 0x8000 | Sensor bar power |
0xF000511C | 0x8000 | ? - camera related |
GPIO register format:
Bits | Desc. |
---|---|
0 | ??? |
8 | Output value |
9 | Output mode (1=output) |
10 | Input value (read-only) |
11 | Input mode (1=input) |
12 | ??? |
13 | ??? |
14 | ??? |
15 | ??? |
There are probably settings for pullup/pulldown resistors hiding in the unknown bits. It is also unknown what happens if both bit9 and bit11 are set.
Note: when the LSB of the hardware ID register (0xF0000000) is 0x41, bit14 and bit15 seem to be swapped.
Important note: improper GPIO configurations may cause shorts.
gpio.txt · Last modified: 2024/11/01 22:17 by arisotura