User Tools

Site Tools


pmic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pmic [2024/12/17 13:18] – created arisoturapmic [2025/04/03 20:30] (current) arisotura
Line 4: Line 4:
  
 It is connected to the [[UIC]]'s I2C bus, where its device ID is 0x48. It is connected to the [[UIC]]'s I2C bus, where its device ID is 0x48.
 +
 +
 +===== Pinout =====
 +
 +^ Pin ^ Desc. ^
 +| 1   | ?? |
 +| 2   | ?? |
 +| 3   | ?? |
 +| 4   | ?? |
 +| 5   | Battery pin 1 (red) |
 +| 6   | Battery pin 1 (red) |
 +| 7   | ?? |
 +| 8   | ?? |
 +| 9   | ?? |
 +| 10  | 4.75V input from AC adapter |
 +| 11  | Battery pin 2 (gray) (through 510ohm resistor) |
 +| 12  | ?? |
 +| 13  | ?? |
 +| 14  | ?? |
 +| 15  | ?? |
 +| 16  | ?? |
 +| 17  | Ground |
 +| 18  | ?? |
 +| 19  | Vcc1 - 3.2V (UIC voltage?) |
 +| 20  | Vcc1 feedback |
 +| 21  | ?? |
 +| 22  | Vcc2 feedback |
 +| 23  | Vcc2 - 1.24V (SoC core voltage) |
 +| 24  | Power button output - to UIC pin 64 |
 +| 25  | Power button |
 +| 26  | CPU/etc active - to UIC pin 19 |
 +| 27  | UIC I2C - SDA |
 +| 28  | UIC I2C - SCL |
 +| 29  | Vcc3 - 2.8V output for peripherals (CPU, Flash, etc) |
 +| 30  | Ground |
 +| 31  | Vcc3 feedback |
 +| 32  | ?? |
 +| 33  | ?? |
 +| 34  | ?? |
 +| 35  | ?? |
 +| 36  | ?? |
 +| 37  | ?? |
 +| 38  | ?? |
 +| 39  | ?? |
 +| 40  | System active? - to UIC pin 17, with 100k pull-up resistor |
 +| 41  | ?? |
 +| 42  | Ground |
 +| 43  | Battery pin 4 (white) |
 +| 44  | ?? |
 +| 45  | ?? |
 +| 46  | ?? |
 +| 47  | ?? |
 +| 48  | ?? |
 +
 +The gamepad is rated for 4.75V 1.6A. In practice, the PMIC accepts an input voltage of up to 5.2V (as often delivered by third-party AC adapters) without problem. This makes USB chargers a viable substitute for the proprietary AC adapter, as long as they can deliver enough current.
  
  
 ===== I2C communications ===== ===== I2C communications =====
  
-Communications to the PMIC always start by writing one byte, which is likely a register ID/address. Then further bytes are written or read.+Communications to the PMIC always start by writing one byte, which is likely a register ID/address. Then further bytes are written or read in order to access the registers themselves.
  
 The UIC firmware has code for accessing the following registers: The UIC firmware has code for accessing the following registers:
  
 ^ Register ^ Description ^ ^ Register ^ Description ^
-| 0x01     ?? |+| 0x01     Charge status -- bit6=AC, bit7=USB (1=connected) |
 | 0x02     | ?? | | 0x02     | ?? |
 | 0x03     | ?? | | 0x03     | ?? |
Line 20: Line 75:
 | 0x07     | ?? | | 0x07     | ?? |
 | 0x08     | ?? -- seemingly accessed after 0x07 | | 0x08     | ?? -- seemingly accessed after 0x07 |
-| 0x09     ?? |+| 0x09     Battery level LSB (format/bounds unknown) | 
 +| 0x0A     | Battery level MSB |
 | 0x0D     | ?? | | 0x0D     | ?? |
 | 0x0F     | ?? | | 0x0F     | ?? |
-| 0x18     | Backlight related | +| 0x18     | Backlight related -- 0x90=on 0x10=off 
-| 0x19     | Backlight related |+| 0x19     | Backlight related -- maybe timeout/delay? | 
 + 
 +Which battery level is read out of registers 0x09/0x0A seems to depend on settings in register 0x07. 
 + 
 +Writes to register 0x07 (and 0x08): 
 + 
 +90 06 - to turn on the CPU 
 + 
 +D9 - to read current battery level 
 + 
 +D0 - to read maximum battery level 
 + 
 +D5 - ?? to read minimum battery level?? (unused) 
 + 
 +00 07 - to turn off the CPU 
 + 
 +Seems register 0x0D is set to 0xA0 after turning the CPU on/off? 
 + 
 +Bit 5 in register 0x07 is some sort of ready bit that is checked after changing register 0x07 and before reading battery levels.
  
pmic.1734441497.txt.gz · Last modified: 2024/12/17 13:18 by arisotura

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki