Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boards/common/sp_artemis.board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
board_set_flasher_ifnset(sp_artemis)
board_finalize_runner_args(sp_artemis)
134 changes: 134 additions & 0 deletions boards/sparkfun/artemis_nano.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
* Copyright (c) 2023 Ambiq Micro Inc. <www.ambiq.com>
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/ambiq-apollo3-pinctrl.h>
#include "apollo3_evb_connector.dtsi"

&pinctrl {

Check warning on line 10 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:10 please, no spaces at the start of a line
uart0_default: uart0_default {
group1 {

Check failure on line 12 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

boards/sparkfun/artemis_nano.dtsi:12 code indent should use tabs where possible

Check warning on line 12 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:12 please, no spaces at the start of a line
pinmux = <UART0TX_P22>;

Check failure on line 13 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

boards/sparkfun/artemis_nano.dtsi:13 code indent should use tabs where possible

Check warning on line 13 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:13 please, no spaces at the start of a line
};

Check failure on line 14 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

boards/sparkfun/artemis_nano.dtsi:14 code indent should use tabs where possible

Check warning on line 14 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:14 please, no spaces at the start of a line
group2 {

Check failure on line 15 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

boards/sparkfun/artemis_nano.dtsi:15 code indent should use tabs where possible

Check warning on line 15 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:15 please, no spaces at the start of a line
pinmux = <UART0RX_P23>;

Check failure on line 16 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

boards/sparkfun/artemis_nano.dtsi:16 code indent should use tabs where possible

Check warning on line 16 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:16 please, no spaces at the start of a line
input-enable;

Check failure on line 17 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

CODE_INDENT

boards/sparkfun/artemis_nano.dtsi:17 code indent should use tabs where possible

Check warning on line 17 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:17 please, no spaces at the start of a line
};

Check warning on line 18 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:18 please, no spaces at the start of a line
};

Check warning on line 19 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:19 please, no spaces at the start of a line
i2c0_default: i2c0_default {
group1 {

Check warning on line 21 in boards/sparkfun/artemis_nano.dtsi

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

boards/sparkfun/artemis_nano.dtsi:21 please, no spaces at the start of a line
pinmux = <M0SCL_P5>, <M0SDAWIR3_P6>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c1_default: i2c1_default {
group1 {
pinmux = <M1SCL_P8>, <M1SDAWIR3_P9>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c2_default: i2c2_default {
group1 {
pinmux = <M2SCL_P27>, <M2SDAWIR3_P25>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c3_default: i2c3_default {
group1 {
pinmux = <M3SCL_P42>, <M3SDAWIR3_P43>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c4_default: i2c4_default {
group1 {
pinmux = <M4SCL_P39>, <M4SDAWIR3_P40>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c5_default: i2c5_default {
group1 {
pinmux = <M5SCL_P48>, <M5SDAWIR3_P49>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};

spi0_default: spi0_default {
group1 {
pinmux = <M0SCK_P5>, <M0MISO_P6>, <M0MOSI_P7>;
};
};
spi1_default: spi1_default {
group1 {
pinmux = <M1SCK_P8>, <M1MISO_P9>, <M1MOSI_P10>;
};
};
spi2_default: spi2_default {
group1 {
pinmux = <M2SCK_P27>, <M2MISO_P25>, <M2MOSI_P28>;
};
};
spi3_default: spi3_default {
group1 {
pinmux = <M3SCK_P42>, <M3MISO_P43>, <M3MOSI_P38>;
};
};
spi4_default: spi4_default {
group1 {
pinmux = <M4SCK_P39>, <M4MISO_P40>, <M4MOSI_P44>;
};
};
spi5_default: spi5_default {
group1 {
pinmux = <M5SCK_P48>, <M5MISO_P49>, <M5MOSI_P47>;
};
};

adc0_default: adc0_default{
group1 {
pinmux = <ADCSE4_P32>, <ADCSE7_P35>;
drive-strength = "0.1";
};
};

mspi0_default: mspi0_default{
group1 {
pinmux = <MSPI0_0_P22>,
<MSPI0_1_P26>,
<MSPI0_2_P4>,
<MSPI0_3_P23>,
<MSPI0_8_P24>;
};
group2 {
pinmux = <NCE19_P19>;
drive-push-pull;
drive-strength = "0.5";
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <6>;
};
};

bleif_default: bleif_default{
group1 {
pinmux = <BLEIF_SCK_P30>,
<BLEIF_MISO_P31>,
<BLEIF_MOSI_P32>,
<BLEIF_CSN_P33>,
<BLEIF_STATUS_P35>,
<BLEIF_IRQ_P41>;
};
};
};
13 changes: 13 additions & 0 deletions boards/sparkfun/artemis_nano/Kconfig.artemis_nano
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 Ali Sarlak


if BOARD_ARTEMIS_NANO

config BOARD_ARTEMIS_NANO
select SOC_APOLLO3_BLUE

config SYS_CLOCK_HW_CYCLES_PER_SEC
default 32768 if AMBIQ_STIMER_TIMER

endif # BOARD_ARTEMIS_NANO
11 changes: 11 additions & 0 deletions boards/sparkfun/artemis_nano/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Sparkfun artemis_nano board configuration

# Copyright (c) 2024 Ali Sarlak
# SPDX-License-Identifier: Apache-2.0

if BOARD_ARTEMIS_NANO

config FLASH_BASE_ADDRESS
default 0x10000

endif
135 changes: 135 additions & 0 deletions boards/sparkfun/artemis_nano/artemis_nano-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/*
* Copyright (c) 2024 Ali Sarlak
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <dt-bindings/pinctrl/ambiq-apollo3-pinctrl.h>
#include "artemis_nano_connector.dtsi"

&pinctrl {
uart1_default: uart1_default {
group1 {
pinmux = <UART1TX_P42>;
};
group2 {
pinmux = <UART1RX_P43>;
input-enable;
};
};
itm_default: itm_default {
group1 {
pinmux = <SWO_P41>;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <M0SCL_P5>, <M0SDAWIR3_P6>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c1_default: i2c1_default {
group1 {
pinmux = <M1SCL_P8>, <M1SDAWIR3_P9>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c2_default: i2c2_default {
group1 {
pinmux = <M2SCL_P27>, <M2SDAWIR3_P25>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c3_default: i2c3_default {
group1 {
pinmux = <M3SCL_P42>, <M3SDAWIR3_P43>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c4_default: i2c4_default {
group1 {
pinmux = <M4SCL_P39>, <M4SDAWIR3_P40>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
i2c5_default: i2c5_default {
group1 {
pinmux = <M5SCL_P48>, <M5SDAWIR3_P49>;
drive-open-drain;
drive-strength = "0.5";
bias-pull-up;
};
};
spid0_default: spid0_default {
group1 {
pinmux = <SLSCK_P0>, <SLMISO_P2>, <SLMOSI_P1>, <SLNCE_P3>;
};
};
spi0_default: spi0_default {
group1 {
pinmux = <M0SCK_P5>, <M0MISO_P6>, <M0MOSI_P7>;
};
};
spi1_default: spi1_default {
group1 {
pinmux = <M1SCK_P8>, <M1MISO_P9>, <M1MOSI_P10>;
};
};

spi3_default: spi3_default {
group1 {
pinmux = <M3SCK_P42>, <M3MISO_P43>, <M3MOSI_P38>;
};
};

spi5_default: spi5_default {
group1 {
pinmux = <M5SCK_P48>, <M5MISO_P49>, <M5MOSI_P47>;
};
};

adc0_default: adc0_default{
group1 {
pinmux = <ADCSE4_P32>, <ADCSE7_P35>;
drive-strength = "0.1";
};
};

mspi0_default: mspi0_default{
group1 {
pinmux = <MSPI0_0_P22>,
<MSPI0_1_P26>,
<MSPI0_2_P4>,
<MSPI0_3_P23>,
<MSPI0_8_P24>;
};
group2 {
pinmux = <NCE19_P19>;
drive-push-pull;
drive-strength = "0.5";
ambiq,iom-nce-module = <0>;
ambiq,iom-num = <6>;
};
};

bleif_default: bleif_default{
group1 {
pinmux = <BLEIF_SCK_P30>,
<BLEIF_MISO_P31>,
<BLEIF_MOSI_P32>,
<BLEIF_CSN_P33>,
<BLEIF_STATUS_P35>,
<BLEIF_IRQ_P41>;
};
};
};
75 changes: 75 additions & 0 deletions boards/sparkfun/artemis_nano/artemis_nano.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2024 Ali Sarlak
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <ambiq/ambiq_apollo3_blue.dtsi>

#include "artemis_nano-pinctrl.dtsi"

/ {
model = "Sparkfun Artemis Nano";
compatible = "ambiq,artemis_nano";

chosen {
zephyr,itcm = &tcm;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,uart-pipe = &uart1;
zephyr,flash-controller = &flash;
};

aliases {
watchdog0 = &wdt0;
led0 = &led0;
};

leds{
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0_31 19 GPIO_ACTIVE_HIGH>;
label = "USER LED";
};
};
};

&flash0 {
erase-block-size = <8192>;
write-block-size = <4>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

/* Set 16KB of storage at the end of the 976KB of flash */
storage_partition: partition@f0000 {
label = "storage";
reg = <0x000f0000 0x4000>;
};
};
};

&uart1 {
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
status = "okay";
};

&stimer0 {
clk-source = <3>;
};

&gpio0_31 {
status = "okay";
};

&i2c2 {
status = "disabled";
};
17 changes: 17 additions & 0 deletions boards/sparkfun/artemis_nano/artemis_nano.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Artemis Nano Board Definition
identifier: artemis_nano
name: Artemis Nano
type: mcu
arch: arm
ram: 384
flash: 976
toolchain:
- zephyr
- gnuarmemb
supported:
- uart
- gpio
testing:
ignore_tags:
- net
vendor: sparkfun
Loading
Loading