#include <dm.h>
#include <spi.h>
#include <clk.h>
+#include <reset.h>
#include <asm/gpio.h>
#include <linux/iopoll.h>
{
struct npcm_pspi_priv *priv = dev_get_priv(bus);
int node = dev_of_offset(bus);
+ struct reset_ctl reset;
int ret;
ret = clk_get_by_index(bus, 0, &priv->clk);
gpio_request_by_name_nodev(offset_to_ofnode(node), "cs-gpios", 0,
&priv->cs_gpio, GPIOD_IS_OUT| GPIOD_ACTIVE_LOW);
+ /* Reset HW */
+ ret = reset_get_by_index(bus, 0, &reset);
+ if (!ret) {
+ reset_assert(&reset);
+ udelay(5);
+ reset_deassert(&reset);
+ }
+
return 0;
}