# Reboot command

**URL:** <https://forums.sifive.com/t/reboot-command/4721>\
**Category:** HiFive Unmatched\
**Created:** [May 28, 2021, 5:02pm UTC](https://forums.sifive.com/t/reboot-command/4721 "2021-05-28T17:02:42Z")\
**Posts on this page:** 1\
**Showing post:** 22

<div class="post-metadata">

**Author:** ![vmedea](https://avatars.discourse-cdn.com/v4/letter/v/3be4f8/32.png) [@vmedea](https://forums.sifive.com/u/vmedea)\
**Post date:** [September 3, 2021, 10:46am UTC](https://forums.sifive.com/t/reboot-command/4721/22 "2021-09-03T10:46:09Z")

</div>

> [@andersm](#):
>
> ```auto
> i2c dev 0;i2c mw 0x58 0x00 0x00;i2c mw 0x58 0x96 0xdf;i2c mw 0x58 0x4a 0x20;i2c mw 0x58 0x4b 0x80;i2c mw 0x58 0x06 0x4;i2c mw 0x58 0x0e 0x68;
> 
> ```

In terms of Linux implementation, based on the above patch, this sequence would be this, right?

```auto
static int da9063_restart_notify(struct notifier_block *this,
                                unsigned long mode, void *cmd)
{
    struct da9063 *da9063 = container_of(this, struct da9063, restart_handler);
    
    regmap_write(da9063->regmap, DA9063_REG_PAGE_CON, 0x00);
    regmap_write(da9063->regmap, DA9063_REG_SEQ_B, 0xdf);
    regmap_write(da9063->regmap, DA9063_BB_REG_ALARM_MO, 0x20);
    regmap_write(da9063->regmap, DA9063_BB_REG_ALARM_Y, 0x80);
    regmap_write(da9063->regmap, DA9063_REG_EVENT_A, 0x4);
    regmap_write(da9063->regmap, DA9063_REG_CONTROL_A, 0x68);
    
    return NOTIFY_DONE;
}
```

Edit: updated according to andersm’s comment below

---

_[View the full topic](https://forums.sifive.com/t/reboot-command/4721)._
