greybus: arche-platform: Add wake/detect support along with handshaking with AP
Add wake_detect support to arche-platform driver which is responsible
for SVC control. This patch also adds code for handshaking between
AP <=> SVC. The sequence is,
1. AP boots
To keep compatibility between DB3 and EVT platform, SVC will be
help in reset and AP driver would release it at appropriate time.
wake/detect pin (WD8A) = Low
reset (SVC/APB1/APB2) = Asserted (as per polarity)
2. AP Driver gets inserted
2.1. AP will deassert reset to SVC (following power on sequence)
2.2. SVC allows 360 milliseconds to elapse after switch boots to work
around bug described in ENG-330.
2.3. AP asserts wake/detect pin (WD8A = HIGH)
3. SVC detects assertion of wake/detect pin, and sends "wake out" signal to AP
4. AP receives "wake out" signal, takes AP Bridges through their power
on reset sequence as defined in the bridge ASIC reference manuals
5. AP takes USB3613 through its power on reset sequence
6. AP should enumerates AP Bridges
Note: ISR has been deliberately removed (not merged) as we are still
not sure how it will be used, in runtime usage context. Driver as such
doesn't do anything for runtime assert-n-deassert of reset to SVC/APB's,
it just simply offloads it to user by exporting required gpio's.
The exported gpio's are required for FW flashing from user space.
When it comes to usersace manipulated control sequence, user has to manage.
Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Tested-by: Michael Scott <michael.scott@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>