-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Boards: Add Adafruit RP2040 Adalogger #94295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pyhys
wants to merge
1
commit into
zephyrproject-rtos:main
Choose a base branch
from
pyhys:adalogger_board
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2022 Peter Johanson | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ADAFRUIT_FEATHER_ADALOGGER_RP2040 | ||
select RP2_FLASH_W25Q080 |
5 changes: 5 additions & 0 deletions
5
boards/adafruit/feather_adalogger_rp2040/Kconfig.adafruit_feather_adalogger_rp2040
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 Jonas Berg | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_ADAFRUIT_FEATHER_ADALOGGER_RP2040 | ||
select SOC_RP2040 |
16 changes: 16 additions & 0 deletions
16
boards/adafruit/feather_adalogger_rp2040/Kconfig.defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2022 Peter Johanson | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_ADAFRUIT_FEATHER_ADALOGGER_RP2040 | ||
|
||
if I2C_DW | ||
|
||
config I2C_DW_CLOCK_SPEED | ||
default 125 | ||
|
||
endif # I2C_DW | ||
|
||
config USB_SELF_POWERED | ||
default n | ||
|
||
endif # BOARD_ADAFRUIT_FEATHER_ADALOGGER_RP2040 |
69 changes: 69 additions & 0 deletions
69
boards/adafruit/feather_adalogger_rp2040/adafruit_feather_adalogger_rp2040-pinctrl.dtsi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#include <dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h> | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <UART0_TX_P0>; | ||
}; | ||
|
||
group2 { | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
pinmux = <UART0_RX_P1>; | ||
input-enable; | ||
}; | ||
}; | ||
|
||
i2c1_default: i2c1_default { | ||
group1 { | ||
pinmux = <I2C1_SDA_P2>; | ||
input-enable; | ||
}; | ||
|
||
group2 { | ||
pinmux = <I2C1_SCL_P3>; | ||
input-enable; | ||
}; | ||
}; | ||
|
||
spi0_default: spi0_default { | ||
group1 { | ||
pinmux = <SPI0_TX_P19>; | ||
}; | ||
|
||
group2 { | ||
pinmux = <SPI0_RX_P20>; | ||
input-enable; | ||
}; | ||
|
||
group3 { | ||
pinmux = <SPI0_SCK_P18>; | ||
}; | ||
}; | ||
|
||
spi1_default: spi1_default { | ||
group1 { | ||
pinmux = <SPI1_TX_P15>; | ||
}; | ||
|
||
group2 { | ||
pinmux = <SPI1_RX_P8>; | ||
input-enable; | ||
}; | ||
|
||
group3 { | ||
pinmux = <SPI1_SCK_P14>; | ||
}; | ||
}; | ||
|
||
adc_default: adc_default { | ||
group1 { | ||
pinmux = <ADC_CH0_P26>, <ADC_CH1_P27>, <ADC_CH2_P28>, <ADC_CH3_P29>; | ||
input-enable; | ||
}; | ||
}; | ||
|
||
ws2812_pio0_default: ws2812_pio0_default { | ||
ws2812 { | ||
pinmux = <PIO0_P17>; | ||
}; | ||
}; | ||
}; |
230 changes: 230 additions & 0 deletions
230
boards/adafruit/feather_adalogger_rp2040/adafruit_feather_adalogger_rp2040.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
/* | ||
* Copyright (c) 2021 Yonatan Schachter | ||
* Copyright (c) 2022 Peter Johanson | ||
* Copyright (c) 2025 Jonas Berg | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <raspberrypi/rpi_pico/rp2040.dtsi> | ||
#include <dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h> | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
#include <zephyr/dt-bindings/led/led.h> | ||
#include "adafruit_feather_adalogger_rp2040-pinctrl.dtsi" | ||
#include "feather_connector.dtsi" | ||
|
||
/ { | ||
model = "Adafruit Feather RP2040 Adalogger"; | ||
compatible = "adafruit,feather_adalogger_rp2040"; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
zephyr,flash-controller = &ssi; | ||
zephyr,console = &uart0; | ||
zephyr,shell-uart = &uart0; | ||
zephyr,code-partition = &code_partition; | ||
}; | ||
|
||
aliases { | ||
watchdog0 = &wdt0; | ||
led-strip = &ws2812; | ||
led0 = &red_led; | ||
sdhc0 = &sdhc0; | ||
sw0 = &user_button; | ||
}; | ||
|
||
zephyr,user { | ||
io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>; | ||
}; | ||
|
||
gpio_keys { | ||
compatible = "gpio-keys"; | ||
|
||
user_button: button { | ||
label = "User"; | ||
gpios = <&gpio0 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; | ||
zephyr,code = <INPUT_KEY_0>; | ||
}; | ||
}; | ||
|
||
leds: leds { | ||
compatible = "gpio-leds"; | ||
|
||
red_led: red_led { | ||
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; | ||
label = "Red LED"; | ||
}; | ||
}; | ||
|
||
stemma_connector: stemma_connector { | ||
compatible = "stemma-qt-connector"; | ||
#gpio-cells = <2>; | ||
gpio-map-mask = <0xffffffff 0xffffffc0>; | ||
gpio-map-pass-thru = <0 0x3f>; | ||
gpio-map = <0 0 &gpio0 3 0>, /* SCL */ | ||
<1 0 &gpio0 2 0>; /* SDA */ | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
reg = <0x10000000 DT_SIZE_M(8)>; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
/* Reserved memory for the second stage bootloader */ | ||
second_stage_bootloader: partition@0 { | ||
label = "second_stage_bootloader"; | ||
reg = <0x00000000 0x100>; | ||
read-only; | ||
}; | ||
|
||
/* | ||
* Usable flash. Starts at 0x100, after the bootloader. The partition | ||
* size is 8 MB minus the 0x100 bytes taken by the bootloader. | ||
*/ | ||
code_partition: partition@100 { | ||
label = "code-partition"; | ||
reg = <0x100 (DT_SIZE_M(8) - 0x100)>; | ||
read-only; | ||
}; | ||
}; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&uart0 { | ||
current-speed = <115200>; | ||
status = "okay"; | ||
pinctrl-0 = <&uart0_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
zephyr_i2c: &i2c1 { | ||
status = "okay"; | ||
pinctrl-0 = <&i2c1_default>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <I2C_BITRATE_FAST>; | ||
}; | ||
|
||
&spi0 { | ||
pinctrl-0 = <&spi0_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
cs-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>; | ||
|
||
sdhc0: sdhc@0 { | ||
compatible = "zephyr,sdhc-spi-slot"; | ||
reg = <0>; | ||
status = "okay"; | ||
spi-max-frequency = <12000000>; | ||
|
||
mmc { | ||
compatible = "zephyr,sdmmc-disk"; | ||
disk-name = "SD"; | ||
status = "okay"; | ||
}; | ||
}; | ||
}; | ||
|
||
&spi1 { | ||
pinctrl-0 = <&spi1_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
}; | ||
|
||
&timer { | ||
status = "okay"; | ||
}; | ||
|
||
&wdt0 { | ||
status = "okay"; | ||
}; | ||
|
||
&adc { | ||
status = "okay"; | ||
pinctrl-0 = <&adc_default>; | ||
pinctrl-names = "default"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
|
||
channel@1 { | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
|
||
channel@2 { | ||
reg = <2>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
|
||
channel@3 { | ||
reg = <3>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
}; | ||
|
||
&pio0 { | ||
status = "okay"; | ||
|
||
pio-ws2812 { | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
compatible = "worldsemi,ws2812-rpi_pico-pio"; | ||
status = "okay"; | ||
pinctrl-0 = <&ws2812_pio0_default>; | ||
pinctrl-names = "default"; | ||
bit-waveform = <3>, <3>, <4>; | ||
|
||
/* RGB LED (Neopixel) */ | ||
ws2812: ws2812 { | ||
status = "okay"; | ||
gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; | ||
chain-length = <1>; | ||
color-mapping = <LED_COLOR_ID_GREEN | ||
LED_COLOR_ID_RED | ||
LED_COLOR_ID_BLUE>; | ||
Comment on lines
+206
to
+208
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please align start of symbol. |
||
reset-delay = <280>; | ||
frequency = <800000>; | ||
}; | ||
}; | ||
}; | ||
|
||
zephyr_udc0: &usbd { | ||
status = "okay"; | ||
}; | ||
|
||
&die_temp { | ||
status = "okay"; | ||
}; | ||
|
||
&vreg { | ||
regulator-always-on; | ||
regulator-allowed-modes = <REGULATOR_RPI_PICO_MODE_NORMAL>; | ||
}; | ||
|
||
&xosc { | ||
startup-delay-multiplier = <64>; | ||
}; |
22 changes: 22 additions & 0 deletions
22
boards/adafruit/feather_adalogger_rp2040/adafruit_feather_adalogger_rp2040.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
identifier: adafruit_feather_adalogger_rp2040 | ||
name: Adafruit Feather RP2040 Adalogger | ||
type: mcu | ||
arch: arm | ||
flash: 8192 | ||
ram: 264 | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
supported: | ||
- adc | ||
- clock | ||
- counter | ||
- dma | ||
- flash | ||
- gpio | ||
- hwinfo | ||
- i2c | ||
- pwm | ||
- spi | ||
- uart | ||
- watchdog |
12 changes: 12 additions & 0 deletions
12
boards/adafruit/feather_adalogger_rp2040/adafruit_feather_adalogger_rp2040_defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add copyrights notice. |
||
CONFIG_BUILD_OUTPUT_UF2=y | ||
CONFIG_CLOCK_CONTROL=y | ||
CONFIG_GPIO=y | ||
CONFIG_PIO_RPI_PICO=y | ||
CONFIG_RESET=y | ||
CONFIG_USE_DT_CODE_PARTITION=y | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=y | ||
CONFIG_CONSOLE=y | ||
CONFIG_UART_CONSOLE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2023 TOKITA Hiroshi | ||
|
||
board_runner_args(uf2 "--board-id=RPI-RP2") | ||
|
||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: adafruit_feather_adalogger_rp2040 | ||
full_name: Feather RP2040 Adalogger | ||
vendor: adafruit | ||
socs: | ||
- name: rp2040 |
Binary file added
BIN
+31 KB
boards/adafruit/feather_adalogger_rp2040/doc/img/adafruit_feather_adalogger_rp2040.webp
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add SPDX-Identifier and copyrights notice.