servo_v4: clear bbram PD state on reboot
Preserved bbram state causes failure to reinit on reboot.
Clear on board init.
BRANCH=None
TEST=PD reinits on reboot.
Commit-Ready: ChromeOS CL Exonerator Bot
#include "queue_policies.h"
#include "registers.h"
#include "spi.h"
+#include "system.h"
#include "task.h"
#include "timer.h"
#include "update_fw.h"
#include "gpio_list.h"
#define CPRINTS(format, args...) cprints(CC_SYSTEM, format, ## args)
+#define CPRINTF(format, args...) cprintf(CC_SYSTEM, format, ## args)
/******************************************************************************
* Board pre-init function.
@@ -434,6 +436,10 @@ static void board_init(void)
init_uservo_port();
init_usb3_port();
+ /* Clear BBRAM, we don't want any PD state carried over on reset. */
+ system_set_bbram(SYSTEM_BBRAM_IDX_PD0, 0);
+ system_set_bbram(SYSTEM_BBRAM_IDX_PD1, 0);
+
/*
* Enable SBU mux. The polarity is set each time a new PD attach event
* occurs. But, the SBU mux is not disabled on detach so that the H1 USB
