drivers: ieee802154_mcr20a: do not initialize reset gpio on KW2XD

Do not initialize reset gpio on KW2XD SIP.
Modem's clock output is used by the SoC for the PLL.
Initialization of the reset gpio may result in the reset of the modem
and the crash of SoC.

Keep reset gpio low until modem initialization.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
Johann Fischer 2018-12-05 18:15:55 +01:00 committed by Maureen Helm
parent f3a36502a0
commit db64943aa5

View file

@ -1354,17 +1354,20 @@ static inline int configure_gpios(struct device *dev)
GPIO_PUD_PULL_UP |
GPIO_INT_ACTIVE_LOW);
/* setup gpio for the modems reset */
mcr20a->reset_gpio = device_get_binding(DT_MCR20A_GPIO_RESET_NAME);
if (mcr20a->reset_gpio == NULL) {
LOG_ERR("Failed to get pointer to %s device",
DT_MCR20A_GPIO_RESET_NAME);
return -EINVAL;
}
if (!PART_OF_KW2XD_SIP) {
/* setup gpio for the modems reset */
mcr20a->reset_gpio = device_get_binding(
DT_MCR20A_GPIO_RESET_NAME);
if (mcr20a->reset_gpio == NULL) {
LOG_ERR("Failed to get pointer to %s device",
DT_MCR20A_GPIO_RESET_NAME);
return -EINVAL;
}
gpio_pin_configure(mcr20a->reset_gpio, DT_MCR20A_GPIO_RESET_PIN,
GPIO_DIR_OUT);
set_reset(dev, 1);
gpio_pin_configure(mcr20a->reset_gpio, DT_MCR20A_GPIO_RESET_PIN,
GPIO_DIR_OUT);
set_reset(dev, 0);
}
return 0;
}