Skip to content

Commit 55602a5

Browse files
FPlohlkartben
authored andcommitted
boards: norik: Add support for Norik Octopus IO-Board
Add support for Norik Systems Octopus IO-Board based on Norik Systems Octopus SoM. Supported features: - LTE-M/NB-IoT - GPS - LED - 3-axis accelerometer - Battery charger - Solar charger - SPI NOR flash - Nano SIM connector Signed-off-by: Florijan Plohl <[email protected]>
1 parent 00cbdf8 commit 55602a5

19 files changed

+491
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Norik Systems
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
zephyr_library()
5+
zephyr_library_sources(board.c)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2024 Norik Systems
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_OCTOPUS_IO_BOARD
5+
select BOARD_LATE_INIT_HOOK
6+
select GPIO
7+
8+
module = OCTOPUS_IO_BOARD_CONTROL
9+
module-str = Board Control
10+
source "subsys/logging/Kconfig.template.log_config"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (c) 2024 Norik Systems
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_OCTOPUS_IO_BOARD
5+
6+
# For the secure version of the board the firmware is linked at the beginning
7+
# of the flash, or into the code-partition defined in DT if it is intended to
8+
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
9+
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
10+
# be restricted to the size of its code partition.
11+
# For the non-secure version of the board, the firmware
12+
# must be linked into the code-partition (non-secure) defined in DT, regardless.
13+
# Apply this configuration below by setting the Kconfig symbols used by
14+
# the linker according to the information extracted from DT partitions.
15+
16+
# Workaround for not being able to have commas in macro arguments
17+
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
18+
19+
config FLASH_LOAD_SIZE
20+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
21+
depends on BOARD_OCTOPUS_IO_BOARD && TRUSTED_EXECUTION_SECURE
22+
23+
if BOARD_OCTOPUS_IO_BOARD_NRF9160_NS
24+
25+
config FLASH_LOAD_OFFSET
26+
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
27+
28+
config FLASH_LOAD_SIZE
29+
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
30+
31+
endif # BOARD_OCTOPUS_IO_BOARD_NRF9160_NS
32+
33+
endif # BOARD_OCTOPUS_IO_BOARD
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Norik Systems
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_OCTOPUS_IO_BOARD
5+
select SOC_NRF9160_SICA
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2024 Norik Systems
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/init.h>
7+
#include <zephyr/device.h>
8+
#include <zephyr/devicetree.h>
9+
#include <zephyr/drivers/gpio.h>
10+
#include <zephyr/logging/log.h>
11+
12+
LOG_MODULE_REGISTER(board_control, CONFIG_OCTOPUS_IO_BOARD_CONTROL_LOG_LEVEL);
13+
14+
#define SIM_SELECT_NODE DT_PATH(sim_select)
15+
16+
void board_late_init_hook(void)
17+
{
18+
const struct gpio_dt_spec simctrl = GPIO_DT_SPEC_GET(DT_PATH(sim_select), sim_gpios);
19+
20+
if (!gpio_is_ready_dt(&simctrl)) {
21+
LOG_ERR("SIM select GPIO not available");
22+
return;
23+
}
24+
25+
if (DT_ENUM_IDX(SIM_SELECT_NODE, sim) == 0) {
26+
(void)gpio_pin_configure_dt(&simctrl, GPIO_OUTPUT_LOW);
27+
LOG_INF("On-board SIM selected");
28+
} else {
29+
(void)gpio_pin_configure_dt(&simctrl, GPIO_OUTPUT_HIGH);
30+
LOG_INF("External SIM selected");
31+
}
32+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Norik Systems
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=nRF9160_xxAA" "--speed=4000")
5+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
board:
2+
name: octopus_io_board
3+
full_name: Octopus IO-Board
4+
vendor: norik
5+
socs:
6+
- name: nrf9160
7+
variants:
8+
- name: 'ns'
42.4 KB
Loading
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
.. zephyr:board:: octopus_io_board
2+
3+
Overview
4+
********
5+
6+
Octopus IO-Board is an expansion to the Octopus SoM, which is built around the nRF9160 SiP
7+
offering NB-IoT and LTE-M connectivity, GPS and accelerometer. Octopus IO-Board expands
8+
the capabilities of the Octopus SoM by providing additional peripherals and interfaces for
9+
development and prototyping of low-power IoT applications.
10+
11+
nRF9160 SiP contains ARM Cortex-M33 application processor and the
12+
following devices:
13+
14+
* :abbr:`ADC (Analog to Digital Converter)`
15+
* CLOCK
16+
* FLASH
17+
* :abbr:`GPIO (General Purpose Input Output)`
18+
* :abbr:`I2C (Inter-Integrated Circuit)`
19+
* :abbr:`MPU (Memory Protection Unit)`
20+
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
21+
* :abbr:`PWM (Pulse Width Modulation)`
22+
* :abbr:`RTC (nRF RTC System Clock)`
23+
* Segger RTT (RTT Console)
24+
* :abbr:`SPI (Serial Peripheral Interface)`
25+
* :abbr:`UARTE (Universal asynchronous receiver-transmitter with EasyDMA)`
26+
* :abbr:`WDT (Watchdog Timer)`
27+
* :abbr:`IDAU (Implementation Defined Attribution Unit)`
28+
29+
Octopus IO-Board offers the following features:
30+
31+
* Battery charger
32+
* USB-C for power
33+
* Solar charger
34+
* Alkaline battery input
35+
* LDO regulator to power Octopus SoM and peripherals
36+
* Battery monitoring using ADC
37+
* 64 Mbit SPI NOR flash
38+
* Dedicated ADC, GPIO, I2C, SPI and UARTE pins for expansion
39+
* Exposed headers for current measurements
40+
* Nano SIM connector
41+
* Tag-Connect TC2030-IDC 6-pin connector for SWD programming and debugging
42+
* 2x3 pinheader for SWD programming and debugging
43+
44+
More information about the board can be found at the `Octopus IO-Board Product Page`_
45+
and in the `Octopus IO-Board Documentation`_.
46+
47+
Hardware
48+
********
49+
50+
Connections and IOs
51+
===================
52+
53+
The Octopus IO-Board features multiple dedicated pin headers for peripherals:
54+
55+
* 3x I2C0 bus
56+
* 2x SPI0 bus
57+
* 3x I2C1/SPI1 bus (selectable)
58+
* 1x UARTE0 bus
59+
* 1x Analog input (5 input pins)
60+
* 1x GPIO (7 I/O pins)
61+
62+
The I2C1/SPI1 bus is selectable by the user by cutting/soldering SB8 and SB9 solder bridges and configuring the bus in the device tree.
63+
64+
The GPIO pin header provides 7 I/O pins, which can be used as digital input/output. Some of them also serve as chip selects for SPI peripherals.
65+
66+
Power supply
67+
============
68+
69+
The Octopus IO-Board can be powered from the following sources:
70+
71+
* USB-C connector
72+
* Solar cell
73+
* Alkaline battery
74+
* Li-Po battery
75+
76+
When powered from USB-C or solar cell, the board can charge the Li-Po battery. The battery voltage can be monitored using ADC which can
77+
provide information about the battery State of charge (SOC).
78+
79+
When powered from alkaline battery, the user needs to set switch SW1 to ALK position. This ensures that the Li-Ion battery is not charged from the alkaline battery.
80+
81+
The board has a built-in LDO regulator that is used to power the Octopus SoM and peripherals. The EN2 pin can be used to enable/disable output 2 of the LDO regulator.
82+
This can be used to power off peripherals to save power when they are not needed.
83+
84+
The board also has multiple built-in test points for measuring current consumption of the board, which enables the user to measure and optimize the power consumption of the board.
85+
86+
Programming and Debugging
87+
*************************
88+
89+
Norik Octopus IO-Board can be programmed and debugged using the Tag-Connect TC2030-IDC 6-pin connector or 6-pin SWD pinheader.
90+
91+
Building an application
92+
=======================
93+
94+
In most case you'll need to use ``octopus_io_board/nrf9160/ns`` board target for building examples.
95+
Some examples don't require non secure mode and can be built with ``octopus_io_board/nrf9160`` board target.
96+
97+
Flashing
98+
========
99+
Refer to the instruction in the :ref:`nordic_segger` page to install and
100+
configure all the necessary software.
101+
102+
Here is an example for the Hello World application.
103+
104+
First, run your favorite terminal program to listen for output.
105+
106+
.. code-block:: console
107+
108+
$ minicom /dev/<tty_device> 115200
109+
110+
Replace <tty_device> with the port where the Octopus IO-Board can be found. For example, under Linux, /dev/ttyACM0.
111+
112+
Then build and flash the application in the usual way.
113+
114+
.. zephyr-app-commands::
115+
:zephyr-app: samples/hello_world
116+
:board: octopus_io_board/nrf9160
117+
:goals: build flash
118+
119+
To build and flash the application in non-secure mode, use the following command:
120+
121+
.. zephyr-app-commands::
122+
:zephyr-app: samples/hello_world
123+
:board: octopus_io_board/nrf9160/ns
124+
:goals: build flash
125+
126+
Debugging
127+
=========
128+
Refer to the instruction in the :ref:`nordic_segger` page for information on
129+
debugging.
130+
131+
Testing the on-board LED
132+
========================
133+
Use the :zephyr:code-sample:`blinky` to test the on-board LED. Build and flash the example to make sure Zephyr is running correctly on your board.
134+
135+
.. zephyr-app-commands::
136+
:zephyr-app: samples/basic/blinky
137+
:board: octopus_io_board/nrf9160
138+
:goals: build flash
139+
140+
References
141+
**********
142+
143+
.. target-notes::
144+
145+
.. _Octopus IO-Board Product Page: https://www.norik.com/2024/09/16/octopus-io-board/
146+
.. _Octopus IO-Board Documentation: https://www.norik.com/wp-content/uploads/2024/09/Octopus_IO-Board_Datasheet.pdf
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) 2024 Norik Systems
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
The Octopus SoM provides the user 2 options for connecting
6+
a SIM card to the nRF9160. Option one is to use on-board eSIM or
7+
external nano SIM. Which SIM is used can be selected using the 'sim'
8+
property of the 'sim_select' dt node.
9+
10+
compatible: "norik,sim_select"
11+
12+
include: base.yaml
13+
14+
properties:
15+
sim-gpios:
16+
type: phandle-array
17+
required: true
18+
description: Pin used to select which SIM is used
19+
20+
sim:
21+
type: string
22+
required: true
23+
enum:
24+
- "on-board"
25+
- "external"
26+
description: SIM choice (on-board eSIM or external nano SIM)

0 commit comments

Comments
 (0)