[coreboot-gerrit] Change in coreboot[master]: google/gru: Support Nefario rev0
Philip Chen (Code Review)
gerrit at coreboot.org
Thu Aug 24 03:13:46 CEST 2017
Philip Chen has uploaded this change for review. ( https://review.coreboot.org/21176
Change subject: google/gru: Support Nefario rev0
......................................................................
google/gru: Support Nefario rev0
Do not assert GPIO1_B3 otherwise BT would be disabled on Nefario.
Also, remove DVS support for CENTERLOGIC.
BUG=b:64702054, b:63537905
TEST=build coreboot
Change-Id: I350db2c080f2e41ae56413f5f895557978ef0ba8
Signed-off-by: Philip Chen <philipchen at google.com>
---
M src/mainboard/google/gru/board.h
M src/mainboard/google/gru/mainboard.c
M src/mainboard/google/gru/pwm_regulator.c
M src/mainboard/google/gru/romstage.c
4 files changed, 25 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/21176/1
diff --git a/src/mainboard/google/gru/board.h b/src/mainboard/google/gru/board.h
index f240dcf..7c63c82 100644
--- a/src/mainboard/google/gru/board.h
+++ b/src/mainboard/google/gru/board.h
@@ -33,7 +33,6 @@
#define GPIO_P30V_EN dead_code_t(gpio_t, "PP3000 doesn't exist on Scarlet")
#define GPIO_TP_RST_L dead_code_t(gpio_t, "don't need TP_RST_L on Scarlet")
#define GPIO_TPM_IRQ GPIO(1, C, 1)
-#define GPIO_WLAN_RST_L dead_code_t(gpio_t, "no WLAN reset on Scarlet in FW")
#define GPIO_WP GPIO(0, B, 5)
#else
#define GPIO_BACKLIGHT GPIO(1, C, 1)
@@ -44,10 +43,16 @@
#define GPIO_P30V_EN GPIO(0, B, 4)
#define GPIO_TP_RST_L GPIO(3, B, 4) /* may also be an I2C pull-up enable */
#define GPIO_TPM_IRQ GPIO(0, A, 5)
-#define GPIO_WLAN_RST_L GPIO(1, B, 3)
#define GPIO_WP GPIO(1, C, 2)
#endif
+#if IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET) ||\
+ IS_ENABLED(CONFIG_BOARD_GOOGLE_NEFARIO)
+#define GPIO_WLAN_RST_L dead_code_t(gpio_t, "no WLAN reset on Scarlet in FW")
+#else
+#define GPIO_WLAN_RST_L GPIO(1, B, 3)
+#endif
+
void setup_chromeos_gpios(void);
#endif /* ! __COREBOOT_SRC_MAINBOARD_GOOGLE_GRU_BOARD_H */
diff --git a/src/mainboard/google/gru/mainboard.c b/src/mainboard/google/gru/mainboard.c
index 240a549..4ebcd3c 100644
--- a/src/mainboard/google/gru/mainboard.c
+++ b/src/mainboard/google/gru/mainboard.c
@@ -44,7 +44,8 @@
/*
* Wifi's PDN/RST line is pulled down by its (unpowered) voltage rails, but
* this reset pin is pulled up by default. Let's drive it low as early as we
- * can. Scarlet uses a different WiFi chip that doesn't have this pin anymore.
+ * can. Scarlet and Nefario use a different WiFi chip that doesn't have this
+ * pin anymore.
*/
static void assert_wifi_reset(void)
{
@@ -350,7 +351,9 @@
configure_display();
setup_usb(0);
if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)) {
- assert_wifi_reset(); /* Scarlet: no WIFI_PD# line */
+ /* Scarlet and Nefario: no WIFI_PD# line */
+ if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_NEFARIO))
+ assert_wifi_reset();
configure_touchpad(); /* Scarlet: works differently */
setup_usb(1); /* Scarlet: only one USB port */
register_gpio_suspend(); /* Scarlet: all EC-controlled */
diff --git a/src/mainboard/google/gru/pwm_regulator.c b/src/mainboard/google/gru/pwm_regulator.c
index 3ee74a4..329a757 100644
--- a/src/mainboard/google/gru/pwm_regulator.c
+++ b/src/mainboard/google/gru/pwm_regulator.c
@@ -40,12 +40,14 @@
[PWM_REGULATOR_CENTERLOG] = {8001, 10497}
};
-/* Applies for Gru rev2+ and Bob. */
+/* Applies for Gru rev2+, Bob, and Nefario. */
int pwm_design_voltage[][2] = {
[PWM_REGULATOR_GPU] = {7864, 12177},
[PWM_REGULATOR_BIG] = {8001, 13022},
[PWM_REGULATOR_LIT] = {7977, 13078},
+#if !IS_ENABLED(CONFIG_BOARD_GOOGLE_NEFARIO)
[PWM_REGULATOR_CENTERLOG] = {7994, 10499}
+#endif
};
/* Applies for Scarlet */
@@ -58,12 +60,17 @@
int pwm_enum_to_pwm_number[] = {
[PWM_REGULATOR_GPU] = 0,
[PWM_REGULATOR_LIT] = 2,
+#if IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET) ||\
+ IS_ENABLED(CONFIG_BOARD_GOOGLE_NEFARIO)
+ /* Fixed regulator on Nefario and Scarlet */
+ [PWM_REGULATOR_CENTERLOG] = -1,
+#else
+ [PWM_REGULATOR_CENTERLOG] = 3,
+#endif
#if IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET)
[PWM_REGULATOR_BIG] = 3,
- [PWM_REGULATOR_CENTERLOG] = -1, /* fixed regulator on Scarlet */
#else
[PWM_REGULATOR_BIG] = 1,
- [PWM_REGULATOR_CENTERLOG] = 3,
#endif
};
diff --git a/src/mainboard/google/gru/romstage.c b/src/mainboard/google/gru/romstage.c
index bde61b2..5fb5330 100644
--- a/src/mainboard/google/gru/romstage.c
+++ b/src/mainboard/google/gru/romstage.c
@@ -42,10 +42,11 @@
pwm_regulator_configure(PWM_REGULATOR_BIG, 900);
/* Kevin's logic rail has some ripple, so up the voltage a bit. Scarlet
- uses a fixed 900mV regulator for centerlogic. */
+ and Nefario use a fixed 900mV regulator for centerlogic. */
if (IS_ENABLED(CONFIG_BOARD_GOOGLE_KEVIN))
pwm_regulator_configure(PWM_REGULATOR_CENTERLOG, 925);
- else if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET))
+ else if (!IS_ENABLED(CONFIG_BOARD_GOOGLE_SCARLET) &&
+ !IS_ENABLED(CONFIG_BOARD_GOOGLE_NEFARIO))
pwm_regulator_configure(PWM_REGULATOR_CENTERLOG, 900);
/* Allow time for the regulators to settle */
--
To view, visit https://review.coreboot.org/21176
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I350db2c080f2e41ae56413f5f895557978ef0ba8
Gerrit-Change-Number: 21176
Gerrit-PatchSet: 1
Gerrit-Owner: Philip Chen <philipchen at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170824/95af178a/attachment-0001.html>
More information about the coreboot-gerrit
mailing list