fw_wp_state: Introduce abstraction of firmware write-protection

Modifying the firmware protection is different on CCD-capable devices.
It is done by the 'wp' command on CCD console instead of the servo
pins:
  fw_wp_vref:some_voltage
  fw_wp_en:on
  fw_wp:on/off

This CL unifies these 2 approaches by introducing a new servo
control, fw_wp_state (similar to power_state). Different boards have
different implementations (via servo overlay and driver).

BUG=chrome-os-partner:58041
TEST=Tested on servo v3 with micro-servo and CCD.
servo> dut-control fw_wp_state:force_on fw_wp_state
fw_wp_state:force_on
dut> crossystem wpsw_cur # Firmware WP hardware switch current position
1
servo> dut-control fw_wp_state:force_off fw_wp_state
fw_wp_state:force_off
dut> crossystem wpsw_cur
0
servo> dut-control fw_wp_state:reset fw_wp_state # micro-servo only
fw_wp_state:off
dut> crossystem wpsw_cur
0

Change-Id: If8dd7c0b07ccd820b4d956cef6cc48ba2685b320
Reviewed-on: https://chromium-review.googlesource.com/397839
Commit-Ready: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
25 files changed