exo2: implement SmcIramCopy/reboot to payload/rcm

This commit is contained in:
Michael Scire 2020-06-08 09:02:50 -07:00 committed by SciresM
parent bb6671a94a
commit 6c145d76c7
31 changed files with 868 additions and 47 deletions

View file

@ -145,12 +145,17 @@ namespace ams::pmic {
u8 cnfg = i2c::QueryByte(i2c::Port_5, I2cAddressMax77620Pmic, Max77620RegisterOnOffCnfg1);
/* Set SlpEn. */
cnfg |= (1 << 2);
cnfg |= MAX77620_ONOFFCNFG1_SLPEN;
/* Write the new cfg. */
i2c::SendByte(i2c::Port_5, I2cAddressMax77620Pmic, Max77620RegisterOnOffCnfg1, cnfg);
}
void PowerOff() {
/* Write power-off to onoff cfg. */
i2c::SendByte(i2c::Port_5, I2cAddressMax77620Pmic, Max77620RegisterOnOffCnfg1, MAX77620_ONOFFCNFG1_PWR_OFF);
}
bool IsAcOk() {
return (GetPmicOnOffStat() & (1 << 1)) != 0;
}