From 99625b0cd83871b30aca6ad7bb182326f8467673 Mon Sep 17 00:00:00 2001 From: Joel Kitching Date: Thu, 21 Mar 2019 00:30:38 +0800 Subject: gale: add dev switch back as physical presence GPIO gale has a button which is essentially used as a "physical presence" button. Its only use is to emulate ^D or ^U on boot when the button is pressed. (See depthcharge src/board/gale/board.c) Previously (and currently in CrOS firmware branch) this GPIO was defined as the physical developer switch, and read as such in depthcharge. It was removed in cleanup patch CB:18980. Add the GPIO back as physical presence ("presence"), which will be read by depthcharge in CL:1532492. BUG=b:124141368, b:124192753, chromium:942901 TEST=util/lint/checkpatch.pl -g origin/master..HEAD TEST=util/abuild/abuild -B -e -y -c 50 -p none -x TEST=make clean && make test-abuild BRANCH=none Change-Id: Ic144f839b7f9933d573db8f84c4bf5905eea96f6 Signed-off-by: Joel Kitching Reviewed-on: https://review.coreboot.org/c/coreboot/+/31993 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner Reviewed-by: Simon Glass --- src/mainboard/google/gale/chromeos.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mainboard/google/gale/chromeos.c') diff --git a/src/mainboard/google/gale/chromeos.c b/src/mainboard/google/gale/chromeos.c index 09fdc2fa60..66b1a62ea4 100644 --- a/src/mainboard/google/gale/chromeos.c +++ b/src/mainboard/google/gale/chromeos.c @@ -24,6 +24,8 @@ #include #include +#define PP_SW 41 +#define PP_POL ACTIVE_LOW #define REC_POL ACTIVE_LOW #define WP_POL ACTIVE_LOW @@ -68,6 +70,7 @@ static int read_gpio(gpio_t gpio_num) void fill_lb_gpios(struct lb_gpios *gpios) { struct lb_gpio chromeos_gpios[] = { + {PP_SW, PP_POL, read_gpio(PP_SW), "presence"}, {get_rec_sw_gpio_pin(), REC_POL, read_gpio(get_rec_sw_gpio_pin()), "recovery"}, {get_wp_status_gpio_pin(), WP_POL, -- cgit v1.2.3