dev_dbg(dev, "Leaving sleep mode\n");
+ madera_enable_hard_reset(madera);
+
ret = regulator_enable(madera->dcvdd);
if (ret) {
dev_err(dev, "Failed to enable DCVDD: %d\n", ret);
regcache_cache_only(madera->regmap, false);
regcache_cache_only(madera->regmap_32bit, false);
- usleep_range(2000, 3000);
- ret = madera_soft_reset(madera);
- if (ret) {
- dev_err(dev, "Failed to reset: %d\n", ret);
- goto err;
+ madera_disable_hard_reset(madera);
+
+ if (!madera->reset_gpio) {
+ ret = madera_wait_for_boot(madera);
+ if (ret)
+ goto err;
+
+ ret = madera_soft_reset(madera);
+ if (ret) {
+ dev_err(dev, "Failed to reset: %d\n", ret);
+ goto err;
+ }
}
ret = madera_wait_for_boot(madera);