nyx: Use full shutdown based reboot on T210B01

That's because of how the system is exploited.
This commit is contained in:
CTCaer
2020-12-02 01:45:12 +02:00
parent 0a9931ddb3
commit 0954eb2b09
3 changed files with 30 additions and 3 deletions

View File

@@ -152,6 +152,23 @@ void reboot_rcm()
bpmp_halt();
}
void reboot_full()
{
sd_end();
hw_reinit_workaround(false, 0);
// Enable soft reset wake event.
u8 reg = i2c_recv_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_ONOFFCNFG2);
reg |= MAX77620_ONOFFCNFG2_SFT_RST_WK;
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_ONOFFCNFG2, reg);
// Do a soft reset.
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_ONOFFCNFG1, MAX77620_ONOFFCNFG1_SFT_RST);
while (true)
bpmp_halt();
}
void power_off()
{
sd_end();