diff --git a/board/nm/nrhw20/board.c b/board/nm/nrhw20/board.c index c7c4fc3091..ca87a0f625 100644 --- a/board/nm/nrhw20/board.c +++ b/board/nm/nrhw20/board.c @@ -619,24 +619,35 @@ static void init_pcie_slot(void) static void init_gsm(void) { + /* + * Perform power up sequence for Huawei ME909s. + * + * Modem is initially disabled and does not start automatically. + * Enable power and start modem by "pressing" POWER_ON_OFF input for 1.0s. + * + * References: + * - HUAWEI ME909s Series LTE LGA Module Hardware Guide, Issue 02, Date 2016-02-20 + * 3.3.2 Power Supply VBAT Interface + * 3.4.2 Power-on/off Pin, Figure 3.7 + */ + + /* TODO: Keep Power-On and use GSM Modem Reset Signal to restart */ + REQUEST_AND_SET_GPIO(NETBIRD_GPIO_RST_GSM); /* Assert reset (active high) */ REQUEST_AND_CLEAR_GPIO(NETBIRD_GPIO_PWR_GSM); /* Keep power switch inactive (released) */ da9063_set_gpio(PMIC_GSM_SUPPLY_EN_IO, 0); /* Switch GSM Supply off */ - mdelay(30); /* Give time to discharge supply */ + mdelay(30+100); /* Give time to discharge supply */ + /* Keep of for 100ms, #3.3.2 */ da9063_set_gpio(PMIC_GSM_SUPPLY_EN_IO, 1); /* Enable GSM supply */ mdelay(10); - gpio_set_value(NETBIRD_GPIO_RST_GSM, 0); /* Take modem out of reset. */ - mdelay(300); /* Wait 300ms until modem can handle power request */ + gpio_set_value(NETBIRD_GPIO_RST_GSM, 0); /* Take modem out of reset */ + mdelay(300); /* Wait for power to stabilizy, #3.4.2 */ - /* - * Do power up sequence. - * The ME909 has a special power up sequence where we have to pull PWR for > 1s but < 7s (see manual) - */ - gpio_set_value(NETBIRD_GPIO_PWR_GSM, 1); /* TODO: Defer to late_init, so that we don't block boot */ + gpio_set_value(NETBIRD_GPIO_PWR_GSM, 1); /* Generate power on event, #3.4.2 */ mdelay(1200); gpio_set_value(NETBIRD_GPIO_PWR_GSM, 0); }