boards: arm: frdm_k64f: add settings to use WNC-M14A2A LTE-M modem

These settings enable use of the WNC-M14A2A LTE-M modem as the default
network interface instead of ethernet.

They include the following settings when MODEM_WNCM14A2A is selected:
- UART 2 setup
- Avoid ETH_0 setup due to pin conflicts
- DTS addition for WNC-M14A2A
- Kconfig settings for modem driver

Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
Michael Scott 2018-08-01 12:05:00 -08:00 committed by Jukka Rissanen
parent d917f23959
commit 01745c3844
5 changed files with 53 additions and 1 deletions

View file

@ -110,7 +110,7 @@ endif # SPI
if NETWORKING
config NET_L2_ETHERNET
def_bool y
def_bool y if !MODEM_WNCM14A2A
config ETH_MCUX_0
def_bool y if NET_L2_ETHERNET

View file

@ -13,3 +13,19 @@
#define CONFIG_MCR20A_GPIO_IRQ_B_PIN NXP_KINETIS_DSPI_4002C000_NXP_MCR20A_0_IRQB_GPIOS_PIN
#define CONFIG_MCR20A_GPIO_RESET_NAME NXP_KINETIS_DSPI_4002C000_NXP_MCR20A_0_RESET_GPIOS_CONTROLLER
#define CONFIG_MCR20A_GPIO_RESET_PIN NXP_KINETIS_DSPI_4002C000_NXP_MCR20A_0_RESET_GPIOS_PIN
#define CONFIG_WNCM14A2A_UART_DRV_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_BUS_NAME
#define CONFIG_WNCM14A2A_GPIO_MDM_BOOT_MODE_SEL_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_BOOT_MODE_SEL_GPIOS_CONTROLLER
#define CONFIG_WNCM14A2A_GPIO_MDM_BOOT_MODE_SEL_PIN NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_BOOT_MODE_SEL_GPIOS_PIN
#define CONFIG_WNCM14A2A_GPIO_MDM_POWER_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_POWER_GPIOS_CONTROLLER
#define CONFIG_WNCM14A2A_GPIO_MDM_POWER_PIN NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_POWER_GPIOS_PIN
#define CONFIG_WNCM14A2A_GPIO_MDM_KEEP_AWAKE_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_KEEP_AWAKE_GPIOS_CONTROLLER
#define CONFIG_WNCM14A2A_GPIO_MDM_KEEP_AWAKE_PIN NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_KEEP_AWAKE_GPIOS_PIN
#define CONFIG_WNCM14A2A_GPIO_MDM_RESET_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_RESET_GPIOS_CONTROLLER
#define CONFIG_WNCM14A2A_GPIO_MDM_RESET_PIN NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_RESET_GPIOS_PIN
#define CONFIG_WNCM14A2A_GPIO_MDM_SHLD_TRANS_ENA_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_SHLD_TRANS_ENA_GPIOS_CONTROLLER
#define CONFIG_WNCM14A2A_GPIO_MDM_SHLD_TRANS_ENA_PIN NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_SHLD_TRANS_ENA_GPIOS_PIN
#ifdef NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_SEND_OK_GPIOS_PIN
#define CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_NAME NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_SEND_OK_GPIOS_CONTROLLER
#define CONFIG_WNCM14A2A_GPIO_MDM_SEND_OK_PIN NXP_KINETIS_UART_4006C000_WNCM14A2A_MDM_SEND_OK_GPIOS_PIN
#endif

View file

@ -122,6 +122,20 @@
&uart2 {
status = "ok";
current-speed = <115200>;
#ifdef CONFIG_MODEM_WNCM14A2A
wncm14a2a {
compatible = "wnc,m14a2a";
label = "wncm14a2a";
mdm-boot-mode-sel-gpios = <&gpioc 17 0>;
mdm-power-gpios = <&gpiob 9 0>;
mdm-keep-awake-gpios = <&gpioc 2 0>;
mdm-reset-gpios = <&gpioc 12 0>;
mdm-shld-trans-ena-gpios = <&gpioc 4 0>;
mdm-send-ok-gpios = <&gpiod 0 0>;
status = "ok";
};
#endif
};
#endif

View file

@ -66,6 +66,27 @@ static int frdm_k64f_pinmux_init(struct device *dev)
pinmux_pin_set(porte, 26, PORT_PCR_MUX(kPORT_MuxAsGpio));
pinmux_pin_set(portb, 21, PORT_PCR_MUX(kPORT_MuxAsGpio));
#ifdef CONFIG_MODEM_WNCM14A2A
/* WNC-M14A2A Modem POWER_ON */
pinmux_pin_set(portb, 9, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Shield PMOD_D1 */
pinmux_pin_set(portb, 10, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Shield PMOD_D2 */
pinmux_pin_set(portb, 11, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Modem WWAN_STATE */
pinmux_pin_set(portb, 23, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Modem WAKEUP_ENABLE */
pinmux_pin_set(portc, 2, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Modem HTS221_DRDY */
pinmux_pin_set(portc, 3, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Shield LEVEL_TRANSFORM_ENABLE */
pinmux_pin_set(portc, 4, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Modem RESET */
pinmux_pin_set(portc, 12, PORT_PCR_MUX(kPORT_MuxAsGpio));
/* WNC-M14A2A Modem BOOT_MODE_SELECT */
pinmux_pin_set(portc, 17, PORT_PCR_MUX(kPORT_MuxAsGpio));
#endif
#ifdef CONFIG_IEEE802154_MCR20A
/* FRDM-MCR20A Reset (D5) */
pinmux_pin_set(porta, 2, PORT_PCR_MUX(kPORT_MuxAsGpio));

View file

@ -44,6 +44,7 @@ config MODEM_WNCM14A2A
depends on UART_INTERRUPT_DRIVEN
select MODEM_RECEIVER
select NET_OFFLOAD
select UART_MCUX_2 if BOARD_FRDM_K64F
help
Choose this setting to enable Wistron WNC-M14A2A LTE-M modem driver.
NOTE: Currently the pin settings only work with FRDM K64F shield.