blob: abaed0e4c68ec50bdcec1ecd6b0c8251cdb39dd0 [file] [log] [blame]
/*
* 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 "beetle_rp2040-pinctrl.dtsi"
/ {
model = "DFRobot Beetle RP2040";
compatible = "dfrobot,beetle_rp2040";
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,flash-controller = &ssi;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,code-partition = &code_partition;
};
aliases {
watchdog0 = &wdt0;
led0 = &green_led;
};
zephyr,user {
io-channels = <&adc 2>, <&adc 3>;
};
leds: leds {
compatible = "gpio-leds";
green_led: green_led {
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
label = "Green LED";
};
};
};
&flash0 {
reg = <0x10000000 DT_SIZE_M(2)>;
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 2 MB minus the 0x100 bytes taken by the bootloader.
*/
code_partition: partition@100 {
label = "code-partition";
reg = <0x100 (DT_SIZE_M(2) - 0x100)>;
read-only;
};
};
};
&gpio0 {
status = "okay";
};
&uart1 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};
&timer {
status = "okay";
};
&wdt0 {
status = "okay";
};
&adc {
status = "okay";
pinctrl-0 = <&adc_default>;
pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
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>;
};
};
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>;
};