Skip to content
Permalink
Browse files

boards: arm: particle_boron: enable SARA-R4 modem

The Particle.io Boron is an nRF52840-based board with a connected
u-blox SARA-R4 modem.  The main board was previously upstreamed
without modem support.

Now that we have a driver to support the SARA-R4 modem, let's enable
it for the Boron board.

Signed-off-by: Michael Scott <mike@foundries.io>
  • Loading branch information...
mike-scott authored and nashif committed May 17, 2019
1 parent 4c49075 commit e2b45e6b1d191a152d32d4ed92947bd3838367cd
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()
zephyr_library_sources(board.c)
@@ -50,4 +50,20 @@ endif # IEEE802154
config BT_CTLR
default BT

if MODEM

config UART_1_NRF_UARTE
default y

config UART_1_NRF_FLOW_CONTROL
default y

config MODEM_UBLOX_SARA_R4
default y

config UART_INTERRUPT_DRIVEN
default y

endif # MODEM

endif # BOARD_PARTICLE_BORON
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2019 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <init.h>
#include "board.h"
#include <gpio.h>

static int particle_boron_init(struct device *dev)
{

ARG_UNUSED(dev);

#if defined(CONFIG_MODEM_UBLOX_SARA_R4)
struct device *gpio_dev;

/* Enable the serial buffer for SARA-R4 modem */
gpio_dev = device_get_binding(SERIAL_BUFFER_ENABLE_GPIO_NAME);
if (!gpio_dev) {
return -ENODEV;
}

gpio_pin_configure(gpio_dev, V_INT_DETECT_GPIO_PIN, GPIO_DIR_IN);

gpio_pin_configure(gpio_dev, SERIAL_BUFFER_ENABLE_GPIO_PIN,
GPIO_DIR_OUT);
#endif

return 0;
}

/* needs to be done after GPIO driver init */
SYS_INIT(particle_boron_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2019 Foundries.io
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef __INC_BOARD_H
#define __INC_BOARD_H

/* pin used to enable the buffer power */
#define SERIAL_BUFFER_ENABLE_GPIO_NAME DT_NORDIC_NRF_GPIO_0_LABEL
#define SERIAL_BUFFER_ENABLE_GPIO_PIN 25

/* pin used to detect V_INT (buffer power) */
#define V_INT_DETECT_GPIO_PIN 2

#endif /* __INC_BOARD_H */
@@ -6,6 +6,7 @@

/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/gpio/gpio.h>
#include "mesh_feather.dtsi"

/ {
@@ -23,10 +24,20 @@

&uart1 { /* u-blox SARA-U2 or SARA-R4 */
compatible = "nordic,nrf-uarte";
current-speed = <921600>;
current-speed = <115200>;
status = "ok";

tx-pin = <37>;
rx-pin = <36>;
rts-pin = <39>;
cts-pin = <38>;

sara_r4 {
compatible = "ublox,sara-r4";
label = "ublox-sara-r4";
status = "ok";

mdm-power-gpios-gpio = <&gpio0 16 0>;
mdm-reset-gpios-gpio = <&gpio0 12 0>;
};
};
@@ -18,7 +18,6 @@ CONFIG_GPIO=y
# enable uart driver
CONFIG_SERIAL=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_1_NRF_UARTE=y

# enable power I2C interface
CONFIG_I2C=y

0 comments on commit e2b45e6

Please sign in to comment.
You can’t perform that action at this time.