rk3399: gru: Fix rk3399-gru write protect
The write protect is active high, not active low. Fix. After fixing I can see this after removing the screw: $ crossystem | grep wpsw_boot wpsw_boot = 0 Putting the screw in shows: $ crossystem | grep wpsw_boot wpsw_boot = 1 Caution: this CL contains explicit material. It explicitly sets the pullup on the WP GPIO even though that's the boot default. BRANCH=None BUG=chrome-os-partner:55933 TEST=See desc. Change-Id: Ie65db9cf182b0a0a05ae412f86904df6b239e0f4 Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/366131 Tested-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
903e737fdb
commit
e6969f4be4
1 changed files with 8 additions and 7 deletions
|
|
@ -22,10 +22,16 @@
|
|||
|
||||
#include "board.h"
|
||||
|
||||
int get_write_protect_state(void)
|
||||
{
|
||||
return gpio_get(GPIO_WP);
|
||||
}
|
||||
|
||||
void fill_lb_gpios(struct lb_gpios *gpios)
|
||||
{
|
||||
struct lb_gpio chromeos_gpios[] = {
|
||||
{GPIO_WP.raw, ACTIVE_LOW, gpio_get(GPIO_WP), "write protect"},
|
||||
{GPIO_WP.raw, ACTIVE_HIGH, get_write_protect_state(),
|
||||
"write protect"},
|
||||
{-1, ACTIVE_HIGH, get_recovery_mode_switch(), "recovery"},
|
||||
{GPIO_BACKLIGHT.raw, ACTIVE_HIGH, -1, "backlight"},
|
||||
{GPIO_EC_IN_RW.raw, ACTIVE_HIGH, -1, "EC in RW"},
|
||||
|
|
@ -50,14 +56,9 @@ int get_recovery_mode_switch(void)
|
|||
EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEYBOARD_RECOVERY));
|
||||
}
|
||||
|
||||
int get_write_protect_state(void)
|
||||
{
|
||||
return !gpio_get(GPIO_WP);
|
||||
}
|
||||
|
||||
void setup_chromeos_gpios(void)
|
||||
{
|
||||
gpio_input(GPIO_WP);
|
||||
gpio_input_pullup(GPIO_WP);
|
||||
gpio_input_pullup(GPIO_EC_IN_RW);
|
||||
gpio_input_pullup(GPIO_EC_IRQ);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue