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 <florijan.plohl@norik.com>
This commit is contained in:
parent
00cbdf86a8
commit
55602a5b6b
19 changed files with 491 additions and 0 deletions
5
boards/norik/octopus_io_board/CMakeLists.txt
Normal file
5
boards/norik/octopus_io_board/CMakeLists.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2024 Norik Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_library()
|
||||
zephyr_library_sources(board.c)
|
10
boards/norik/octopus_io_board/Kconfig
Normal file
10
boards/norik/octopus_io_board/Kconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2024 Norik Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_OCTOPUS_IO_BOARD
|
||||
select BOARD_LATE_INIT_HOOK
|
||||
select GPIO
|
||||
|
||||
module = OCTOPUS_IO_BOARD_CONTROL
|
||||
module-str = Board Control
|
||||
source "subsys/logging/Kconfig.template.log_config"
|
33
boards/norik/octopus_io_board/Kconfig.defconfig
Normal file
33
boards/norik/octopus_io_board/Kconfig.defconfig
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Copyright (c) 2024 Norik Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_OCTOPUS_IO_BOARD
|
||||
|
||||
# For the secure version of the board the firmware is linked at the beginning
|
||||
# of the flash, or into the code-partition defined in DT if it is intended to
|
||||
# be loaded by MCUboot. If the secure firmware is to be combined with a non-
|
||||
# secure image (TRUSTED_EXECUTION_SECURE=y), the secure FW image shall always
|
||||
# be restricted to the size of its code partition.
|
||||
# For the non-secure version of the board, the firmware
|
||||
# must be linked into the code-partition (non-secure) defined in DT, regardless.
|
||||
# Apply this configuration below by setting the Kconfig symbols used by
|
||||
# the linker according to the information extracted from DT partitions.
|
||||
|
||||
# Workaround for not being able to have commas in macro arguments
|
||||
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
|
||||
|
||||
config FLASH_LOAD_SIZE
|
||||
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
|
||||
depends on BOARD_OCTOPUS_IO_BOARD && TRUSTED_EXECUTION_SECURE
|
||||
|
||||
if BOARD_OCTOPUS_IO_BOARD_NRF9160_NS
|
||||
|
||||
config FLASH_LOAD_OFFSET
|
||||
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
|
||||
|
||||
config FLASH_LOAD_SIZE
|
||||
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION))
|
||||
|
||||
endif # BOARD_OCTOPUS_IO_BOARD_NRF9160_NS
|
||||
|
||||
endif # BOARD_OCTOPUS_IO_BOARD
|
5
boards/norik/octopus_io_board/Kconfig.octopus_io_board
Normal file
5
boards/norik/octopus_io_board/Kconfig.octopus_io_board
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright (c) 2024 Norik Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_OCTOPUS_IO_BOARD
|
||||
select SOC_NRF9160_SICA
|
32
boards/norik/octopus_io_board/board.c
Normal file
32
boards/norik/octopus_io_board/board.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Norik Systems
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/init.h>
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
#include <zephyr/drivers/gpio.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
LOG_MODULE_REGISTER(board_control, CONFIG_OCTOPUS_IO_BOARD_CONTROL_LOG_LEVEL);
|
||||
|
||||
#define SIM_SELECT_NODE DT_PATH(sim_select)
|
||||
|
||||
void board_late_init_hook(void)
|
||||
{
|
||||
const struct gpio_dt_spec simctrl = GPIO_DT_SPEC_GET(DT_PATH(sim_select), sim_gpios);
|
||||
|
||||
if (!gpio_is_ready_dt(&simctrl)) {
|
||||
LOG_ERR("SIM select GPIO not available");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DT_ENUM_IDX(SIM_SELECT_NODE, sim) == 0) {
|
||||
(void)gpio_pin_configure_dt(&simctrl, GPIO_OUTPUT_LOW);
|
||||
LOG_INF("On-board SIM selected");
|
||||
} else {
|
||||
(void)gpio_pin_configure_dt(&simctrl, GPIO_OUTPUT_HIGH);
|
||||
LOG_INF("External SIM selected");
|
||||
}
|
||||
}
|
6
boards/norik/octopus_io_board/board.cmake
Normal file
6
boards/norik/octopus_io_board/board.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2024 Norik Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
board_runner_args(jlink "--device=nRF9160_xxAA" "--speed=4000")
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
8
boards/norik/octopus_io_board/board.yml
Normal file
8
boards/norik/octopus_io_board/board.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
board:
|
||||
name: octopus_io_board
|
||||
full_name: Octopus IO-Board
|
||||
vendor: norik
|
||||
socs:
|
||||
- name: nrf9160
|
||||
variants:
|
||||
- name: 'ns'
|
BIN
boards/norik/octopus_io_board/doc/img/octopus_io_board.webp
Normal file
BIN
boards/norik/octopus_io_board/doc/img/octopus_io_board.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
146
boards/norik/octopus_io_board/doc/index.rst
Normal file
146
boards/norik/octopus_io_board/doc/index.rst
Normal file
|
@ -0,0 +1,146 @@
|
|||
.. zephyr:board:: octopus_io_board
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
Octopus IO-Board is an expansion to the Octopus SoM, which is built around the nRF9160 SiP
|
||||
offering NB-IoT and LTE-M connectivity, GPS and accelerometer. Octopus IO-Board expands
|
||||
the capabilities of the Octopus SoM by providing additional peripherals and interfaces for
|
||||
development and prototyping of low-power IoT applications.
|
||||
|
||||
nRF9160 SiP contains ARM Cortex-M33 application processor and the
|
||||
following devices:
|
||||
|
||||
* :abbr:`ADC (Analog to Digital Converter)`
|
||||
* CLOCK
|
||||
* FLASH
|
||||
* :abbr:`GPIO (General Purpose Input Output)`
|
||||
* :abbr:`I2C (Inter-Integrated Circuit)`
|
||||
* :abbr:`MPU (Memory Protection Unit)`
|
||||
* :abbr:`NVIC (Nested Vectored Interrupt Controller)`
|
||||
* :abbr:`PWM (Pulse Width Modulation)`
|
||||
* :abbr:`RTC (nRF RTC System Clock)`
|
||||
* Segger RTT (RTT Console)
|
||||
* :abbr:`SPI (Serial Peripheral Interface)`
|
||||
* :abbr:`UARTE (Universal asynchronous receiver-transmitter with EasyDMA)`
|
||||
* :abbr:`WDT (Watchdog Timer)`
|
||||
* :abbr:`IDAU (Implementation Defined Attribution Unit)`
|
||||
|
||||
Octopus IO-Board offers the following features:
|
||||
|
||||
* Battery charger
|
||||
* USB-C for power
|
||||
* Solar charger
|
||||
* Alkaline battery input
|
||||
* LDO regulator to power Octopus SoM and peripherals
|
||||
* Battery monitoring using ADC
|
||||
* 64 Mbit SPI NOR flash
|
||||
* Dedicated ADC, GPIO, I2C, SPI and UARTE pins for expansion
|
||||
* Exposed headers for current measurements
|
||||
* Nano SIM connector
|
||||
* Tag-Connect TC2030-IDC 6-pin connector for SWD programming and debugging
|
||||
* 2x3 pinheader for SWD programming and debugging
|
||||
|
||||
More information about the board can be found at the `Octopus IO-Board Product Page`_
|
||||
and in the `Octopus IO-Board Documentation`_.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
Connections and IOs
|
||||
===================
|
||||
|
||||
The Octopus IO-Board features multiple dedicated pin headers for peripherals:
|
||||
|
||||
* 3x I2C0 bus
|
||||
* 2x SPI0 bus
|
||||
* 3x I2C1/SPI1 bus (selectable)
|
||||
* 1x UARTE0 bus
|
||||
* 1x Analog input (5 input pins)
|
||||
* 1x GPIO (7 I/O pins)
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
Power supply
|
||||
============
|
||||
|
||||
The Octopus IO-Board can be powered from the following sources:
|
||||
|
||||
* USB-C connector
|
||||
* Solar cell
|
||||
* Alkaline battery
|
||||
* Li-Po battery
|
||||
|
||||
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
|
||||
provide information about the battery State of charge (SOC).
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
This can be used to power off peripherals to save power when they are not needed.
|
||||
|
||||
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.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Norik Octopus IO-Board can be programmed and debugged using the Tag-Connect TC2030-IDC 6-pin connector or 6-pin SWD pinheader.
|
||||
|
||||
Building an application
|
||||
=======================
|
||||
|
||||
In most case you'll need to use ``octopus_io_board/nrf9160/ns`` board target for building examples.
|
||||
Some examples don't require non secure mode and can be built with ``octopus_io_board/nrf9160`` board target.
|
||||
|
||||
Flashing
|
||||
========
|
||||
Refer to the instruction in the :ref:`nordic_segger` page to install and
|
||||
configure all the necessary software.
|
||||
|
||||
Here is an example for the Hello World application.
|
||||
|
||||
First, run your favorite terminal program to listen for output.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ minicom /dev/<tty_device> 115200
|
||||
|
||||
Replace <tty_device> with the port where the Octopus IO-Board can be found. For example, under Linux, /dev/ttyACM0.
|
||||
|
||||
Then build and flash the application in the usual way.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: octopus_io_board/nrf9160
|
||||
:goals: build flash
|
||||
|
||||
To build and flash the application in non-secure mode, use the following command:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: octopus_io_board/nrf9160/ns
|
||||
:goals: build flash
|
||||
|
||||
Debugging
|
||||
=========
|
||||
Refer to the instruction in the :ref:`nordic_segger` page for information on
|
||||
debugging.
|
||||
|
||||
Testing the on-board LED
|
||||
========================
|
||||
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.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/basic/blinky
|
||||
:board: octopus_io_board/nrf9160
|
||||
:goals: build flash
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _Octopus IO-Board Product Page: https://www.norik.com/2024/09/16/octopus-io-board/
|
||||
.. _Octopus IO-Board Documentation: https://www.norik.com/wp-content/uploads/2024/09/Octopus_IO-Board_Datasheet.pdf
|
|
@ -0,0 +1,26 @@
|
|||
# Copyright (c) 2024 Norik Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
description: |
|
||||
The Octopus SoM provides the user 2 options for connecting
|
||||
a SIM card to the nRF9160. Option one is to use on-board eSIM or
|
||||
external nano SIM. Which SIM is used can be selected using the 'sim'
|
||||
property of the 'sim_select' dt node.
|
||||
|
||||
compatible: "norik,sim_select"
|
||||
|
||||
include: base.yaml
|
||||
|
||||
properties:
|
||||
sim-gpios:
|
||||
type: phandle-array
|
||||
required: true
|
||||
description: Pin used to select which SIM is used
|
||||
|
||||
sim:
|
||||
type: string
|
||||
required: true
|
||||
enum:
|
||||
- "on-board"
|
||||
- "external"
|
||||
description: SIM choice (on-board eSIM or external nano SIM)
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Norik Systems
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 4)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 3)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 4)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 3)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_default: i2c1_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 2)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 1)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c1_sleep: i2c1_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 2)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 1)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
61
boards/norik/octopus_io_board/octopus_io_board_common.dtsi
Normal file
61
boards/norik/octopus_io_board/octopus_io_board_common.dtsi
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Norik Systems
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include "octopus_io_board_common-pinctrl.dtsi"
|
||||
#include "../octopus_som/octopus_som_common.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Norik Octopus IO-Board";
|
||||
compatible = "norik,octopus-io-board";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,uart-mcumgr = &uart0;
|
||||
};
|
||||
|
||||
/* These aliases are provided for compatibility with samples */
|
||||
aliases {
|
||||
watchdog0 = &wdt0;
|
||||
};
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
compatible = "nordic,nrf-twim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
bq25180: bq25180@6a {
|
||||
compatible = "ti,bq25180";
|
||||
status = "okay";
|
||||
reg = <0x6a>;
|
||||
constant-charge-current-max-microamp = <10000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
status = "okay";
|
||||
cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>,<&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||
|
||||
adxl362: adxl362@0 {
|
||||
compatible = "adi,adxl362";
|
||||
spi-max-frequency = <8000000>;
|
||||
reg = <0>;
|
||||
int1-gpios = <&gpio0 12 0>;
|
||||
};
|
||||
|
||||
w25q64: w25q64@1 {
|
||||
compatible = "jedec,spi-nor";
|
||||
status = "okay";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <8000000>;
|
||||
jedec-id = [ef 40 17];
|
||||
size = <0x4000000>;
|
||||
has-dpd;
|
||||
t-enter-dpd = <3500>;
|
||||
t-exit-dpd = <3500>;
|
||||
};
|
||||
};
|
20
boards/norik/octopus_io_board/octopus_io_board_defconfig
Normal file
20
boards/norik/octopus_io_board/octopus_io_board_defconfig
Normal file
|
@ -0,0 +1,20 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable hardware stack protection
|
||||
CONFIG_HW_STACK_PROTECTION=y
|
||||
|
||||
# Enable TrustZone-M
|
||||
CONFIG_ARM_TRUSTZONE_M=y
|
||||
|
||||
# Enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable UART driver
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
# Enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
23
boards/norik/octopus_io_board/octopus_io_board_nrf9160.dts
Normal file
23
boards/norik/octopus_io_board/octopus_io_board_nrf9160.dts
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Norik Systems
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf9160_sica.dtsi>
|
||||
#include "octopus_io_board_common.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,sram = &sram0_s;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
zephyr,sram-secure-partition = &sram0_s;
|
||||
zephyr,sram-non-secure-partition = &sram0_ns;
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
};
|
17
boards/norik/octopus_io_board/octopus_io_board_nrf9160.yaml
Normal file
17
boards/norik/octopus_io_board/octopus_io_board_nrf9160.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
identifier: octopus_io_board/nrf9160
|
||||
name: Norik Octopus IO-Board
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 88
|
||||
flash: 1024
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
- pwm
|
||||
- watchdog
|
||||
vendor: norik
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Norik Systems
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf9160ns_sica.dtsi>
|
||||
#include "octopus_io_board_common.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,sram = &sram0_ns;
|
||||
zephyr,code-partition = &slot0_ns_partition;
|
||||
};
|
||||
};
|
||||
|
||||
/* Disable UART1, because it is used by default in TF-M */
|
||||
|
||||
&uart1 {
|
||||
status = "disabled";
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
identifier: octopus_io_board/nrf9160/ns
|
||||
name: Norik Octopus IO-Board Non-Secure
|
||||
type: mcu
|
||||
arch: arm
|
||||
ram: 128
|
||||
flash: 192
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
- pwm
|
||||
- watchdog
|
||||
vendor: norik
|
|
@ -0,0 +1,23 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# Enable hardware stack protection
|
||||
CONFIG_HW_STACK_PROTECTION=y
|
||||
|
||||
# Enable TrustZone-M
|
||||
CONFIG_ARM_TRUSTZONE_M=y
|
||||
|
||||
# This Board implies building Non-Secure firmware
|
||||
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
|
||||
|
||||
# Enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable UART driver
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
# Enable console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
|
@ -464,6 +464,7 @@ nintendo Nintendo
|
|||
nlt NLT Technologies, Ltd.
|
||||
nokia Nokia
|
||||
nordic Nordic Semiconductor
|
||||
norik Norik Systems
|
||||
noritake Noritake Co., Inc. Electronics Division
|
||||
novtech NovTech, Inc.
|
||||
nuclei Nuclei System Technology
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue