/dev/bsp/CCRH

From WiiUBrew
< /dev | bsp
Jump to navigation Jump to search

/bsp/CCRH is the BSP entity responsible for the hardware reset line of the DRH.

Attributes

Reset

This attribute drives the DRH hardware reset via GPIO (CCRIO3, with CCRIO12 as a secondary control line on some code paths). Behavior is gated by the board revision and movPassiveReset in the BSP EEPROM config, and differs depending on the board type:

  • On EV boards, the reset is always driven through this attribute.
  • On CT boards, it only fires if board revision <= 2 and movPassiveReset != 1 (later revisions rely on a passive reset circuit instead).
  • On ID/IH boards, it is a no-op.
  • On CF boards, an extended code path is taken that additionally queries an SMC attribute and logs "resetting DRH.\n" / "holding DRH in reset.\n"
Attribute properties
Options BSP_AO_INIT_GLOBAL
Permissions BSP_PERMISSIONS_IOS
Data 0x4
Data size 0x4
Methods
Method Description Values
Init Reads the current hardware version and, if applicable, forwards the attribute's data into write.
Write Sets the DRH reset state via GPIO. After a successful call, callers (e.g. Cafe OS's CCREnableFwUpdateMode/CCRDisableFwUpdateMode) sleep ~3 seconds to allow the DRH to detach and reattach on the bus. 0x1 – deassert reset (CCRIO3 = 0)

0x2 – enable firmware-update mode: re-checks HW version and drives CCRIO12 = 1 (DRH FW-update/bootloader-entry sequence)

0x3 – assert reset (CCRIO3 = 1, CCRIO12 = 0)

0x4 – disable firmware-update mode / normal reset (CCRIO3 = 0, CCRIO12 = 0)


Summary

This attribute only contains data; a read-only status word indicating whether the currently installed board revision actually has the DRH reset circuit present/supported. Set during bspCCRHInstall:

  • boardType CT/ID — supported if boardRevision >= 2.
  • boardType EV — supported if boardRevision >= 4.
  • boardType CF/IH, or an unrecognized boardType — always supported.

Otherwise — unsupported.

Attribute properties
Options BSP_AO_QUERY_DATA_INDIRECT
Permissions BSP_PERMISSIONS_IOS
Data size 0x4
Methods
Method Description
Read Gets the current summary flags, indicating whether DRH reset is supported on this board.